Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 Tools » cannot open diagram programmatically
cannot open diagram programmatically [message #474403] Tue, 06 May 2008 07:55 Go to next message
Aram Hovsepyan is currently offline Aram Hovsepyan
Messages: 34
Registered: July 2009
Member
Hi,

I have the following problem using UML2Tools plugin.

I can open the uml2class_diagram files from my Eclipse, however this does
not work when I do this programmatically. I get the following
error: "Cannot open input element. Reason: text editor does not have a
document provider".

All other files open fine.

Here is the code that handles the opening:

IFileStore fileStore = EFS.getLocalFileSystem().getStore(new Path(path));
IDE.openEditorOnFileStore(PlatformUI.getWorkbench().getActiv eWorkbenchWindow().getActivePage(),
fileStore);

I've already tried to launch eclipse with the -clean option. Doesn't help.
Thanks in advance for the help.



Here is the complete stack trace of the exception:

java.lang.NullPointerException
at
org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocumentEditor$1.run(DiagramDocumentEditor.java:120)
at
org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:369)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:313)
at
org.eclipse.jface.window.ApplicationWindow$1.run(Application Window.java:758)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.jface.window.ApplicationWindow.run(ApplicationWi ndow.java:755)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow. java:2451)
at
org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocumentEditor.init(DiagramDocumentEditor.java:129)
at org.eclipse.ui.internal.EditorManager.createSite(EditorManag er.java:794)
at
org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:643)
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:2557)
at org.eclipse.ui.ide.IDE.openEditorOnFileStore(IDE.java:1090)
at
org.kuleuven.grecco.views.GreccoConcernLibraryView$3.run(Gre ccoConcernLibraryView.java:233)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:546)
at org.eclipse.jface.action.ActionContributionItem.access$
(ActionContributionItem.java:490)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3319)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2971)
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
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
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(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.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)
--
Aram Hovsepyan
Distrinet research group
Katholieke Universiteit Leuven
Re: cannot open diagram programmatically [message #474404 is a reply to message #474403] Tue, 06 May 2008 11:21 Go to previous messageGo to next message
Tatiana Fesenko is currently offline Tatiana Fesenko
Messages: 530
Registered: July 2009
Senior Member
Hello Aram,

I tried to open the editor programmatically the way you did, it works fine.
However, I had the same exception you had, when path was workspace-relative.
Is path in your example absolute (something like 'C:/junit-workspace/TestProject/test.umlclass_diagram')?

BTW, we open the diagram editor programattically in tests (org.eclipse.uml2.diagram.common.tests.UMLDiagramFacade#open ()):
IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage();
IEditorPart editorPart = page .openEditor(new FileEditorInput((IFile) workspaceResource),
workbench.getEditorRegistry().getDefaultEditor(workspaceReso urce.getFullPath().toString()).getId());
Code is a bit different from yours, it uses IFile. Probably it can solve
your problem.

Best wishes,
Tatiana.

> Hi,
>
> I have the following problem using UML2Tools plugin.
>
> I can open the uml2class_diagram files from my Eclipse,
> however this does
> not work when I do this programmatically. I get the following
> error: "Cannot open input element. Reason: text editor does not have a
> document provider".
> All other files open fine.
>
> Here is the code that handles the opening:
>
> IFileStore fileStore = EFS.getLocalFileSystem().getStore(new
> Path(path));
> IDE.openEditorOnFileStore(PlatformUI.getWorkbench().getActiv eWorkbench
> Window().getActivePage(), fileStore);
>
> I've already tried to launch eclipse with the -clean option.
> Doesn't help.
> Thanks in advance for the help.
> Here is the complete stack trace of the exception:
>
> java.lang.NullPointerException
> at
> org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocum
> entEditor$1.run(DiagramDocumentEditor.java:120)
> at
> org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalConte
> xt.java:369)
> at
> org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:313)
> at
> org.eclipse.jface.window.ApplicationWindow$1.run(Application Window.jav
> a:758)
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
> at
> org.eclipse.jface.window.ApplicationWindow.run(ApplicationWi ndow.java:
> 755)
> at
> org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow. java:2451)
> at
> org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocum
> entEditor.init(DiagramDocumentEditor.java:129)
> at
> org.eclipse.ui.internal.EditorManager.createSite(EditorManag er.java:79
> 4)
> at
> org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReferen
> ce.java:643)
> at
> org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.jav
> a:426)
> at
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartRe
> ference.java:592)
> at
> org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:29 9)
> at
> org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(Prese
> ntablePart.java:179)
> at
> org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.selec
> t(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.sel
> ectPart(TabbedStackPresentation.java:400)
> at
> org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartSta
> ck.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 SashContai
> ner.java:63)
> at
> org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorA reaHelper.
> java:217)
> at
> org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAre aHelper.ja
> va:207)
> at
> org.eclipse.ui.internal.EditorManager.createEditorTab(Editor Manager.ja
> va:774)
> at
> org.eclipse.ui.internal.EditorManager.openEditorFromDescript or(EditorM
> anager.java:673)
> at
> org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:63
> 4)
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchP
> age.java:2737)
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.jav
> a:2651)
> at
> org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPag e.java:264
> 3)
> 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:25
> 90)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:25
> 74)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:25
> 57)
> at org.eclipse.ui.ide.IDE.openEditorOnFileStore(IDE.java:1090)
> at
> org.kuleuven.grecco.views.GreccoConcernLibraryView$3.run(Gre ccoConcern
> LibraryView.java:233)
> at
> org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(
> ActionContributionItem.java:546)
> at org.eclipse.jface.action.ActionContributionItem.access$
> (ActionContributionItem.java:490)
> at
> org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionCo
> ntributionItem.java:402)
> at
> org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3319)
> at
> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2971)
> 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.jav
> a:289)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java
> :461)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplic
> ation.java:106)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle
> .java:169)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplic
> ation(EclipseAppLauncher.java:106)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(Ecl
> ipseAppLauncher.java:76)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.jav
> a:363)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.jav
> a:176)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.j
> ava:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccess
> orImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> 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)
Re: cannot open diagram programmatically [message #474407 is a reply to message #474404] Tue, 06 May 2008 13:17 Go to previous messageGo to next message
Aram Hovsepyan is currently offline Aram Hovsepyan
Messages: 34
Registered: July 2009
Member
Hi Tatiana,

Thanks for the reply but somehow it still doesn't work.
I need to mention that I'm working under linux. I've tried with the IFile
and I get now the following error:

Resource /home/barri/install/eclipse/plugin/org.kuleuven.grecco/conce rn_library/audit_interceptor.umlclass_diagram
does not exist. I've checked and the file is in there.

I think it has to do something with linux and paths, but I can't find it.
By the way, the tree UML editor works fine with this code. If I open a .uml
file with the same code it doesn't give any errors.

thnx in advance.

Tatiana Fesenko wrote:

> Hello Aram,
>
> I tried to open the editor programmatically the way you did, it works
> fine. However, I had the same exception you had, when path was
> workspace-relative. Is path in your example absolute (something like
> 'C:/junit-workspace/TestProject/test.umlclass_diagram')?
>
> BTW, we open the diagram editor programattically in tests
> (org.eclipse.uml2.diagram.common.tests.UMLDiagramFacade#open ()):
> IWorkbenchPage page =
> workbench.getActiveWorkbenchWindow().getActivePage();
> IEditorPart editorPart = page .openEditor(new FileEditorInput((IFile)
> workspaceResource),
>
workbench.getEditorRegistry().getDefaultEditor(workspaceReso urce.getFullPath().toString()).getId());
> Code is a bit different from yours, it uses IFile. Probably it can solve
> your problem.
>
> Best wishes,
> Tatiana.
>
>> Hi,
>>
>> I have the following problem using UML2Tools plugin.
>>
>> I can open the uml2class_diagram files from my Eclipse,
>> however this does
>> not work when I do this programmatically. I get the following
>> error: "Cannot open input element. Reason: text editor does not have a
>> document provider".
>> All other files open fine.
>>
>> Here is the code that handles the opening:
>>
>> IFileStore fileStore = EFS.getLocalFileSystem().getStore(new
>> Path(path));
>> IDE.openEditorOnFileStore(PlatformUI.getWorkbench().getActiv eWorkbench
>> Window().getActivePage(), fileStore);
>>
>> I've already tried to launch eclipse with the -clean option.
>> Doesn't help.
>> Thanks in advance for the help.
>> Here is the complete stack trace of the exception:
>>
>> java.lang.NullPointerException
>> at
>> org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocum
>> entEditor$1.run(DiagramDocumentEditor.java:120)
>> at
>> org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalConte
>> xt.java:369)
>> at
>> org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:313)
>> at
>> org.eclipse.jface.window.ApplicationWindow$1.run(Application Window.jav
>> a:758)
>> at
>> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
>> at
>> org.eclipse.jface.window.ApplicationWindow.run(ApplicationWi ndow.java:
>> 755)
>> at
>> org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow. java:2451)
>> at
>> org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocum
>> entEditor.init(DiagramDocumentEditor.java:129)
>> at
>> org.eclipse.ui.internal.EditorManager.createSite(EditorManag er.java:79
>> 4)
>> at
>> org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReferen
>> ce.java:643)
>> at
>> org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.jav
>> a:426)
>> at
>> org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartRe
>> ference.java:592)
>> at
>> org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:29 9)
>> at
>> org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(Prese
>> ntablePart.java:179)
>> at
>> org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.selec
>> t(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.sel
>> ectPart(TabbedStackPresentation.java:400)
>> at
>> org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartSta
>> ck.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 SashContai
>> ner.java:63)
>> at
>> org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorA reaHelper.
>> java:217)
>> at
>> org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAre aHelper.ja
>> va:207)
>> at
>> org.eclipse.ui.internal.EditorManager.createEditorTab(Editor Manager.ja
>> va:774)
>> at
>> org.eclipse.ui.internal.EditorManager.openEditorFromDescript or(EditorM
>> anager.java:673)
>> at
>> org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:63
>> 4)
>> at
>> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchP
>> age.java:2737)
>> at
>> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.jav
>> a:2651)
>> at
>> org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPag e.java:264
>> 3)
>> 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:25
>> 90)
>> at
>> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:25
>> 74)
>> at
>> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:25
>> 57)
>> at org.eclipse.ui.ide.IDE.openEditorOnFileStore(IDE.java:1090)
>> at
>> org.kuleuven.grecco.views.GreccoConcernLibraryView$3.run(Gre ccoConcern
>> LibraryView.java:233)
>> at
>> org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
>> at
>> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(
>> ActionContributionItem.java:546)
>> at org.eclipse.jface.action.ActionContributionItem.access$
>> (ActionContributionItem.java:490)
>> at
>> org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionCo
>> ntributionItem.java:402)
>> at
>> org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
>> at
>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3319)
>> at
>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2971)
>> 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.jav
>> a:289)
>> at
>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java
>> :461)
>> at
>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>> at
>> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplic
>> ation.java:106)
>> at
>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle
>> .java:169)
>> at
>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplic
>> ation(EclipseAppLauncher.java:106)
>> at
>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(Ecl
>> ipseAppLauncher.java:76)
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.jav
>> a:363)
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.jav
>> a:176)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.j
>> ava:39)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccess
>> orImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:585)
>> 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)

--
Aram Hovsepyan
Distrinet research group
Katholieke Universiteit Leuven
Re: cannot open diagram programmatically [message #474411 is a reply to message #474403] Tue, 20 May 2008 07:25 Go to previous messageGo to next message
Aram Hovsepyan is currently offline Aram Hovsepyan
Messages: 34
Registered: July 2009
Member
Hey guys,

I still can't find it. I have to give a demo at thursday and I'd like to
have it working :). The UML2 tree editor works fine while the diagram
editor always results in an error saying that he can't find the file, while
the file is there.

thnx.

Aram Hovsepyan wrote:

> Hi,
>
> I have the following problem using UML2Tools plugin.
>
> I can open the uml2class_diagram files from my Eclipse, however
> this does
> not work when I do this programmatically. I get the following
> error: "Cannot open input element. Reason: text editor does not have a
> document provider".
>
> All other files open fine.
>
> Here is the code that handles the opening:
>
> IFileStore fileStore = EFS.getLocalFileSystem().getStore(new Path(path));
>
IDE.openEditorOnFileStore(PlatformUI.getWorkbench().getActiv eWorkbenchWindow().getActivePage(),
> fileStore);
>
> I've already tried to launch eclipse with the -clean option.
> Doesn't help. Thanks in advance for the help.
>
>
>
> Here is the complete stack trace of the exception:
>
> java.lang.NullPointerException
> at
>
org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocumentEditor$1.run(DiagramDocumentEditor.java:120)
> at
>
org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:369)
> at
>
org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:313)
> at
>
org.eclipse.jface.window.ApplicationWindow$1.run(Application Window.java:758)
> at
>
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
> at
> org.eclipse.jface.window.ApplicationWindow.run(ApplicationWi ndow.java:755)
> at
>
org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow. java:2451)
> at
>
org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocumentEditor.init(DiagramDocumentEditor.java:129)
> at
>
org.eclipse.ui.internal.EditorManager.createSite(EditorManag er.java:794)
> at
>
org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:643)
> 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$1
(WorkbenchPage.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:2557)
> at org.eclipse.ui.ide.IDE.openEditorOnFileStore(IDE.java:1090)
> at
>
org.kuleuven.grecco.views.GreccoConcernLibraryView$3.run(Gre ccoConcernLibraryView.java:233)
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
> at
>
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:546)
> at org.eclipse.jface.action.ActionContributionItem.access$
> (ActionContributionItem.java:490)
> at
>
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:402)
> at
> org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101) at
>
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3319)
> at
> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2971)
> 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
>
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
> 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(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.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)

--
Aram Hovsepyan
Distrinet research group
Katholieke Universiteit Leuven
Re: cannot open diagram programmatically [message #474415 is a reply to message #474411] Wed, 21 May 2008 12:49 Go to previous messageGo to next message
Tatiana Fesenko is currently offline Tatiana Fesenko
Messages: 530
Registered: July 2009
Senior Member
Hi Aram,

Have you solved the problem? Could you please try to programmatically open
other GMF-generated diagrams, say, Taipan.

I'm installing Linux on my machine to check the problem.

Tatiana.

> Hey guys,
>
> I still can't find it. I have to give a demo at thursday and
> I'd like to
> have it working :). The UML2 tree editor works fine while the diagram
> editor always results in an error saying that he can't find the file,
> while
> the file is there.
> thnx.
>
> Aram Hovsepyan wrote:
>
>> Hi,
>>
>> I have the following problem using UML2Tools plugin.
>>
>> I can open the uml2class_diagram files from my Eclipse, however
>> this does
>> not work when I do this programmatically. I get the following
>> error: "Cannot open input element. Reason: text editor does not have
>> a
>> document provider".
>> All other files open fine.
>>
>> Here is the code that handles the opening:
>>
>> IFileStore fileStore = EFS.getLocalFileSystem().getStore(new
>> Path(path));
>>
> IDE.openEditorOnFileStore(PlatformUI.getWorkbench().getActiv eWorkbench
> Window().getActivePage(),
>
>> fileStore);
>>
>> I've already tried to launch eclipse with the -clean option. Doesn't
>> help. Thanks in advance for the help.
>>
>> Here is the complete stack trace of the exception:
>>
>> java.lang.NullPointerException
>> at
> org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocum
> entEditor$1.run(DiagramDocumentEditor.java:120)
>
>> at
>>
> org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalConte
> xt.java:369)
>
>> at
>>
> org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:313)
>
>> at
>>
> org.eclipse.jface.window.ApplicationWindow$1.run(Application Window.jav
> a:758)
>
>> at
>>
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
>
>> at
>> org.eclipse.jface.window.ApplicationWindow.run(ApplicationWi ndow.java
>> :755) at
>>
> org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow. java:2451)
>
>> at
>>
> org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocum
> entEditor.init(DiagramDocumentEditor.java:129)
>
>> at
>>
> org.eclipse.ui.internal.EditorManager.createSite(EditorManag er.java:79
> 4)
>
>> at
>>
> org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReferen
> ce.java:643)
>
>> at
>>
> org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.jav
> a:426)
>
>> at
>>
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartRe
> ference.java:592)
>
>> at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:29 9) at
>>
> org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(Prese
> ntablePart.java:179)
>
>> at
>>
> org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.selec
> t(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.sel
> ectPart(TabbedStackPresentation.java:400)
>
>> at
>>
> org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartSta
> ck.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 SashContai
> ner.java:63)
>
>> at
>>
> org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorA reaHelper.
> java:217)
>
>> at
>>
> org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAre aHelper.ja
> va:207)
>
>> at
>>
> org.eclipse.ui.internal.EditorManager.createEditorTab(Editor Manager.ja
> va:774)
>
>> at
>>
> org.eclipse.ui.internal.EditorManager.openEditorFromDescript or(EditorM
> anager.java:673)
>
>> at
>>
> org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:63
> 4)
>
>> at
>>
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchP
> age.java:2737)
>
>> at
>>
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.jav
> a:2651)
>
>> at
>> org.eclipse.ui.internal.WorkbenchPage.access$1
> (WorkbenchPage.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:2
>> 590)
>> at
>> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2
>> 574)
>> at
>> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2
>> 557)
>> at org.eclipse.ui.ide.IDE.openEditorOnFileStore(IDE.java:1090)
>> at
> org.kuleuven.grecco.views.GreccoConcernLibraryView$3.run(Gre ccoConcern
> LibraryView.java:233)
>
>> at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 ) at
>>
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(
> ActionContributionItem.java:546)
>
>> at org.eclipse.jface.action.ActionContributionItem.access$
>> (ActionContributionItem.java:490)
>> at
> org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionCo
> ntributionItem.java:402)
>
>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101) at
>>
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3319)
>
>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2971)
>> 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.jav
> a:289)
>
>> at
>>
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java
> :461)
>
>> at
>>
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>
>> at
>>
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplic
> ation.java:106)
>
>> at
>>
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle
> .java:169)
>
>> at
>>
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplic
> ation(EclipseAppLauncher.java:106)
>
>> at
>>
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(Ecl
> ipseAppLauncher.java:76)
>
>> at
>>
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.jav
> a:363)
>
>> at
>>
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.jav
> a:176)
>
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
>>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.j
> ava:39)
>
>> at
>>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccess
> orImpl.java:25)
>
>> at java.lang.reflect.Method.invoke(Method.java:585)
>> 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)
Re: cannot open diagram programmatically [message #474417 is a reply to message #474411] Thu, 22 May 2008 14:32 Go to previous messageGo to next message
Tatiana Fesenko is currently offline Tatiana Fesenko
Messages: 530
Registered: July 2009
Senior Member
Hi Aram,

I found the root of the problem.

If diagram file is located in eclipse workspace, it is opened correctly in
both Windows and Linux (I use Ubuntu) systems.
However, when I tried to open diagrams that are not in workspace, it didn't
work, while *.uml files were opened well.
The reason is, that when file isn't located in Workspace, IDE.getEditorInput()
is instanceof FileStoreEditorInput. It is used as a parameter in UMLDiagramEditor#setDocumentProvider(IEditorInput)
..
UMLDiagramEditor#setDocumentProvider(IEditorInput) sets null in such case.
That's why getDocumentProvider() returns null after and you see NPE.

Solution is to add diagram file to your workspace before opening it. It should
help.
I hope I wasn't late with the advice.

Best wishes,
Tatiana.

> Hey guys,
>
> I still can't find it. I have to give a demo at thursday and
> I'd like to
> have it working :). The UML2 tree editor works fine while the diagram
> editor always results in an error saying that he can't find the file,
> while
> the file is there.
> thnx.
>
> Aram Hovsepyan wrote:
>
>> Hi,
>>
>> I have the following problem using UML2Tools plugin.
>>
>> I can open the uml2class_diagram files from my Eclipse, however
>> this does
>> not work when I do this programmatically. I get the following
>> error: "Cannot open input element. Reason: text editor does not have
>> a
>> document provider".
>> All other files open fine.
>>
>> Here is the code that handles the opening:
>>
>> IFileStore fileStore = EFS.getLocalFileSystem().getStore(new
>> Path(path));
>>
> IDE.openEditorOnFileStore(PlatformUI.getWorkbench().getActiv eWorkbench
> Window().getActivePage(),
>
>> fileStore);
>>
>> I've already tried to launch eclipse with the -clean option. Doesn't
>> help. Thanks in advance for the help.
>>
>> Here is the complete stack trace of the exception:
>>
>> java.lang.NullPointerException
>> at
> org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocum
> entEditor$1.run(DiagramDocumentEditor.java:120)
>
>> at
>>
> org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalConte
> xt.java:369)
>
>> at
>>
> org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:313)
>
>> at
>>
> org.eclipse.jface.window.ApplicationWindow$1.run(Application Window.jav
> a:758)
>
>> at
>>
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
>
>> at
>> org.eclipse.jface.window.ApplicationWindow.run(ApplicationWi ndow.java
>> :755) at
>>
> org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow. java:2451)
>
>> at
>>
> org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocum
> entEditor.init(DiagramDocumentEditor.java:129)
>
>> at
>>
> org.eclipse.ui.internal.EditorManager.createSite(EditorManag er.java:79
> 4)
>
>> at
>>
> org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReferen
> ce.java:643)
>
>> at
>>
> org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.jav
> a:426)
>
>> at
>>
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartRe
> ference.java:592)
>
>> at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:29 9) at
>>
> org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(Prese
> ntablePart.java:179)
>
>> at
>>
> org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.selec
> t(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.sel
> ectPart(TabbedStackPresentation.java:400)
>
>> at
>>
> org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartSta
> ck.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 SashContai
> ner.java:63)
>
>> at
>>
> org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorA reaHelper.
> java:217)
>
>> at
>>
> org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAre aHelper.ja
> va:207)
>
>> at
>>
> org.eclipse.ui.internal.EditorManager.createEditorTab(Editor Manager.ja
> va:774)
>
>> at
>>
> org.eclipse.ui.internal.EditorManager.openEditorFromDescript or(EditorM
> anager.java:673)
>
>> at
>>
> org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:63
> 4)
>
>> at
>>
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchP
> age.java:2737)
>
>> at
>>
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.jav
> a:2651)
>
>> at
>> org.eclipse.ui.internal.WorkbenchPage.access$1
> (WorkbenchPage.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:2
>> 590)
>> at
>> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2
>> 574)
>> at
>> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2
>> 557)
>> at org.eclipse.ui.ide.IDE.openEditorOnFileStore(IDE.java:1090)
>> at
> org.kuleuven.grecco.views.GreccoConcernLibraryView$3.run(Gre ccoConcern
> LibraryView.java:233)
>
>> at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 ) at
>>
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(
> ActionContributionItem.java:546)
>
>> at org.eclipse.jface.action.ActionContributionItem.access$
>> (ActionContributionItem.java:490)
>> at
> org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionCo
> ntributionItem.java:402)
>
>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101) at
>>
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3319)
>
>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2971)
>> 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.jav
> a:289)
>
>> at
>>
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java
> :461)
>
>> at
>>
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>
>> at
>>
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplic
> ation.java:106)
>
>> at
>>
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle
> .java:169)
>
>> at
>>
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplic
> ation(EclipseAppLauncher.java:106)
>
>> at
>>
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(Ecl
> ipseAppLauncher.java:76)
>
>> at
>>
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.jav
> a:363)
>
>> at
>>
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.jav
> a:176)
>
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
>>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.j
> ava:39)
>
>> at
>>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccess
> orImpl.java:25)
>
>> at java.lang.reflect.Method.invoke(Method.java:585)
>> 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)
Re: cannot open diagram programmatically [message #474420 is a reply to message #474417] Mon, 26 May 2008 08:16 Go to previous message
Aram Hovsepyan is currently offline Aram Hovsepyan
Messages: 34
Registered: July 2009
Member
Hi Tatiana,

Thnx for the help. I managed to get it working by creating a link to the
diagram and .uml files in the current workspace.

file.createLink(location, IResource.NONE, null);

Regards,
Aram.



Tatiana Fesenko wrote:

> Hi Aram,
>
> I found the root of the problem.
>
> If diagram file is located in eclipse workspace, it is opened correctly in
> both Windows and Linux (I use Ubuntu) systems.
> However, when I tried to open diagrams that are not in workspace, it
> didn't work, while *.uml files were opened well.
> The reason is, that when file isn't located in Workspace,
> IDE.getEditorInput() is instanceof FileStoreEditorInput. It is used as a
> parameter in UMLDiagramEditor#setDocumentProvider(IEditorInput) .
> UMLDiagramEditor#setDocumentProvider(IEditorInput) sets null in such case.
> That's why getDocumentProvider() returns null after and you see NPE.
>
> Solution is to add diagram file to your workspace before opening it. It
> should help.
> I hope I wasn't late with the advice.
>
> Best wishes,
> Tatiana.
>
>> Hey guys,
>>
>> I still can't find it. I have to give a demo at thursday and
>> I'd like to
>> have it working :). The UML2 tree editor works fine while the diagram
>> editor always results in an error saying that he can't find the file,
>> while
>> the file is there.
>> thnx.
>>
>> Aram Hovsepyan wrote:
>>
>>> Hi,
>>>
>>> I have the following problem using UML2Tools plugin.
>>>
>>> I can open the uml2class_diagram files from my Eclipse, however
>>> this does
>>> not work when I do this programmatically. I get the following
>>> error: "Cannot open input element. Reason: text editor does not have
>>> a
>>> document provider".
>>> All other files open fine.
>>>
>>> Here is the code that handles the opening:
>>>
>>> IFileStore fileStore = EFS.getLocalFileSystem().getStore(new
>>> Path(path));
>>>
>> IDE.openEditorOnFileStore(PlatformUI.getWorkbench().getActiv eWorkbench
>> Window().getActivePage(),
>>
>>> fileStore);
>>>
>>> I've already tried to launch eclipse with the -clean option. Doesn't
>>> help. Thanks in advance for the help.
>>>
>>> Here is the complete stack trace of the exception:
>>>
>>> java.lang.NullPointerException
>>> at
>> org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocum
>> entEditor$1.run(DiagramDocumentEditor.java:120)
>>
>>> at
>>>
>> org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalConte
>> xt.java:369)
>>
>>> at
>>>
>> org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:313)
>>
>>> at
>>>
>> org.eclipse.jface.window.ApplicationWindow$1.run(Application Window.jav
>> a:758)
>>
>>> at
>>>
>> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
>>
>>> at
>>> org.eclipse.jface.window.ApplicationWindow.run(ApplicationWi ndow.java
>>> :755) at
>>>
>> org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow. java:2451)
>>
>>> at
>>>
>> org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocum
>> entEditor.init(DiagramDocumentEditor.java:129)
>>
>>> at
>>>
>> org.eclipse.ui.internal.EditorManager.createSite(EditorManag er.java:79
>> 4)
>>
>>> at
>>>
>> org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReferen
>> ce.java:643)
>>
>>> at
>>>
>> org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.jav
>> a:426)
>>
>>> at
>>>
>> org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartRe
>> ference.java:592)
>>
>>> at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:29 9) at
>>>
>> org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(Prese
>> ntablePart.java:179)
>>
>>> at
>>>
>> org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.selec
>> t(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.sel
>> ectPart(TabbedStackPresentation.java:400)
>>
>>> at
>>>
>> org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartSta
>> ck.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 SashContai
>> ner.java:63)
>>
>>> at
>>>
>> org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorA reaHelper.
>> java:217)
>>
>>> at
>>>
>> org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAre aHelper.ja
>> va:207)
>>
>>> at
>>>
>> org.eclipse.ui.internal.EditorManager.createEditorTab(Editor Manager.ja
>> va:774)
>>
>>> at
>>>
>> org.eclipse.ui.internal.EditorManager.openEditorFromDescript or(EditorM
>> anager.java:673)
>>
>>> at
>>>
>> org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:63
>> 4)
>>
>>> at
>>>
>> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchP
>> age.java:2737)
>>
>>> at
>>>
>> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.jav
>> a:2651)
>>
>>> at
>>> org.eclipse.ui.internal.WorkbenchPage.access$1
>> (WorkbenchPage.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:2
>>> 590)
>>> at
>>> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2
>>> 574)
>>> at
>>> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2
>>> 557)
>>> at org.eclipse.ui.ide.IDE.openEditorOnFileStore(IDE.java:1090)
>>> at
>> org.kuleuven.grecco.views.GreccoConcernLibraryView$3.run(Gre ccoConcern
>> LibraryView.java:233)
>>
>>> at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 ) at
>>>
>> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(
>> ActionContributionItem.java:546)
>>
>>> at org.eclipse.jface.action.ActionContributionItem.access$
>>> (ActionContributionItem.java:490)
>>> at
>> org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionCo
>> ntributionItem.java:402)
>>
>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101) at
>>>
>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3319)
>>
>>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2971)
>>> 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.jav
>> a:289)
>>
>>> at
>>>
>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java
>> :461)
>>
>>> at
>>>
>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>>
>>> at
>>>
>> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplic
>> ation.java:106)
>>
>>> at
>>>
>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle
>> .java:169)
>>
>>> at
>>>
>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplic
>> ation(EclipseAppLauncher.java:106)
>>
>>> at
>>>
>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(Ecl
>> ipseAppLauncher.java:76)
>>
>>> at
>>>
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.jav
>> a:363)
>>
>>> at
>>>
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.jav
>> a:176)
>>
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
>>>
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.j
>> ava:39)
>>
>>> at
>>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccess
>> orImpl.java:25)
>>
>>> at java.lang.reflect.Method.invoke(Method.java:585)
>>> 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)

--
Aram Hovsepyan
Distrinet research group
Katholieke Universiteit Leuven
Re: cannot open diagram programmatically [message #619709 is a reply to message #474403] Tue, 06 May 2008 11:21 Go to previous message
Tatiana Fesenko is currently offline Tatiana Fesenko
Messages: 530
Registered: July 2009
Senior Member
Hello Aram,

I tried to open the editor programmatically the way you did, it works fine.
However, I had the same exception you had, when path was workspace-relative.
Is path in your example absolute (something like 'C:/junit-workspace/TestProject/test.umlclass_diagram')?

BTW, we open the diagram editor programattically in tests (org.eclipse.uml2.diagram.common.tests.UMLDiagramFacade#open ()):
IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage();
IEditorPart editorPart = page .openEditor(new FileEditorInput((IFile) workspaceResource),
workbench.getEditorRegistry().getDefaultEditor(workspaceReso urce.getFullPath().toString()).getId());
Code is a bit different from yours, it uses IFile. Probably it can solve
your problem.

Best wishes,
Tatiana.

> Hi,
>
> I have the following problem using UML2Tools plugin.
>
> I can open the uml2class_diagram files from my Eclipse,
> however this does
> not work when I do this programmatically. I get the following
> error: "Cannot open input element. Reason: text editor does not have a
> document provider".
> All other files open fine.
>
> Here is the code that handles the opening:
>
> IFileStore fileStore = EFS.getLocalFileSystem().getStore(new
> Path(path));
> IDE.openEditorOnFileStore(PlatformUI.getWorkbench().getActiv eWorkbench
> Window().getActivePage(), fileStore);
>
> I've already tried to launch eclipse with the -clean option.
> Doesn't help.
> Thanks in advance for the help.
> Here is the complete stack trace of the exception:
>
> java.lang.NullPointerException
> at
> org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocum
> entEditor$1.run(DiagramDocumentEditor.java:120)
> at
> org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalConte
> xt.java:369)
> at
> org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:313)
> at
> org.eclipse.jface.window.ApplicationWindow$1.run(Application Window.jav
> a:758)
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
> at
> org.eclipse.jface.window.ApplicationWindow.run(ApplicationWi ndow.java:
> 755)
> at
> org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow. java:2451)
> at
> org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocum
> entEditor.init(DiagramDocumentEditor.java:129)
> at
> org.eclipse.ui.internal.EditorManager.createSite(EditorManag er.java:79
> 4)
> at
> org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReferen
> ce.java:643)
> at
> org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.jav
> a:426)
> at
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartRe
> ference.java:592)
> at
> org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:29 9)
> at
> org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(Prese
> ntablePart.java:179)
> at
> org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.selec
> t(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.sel
> ectPart(TabbedStackPresentation.java:400)
> at
> org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartSta
> ck.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 SashContai
> ner.java:63)
> at
> org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorA reaHelper.
> java:217)
> at
> org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAre aHelper.ja
> va:207)
> at
> org.eclipse.ui.internal.EditorManager.createEditorTab(Editor Manager.ja
> va:774)
> at
> org.eclipse.ui.internal.EditorManager.openEditorFromDescript or(EditorM
> anager.java:673)
> at
> org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:63
> 4)
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchP
> age.java:2737)
> at
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.jav
> a:2651)
> at
> org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPag e.java:264
> 3)
> 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:25
> 90)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:25
> 74)
> at
> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:25
> 57)
> at org.eclipse.ui.ide.IDE.openEditorOnFileStore(IDE.java:1090)
> at
> org.kuleuven.grecco.views.GreccoConcernLibraryView$3.run(Gre ccoConcern
> LibraryView.java:233)
> at
> org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(
> ActionContributionItem.java:546)
> at org.eclipse.jface.action.ActionContributionItem.access$
> (ActionContributionItem.java:490)
> at
> org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionCo
> ntributionItem.java:402)
> at
> org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3319)
> at
> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2971)
> 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.jav
> a:289)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java
> :461)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplic
> ation.java:106)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle
> .java:169)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplic
> ation(EclipseAppLauncher.java:106)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(Ecl
> ipseAppLauncher.java:76)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.jav
> a:363)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.jav
> a:176)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.j
> ava:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccess
> orImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> 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)
Re: cannot open diagram programmatically [message #619715 is a reply to message #474404] Tue, 06 May 2008 13:17 Go to previous message
Aram Hovsepyan is currently offline Aram Hovsepyan
Messages: 34
Registered: July 2009
Member
Hi Tatiana,

Thanks for the reply but somehow it still doesn't work.
I need to mention that I'm working under linux. I've tried with the IFile
and I get now the following error:

Resource /home/barri/install/eclipse/plugin/org.kuleuven.grecco/conce rn_library/audit_interceptor.umlclass_diagram
does not exist. I've checked and the file is in there.

I think it has to do something with linux and paths, but I can't find it.
By the way, the tree UML editor works fine with this code. If I open a .uml
file with the same code it doesn't give any errors.

thnx in advance.

Tatiana Fesenko wrote:

> Hello Aram,
>
> I tried to open the editor programmatically the way you did, it works
> fine. However, I had the same exception you had, when path was
> workspace-relative. Is path in your example absolute (something like
> 'C:/junit-workspace/TestProject/test.umlclass_diagram')?
>
> BTW, we open the diagram editor programattically in tests
> (org.eclipse.uml2.diagram.common.tests.UMLDiagramFacade#open ()):
> IWorkbenchPage page =
> workbench.getActiveWorkbenchWindow().getActivePage();
> IEditorPart editorPart = page .openEditor(new FileEditorInput((IFile)
> workspaceResource),
>
workbench.getEditorRegistry().getDefaultEditor(workspaceReso urce.getFullPath().toString()).getId());
> Code is a bit different from yours, it uses IFile. Probably it can solve
> your problem.
>
> Best wishes,
> Tatiana.
>
>> Hi,
>>
>> I have the following problem using UML2Tools plugin.
>>
>> I can open the uml2class_diagram files from my Eclipse,
>> however this does
>> not work when I do this programmatically. I get the following
>> error: "Cannot open input element. Reason: text editor does not have a
>> document provider".
>> All other files open fine.
>>
>> Here is the code that handles the opening:
>>
>> IFileStore fileStore = EFS.getLocalFileSystem().getStore(new
>> Path(path));
>> IDE.openEditorOnFileStore(PlatformUI.getWorkbench().getActiv eWorkbench
>> Window().getActivePage(), fileStore);
>>
>> I've already tried to launch eclipse with the -clean option.
>> Doesn't help.
>> Thanks in advance for the help.
>> Here is the complete stack trace of the exception:
>>
>> java.lang.NullPointerException
>> at
>> org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocum
>> entEditor$1.run(DiagramDocumentEditor.java:120)
>> at
>> org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalConte
>> xt.java:369)
>> at
>> org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:313)
>> at
>> org.eclipse.jface.window.ApplicationWindow$1.run(Application Window.jav
>> a:758)
>> at
>> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
>> at
>> org.eclipse.jface.window.ApplicationWindow.run(ApplicationWi ndow.java:
>> 755)
>> at
>> org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow. java:2451)
>> at
>> org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocum
>> entEditor.init(DiagramDocumentEditor.java:129)
>> at
>> org.eclipse.ui.internal.EditorManager.createSite(EditorManag er.java:79
>> 4)
>> at
>> org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReferen
>> ce.java:643)
>> at
>> org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.jav
>> a:426)
>> at
>> org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartRe
>> ference.java:592)
>> at
>> org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:29 9)
>> at
>> org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(Prese
>> ntablePart.java:179)
>> at
>> org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.selec
>> t(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.sel
>> ectPart(TabbedStackPresentation.java:400)
>> at
>> org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartSta
>> ck.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 SashContai
>> ner.java:63)
>> at
>> org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorA reaHelper.
>> java:217)
>> at
>> org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAre aHelper.ja
>> va:207)
>> at
>> org.eclipse.ui.internal.EditorManager.createEditorTab(Editor Manager.ja
>> va:774)
>> at
>> org.eclipse.ui.internal.EditorManager.openEditorFromDescript or(EditorM
>> anager.java:673)
>> at
>> org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:63
>> 4)
>> at
>> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchP
>> age.java:2737)
>> at
>> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.jav
>> a:2651)
>> at
>> org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPag e.java:264
>> 3)
>> 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:25
>> 90)
>> at
>> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:25
>> 74)
>> at
>> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:25
>> 57)
>> at org.eclipse.ui.ide.IDE.openEditorOnFileStore(IDE.java:1090)
>> at
>> org.kuleuven.grecco.views.GreccoConcernLibraryView$3.run(Gre ccoConcern
>> LibraryView.java:233)
>> at
>> org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
>> at
>> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(
>> ActionContributionItem.java:546)
>> at org.eclipse.jface.action.ActionContributionItem.access$
>> (ActionContributionItem.java:490)
>> at
>> org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionCo
>> ntributionItem.java:402)
>> at
>> org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
>> at
>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3319)
>> at
>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2971)
>> 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.jav
>> a:289)
>> at
>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java
>> :461)
>> at
>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>> at
>> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplic
>> ation.java:106)
>> at
>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle
>> .java:169)
>> at
>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplic
>> ation(EclipseAppLauncher.java:106)
>> at
>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(Ecl
>> ipseAppLauncher.java:76)
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.jav
>> a:363)
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.jav
>> a:176)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.j
>> ava:39)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccess
>> orImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:585)
>> 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)

--
Aram Hovsepyan
Distrinet research group
Katholieke Universiteit Leuven
Re: cannot open diagram programmatically [message #619722 is a reply to message #474403] Tue, 20 May 2008 07:25 Go to previous message
Aram Hovsepyan is currently offline Aram Hovsepyan
Messages: 34
Registered: July 2009
Member
Hey guys,

I still can't find it. I have to give a demo at thursday and I'd like to
have it working :). The UML2 tree editor works fine while the diagram
editor always results in an error saying that he can't find the file, while
the file is there.

thnx.

Aram Hovsepyan wrote:

> Hi,
>
> I have the following problem using UML2Tools plugin.
>
> I can open the uml2class_diagram files from my Eclipse, however
> this does
> not work when I do this programmatically. I get the following
> error: "Cannot open input element. Reason: text editor does not have a
> document provider".
>
> All other files open fine.
>
> Here is the code that handles the opening:
>
> IFileStore fileStore = EFS.getLocalFileSystem().getStore(new Path(path));
>
IDE.openEditorOnFileStore(PlatformUI.getWorkbench().getActiv eWorkbenchWindow().getActivePage(),
> fileStore);
>
> I've already tried to launch eclipse with the -clean option.
> Doesn't help. Thanks in advance for the help.
>
>
>
> Here is the complete stack trace of the exception:
>
> java.lang.NullPointerException
> at
>
org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocumentEditor$1.run(DiagramDocumentEditor.java:120)
> at
>
org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalContext.java:369)
> at
>
org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:313)
> at
>
org.eclipse.jface.window.ApplicationWindow$1.run(Application Window.java:758)
> at
>
org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
> at
> org.eclipse.jface.window.ApplicationWindow.run(ApplicationWi ndow.java:755)
> at
>
org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow. java:2451)
> at
>
org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocumentEditor.init(DiagramDocumentEditor.java:129)
> at
>
org.eclipse.ui.internal.EditorManager.createSite(EditorManag er.java:794)
> at
>
org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReference.java:643)
> 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$1
(WorkbenchPage.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:2557)
> at org.eclipse.ui.ide.IDE.openEditorOnFileStore(IDE.java:1090)
> at
>
org.kuleuven.grecco.views.GreccoConcernLibraryView$3.run(Gre ccoConcernLibraryView.java:233)
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
> at
>
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:546)
> at org.eclipse.jface.action.ActionContributionItem.access$
> (ActionContributionItem.java:490)
> at
>
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:402)
> at
> org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101) at
>
org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3319)
> at
> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2971)
> 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
>
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
> 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(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.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)

--
Aram Hovsepyan
Distrinet research group
Katholieke Universiteit Leuven
Re: cannot open diagram programmatically [message #619812 is a reply to message #474411] Wed, 21 May 2008 12:49 Go to previous message
Tatiana Fesenko is currently offline Tatiana Fesenko
Messages: 530
Registered: July 2009
Senior Member
Hi Aram,

Have you solved the problem? Could you please try to programmatically open
other GMF-generated diagrams, say, Taipan.

I'm installing Linux on my machine to check the problem.

Tatiana.

> Hey guys,
>
> I still can't find it. I have to give a demo at thursday and
> I'd like to
> have it working :). The UML2 tree editor works fine while the diagram
> editor always results in an error saying that he can't find the file,
> while
> the file is there.
> thnx.
>
> Aram Hovsepyan wrote:
>
>> Hi,
>>
>> I have the following problem using UML2Tools plugin.
>>
>> I can open the uml2class_diagram files from my Eclipse, however
>> this does
>> not work when I do this programmatically. I get the following
>> error: "Cannot open input element. Reason: text editor does not have
>> a
>> document provider".
>> All other files open fine.
>>
>> Here is the code that handles the opening:
>>
>> IFileStore fileStore = EFS.getLocalFileSystem().getStore(new
>> Path(path));
>>
> IDE.openEditorOnFileStore(PlatformUI.getWorkbench().getActiv eWorkbench
> Window().getActivePage(),
>
>> fileStore);
>>
>> I've already tried to launch eclipse with the -clean option. Doesn't
>> help. Thanks in advance for the help.
>>
>> Here is the complete stack trace of the exception:
>>
>> java.lang.NullPointerException
>> at
> org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocum
> entEditor$1.run(DiagramDocumentEditor.java:120)
>
>> at
>>
> org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalConte
> xt.java:369)
>
>> at
>>
> org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:313)
>
>> at
>>
> org.eclipse.jface.window.ApplicationWindow$1.run(Application Window.jav
> a:758)
>
>> at
>>
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
>
>> at
>> org.eclipse.jface.window.ApplicationWindow.run(ApplicationWi ndow.java
>> :755) at
>>
> org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow. java:2451)
>
>> at
>>
> org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocum
> entEditor.init(DiagramDocumentEditor.java:129)
>
>> at
>>
> org.eclipse.ui.internal.EditorManager.createSite(EditorManag er.java:79
> 4)
>
>> at
>>
> org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReferen
> ce.java:643)
>
>> at
>>
> org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.jav
> a:426)
>
>> at
>>
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartRe
> ference.java:592)
>
>> at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:29 9) at
>>
> org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(Prese
> ntablePart.java:179)
>
>> at
>>
> org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.selec
> t(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.sel
> ectPart(TabbedStackPresentation.java:400)
>
>> at
>>
> org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartSta
> ck.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 SashContai
> ner.java:63)
>
>> at
>>
> org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorA reaHelper.
> java:217)
>
>> at
>>
> org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAre aHelper.ja
> va:207)
>
>> at
>>
> org.eclipse.ui.internal.EditorManager.createEditorTab(Editor Manager.ja
> va:774)
>
>> at
>>
> org.eclipse.ui.internal.EditorManager.openEditorFromDescript or(EditorM
> anager.java:673)
>
>> at
>>
> org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:63
> 4)
>
>> at
>>
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchP
> age.java:2737)
>
>> at
>>
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.jav
> a:2651)
>
>> at
>> org.eclipse.ui.internal.WorkbenchPage.access$1
> (WorkbenchPage.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:2
>> 590)
>> at
>> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2
>> 574)
>> at
>> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2
>> 557)
>> at org.eclipse.ui.ide.IDE.openEditorOnFileStore(IDE.java:1090)
>> at
> org.kuleuven.grecco.views.GreccoConcernLibraryView$3.run(Gre ccoConcern
> LibraryView.java:233)
>
>> at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 ) at
>>
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(
> ActionContributionItem.java:546)
>
>> at org.eclipse.jface.action.ActionContributionItem.access$
>> (ActionContributionItem.java:490)
>> at
> org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionCo
> ntributionItem.java:402)
>
>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101) at
>>
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3319)
>
>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2971)
>> 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.jav
> a:289)
>
>> at
>>
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java
> :461)
>
>> at
>>
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>
>> at
>>
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplic
> ation.java:106)
>
>> at
>>
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle
> .java:169)
>
>> at
>>
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplic
> ation(EclipseAppLauncher.java:106)
>
>> at
>>
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(Ecl
> ipseAppLauncher.java:76)
>
>> at
>>
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.jav
> a:363)
>
>> at
>>
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.jav
> a:176)
>
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
>>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.j
> ava:39)
>
>> at
>>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccess
> orImpl.java:25)
>
>> at java.lang.reflect.Method.invoke(Method.java:585)
>> 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)
Re: cannot open diagram programmatically [message #619816 is a reply to message #474411] Thu, 22 May 2008 14:32 Go to previous message
Tatiana Fesenko is currently offline Tatiana Fesenko
Messages: 530
Registered: July 2009
Senior Member
Hi Aram,

I found the root of the problem.

If diagram file is located in eclipse workspace, it is opened correctly in
both Windows and Linux (I use Ubuntu) systems.
However, when I tried to open diagrams that are not in workspace, it didn't
work, while *.uml files were opened well.
The reason is, that when file isn't located in Workspace, IDE.getEditorInput()
is instanceof FileStoreEditorInput. It is used as a parameter in UMLDiagramEditor#setDocumentProvider(IEditorInput)
..
UMLDiagramEditor#setDocumentProvider(IEditorInput) sets null in such case.
That's why getDocumentProvider() returns null after and you see NPE.

Solution is to add diagram file to your workspace before opening it. It should
help.
I hope I wasn't late with the advice.

Best wishes,
Tatiana.

> Hey guys,
>
> I still can't find it. I have to give a demo at thursday and
> I'd like to
> have it working :). The UML2 tree editor works fine while the diagram
> editor always results in an error saying that he can't find the file,
> while
> the file is there.
> thnx.
>
> Aram Hovsepyan wrote:
>
>> Hi,
>>
>> I have the following problem using UML2Tools plugin.
>>
>> I can open the uml2class_diagram files from my Eclipse, however
>> this does
>> not work when I do this programmatically. I get the following
>> error: "Cannot open input element. Reason: text editor does not have
>> a
>> document provider".
>> All other files open fine.
>>
>> Here is the code that handles the opening:
>>
>> IFileStore fileStore = EFS.getLocalFileSystem().getStore(new
>> Path(path));
>>
> IDE.openEditorOnFileStore(PlatformUI.getWorkbench().getActiv eWorkbench
> Window().getActivePage(),
>
>> fileStore);
>>
>> I've already tried to launch eclipse with the -clean option. Doesn't
>> help. Thanks in advance for the help.
>>
>> Here is the complete stack trace of the exception:
>>
>> java.lang.NullPointerException
>> at
> org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocum
> entEditor$1.run(DiagramDocumentEditor.java:120)
>
>> at
>>
> org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalConte
> xt.java:369)
>
>> at
>>
> org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:313)
>
>> at
>>
> org.eclipse.jface.window.ApplicationWindow$1.run(Application Window.jav
> a:758)
>
>> at
>>
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
>
>> at
>> org.eclipse.jface.window.ApplicationWindow.run(ApplicationWi ndow.java
>> :755) at
>>
> org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow. java:2451)
>
>> at
>>
> org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocum
> entEditor.init(DiagramDocumentEditor.java:129)
>
>> at
>>
> org.eclipse.ui.internal.EditorManager.createSite(EditorManag er.java:79
> 4)
>
>> at
>>
> org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReferen
> ce.java:643)
>
>> at
>>
> org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.jav
> a:426)
>
>> at
>>
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartRe
> ference.java:592)
>
>> at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:29 9) at
>>
> org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(Prese
> ntablePart.java:179)
>
>> at
>>
> org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.selec
> t(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.sel
> ectPart(TabbedStackPresentation.java:400)
>
>> at
>>
> org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartSta
> ck.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 SashContai
> ner.java:63)
>
>> at
>>
> org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorA reaHelper.
> java:217)
>
>> at
>>
> org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAre aHelper.ja
> va:207)
>
>> at
>>
> org.eclipse.ui.internal.EditorManager.createEditorTab(Editor Manager.ja
> va:774)
>
>> at
>>
> org.eclipse.ui.internal.EditorManager.openEditorFromDescript or(EditorM
> anager.java:673)
>
>> at
>>
> org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:63
> 4)
>
>> at
>>
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchP
> age.java:2737)
>
>> at
>>
> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.jav
> a:2651)
>
>> at
>> org.eclipse.ui.internal.WorkbenchPage.access$1
> (WorkbenchPage.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:2
>> 590)
>> at
>> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2
>> 574)
>> at
>> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2
>> 557)
>> at org.eclipse.ui.ide.IDE.openEditorOnFileStore(IDE.java:1090)
>> at
> org.kuleuven.grecco.views.GreccoConcernLibraryView$3.run(Gre ccoConcern
> LibraryView.java:233)
>
>> at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 ) at
>>
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(
> ActionContributionItem.java:546)
>
>> at org.eclipse.jface.action.ActionContributionItem.access$
>> (ActionContributionItem.java:490)
>> at
> org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionCo
> ntributionItem.java:402)
>
>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101) at
>>
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3319)
>
>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2971)
>> 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.jav
> a:289)
>
>> at
>>
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java
> :461)
>
>> at
>>
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>
>> at
>>
> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplic
> ation.java:106)
>
>> at
>>
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle
> .java:169)
>
>> at
>>
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplic
> ation(EclipseAppLauncher.java:106)
>
>> at
>>
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(Ecl
> ipseAppLauncher.java:76)
>
>> at
>>
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.jav
> a:363)
>
>> at
>>
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.jav
> a:176)
>
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
>>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.j
> ava:39)
>
>> at
>>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccess
> orImpl.java:25)
>
>> at java.lang.reflect.Method.invoke(Method.java:585)
>> 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)
Re: cannot open diagram programmatically [message #619823 is a reply to message #474417] Mon, 26 May 2008 08:16 Go to previous message
Aram Hovsepyan is currently offline Aram Hovsepyan
Messages: 34
Registered: July 2009
Member
Hi Tatiana,

Thnx for the help. I managed to get it working by creating a link to the
diagram and .uml files in the current workspace.

file.createLink(location, IResource.NONE, null);

Regards,
Aram.



Tatiana Fesenko wrote:

> Hi Aram,
>
> I found the root of the problem.
>
> If diagram file is located in eclipse workspace, it is opened correctly in
> both Windows and Linux (I use Ubuntu) systems.
> However, when I tried to open diagrams that are not in workspace, it
> didn't work, while *.uml files were opened well.
> The reason is, that when file isn't located in Workspace,
> IDE.getEditorInput() is instanceof FileStoreEditorInput. It is used as a
> parameter in UMLDiagramEditor#setDocumentProvider(IEditorInput) .
> UMLDiagramEditor#setDocumentProvider(IEditorInput) sets null in such case.
> That's why getDocumentProvider() returns null after and you see NPE.
>
> Solution is to add diagram file to your workspace before opening it. It
> should help.
> I hope I wasn't late with the advice.
>
> Best wishes,
> Tatiana.
>
>> Hey guys,
>>
>> I still can't find it. I have to give a demo at thursday and
>> I'd like to
>> have it working :). The UML2 tree editor works fine while the diagram
>> editor always results in an error saying that he can't find the file,
>> while
>> the file is there.
>> thnx.
>>
>> Aram Hovsepyan wrote:
>>
>>> Hi,
>>>
>>> I have the following problem using UML2Tools plugin.
>>>
>>> I can open the uml2class_diagram files from my Eclipse, however
>>> this does
>>> not work when I do this programmatically. I get the following
>>> error: "Cannot open input element. Reason: text editor does not have
>>> a
>>> document provider".
>>> All other files open fine.
>>>
>>> Here is the code that handles the opening:
>>>
>>> IFileStore fileStore = EFS.getLocalFileSystem().getStore(new
>>> Path(path));
>>>
>> IDE.openEditorOnFileStore(PlatformUI.getWorkbench().getActiv eWorkbench
>> Window().getActivePage(),
>>
>>> fileStore);
>>>
>>> I've already tried to launch eclipse with the -clean option. Doesn't
>>> help. Thanks in advance for the help.
>>>
>>> Here is the complete stack trace of the exception:
>>>
>>> java.lang.NullPointerException
>>> at
>> org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocum
>> entEditor$1.run(DiagramDocumentEditor.java:120)
>>
>>> at
>>>
>> org.eclipse.jface.operation.ModalContext.runInCurrentThread( ModalConte
>> xt.java:369)
>>
>>> at
>>>
>> org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:313)
>>
>>> at
>>>
>> org.eclipse.jface.window.ApplicationWindow$1.run(Application Window.jav
>> a:758)
>>
>>> at
>>>
>> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
>>
>>> at
>>> org.eclipse.jface.window.ApplicationWindow.run(ApplicationWi ndow.java
>>> :755) at
>>>
>> org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow. java:2451)
>>
>>> at
>>>
>> org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.Di agramDocum
>> entEditor.init(DiagramDocumentEditor.java:129)
>>
>>> at
>>>
>> org.eclipse.ui.internal.EditorManager.createSite(EditorManag er.java:79
>> 4)
>>
>>> at
>>>
>> org.eclipse.ui.internal.EditorReference.createPartHelper(Edi torReferen
>> ce.java:643)
>>
>>> at
>>>
>> org.eclipse.ui.internal.EditorReference.createPart(EditorRef erence.jav
>> a:426)
>>
>>> at
>>>
>> org.eclipse.ui.internal.WorkbenchPartReference.getPart(Workb enchPartRe
>> ference.java:592)
>>
>>> at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:29 9) at
>>>
>> org.eclipse.ui.internal.presentations.PresentablePart.setVis ible(Prese
>> ntablePart.java:179)
>>
>>> at
>>>
>> org.eclipse.ui.internal.presentations.util.PresentablePartFo lder.selec
>> t(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.sel
>> ectPart(TabbedStackPresentation.java:400)
>>
>>> at
>>>
>> org.eclipse.ui.internal.PartStack.refreshPresentationSelecti on(PartSta
>> ck.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 SashContai
>> ner.java:63)
>>
>>> at
>>>
>> org.eclipse.ui.internal.EditorAreaHelper.addToLayout(EditorA reaHelper.
>> java:217)
>>
>>> at
>>>
>> org.eclipse.ui.internal.EditorAreaHelper.addEditor(EditorAre aHelper.ja
>> va:207)
>>
>>> at
>>>
>> org.eclipse.ui.internal.EditorManager.createEditorTab(Editor Manager.ja
>> va:774)
>>
>>> at
>>>
>> org.eclipse.ui.internal.EditorManager.openEditorFromDescript or(EditorM
>> anager.java:673)
>>
>>> at
>>>
>> org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:63
>> 4)
>>
>>> at
>>>
>> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchP
>> age.java:2737)
>>
>>> at
>>>
>> org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.jav
>> a:2651)
>>
>>> at
>>> org.eclipse.ui.internal.WorkbenchPage.access$1
>> (WorkbenchPage.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:2
>>> 590)
>>> at
>>> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2
>>> 574)
>>> at
>>> org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2
>>> 557)
>>> at org.eclipse.ui.ide.IDE.openEditorOnFileStore(IDE.java:1090)
>>> at
>> org.kuleuven.grecco.views.GreccoConcernLibraryView$3.run(Gre ccoConcern
>> LibraryView.java:233)
>>
>>> at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 ) at
>>>
>> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(
>> ActionContributionItem.java:546)
>>
>>> at org.eclipse.jface.action.ActionContributionItem.access$
>>> (ActionContributionItem.java:490)
>>> at
>> org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionCo
>> ntributionItem.java:402)
>>
>>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
>>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101) at
>>>
>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3319)
>>
>>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2971)
>>> 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.jav
>> a:289)
>>
>>> at
>>>
>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java
>> :461)
>>
>>> at
>>>
>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>>
>>> at
>>>
>> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplic
>> ation.java:106)
>>
>>> at
>>>
>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle
>> .java:169)
>>
>>> at
>>>
>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplic
>> ation(EclipseAppLauncher.java:106)
>>
>>> at
>>>
>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(Ecl
>> ipseAppLauncher.java:76)
>>
>>> at
>>>
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.jav
>> a:363)
>>
>>> at
>>>
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.jav
>> a:176)
>>
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
>>>
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.j
>> ava:39)
>>
>>> at
>>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccess
>> orImpl.java:25)
>>
>>> at java.lang.reflect.Method.invoke(Method.java:585)
>>> 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)

--
Aram Hovsepyan
Distrinet research group
Katholieke Universiteit Leuven
Previous Topic:[Announce] MDT UML2TOOLS 0.8.0RC1 is available
Next Topic:Viewing element tagged values on Properties tab when viewing UML (class) diagram?
Goto Forum:
  


Current Time: Thu Oct 23 00:10:05 GMT 2014

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

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