Greg,
There seems to be two issues:
1. Sapphire installation dependency using
P2
2. NPE in DiagramNodePart when the default action is not
loaded.
Although issue 2 is caused by issue 1, we should guard
against this NPE in DiagramNodePart nonetheless.
Could you open bugs for these two
issues?
Thanks,
Shenxue
Hey Sapphire team,
I'm working on rolling out my first sapphire based editor (Yeah!). In
this process I built my update-site and included all the dependencies in my
updatesite (sapphire and graphiti). I then installed my plugins into a
vanilla HeliosSR2/JavaEE package. After installation and restart, when I
first open my sapphire based editor (that has a diagram page) I get this error
[1].
Next I manually installed all the features of sapphire from sapphire
update-site and restarted and don't get this exception. So I went back and
looked after I first installed my plugins, here is the list of the sapphire
plugins that were installed into the eclipse install [2]. So it seems that
these were the only plugins pulled in by p2's dependency resolver/transitive
dependencies. Taking a look at the actual NPE location it seems
that it can't find a default action handler which I guess is because not
all of the plugins were available? Not for sure. What is weird is
that once I install sapphire UI framework feature from the updatesite, the only
new plugin that is installed is the org.eclipse.sapphire.osgi.fragment.
But once this is available (along with the sapphire UI feature), the
diagram editor loads just fine. Here is the list of plugins that do work
for me (after installing the Sapphire UI feature) [3]. So it seems that
leaving installation of dependencies up to the p2 black magic is not quite
enough to make it work.
However, this is not a blocker issue for me, because all I had to do in my
feature.xml is to add a dependency on the sapphire UI framework feature and then
the right set of plugins will be installed. So this post is mainly to
mention this in case any other adopters run into this and also see if the
sapphire team thinks this should be addressed. If so let me know and I can
open a bug, if not, I'm personally fine with the workaround of just listing the
sapphire UI framework as a dependency in feature.xml.
Thanks again sapphire team, hope to be rolling out my new editor in new few
weeks. I'll post back once I've done a blog post where I plan ton plugging
Sapphire.
[1]:java.lang.NullPointerException
at
org.eclipse.sapphire.ui.diagram.editor.DiagramNodePart.init(DiagramNodePart.java:146)
at
org.eclipse.sapphire.ui.SapphirePart.init(SapphirePart.java:150)
at
org.eclipse.sapphire.ui.diagram.editor.DiagramNodeTemplate.createNewNodePart(DiagramNodeTemplate.java:367)
at
org.eclipse.sapphire.ui.diagram.editor.DiagramNodeTemplate.init(DiagramNodeTemplate.java:118)
at
org.eclipse.sapphire.ui.SapphirePart.init(SapphirePart.java:150)
at
org.eclipse.sapphire.ui.diagram.editor.SapphireDiagramEditorPagePart.init(SapphireDiagramEditorPagePart.java:85)
at
org.eclipse.sapphire.ui.SapphirePart.init(SapphirePart.java:150)
at
org.eclipse.sapphire.ui.swt.graphiti.editor.SapphireDiagramEditor.<init>(SapphireDiagramEditor.java:107)
at
com.liferay.ide.eclipse.service.ui.ServiceBuilderEditor.createDiagramPages(ServiceBuilderEditor.java:31)
at
org.eclipse.sapphire.ui.SapphireEditor.addPages(SapphireEditor.java:368)
at
org.eclipse.ui.forms.editor.FormEditor.createPages(FormEditor.java:138)
at
org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:348)
[2]: org.eclipse.sapphire.java
org.eclipse.sapphire.modeling
org.eclipse.sapphire.modeling.xml
org.eclipse.sapphire.osgi
org.eclipse.sapphire.platform
org.eclipse.sapphire.ui
org.eclipse.sapphire.ui.swt.graphiti
org.eclipse.sapphire.ui.swt.xml.editor
org.eclipse.sapphire.workspace
org.eclipse.sapphire.workspace.ui
[3]: org.eclipse.sapphire.java
org.eclipse.sapphire.modeling
org.eclipse.sapphire.modeling.xml
org.eclipse.sapphire.osgi
org.eclipse.sapphire.platform
org.eclipse.sapphire.platform.fragment
org.eclipse.sapphire.ui
org.eclipse.sapphire.ui.swt.graphiti
org.eclipse.sapphire.ui.swt.xml.editor
org.eclipse.sapphire.workspace
org.eclipse.sapphire.workspace.ui
--
Greg
Amerson
Liferay, Inc.