Configuration of palette and override files by fragments [message #128849] |
Tue, 18 July 2006 01:39  |
Eclipse User |
|
|
|
Originally posted by: f-l.gmx.net
Hello,
is it possible to configure the palette (and possibly override settings...)
in a fragment, instead of a base plugin?
Our development team split in two groups is looking for an elegant way to
divide the work on a plugin containing components of two kinds: basic and
complex ones. For administrative and other reasons, we'd prefer not to share
a common plugin project. Having a separate fragment project from a base
plugin project looked like the best way to bring in the complex components
into the set of basic ones. Simplified, our fragment project contains edit
parts, overrides files, bean infos and the widget classes for the complex
components. (Life is more complex in reality: instead of having two projects
for plugin and fragment, we have to have four: two plugins and two
fragments, additionally distinguishing between a design and a runtime part
for other reasons.)
When specifying a palette file in the fragment.xml which is located in the
fragment project, on loading it VE runs into the exception attached below
(all on Eclipse 3.1.1, VE 1.1.0.1, EMF 2.1.0, GEF 3.1.1).
Everything works fine, when the the palette file specified in the
fragment.xml is located in the base plugin project (in that case the host of
the palette file specification is irrelevant, only the host of the
palette.xmi file itself counts, i.e. it might be even specified in the
plugin.xml). But that's evidently not what is needed in our case. We can
live fine without having specified a palette file in the base plugin
project, since this should be done in the fragment which is mandatory to
exist. So we don't need to override any palette settings, as the the
fragment palette file will contain the complex as well as the basic
components, i.e. the full palette information.
Similar to the palette file behaviour, I've problems with making VE load the
override files for our complex components, again contained in the fragment
project. No trouble with the overrides for the basic set contained in the
base plugin project.
Have I overlooked anything?
Or do you have any suggestions for my problem?
Thanks,
Fedor
java.io.FileNotFoundException: /palettecomplex/dsacomplexwidgets.xmi
at
org.eclipse.osgi.framework.internal.protocol.bundleentry.Han dler.findBundleEntry(Handler.java:42)
at
org.eclipse.osgi.framework.internal.core.BundleResourceHandl er.openConnection(BundleResourceHandler.java:155)
at java.net.URL.openConnection(URL.java:896)
at
org.eclipse.core.internal.boot.PlatformURLConnection.connect (PlatformURLConnection.java:88)
at
org.eclipse.core.internal.boot.PlatformURLConnection.connect (PlatformURLConnection.java:69)
at
org.eclipse.core.internal.boot.PlatformURLConnection.getInpu tStream(PlatformURLConnection.java:207)
at
org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createU RLInputStream(URIConverterImpl.java:557)
at
org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createI nputStream(URIConverterImpl.java:446)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:829)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
at
org.eclipse.jem.internal.util.emf.workbench.ProjectResourceS etImpl.demandLoad(ProjectResourceSetImpl.java:83)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:349)
at
org.eclipse.jem.internal.util.emf.workbench.ProjectResourceS etImpl.getResource(ProjectResourceSetImpl.java:262)
at
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart$DefaultVEContributor.contributePalleteCats(JavaVisu alEditorPart.java:1144)
at
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart$7.run(JavaVisualEditorPart.java:1586)
at
org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java:1044)
at org.eclipse.core.runtime.Platform.run(Platform.java:783)
at
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart$Setup$CreateRegistry.run(JavaVisualEditorPart.java: 1577)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)
|
|
|
|
|
|
Re: Configuration of palette and override files by fragments [message #129047 is a reply to message #128941] |
Fri, 21 July 2006 13:07  |
Eclipse User |
|
|
|
Originally posted by: f-l.gmx.net
Hello Rich,
thanks for the advice.
Since I've simply switched my efforts to try out changing the fragment to a
plugin, I haven't tried your code yet. In the shell of a plugin, everything
works fine...
But we believe several other issues to become problems at a later stage of
development, which may drive us to use fragments again, like package
sealing. I'll let you (and the newsgroup) now about the continuation of our
fragment story.
- Fedor
"Rich Kulp" <richkulp@us.NO_SPAM.ibm.com> schrieb im Newsbeitrag
news:e9ldoe$a44$1@utils.eclipse.org...
> The Eclipse code doesn't seem to look into fragments using the API that we
> are using. Give this a try, if it still fails, then I don't know what to
> do:
>
> <fragment>
>
> <extension
>
> point="org.eclipse.ve.java.core.contributors">
>
> <palette
>
> container="screeneditor.runtime.DSAWidgetsContainer"
>
> categories="/screeneditor.complex/palettecomplex/dsacomplexwidgets.xmi "/>
>
> </extension>
>
> </fragment>
>
> I think what is happening is that it doesn't realize that palette is in a
> fragment, so it is looking for palettecomplex... within only the plugin,
> and so it can't find it. I'm hoping that if you tell it that it is in the
> fragment (via the "/screeneditor.complex/") that it would look into the
> fragment instead.
>
> --
> Thanks,
> Rich Kulp
|
|
|
Re: Configuration of palette and override files by fragments [message #613551 is a reply to message #128849] |
Tue, 18 July 2006 10:27  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
We have no clue if fragments would work. :-( We've never even thought of
it, let alone tried it. Sorry.
Could you please append the palette contribution from the fragment's
plugin.xml? Maybe off the top of my head I can see something that could
be tried.
Also tell me what the plugin and fragments id's are.
--
Thanks,
Rich Kulp
|
|
|
Re: Configuration of palette and override files by fragments [message #613555 is a reply to message #128877] |
Tue, 18 July 2006 23:41  |
Eclipse User |
|
|
|
Originally posted by: f-l.gmx.net
Hi Rich,
the fragment.xml looks like
<fragment>
<extension
point="org.eclipse.ve.java.core.contributors">
<palette
container="screeneditor.runtime.DSAWidgetsContainer"
categories="palettecomplex/dsacomplexwidgets.xmi"/>
</extension>
</fragment>
and the plugin.xml (with container definition) of the base plugin is:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
<extension
point="org.eclipse.ui.views">
<view name="Screen"
category="repositories"
class="screeneditor.views.ScreenRepository"
id="screeneditor.views.ScreenRepository">
</view>
</extension>
<extension
name="Screen Editor"
point="org.eclipse.ui.editors">
<editor
class="screeneditor.editors.ScreenEditor"
contributorClass="screeneditor.editors.ScreenEditorContributor "
icon="icons/dummy.gif"
id="screeneditor.editors.ScreenEditor"
name="Screen Editor">
</editor>
</extension>
<extension
point="org.eclipse.ui.startup">
<startup class="screeneditor.ScreenEditorPlugin"/>
</extension>
<!-- needed for VE -->
<extension
point="org.eclipse.jdt.ui.classpathContainerPage">
<classpathContainerPage
name="DSA Widgets"
class=" org.eclipse.ve.internal.java.wizard.RegisteredClasspathConta inerWizardPage "
id="screeneditor.runtime.DSAWidgetsContainer">
</classpathContainerPage>
</extension>
<extension
point="org.eclipse.jdt.core.classpathContainerInitializer">
<classpathContainerInitializer
class=" org.eclipse.ve.internal.java.core.RegisteredClasspathContain erInitializer "
id="screeneditor.runtime.DSAWidgetsContainer">
</classpathContainerInitializer>
</extension>
<extension
point="org.eclipse.ve.java.core.registrations">
<registration
container="screeneditor.runtime.DSAWidgetsContainer"
description="DSA Widgets">
<library runtime="runtime/dsawidgets.jar"/>
</registration>
</extension>
<extension
point="org.eclipse.jem.beaninfo.registrations">
<registration
container="screeneditor.runtime.DSAWidgetsContainer">
<override
package="screeneditor.runtime.widgets"
path="overrides/screeneditor/runtime/widgets">
</override>
</registration>
<registration
container="org.eclipse.jdt.launching.JRE_CONTAINER">
<override
package="java.awt"
path="overrides/java/awt">
</override>
<override
package="javax.swing"
path="overrides/javax/swing">
</override>
<override
package="java.lang"
path="overrides/java/lang">
</override>
</registration>
</extension>
</plugin>
The fragment's id: "screeneditor.complex", the plugin's: "screeneditor".
Thanks,
Fedor
"Rich Kulp" <richkulp@us.NO_SPAM.ibm.com> schrieb im Newsbeitrag
news:e9ir4q$90g$1@utils.eclipse.org...
> We have no clue if fragments would work. :-( We've never even thought of
> it, let alone tried it. Sorry.
>
> Could you please append the palette contribution from the fragment's
> plugin.xml? Maybe off the top of my head I can see something that could be
> tried.
>
> Also tell me what the plugin and fragments id's are.
>
>
> --
> Thanks,
> Rich Kulp
|
|
|
Re: Configuration of palette and override files by fragments [message #613556 is a reply to message #128928] |
Wed, 19 July 2006 09:57  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
The Eclipse code doesn't seem to look into fragments using the API that
we are using. Give this a try, if it still fails, then I don't know what
to do:
<fragment>
<extension
point="org.eclipse.ve.java.core.contributors">
<palette
container="screeneditor.runtime.DSAWidgetsContainer"
categories="/screeneditor.complex/palettecomplex/dsacomplexwidgets.xmi "/>
</extension>
</fragment>
I think what is happening is that it doesn't realize that palette is in
a fragment, so it is looking for palettecomplex... within only the
plugin, and so it can't find it. I'm hoping that if you tell it that it
is in the fragment (via the "/screeneditor.complex/") that it would look
into the fragment instead.
--
Thanks,
Rich Kulp
|
|
|
Re: Configuration of palette and override files by fragments [message #613564 is a reply to message #128941] |
Fri, 21 July 2006 13:07  |
Eclipse User |
|
|
|
Originally posted by: f-l.gmx.net
Hello Rich,
thanks for the advice.
Since I've simply switched my efforts to try out changing the fragment to a
plugin, I haven't tried your code yet. In the shell of a plugin, everything
works fine...
But we believe several other issues to become problems at a later stage of
development, which may drive us to use fragments again, like package
sealing. I'll let you (and the newsgroup) now about the continuation of our
fragment story.
- Fedor
"Rich Kulp" <richkulp@us.NO_SPAM.ibm.com> schrieb im Newsbeitrag
news:e9ldoe$a44$1@utils.eclipse.org...
> The Eclipse code doesn't seem to look into fragments using the API that we
> are using. Give this a try, if it still fails, then I don't know what to
> do:
>
> <fragment>
>
> <extension
>
> point="org.eclipse.ve.java.core.contributors">
>
> <palette
>
> container="screeneditor.runtime.DSAWidgetsContainer"
>
> categories="/screeneditor.complex/palettecomplex/dsacomplexwidgets.xmi "/>
>
> </extension>
>
> </fragment>
>
> I think what is happening is that it doesn't realize that palette is in a
> fragment, so it is looking for palettecomplex... within only the plugin,
> and so it can't find it. I'm hoping that if you tell it that it is in the
> fragment (via the "/screeneditor.complex/") that it would look into the
> fragment instead.
>
> --
> Thanks,
> Rich Kulp
|
|
|
Powered by
FUDForum. Page generated in 0.04485 seconds