Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » NPE in org.eclipse.wb.internal.swt.support.AbstractSupport$1 after adding a getter
NPE in org.eclipse.wb.internal.swt.support.AbstractSupport$1 after adding a getter [message #722266] Mon, 05 September 2011 08:10 Go to next message
andiqo  is currently offline andiqo
Messages: 32
Registered: July 2009
Member
I have an issue which is close from the one I had in message #717822. But this time it is one step further because the error occures when I try to remove the component from the WB editor.

Here are the steps to reproduce:

* Create a plug-in project
* Create your own MyComponentTest1 like this:

import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Table;

public class MyComponentTest1 extends Composite {

  private TableViewer tableViewer;

  public MyComponentTest1(Composite parent, int style) {
    super(parent, style);
    setLayout(new GridLayout(1, false));

    tableViewer = new TableViewer(this, SWT.BORDER | SWT.FULL_SELECTION);
    Table table = tableViewer.getTable();
    table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
  }

  // Comment this method and you will be able to delete this component from WB again
  public TableViewer getTableViewer() {
    return tableViewer;
  }
}


* Create another Composite class
* Open it using WindowBuilder
* Add MyComponentTest1 to the palette
* Drag'n'Drop MyComponentTest1 to your newly created Composite
* Delete it

Thanks a lot,
--andiqo


java.lang.NullPointerException
	at org.eclipse.wb.internal.swt.support.AbstractSupport$1.runObject(AbstractSupport.java:49)
	at org.eclipse.wb.internal.swt.support.AbstractSupport$1.runObject(AbstractSupport.java:1)
	at org.eclipse.wb.internal.core.utils.execution.ExecutionUtils.runObject(ExecutionUtils.java:240)
	at org.eclipse.wb.internal.swt.support.AbstractSupport.loadClass(AbstractSupport.java:47)
	at org.eclipse.wb.internal.swt.support.LabelSupport.getLabelClass(LabelSupport.java:67)
	at org.eclipse.wb.internal.swt.model.layout.grid.GridLayoutInfo.addFiller(GridLayoutInfo.java:959)
	at org.eclipse.wb.internal.swt.model.layout.grid.GridLayoutInfo.onControlRemoveAfter(GridLayoutInfo.java:292)
	at org.eclipse.wb.internal.swt.model.layout.LayoutInfo$4.after(LayoutInfo.java:164)
	at sun.reflect.GeneratedMethodAccessor124.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.wb.core.model.broadcast.BroadcastSupport$1.intercept(BroadcastSupport.java:208)
	at org.eclipse.wb.core.model.broadcast.ObjectInfoDelete$$EnhancerByCGLIB$$ba60c845.after(<generated>)
	at org.eclipse.wb.core.model.JavaInfo$6.run(JavaInfo.java:790)
	at org.eclipse.wb.internal.core.utils.execution.ExecutionUtils.run(ExecutionUtils.java:318)
	at org.eclipse.wb.core.model.JavaInfo.delete(JavaInfo.java:775)
	at org.eclipse.wb.core.model.AbstractComponentInfo.delete(AbstractComponentInfo.java:216)
	at org.eclipse.wb.internal.core.editor.actions.DeleteAction$2.executeEdit(DeleteAction.java:123)
	at org.eclipse.wb.core.gef.command.EditCommand$1.run(EditCommand.java:52)
	at org.eclipse.wb.internal.core.utils.execution.ExecutionUtils.run(ExecutionUtils.java:318)
	at org.eclipse.wb.core.gef.command.EditCommand.execute(EditCommand.java:50)
	at org.eclipse.wb.internal.gef.core.CompoundCommand.execute(CompoundCommand.java:89)
	at org.eclipse.wb.core.gef.command.CompoundEditCommand.access$0(CompoundEditCommand.java:1)
	at org.eclipse.wb.core.gef.command.CompoundEditCommand$1.run(CompoundEditCommand.java:47)
	at org.eclipse.wb.internal.core.utils.execution.ExecutionUtils.run(ExecutionUtils.java:318)
	at org.eclipse.wb.core.gef.command.CompoundEditCommand.execute(CompoundEditCommand.java:45)
	at org.eclipse.wb.internal.gef.core.EditDomain.executeCommand(EditDomain.java:59)
	at org.eclipse.wb.internal.core.editor.actions.DeleteAction.run(DeleteAction.java:64)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:119)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:468)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:786)
	at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:885)
	at org.eclipse.ui.internal.keys.OutOfOrderListener.handleEvent(OutOfOrderListener.java:76)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1282)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1267)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1294)
	at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:730)
	at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:3019)
	at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:734)
	at org.eclipse.swt.widgets.Tree.gtk_key_press_event(Tree.java:2002)
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1743)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:5016)
	at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:3530)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4408)
	at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
	at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:8394)
	at org.eclipse.swt.widgets.Display.eventProc(Display.java:1245)
	at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
	at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2258)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3207)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	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:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Re: NPE in org.eclipse.wb.internal.swt.support.AbstractSupport$1 after adding a getter [message #722493 is a reply to message #722266] Tue, 06 September 2011 00:48 Go to previous message
Konstantin Scheglov is currently offline Konstantin Scheglov
Messages: 555
Registered: July 2009
Senior Member
Fixed in trunk.

Konstantin Scheglov,
Google, Inc.
Previous Topic:Component access from event methods (Anonymous class)
Next Topic:wbp-meta folder not in classpath?
Goto Forum:
  


Current Time: Thu Oct 23 17:18:06 GMT 2014

Powered by FUDForum. Page generated in 0.03159 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software