Extension point schema and plugin.xml editor [message #462216] |
Wed, 24 January 2007 19:30 |
Eclipse User |
|
|
|
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 #462259 is a reply to message #462216] |
Thu, 25 January 2007 13:18 |
|
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
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
|
|
|
Re: Extension point schema and plugin.xml editor [message #462266 is a reply to message #462259] |
Thu, 25 January 2007 14:32 |
Eclipse User |
|
|
|
Originally posted by: jraven76.gmail.com
> 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.
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.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03728 seconds