What are the targetIDs of WST editors? [message #136778] |
Tue, 06 September 2005 10:53  |
Eclipse User |
|
|
|
Originally posted by: agilbert.invalidemail.com
Hi,
I'd like to extend the popupMenus of the WST 0.7 editors (mainly html/xml
JSP editors). What are the targetIDs of those editors?
Regards,
Alain Gilbert
|
|
|
Re: What are the targetIDs of WST editors? [message #137211 is a reply to message #136778] |
Wed, 07 September 2005 22:15   |
Eclipse User |
|
|
|
On Tue, 06 Sep 2005 10:53:31 -0400, Alain Gilbert <agilbert@invalidemail=
..com> wrote:
> What are the targetIDs of those editors?
Wow, finally a question we actually have some documentation for! :)
See
Editor related IDs
in
http://www.eclipse.org/webtools/wst/components/sse/overview. html
In brief,
To contribute, a "target id" of some kind is needed. For Structured Text=
editors, the target id is generated based on the content type in the ed=
itor, type of editor, place to contribute. The target id looks like: >co=
ntent type<.>editor type keyword<.>place to contribute keyword<
[... such as ... ] To contribute to *xml source editor's popup menu*, us=
e target id "org.eclipse.core.runtime.xml.source.EditorContext
|
|
|
|
Re: What are the targetIDs of WST editors? [message #137400 is a reply to message #137331] |
Thu, 08 September 2005 12:58   |
Eclipse User |
|
|
|
Originally posted by: amywu.us.DELETETHISPART.ibm.com
Actually, the document David referred to needs a tiny bit of updating due to
changes made in:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=104233
But as for your problem, Alain, if you are trying to contribute a popup menu
while editing JSP content, you should use the targetID
"org.eclipse.jst.jsp.core.source.EditorContext"
The editor related id lookup is not smart enough to check the embedded
content type within JSP (XML, HTML). Of course, you could open a bug
requesting for this feature. Hope this works!
-amy
"Alain Gilbert" <agilbert@invalidemail.com> wrote in message
news:dfperm$17i$1@news.eclipse.org...
> > To contribute to *xml source editor's popup menu*, use target id
> > "org.eclipse.core.runtime.xml.source.EditorContext
>
> Thanks David,
>
> I had seen this doc recently. It could be completed to include the exact
> content types of STEs. The "org.eclipse.core.runtime." prefix was not
> obvious to me.
>
> However my plug-in is still not working for JSP files (either in html or
xml
> format) but does for the platform text editor. The menu item is not being
> added to the popup menu.
>
> Follows an excerpt of my plugin.xml file:
> <extension point="org.eclipse.ui.popupMenus">
> <viewerContribution targetID="#TextEditorContext"
> id="com.taleo.tools.plugins.jsf.TextEditorContribution">
> <action label="Find Managed Bean"
> class="com.taleo.tools.plugins.jsf.actions.FindManagedBeanType "
> menubarPath="additions"
> id="com.taleo.tools.plugins.jsf.findManagedBean1"/>
> </viewerContribution>
> <viewerContribution
> targetID="org.eclipse.core.runtime.xml.source.EditorContext "
> id="com.taleo.tools.plugins.jsf.XmlEditorContribution">
> <action label="Find Managed Bean"
> class="com.taleo.tools.plugins.jsf.actions.FindManagedBeanType "
> menubarPath="additions"
> id="com.taleo.tools.plugins.jsf.findManagedBean2"/>
> </viewerContribution>
> <viewerContribution
> targetID="org.eclipse.core.runtime.html.source.EditorContext "
> id="com.taleo.tools.plugins.jsf.HtmlEditorContribution">
> <action label="Find Managed Bean"
> class="com.taleo.tools.plugins.jsf.actions.FindManagedBeanType "
> menubarPath="additions"
> id="com.taleo.tools.plugins.jsf.findManagedBean3"/>
> </viewerContribution>
> </extension>
>
> The last 2 viewer contributions are not considered. What am I doing wrong?
>
> Regards,
> Alain Gilbert
>
>
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.58193 seconds