Community
Participate
Working Groups
Build ID: I20090414-0800 Steps To Reproduce: Referring from bug 183000. - create new Plug-in project using the "Hello, World" template - go to plugin.xml page and insert a '=' character at the beginning - save - in the Package Explorer, doubleclick MANIFEST.MF => Dialog "The source page has errors. Other pages cannot be used until these errors are corrected.". This is unexpected, since I just wanted to edit another source page. - click OK => Editor changes to Overview page and shows same error dialog again. Should bug me at most once and should not kid me by showing and hiding another page. - click OK => Editor switches back to plugin.xml page - doubleclick build.properties => Error dialog again, followed by NPE below. java.lang.NullPointerException at org.eclipse.ui.forms.editor.FormPage.setActive(FormPage.java:124) at org.eclipse.ui.forms.editor.FormEditor.setActivePage(FormEditor.java:621) at org.eclipse.ui.forms.editor.FormEditor.setActivePage(FormEditor.java:525) at org.eclipse.pde.internal.ui.editor.PDEFormEditor.setActivePage(PDEFormEditor.java:758) at org.eclipse.pde.internal.ui.editor.plugin.ManifestEditor.showEditorInput(ManifestEditor.java:657) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2648) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2592) at org.eclipse.ui.internal.WorkbenchPage.access$12(WorkbenchPage.java:2584) at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2569) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2564) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2548) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2539) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:644) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:603) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:285) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:138) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:194) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:175) More information: Cause of Exception is an unchecked function call public void setActive(boolean active) { if (active) { // We are switching to this page - refresh it // if needed. mform.refresh(); } } mform should be checked for null before calling refresh. The same check is done in other methods of FormPage class
Created attachment 132542 [details] Proposed patch to ffix the bug by adding a null check
The patch is good and has been applied to HEAD.