Bug 13359 - NPE when creating new plugin project
Summary: NPE when creating new plugin project
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Linux-Motif
: P1 critical (vote)
Target Milestone: 2.0 M6   Edit
Assignee: Dejan Glozic CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-10 11:41 EDT by Grant Gayed CLA
Modified: 2002-04-17 23:23 EDT (History)
0 users

See Also:


Attachments
NPE trace (4.00 KB, text/plain)
2002-04-10 11:42 EDT, Grant Gayed CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Grant Gayed CLA 2002-04-10 11:41:46 EDT
Integration build 0409.  Not sure if it happens on windows as well.  Steps:

- File -> New -> Project
- Plugin-in Development -> Plugin-in Project, Next
- enter a Project name like 'Abc', Next
- Next, to skip this page
- select 'Create new plugin using code gen wizard' radio
- select 'plug-in with multi-page editor' from list, Next
- Finish, get the attached exception
Comment 1 Grant Gayed CLA 2002-04-10 11:42:45 EDT
Created attachment 567 [details]
NPE trace
Comment 2 Grant Gayed CLA 2002-04-10 11:50:34 EDT
*sigh*.  My IE isn't able to display my attachment.  I'm not sure if others 
will have the same problem, so I'll paste it below just in case:

<?xml version="1.0" encoding="UTF-8"?>
<log>
<log-entry date="Wed Apr 10 11:28:53 EDT 2002">
  <status
     plugin-id="org.eclipse.pde.ui"
     severity="ERROR"
     message="java.lang.NullPointerException"
     code="0">
    <exception
       message="null"
       trace="
java.lang.NullPointerException
	at org.eclipse.pde.internal.core.plugin.PluginElement.removeAttribute
(PluginElement.java:131)
	at org.eclipse.pde.internal.core.plugin.PluginElement.setAttribute
(PluginElement.java:158)
	at 
org.eclipse.pde.internal.ui.wizards.templates.NewWizardTemplate.createCategory
(NewWizardTemplate.java:127)
	at 
org.eclipse.pde.internal.ui.wizards.templates.NewWizardTemplate.updateModel
(NewWizardTemplate.java:96)
	at 
org.eclipse.pde.internal.ui.wizards.templates.AbstractTemplateSection.execute
(AbstractTemplateSection.java:347)
	at 
org.eclipse.pde.internal.ui.wizards.templates.AbstractNewPluginTemplateWizard.ex
ecuteTemplates(AbstractNewPluginTemplateWizard.java:181)
	at 
org.eclipse.pde.internal.ui.wizards.templates.AbstractNewPluginTemplateWizard.do
Finish(AbstractNewPluginTemplateWizard.java:131)
	at 
org.eclipse.pde.internal.ui.wizards.templates.AbstractNewPluginTemplateWizard$1.
execute(AbstractNewPluginTemplateWizard.java:86)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run
(WorkspaceModifyOperation.java:64)
	at org.eclipse.core.internal.resources.Workspace.run
(Workspace.java:1343)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run
(WorkspaceModifyOperation.java:78)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread
(ModalContext.java:296)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:249)
	at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:713)
	at 
org.eclipse.pde.internal.ui.wizards.templates.AbstractNewPluginTemplateWizard.pe
rformFinish(AbstractNewPluginTemplateWizard.java:95)
	at org.eclipse.jface.wizard.WizardDialog.finishPressed
(WizardDialog.java:570)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed
(WizardDialog.java:311)
	at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:356)
	at org.eclipse.swt.widgets.TypedListener.handleEvent
(TypedListener.java:85)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java
(Compiled Code))
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:488)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java
(Compiled Code))
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java
(Compiled Code))
	at org.eclipse.jface.window.Window.runEventLoop(Window.java(Compiled 
Code))
	at org.eclipse.jface.window.Window.open(Window.java:525)
	at org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction.java:96)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:590)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection
(ActionContributionItem.java:407)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent
(ActionContributionItem.java:361)
	at org.eclipse.jface.action.ActionContributionItem.access$0
(ActionContributionItem.java:352)
	at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent
(ActionContributionItem.java:47)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java
(Compiled Code))
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:488)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java
(Compiled Code))
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java
(Compiled Code))
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java
(Compiled Code))
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:819)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:777)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:319)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:190)
	at org.eclipse.core.launcher.Main.run(Main.java:549)
	at org.eclipse.core.launcher.Main.main(Main.java:390)
">
    </exception>
  </status>
</log-entry>

Comment 3 Dejan Glozic CLA 2002-04-16 18:02:34 EDT
A must fix
Comment 4 Dejan Glozic CLA 2002-04-17 23:23:55 EDT
Some fields in the template pages were initialized late (when page was made 
visible). However, since wizard can be finished at any time (without ever 
showing some pages), these fields were never initialized. Added a call to 
initialize all option fields before executing the template to cover this 
situation.