Pop-up window in GEF [message #171194] |
Thu, 10 March 2005 02:55  |
Eclipse User |
|
|
|
Originally posted by: xxxx.xxxx.com
Hi
I'm making a GEF editor and need to create a pop-up window. The editor
contains an UML2 diagram and by pushing a button on the pallette it
creates a *.uml2 file. This part is implemented, but I would like to have
a pop-up window telling if the *.uml2 file is created OK or if there are
any problems. This means I only new pop-up containing some text and a OK
button. I have tried to implement a MessageDialog like this:
...
String []buttons=new String [1];
buttons[0]="ok";
MessageDialog msgD = new MessageDialog(null,
null,
null,
"Hello",
MessageDialog.NONE,
buttons,
0);
msgD.open();
...
The dialog activates and says "Hello" but I get a NullPointerException
when the dialog is closed.
Anyone have any idea why?
And what should I do to avoid it?
The stack trace is as follows:
java.lang.NullPointerException
at
org.eclipse.gef.tools.SelectEditPartTracker.handleButtonUp(S electEditPartTracker.java:110)
at
org.eclipse.gef.internal.ui.palette.editparts.ToolEntryEditP art$OtherToggleButtonTracker.handleButtonUp(ToolEntryEditPar t.java:162)
at org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java :1042)
at org.eclipse.gef.tools.SelectionTool.mouseUp(SelectionTool.ja va:535)
at org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:241)
at
org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouse Released(DomainEventDispatcher.java:344)
at
org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(Li ghtweightSystem.java:516)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:136)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2772)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2431)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1377)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:254)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:96)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:335)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
at org.eclipse.core.launcher.Main.run(Main.java:704)
at org.eclipse.core.launcher.Main.main(Main.java:688)
|
|
|
|
|
|
Re: Pop-up window in GEF [message #171614 is a reply to message #171373] |
Mon, 14 March 2005 07:14  |
Eclipse User |
|
|
|
Originally posted by: xxxx.xxx.com
I am not using the 3.1 builds, but will try it.
I have not implemented any drag tracker code for button up.
Or at least not that I am aware of. The tool creating the pop-up window is
a subclass of AbstractTool. AbstractTool already have a handleButtonUp()
method implemented. (I that is what you mean)...
Randy Hudson wrote:
> Are you using the most recent 3.1 builds? If not, please try them.
> I'm looking for your drag trackers code for button up.
> "Andreas Limyr" <xxxx@xxx.com> wrote in message
> news:d0ro61$5sh$1@www.eclipse.org...
>> Hi Randy
>>
>> I am sorry but what code do you want me to post?
>>
>>
>> Randy Hudson wrote:
>>
|
|
|
Powered by
FUDForum. Page generated in 0.28712 seconds