Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Extension point schema and plugin.xml editor
Extension point schema and plugin.xml editor [message #462216] Wed, 24 January 2007 19:30 Go to next message
Eclipse UserFriend
Originally posted by: jraven76.gmail.com

I've been working on adding my own extension points to my "core" plug-in. Everything works great, but there is one little issue that I just can't seem to figure out.

Should the plugin.xml editor recognize the new schema that I created to go along with the extension point? In other words, when I add the new extension to the plugin.xml editor (for a third-party plugin that is contributing through the extension point) and right click on it, should I be able to add my elements through the editor? Similar to when I want to add a view, I first add the View extension to my plugin, then right click again to "Add --> View". Should the editor be smart enough to do this for my newly defined extension point? If so, what might I be missing?

In addition (and most probably related), when I add my extension to the plugin.xml file manually (see below), the schema it is using tells me that the "treeitem" element is not valid, even though it works at runtime.

<extension point="my.plugin.treeItem">
   <treeitem
        class="my.plugin.TreeItem"
        name="Root">
   </treeitem>           
</extension>


Any advice would be most appreciated :)
Re: Extension point schema and plugin.xml editor [message #462229 is a reply to message #462216] Wed, 24 January 2007 22:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jraven76.gmail.com

Note: I'm using MyEclipse 5.0.1 GA, which uses Eclipse 3.2.1.
Re: Extension point schema and plugin.xml editor [message #462259 is a reply to message #462216] Thu, 25 January 2007 13:18 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

I'm not 100% sure of the black magic part, but here's what I do know:

When you are working on your core plugin in your workspace, you can
create test plugins and the PDE editor will see your schema.

Within a self-hosted runtime, that doesn't work (i.e. you can't test
creating extensions in the self-hosted eclipse, only in the same eclipse
that has your core plugin in the workspace).

When your plugin is deployed and you want people to be able to use it
you need to deploy both your plugin and a source plugin. At least
that's how the platform does it. org.eclipse.ui contains most of the
extension points (org.eclipse.ui.workbench contains most of the working
code), but
org.eclipse.rcp.source_3.3.0.v20070116b-fFIEGjaR9y-RFRP/src/ org.eclipse.ui_3.3.0.I20070123-0800/schema
contains all of the .exsd files. Without that in the PDE editor all you
see is Generic ... I think the source plugin usually has a pde extension
in it.

Later,
PW


Re: Extension point schema and plugin.xml editor [message #462266 is a reply to message #462259] Thu, 25 January 2007 14:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jraven76.gmail.com

&gt; I'm not 100% sure of the black magic part, but here's
&gt; what I do know:
&gt;
&gt; When you are working on your core plugin in your
&gt; workspace, you can
&gt; create test plugins and the PDE editor will see your
&gt; schema.

See, I think that isn't happening for whatever reason. In my own workspace, I'll add the custom extension to my "third-party" plug-in, but it never reads the schema and therefore the PDE doesn't recognize the elements I've added. Now, if I go into the XML and add a entry manually, the PDE will reverse engineer the information and display in the PDE, but I can't add information directly through the PDE. It all works fine at runtime. It's wierd. I have to be missing something. There's just so little documentation on this sort of thing.
Re: Extension point schema and plugin.xml editor [message #462385 is a reply to message #462266] Sun, 28 January 2007 17:13 Go to previous message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
There may be a bug, which you could report at https://bugs.eclipse.org. There may also be a case where if you have V1 of the plugin already installed in your eclipse, and you're developing V2 which you have the schema for, then PDE might be using the V1 schema. I've certainly seen some similar things for other cases where PDE has been complaining but it's run fine.

One thing to try would be to clean out the PDE specific information cached in .metadata/.plugins/org.eclipse.pde.core (or something like that) and then starting Eclipse (don't do it whilst it's running ...) It might be the schema is cached in PDE and then not refreshed after editing, which is why it doesn't show up.

If this does work, then filing a bug is a good idea ...

Alex.
Previous Topic:PreferenceFiedlEditor customize
Next Topic:Problem about ComboBoxCellEditor, loading dynamic items.
Goto Forum:
  


Current Time: Sat Sep 07 10:34:05 GMT 2024

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

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

Back to the top