Bug 19075 Rename Java file to non Java file causes most actions to crash
F2 - open Java file in editor - rename it so that it has the extension .txt Almost all Java relevant actions in Edit, Source, Refactor, Naviagte and context menu are still enabled. Executing them almost always leads to some sort of exceptions.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
dialog.create();
		
		IEditorInput input = getEditorInput();
		
		IFile original= (input instanceof IFileEditorInput) ? ((IFileEditorInput) input).getFile() : null;
		if (original != null)
			dialog.setOriginalFile(original);
			
		IDocumentProvider provider= getDocumentProvider();
		if (provider.isDeleted(input) && original != null) {
			String message= JavaEditorMessages.getFormattedString("CompilationUnitEditor.warning.save.delete", new Object[] { original.getName() });
			dialog.setMessage(message, IMessageProvider.WARNING);
		}
			
		if (dialog.open() == Dialog.CANCEL) {
			if (progressMonitor != null)
				progressMonitor.setCanceled(true);
			return;
		}
			
		IPath filePath= dialog.getResult();
		if (filePath == null) {
			if (progressMonitor != null)
				progressMonitor.setCanceled(true);
			return;
		}
			
		IWorkspace workspace= ResourcesPlugin.getWorkspace();
		IFile file= workspace.getRoot().getFile(filePath);
		final IEditorInput newInput= new FileEditorInput(file);