Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » APPLICATION_MODAL and parentShell
APPLICATION_MODAL and parentShell [message #110180] Thu, 27 October 2005 13:22 Go to next message
Eclipse UserFriend
Originally posted by: lists.pakra.net

Hi,
i try to make application modal shell, but my code(s.bellow) get error in
VE : Error trying to set new file into editor. Reason:
java.lang.NullPointerException

How can i make this ?
Thanks!

/**
* This method initializes sShell
*/
void createSShell(Shell parentShell) {
if(parentShell == null) parentShell = new Shell();
sProfileEditDlg = new Shell(parentShell, SWT.APPLICATION_MODAL
SWT.DIALOG_TRIM);
......
}
Re: APPLICATION_MODAL and parentShell [message #110234 is a reply to message #110180] Thu, 27 October 2005 14:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

What is the stack trace of the NPE?

Filipp Akinfiev wrote:
> Hi,
> i try to make application modal shell, but my code(s.bellow) get error in
> VE : Error trying to set new file into editor. Reason:
> java.lang.NullPointerException
>
> How can i make this ?
> Thanks!
>
> /**
> * This method initializes sShell
> */
> void createSShell(Shell parentShell) {
> if(parentShell == null) parentShell = new Shell();
> sProfileEditDlg = new Shell(parentShell, SWT.APPLICATION_MODAL
> SWT.DIALOG_TRIM);
> ......
> }

--
Thanks,
Rich Kulp
Re: APPLICATION_MODAL and parentShell [message #110244 is a reply to message #110180] Thu, 27 October 2005 17:46 Go to previous messageGo to next message
Jeff Myers is currently offline Jeff MyersFriend
Messages: 489
Registered: July 2009
Senior Member
Is your code
> sProfileEditDlg = new Shell(parentShell, SWT.APPLICATION_MODAL
> SWT.DIALOG_TRIM);

Because you need an | between the two style bits.
sProfileEditDlg = new Shell(parentShell, SWT.APPLICATION_MODAL |
SWT.DIALOG_TRIM);

- Jeff

Filipp Akinfiev wrote:
> Hi,
> i try to make application modal shell, but my code(s.bellow) get error in
> VE : Error trying to set new file into editor. Reason:
> java.lang.NullPointerException
>
> How can i make this ?
> Thanks!
>
> /**
> * This method initializes sShell
> */
> void createSShell(Shell parentShell) {
> if(parentShell == null) parentShell = new Shell();
> sProfileEditDlg = new Shell(parentShell, SWT.APPLICATION_MODAL
> SWT.DIALOG_TRIM);
> ......
> }
Re: APPLICATION_MODAL and parentShell [message #110258 is a reply to message #110234] Thu, 27 October 2005 18:16 Go to previous message
Eclipse UserFriend
Originally posted by: lists.pakra.net

!ENTRY org.eclipse.ve.java.core 4 0 2005-10-27 20:14:05.528
!MESSAGE Exception thrown.
!STACK 0
java.lang.NullPointerException
at
org.eclipse.ve.internal.swt.CompositeGraphicalEditPart.setup Control(CompositeGraphicalEditPart.java:96)
at
org.eclipse.ve.internal.swt.CompositeGraphicalEditPart.creat eChild(CompositeGraphicalEditPart.java:84)
at
org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(A bstractEditPart.java:733)
at
org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractE ditPart.java:684)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh( AbstractGraphicalEditPart.java:554)
at
org.eclipse.gef.editparts.AbstractEditPart.addNotify(Abstrac tEditPart.java:232)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.addNotif y(AbstractGraphicalEditPart.java:212)
at
org.eclipse.gef.editparts.AbstractEditPart.addChild(Abstract EditPart.java:195)
at
org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(A bstractEditPart.java:734)
at
org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractE ditPart.java:684)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh( AbstractGraphicalEditPart.java:554)
at
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart.setRootModel(JavaVisualEditorPart.java:506)
at
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart.initializeViewers(JavaVisualEditorPart.java:987)
at
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart$12.run(JavaVisualEditorPart.java:1977)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2886)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2608)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1755)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1719)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:368)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:106)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:377)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:164)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)

!ENTRY org.eclipse.ui 4 4 2005-10-27 20:14:05.529
!MESSAGE Unhandled event loop exception

!ENTRY org.eclipse.ui 4 0 2005-10-27 20:14:05.529
!MESSAGE Failed to execute runnable (java.lang.NullPointerException)
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable
(java.lang.NullPointerException)
at org.eclipse.swt.SWT.error(SWT.java:3251)
at org.eclipse.swt.SWT.error(SWT.java:3174)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:126)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2886)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2608)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1755)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1719)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:368)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:106)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:377)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:164)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Caused by: java.lang.NullPointerException
at
org.eclipse.ve.internal.swt.CompositeGraphicalEditPart.setup Control(CompositeGraphicalEditPart.java:96)
at
org.eclipse.ve.internal.swt.CompositeGraphicalEditPart.creat eChild(CompositeGraphicalEditPart.java:84)
at
org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(A bstractEditPart.java:733)
at
org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractE ditPart.java:684)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh( AbstractGraphicalEditPart.java:554)
at
org.eclipse.gef.editparts.AbstractEditPart.addNotify(Abstrac tEditPart.java:232)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.addNotif y(AbstractGraphicalEditPart.java:212)
at
org.eclipse.gef.editparts.AbstractEditPart.addChild(Abstract EditPart.java:195)
at
org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(A bstractEditPart.java:734)
at
org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractE ditPart.java:684)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh( AbstractGraphicalEditPart.java:554)
at
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart.setRootModel(JavaVisualEditorPart.java:506)
at
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart.initializeViewers(JavaVisualEditorPart.java:987)
at
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart$12.run(JavaVisualEditorPart.java:1977)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
... 18 more
Re: APPLICATION_MODAL and parentShell [message #611269 is a reply to message #110180] Thu, 27 October 2005 14:36 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

What is the stack trace of the NPE?

Filipp Akinfiev wrote:
> Hi,
> i try to make application modal shell, but my code(s.bellow) get error in
> VE : Error trying to set new file into editor. Reason:
> java.lang.NullPointerException
>
> How can i make this ?
> Thanks!
>
> /**
> * This method initializes sShell
> */
> void createSShell(Shell parentShell) {
> if(parentShell == null) parentShell = new Shell();
> sProfileEditDlg = new Shell(parentShell, SWT.APPLICATION_MODAL
> SWT.DIALOG_TRIM);
> ......
> }

--
Thanks,
Rich Kulp
Re: APPLICATION_MODAL and parentShell [message #611270 is a reply to message #110180] Thu, 27 October 2005 17:46 Go to previous message
Jeff Myers is currently offline Jeff MyersFriend
Messages: 489
Registered: July 2009
Senior Member
Is your code
> sProfileEditDlg = new Shell(parentShell, SWT.APPLICATION_MODAL
> SWT.DIALOG_TRIM);

Because you need an | between the two style bits.
sProfileEditDlg = new Shell(parentShell, SWT.APPLICATION_MODAL |
SWT.DIALOG_TRIM);

- Jeff

Filipp Akinfiev wrote:
> Hi,
> i try to make application modal shell, but my code(s.bellow) get error in
> VE : Error trying to set new file into editor. Reason:
> java.lang.NullPointerException
>
> How can i make this ?
> Thanks!
>
> /**
> * This method initializes sShell
> */
> void createSShell(Shell parentShell) {
> if(parentShell == null) parentShell = new Shell();
> sProfileEditDlg = new Shell(parentShell, SWT.APPLICATION_MODAL
> SWT.DIALOG_TRIM);
> ......
> }
Re: APPLICATION_MODAL and parentShell [message #611271 is a reply to message #110234] Thu, 27 October 2005 18:16 Go to previous message
Filipp Akinfiev is currently offline Filipp AkinfievFriend
Messages: 6
Registered: July 2009
Junior Member
!ENTRY org.eclipse.ve.java.core 4 0 2005-10-27 20:14:05.528
!MESSAGE Exception thrown.
!STACK 0
java.lang.NullPointerException
at
org.eclipse.ve.internal.swt.CompositeGraphicalEditPart.setup Control(CompositeGraphicalEditPart.java:96)
at
org.eclipse.ve.internal.swt.CompositeGraphicalEditPart.creat eChild(CompositeGraphicalEditPart.java:84)
at
org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(A bstractEditPart.java:733)
at
org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractE ditPart.java:684)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh( AbstractGraphicalEditPart.java:554)
at
org.eclipse.gef.editparts.AbstractEditPart.addNotify(Abstrac tEditPart.java:232)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.addNotif y(AbstractGraphicalEditPart.java:212)
at
org.eclipse.gef.editparts.AbstractEditPart.addChild(Abstract EditPart.java:195)
at
org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(A bstractEditPart.java:734)
at
org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractE ditPart.java:684)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh( AbstractGraphicalEditPart.java:554)
at
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart.setRootModel(JavaVisualEditorPart.java:506)
at
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart.initializeViewers(JavaVisualEditorPart.java:987)
at
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart$12.run(JavaVisualEditorPart.java:1977)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2886)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2608)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1755)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1719)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:368)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:106)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:377)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:164)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)

!ENTRY org.eclipse.ui 4 4 2005-10-27 20:14:05.529
!MESSAGE Unhandled event loop exception

!ENTRY org.eclipse.ui 4 0 2005-10-27 20:14:05.529
!MESSAGE Failed to execute runnable (java.lang.NullPointerException)
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable
(java.lang.NullPointerException)
at org.eclipse.swt.SWT.error(SWT.java:3251)
at org.eclipse.swt.SWT.error(SWT.java:3174)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:126)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:2886)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2608)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1755)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1719)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:368)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:106)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:226)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:377)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:164)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Caused by: java.lang.NullPointerException
at
org.eclipse.ve.internal.swt.CompositeGraphicalEditPart.setup Control(CompositeGraphicalEditPart.java:96)
at
org.eclipse.ve.internal.swt.CompositeGraphicalEditPart.creat eChild(CompositeGraphicalEditPart.java:84)
at
org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(A bstractEditPart.java:733)
at
org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractE ditPart.java:684)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh( AbstractGraphicalEditPart.java:554)
at
org.eclipse.gef.editparts.AbstractEditPart.addNotify(Abstrac tEditPart.java:232)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.addNotif y(AbstractGraphicalEditPart.java:212)
at
org.eclipse.gef.editparts.AbstractEditPart.addChild(Abstract EditPart.java:195)
at
org.eclipse.gef.editparts.AbstractEditPart.refreshChildren(A bstractEditPart.java:734)
at
org.eclipse.gef.editparts.AbstractEditPart.refresh(AbstractE ditPart.java:684)
at
org.eclipse.gef.editparts.AbstractGraphicalEditPart.refresh( AbstractGraphicalEditPart.java:554)
at
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart.setRootModel(JavaVisualEditorPart.java:506)
at
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart.initializeViewers(JavaVisualEditorPart.java:987)
at
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart$12.run(JavaVisualEditorPart.java:1977)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:123)
... 18 more
Previous Topic:GridLayout
Next Topic:VE on MacOSX
Goto Forum:
  


Current Time: Fri Nov 08 23:36:15 GMT 2024

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

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

Back to the top