Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » extend javascript editor
extend javascript editor [message #1012550] Thu, 21 February 2013 19:27 Go to next message
jerome felix is currently offline jerome felixFriend
Messages: 3
Registered: February 2013
Junior Member
Hi,

I'm trying to do a plugin who extends the javascript editor in order to change the hover behaviour.

I found some examples and i created this extension point:
<extension
      name="js_hover"
      point="org.eclipse.wst.jsdt.ui.javaEditorTextHovers">
      <hover
	 id="jshover.JavascriptHover"
	 class="jseditor.jshover.JavascriptHover"
	 label="%javaVariableHover"> 
      </hover>
</extension>


And I created the class: JavascriptHover who implements IJavaEditorTextHover, ITextHoverExtension, ITextHoverExtension2.

When I launch the plugin and open a javascript file, nothing happens on hover.

Maybe I'm missing something...
I tried to add those extensions points and their matching classes
<extension point="org.eclipse.wst.jsdt.ui.JsGlobalScopeContainerPage">
	<JsGlobalScopeContainerPage
		name="container page"
		class="jshover.LibraryWizardPage"
                id="libraryWizardPage">
	</JsGlobalScopeContainerPage>
</extension>
	
<extension
	point="org.eclipse.wst.jsdt.core.JsGlobalScopeContainerInitializer">
	<JsGlobalScopeContainerInitializer
		class="jshover.CommonLibraryInitializer"
		id="commonLibraryInitializer">
	</JsGlobalScopeContainerInitializer>
</extension>


Thank you for your help! I'm a bit lost.
Re: extend javascript editor [message #1015319 is a reply to message #1012550] Thu, 28 February 2013 08:32 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 2341
Registered: July 2009
Senior Member
On 2/21/2013 2:52 PM, jerome felix wrote:
> Hi,
>
> I'm trying to do a plugin who extends the javascript editor in order to
> change the hover behaviour.
>
> I found some examples and i created this extension point:
>
> <extension
> name="js_hover"
> point="org.eclipse.wst.jsdt.ui.javaEditorTextHovers">
> <hover
> id="jshover.JavascriptHover"
> class="jseditor.jshover.JavascriptHover"
> label="%javaVariableHover"> </hover>
> </extension>
>
>
> And I created the class: JavascriptHover who implements
> IJavaEditorTextHover, ITextHoverExtension, ITextHoverExtension2.
>
> When I launch the plugin and open a javascript file, nothing happens on
> hover.
>
> Maybe I'm missing something...

Only that first one is really involved with the hover. Are you using a
new workspace for that runtime launcher when trying this and/or clearing
the "Configuration area" of the existing runtime workspace (check the
Configuration tab of the Eclipse Application launcher)? Have you also
tweaked the preferences as needed on the JavaScript->Editor->Hovers
Preference Page?


---
Nitin Dahyabhai
Eclipse WTP, IBM

[Updated on: Thu, 28 February 2013 08:36]

Report message to a moderator

Re: extend javascript editor [message #1016111 is a reply to message #1015319] Tue, 05 March 2013 06:20 Go to previous message
jerome felix is currently offline jerome felixFriend
Messages: 3
Registered: February 2013
Junior Member
First, thank you for your answer.

> Are you using a new workspace for that runtime launcher when trying this and/or clearing the "Configuration area" of the existing runtime workspace (check the Configuration tab of the Eclipse Application launcher)?

I used a other workspace for that runtime launcher which is:
${workspace_loc}/../runtime-EclipseApplication

I also check the option "Clear the configuration area before launching" which location is:
${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Eclipse Application

> Have you also tweaked the preferences as needed on the JavaScript->Editor->Hovers
Preference Page?

Finally, in the Javascript > Editor > Hovers preferences, Combined Hover and Source are both checked.

Unfortunatly, after doing all those things it still doesn't work.

Do you think the extension point and the java class I created are enough to change the hover behaviour on the existing Eclipse Javascript Editor?

Thank you for your help.
Previous Topic:Unable to start HTTP Preview server
Next Topic:Publish failing for a Seam project
Goto Forum:
  


Current Time: Fri Dec 19 09:39:26 GMT 2014

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

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