Permalink
Browse files

[361553] [formatting] Formatting a JSP file, containing Java snippets…

…, leads to misformatted or even lost code
  • Loading branch information...
1 parent 68ff583 commit b8df81dcc44e8a30ce7f18739ac364a5410d710c nitind committed Apr 25, 2012
@@ -377,11 +377,11 @@ private static JavaEditor getEditor(IFile file) {
try {
IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
IWorkbenchPage page = workbenchWindow.getActivePage();
- IEditorPart editorPart = IDE.openEditor(page, file, true, true);
+ IEditorPart editorPart = IDE.openEditor(page, file, "org.eclipse.wst.jsdt.ui.CompilationUnitEditor", true);
if(editorPart instanceof JavaEditor) {
editor = (JavaEditor)editorPart;
} else {
- fail("Unable to open structured text editor: " + editorPart.getClass().getName());
+ fail("Unable to open intended editor: " + editorPart.getClass().getName());
}
if(editor != null) {

0 comments on commit b8df81d

Please sign in to comment.