Community
Participate
Working Groups
I went to my external tool builder properties for a project which has two ext tool builders (an ant script and a program). The icons displayed as regular builders rather than Ant and Program (this was after re-starting the workspace). When I attempted to edit a builder I got this error: !ENTRY org.eclipse.ui 4 0 Dec 06, 2002 10:16:15.787 !MESSAGE java.lang.NullPointerException !STACK 0 java.lang.NullPointerException at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupVi ewer.displayTabs(LaunchConfigurationTabGroupViewer.java:440) at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupVi ewer.inputChanged(LaunchConfigurationTabGroupViewer.java:422) at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupVi ewer.setInput(LaunchConfigurationTabGroupViewer.java:402) at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationProperties Dialog.initializeContent(LaunchConfigurationPropertiesDialog.java:74) at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.cr eateContents(LaunchConfigurationsDialog.java:347) at org.eclipse.jface.window.Window.create(Window.java:281) at org.eclipse.jface.window.Window.open(Window.java:530) at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.op en(LaunchConfigurationsDialog.java:497) at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationProperties Dialog.open(LaunchConfigurationPropertiesDialog.java:240) at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationPropertiesDialog (DebugUITools.java:337) at org.eclipse.ui.externaltools.internal.ui.BuilderPropertyPage.handleEditButtonPre ssed(BuilderPropertyPage.java:521) at org.eclipse.ui.externaltools.internal.ui.BuilderPropertyPage.handleButtonPressed (BuilderPropertyPage.java:329) at org.eclipse.ui.externaltools.internal.ui.BuilderPropertyPage.access$0 (BuilderPropertyPage.java:323) at org.eclipse.ui.externaltools.internal.ui.BuilderPropertyPage$1.widgetSelected (BuilderPropertyPage.java:93) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:87) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:825) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1692) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1410) at org.eclipse.jface.window.Window.runEventLoop(Window.java:561) at org.eclipse.jface.window.Window.open(Window.java:541) at org.eclipse.ui.dialogs.PropertyDialogAction.run (PropertyDialogAction.java:158) at org.eclipse.jface.action.Action.runWithEvent(Action.java:769) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:411) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java:365) at org.eclipse.jface.action.ActionContributionItem.access$0 (ActionContributionItem.java:356) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java:48) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:825) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1692) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1410) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1405) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1388) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:841) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539)
Also saw an error dialog saying "Launch configuration does not exist".
Looking at the "handles" and my ".externalToolBuilders" directory - somehow two launch configs have gone missing. Not sure how to reproduce.
This happened again - for a "copied" builder (program type). At some point the launch config went missing.
I also noticed there are entries in the .externalToolBuilders directory for configs/builders which have been removed from the project.
The error occurrs when you try to rename an existing external tool builder.
I think I know what's happening. 1. You open the dialog on a config named "Foo" 2. You change the name of the config to "Bar" and hit "Ok" 3. The config is saved to disk as Bar.launch 4. The file creating causes a build to run 5. The .project file still points to Foo.launch - This causes the build to fail 7. The location of the new config is not saved to the .project file - This causes the builder to be shown with the default icon The .project file not getting updated at all should be easily fixable. The problem with the builder running before the .project file is updated looks like it could be serious trouble, though...
It looks like the second problem (the config never getting correctly updated) is happening because the config isn't getting updated by the debug framework. In BuilderPropertyPage.handleEditButtonPressed(), I get the config and then open the launch dialog to edit the config. After the user pressed Ok to dismiss the dialog, the name of the config is not changed in memory. To see this, put a breakpoint on the last line of handleEditButtonPressed() and evaluate "config.getName()" after renaming the config. The config will return the old name. Is there something I'm missing?
The update problem was that when a config is renamed in the dialog, a new config is created and the config that was passed into the dialog is not updated. It is just obsolete. This can be worked around by adding a launch configuration listener while the dialog is open. If the config is renamed, a configAdded notification is received and a movedFrom delta can be obtained from the launch configuration manager. This allows us to replace the old config (the movedFrom config) in the table with the new config. The build problem (the fact that a build occurs when a config is changed) can be worked around by turning off around operations that cause configs to be edited on disk.
Fixed. By the way, we had the same renaming problem through the New button if you changed the name of the config when you created it. Please verify.
Verified.