Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Service Oriented Architecture Tools Platform (STP) » error opening the editor
error opening the editor [message #619546] Thu, 18 September 2008 06:45 Go to next message
faroun is currently offline faroun
Messages: 41
Registered: July 2009
Member
Hi everybody ,

i'm trying to create diagram programmaticly from data that exists on
database.

i take this steps :

- extends the BPMNVisual2ProcessGenerator and then generate diagram
elements .
- Define my own editor provider (IDocument ) that loads the diagram in the
getDocument() Method.
- set my document provider in the setDocumentProvider() of the BpmnEditor.
- Trying to open editor with a basic editor input ( without any override)

i'm getting the following exception :

org.eclipse.jface.util.Assert$AssertionFailedException: null argument;
at org.eclipse.jface.util.Assert.isNotNull(Assert.java:153)
at org.eclipse.jface.util.Assert.isNotNull(Assert.java:129)
at
org.eclipse.gmf.runtime.diagram.ui.internal.services.editpar t.EditPartOperation. <init>(EditPartOperation.java:43)
at
org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateR ootEditPartOperation. <init>(CreateRootEditPartOperation.java:32)
at
org.eclipse.gmf.runtime.diagram.ui.services.editpart.EditPar tService.createRootEditPart(EditPartService.java:248)
at
org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor.confi gureGraphicalViewer(DiagramEditor.java:818)
at
org.eclipse.stp.bpmn.diagram.part.BpmnDiagramEditor.configur eGraphicalViewer(BpmnDiagramEditor.java:101)
at
org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor.creat eGraphicalViewer(DiagramEditor.java:793)
at
org.eclipse.gef.ui.parts.GraphicalEditor.createPartControl(G raphicalEditor.java:163)
at
org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor.creat ePartControl(DiagramEditor.java:1548)
at
org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditorWithFl yOutPalette.createPartControl(DiagramEditorWithFlyOutPalette .java:310)
at
org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocumentEditor.createPartControl(DiagramDocumentEditor. java:1459)
at
org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:661)
at
org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.java:426)
at
org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:592)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:29 9)
at
org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(PresentablePart.java:179)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.select(PresentablePartFolder.java:268)
at
org.eclipse.ui.internal.presentations.util.LeftToRightTabOrd er.select(LeftToRightTabOrder.java:65)
at
org.eclipse.ui.internal.presentations.util.TabbedStackPresen tation.selectPart(TabbedStackPresentation.java:400)
at
org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartStack.java:1256)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.jav a:1209)
at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:16 04)
at org.eclipse.ui.internal.PartStack.add(PartStack.java:499)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103 )
at org.eclipse.ui.internal.PartStack.add(PartStack.java:485)
at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112 )
at
org.eclipse.ui.internal.EditorSashContainer.addEditor(Editor SashContainer.java:63)
at
org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorA reaHelper.java:217)
at
org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAre aHelper.java:207)
at
org.eclipse.ui.internal.EditorManager.createEditorTab(Editor Manager.java:774)
at
org.eclipse.ui.internal.EditorManager.openEditorFromDescript or(EditorManager.java:673)
at
org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:634)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2737)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2651)
at
org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPag e.java:2643)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.j ava:2595)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2590)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2574)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2565)
at ekipbpm.TestHandler.execute(TestHandler.java:39)
at
org.eclipse.ui.internal.handlers.HandlerProxy.execute(Handle rProxy.java:239)
at org.eclipse.core.commands.Command.executeWithChecks(Command. java:475)
at
org.eclipse.core.commands.ParameterizedCommand.executeWithCh ecks(ParameterizedCommand.java:429)
at
org.eclipse.ui.internal.handlers.HandlerService.executeComma nd(HandlerService.java:165)
at
org.eclipse.ui.internal.handlers.SlaveHandlerService.execute Command(SlaveHandlerService.java:247)
at
org.eclipse.ui.menus.CommandContributionItem.handleWidgetSel ection(CommandContributionItem.java:555)
at
org.eclipse.ui.menus.CommandContributionItem.access$8(Comman dContributionItem.java:541)
at
org.eclipse.ui.menus.CommandContributionItem$3.handleEvent(C ommandContributionItem.java:531)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at ekipbpm.Application.start(Application.java:20)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:169)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
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.equinox.launcher.Main.invokeFramework(Main.java: 508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)


it's realy blocking me , i cannot go ahead .

Please help.


Best Regards ,

Dali
Re: error opening the editor [message #619550 is a reply to message #619546] Thu, 18 September 2008 10:09 Go to previous messageGo to next message
Eclipse User
Originally posted by: atoulme.intalio.com

Dali, did you get the GMF sources as I recommended you do ?

The error comes from the fact that the object you pass to create the
root edit part is null.

The document should NOT be given to the document provider directly.
Instead it should be passed as an editor input, and your document
provider needs to extend AbstractDocumentProvider (since you don't use a
file) and implement the method createDocument(Object element).

That's where the magic happens.


Note that by no means I am a GMF expert, at least I am not familiar with
this part of the code. Looking up the code gave me the answers in 5
minutes. So make sure you have the source if that's not already the case.

Thanks,

Antoine

Dali wrote:
> Hi everybody ,
>
> i'm trying to create diagram programmaticly from data that exists on
> database.
>
> i take this steps :
>
> - extends the BPMNVisual2ProcessGenerator and then generate diagram
> elements .
> - Define my own editor provider (IDocument ) that loads the diagram in
> the getDocument() Method.
> - set my document provider in the setDocumentProvider() of the BpmnEditor.
> - Trying to open editor with a basic editor input ( without any override)
>
> i'm getting the following exception :
>
> org.eclipse.jface.util.Assert$AssertionFailedException: null argument;
> at org.eclipse.jface.util.Assert.isNotNull(Assert.java:153)
> at org.eclipse.jface.util.Assert.isNotNull(Assert.java:129)
> at
> org.eclipse.gmf.runtime.diagram.ui.internal.services.editpar t.EditPartOperation. <init>(EditPartOperation.java:43)
>
> at
> org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateR ootEditPartOperation. <init>(CreateRootEditPartOperation.java:32)
>
> at
> org.eclipse.gmf.runtime.diagram.ui.services.editpart.EditPar tService.createRootEditPart(EditPartService.java:248)
>
> at
> org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor.confi gureGraphicalViewer(DiagramEditor.java:818)
>
> at
> org.eclipse.stp.bpmn.diagram.part.BpmnDiagramEditor.configur eGraphicalViewer(BpmnDiagramEditor.java:101)
>
> at
> org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor.creat eGraphicalViewer(DiagramEditor.java:793)
>
> at
> org.eclipse.gef.ui.parts.GraphicalEditor.createPartControl(G raphicalEditor.java:163)
>
> at
> org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor.creat ePartControl(DiagramEditor.java:1548)
>
> at
> org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditorWithFl yOutPalette.createPartControl(DiagramEditorWithFlyOutPalette .java:310)
>
> at
> org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocumentEditor.createPartControl(DiagramDocumentEditor. java:1459)
>
> at
> org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:661)
>
> at
> org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.java:426)
>
> at
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartReference.java:592)
>
> at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:29 9)
> at
> org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(PresentablePart.java:179)
>
> at
> org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.select(PresentablePartFolder.java:268)
>
> at
> org.eclipse.ui.internal.presentations.util.LeftToRightTabOrd er.select(LeftToRightTabOrder.java:65)
>
> at
> org.eclipse.ui.internal.presentations.util.TabbedStackPresen tation.selectPart(TabbedStackPresentation.java:400)
>
> at
> org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartStack.java:1256)
>
> at org.eclipse.ui.internal.PartStack.setSelection(PartStack.jav a:1209)
> at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:16 04)
> at org.eclipse.ui.internal.PartStack.add(PartStack.java:499)
> at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:103 )
> at org.eclipse.ui.internal.PartStack.add(PartStack.java:485)
> at org.eclipse.ui.internal.EditorStack.add(EditorStack.java:112 )
> at
> org.eclipse.ui.internal.EditorSashContainer.addEditor(Editor SashContainer.java:63)
>
> at
> org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorA reaHelper.java:217)
>
> at
> org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAre aHelper.java:207)
>
> at
> org.eclipse.ui.internal.EditorManager.createEditorTab(Editor Manager.java:774)
>
> at
> org.eclipse.ui.internal.EditorManager.openEditorFromDescript or(EditorManager.java:673)
>
> at
> org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:634)
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2737)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2651)
>
> at
> org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPag e.java:2643)
> at
> org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.j ava:2595)
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2590)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2574)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2565)
> at ekipbpm.TestHandler.execute(TestHandler.java:39)
> at
> org.eclipse.ui.internal.handlers.HandlerProxy.execute(Handle rProxy.java:239)
>
> at
> org.eclipse.core.commands.Command.executeWithChecks(Command. java:475)
> at
> org.eclipse.core.commands.ParameterizedCommand.executeWithCh ecks(ParameterizedCommand.java:429)
>
> at
> org.eclipse.ui.internal.handlers.HandlerService.executeComma nd(HandlerService.java:165)
>
> at
> org.eclipse.ui.internal.handlers.SlaveHandlerService.execute Command(SlaveHandlerService.java:247)
>
> at
> org.eclipse.ui.menus.CommandContributionItem.handleWidgetSel ection(CommandContributionItem.java:555)
>
> at
> org.eclipse.ui.menus.CommandContributionItem.access$8(Comman dContributionItem.java:541)
>
> at
> org.eclipse.ui.menus.CommandContributionItem$3.handleEvent(C ommandContributionItem.java:531)
>
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
> at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
>
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at ekipbpm.Application.start(Application.java:20)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:169)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
>
> 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.equinox.launcher.Main.invokeFramework(Main.java: 508)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
>
>
> it's realy blocking me , i cannot go ahead .
>
> Please help.
>
>
> Best Regards ,
>
> Dali
>
>
>
Re: error opening the editor [message #620079 is a reply to message #619550] Fri, 19 September 2008 03:34 Go to previous messageGo to next message
faroun is currently offline faroun
Messages: 41
Registered: July 2009
Member
Hi Antoine ,

i'm following your advices but i still have two more questions :

1- How can i ensure that the diagram was created? ( i display the content
of the sem2NotationMap and it shows element is it enough ?)

2- What interface should implement my editor input ( i reused
DiagramEditorInput and it does not works)

Thanx a lot for help.

Best Regards,

Dali
Re: error opening the editor [message #620080 is a reply to message #620079] Fri, 19 September 2008 13:53 Go to previous message
Eclipse User
Originally posted by: atoulme.intalio.com

Dali wrote:
> Hi Antoine ,
>
> i'm following your advices but i still have two more questions :
>
> 1- How can i ensure that the diagram was created? ( i display the
> content of the sem2NotationMap and it shows element is it enough ?)
The diagram is created when you create the generator instance.
>
> 2- What interface should implement my editor input ( i reused
> DiagramEditorInput and it does not works)
What did not work ? Anything implementing IEditorInput and working for
you should work.
>
> Thanx a lot for help.
>
> Best Regards,
>
> Dali
>
Previous Topic:Open Source SOA environment for STP
Next Topic:problem with the activity painter
Goto Forum:
  


Current Time: Mon Sep 01 07:26:16 EDT 2014

Powered by FUDForum. Page generated in 0.02264 seconds