Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Quick Fix on JSP java partition
Quick Fix on JSP java partition [message #207754] Tue, 29 January 2008 23:38 Go to next message
Jacob Danner is currently offline Jacob Danner
Messages: 2
Registered: July 2009
Junior Member
Hi,
I was curious about the quick fix feature of the WTP JSP Editor.
Its mentioned here:
http://www.eclipse.org/webtools/community/tutorials/Reintrod ucingSSE/ReintroducingSSE.html#quickfix
and
http://www.eclipse.org/webtools/initial-contribution/IBM/eva lGuides/SSEEval.html?p=1

However, I have been unsuccessful at getting it to work within a JSP
page. I've even tried content like the one from the pictures. (I also
checked the newsgroups and bugzilla but didn't see anything relevant).

I noticed this issue while trying to get the import statement added
using the following snippet.
<%
List l = new LinkedList();
%>

Do I need to do anything special for this functionality to be enabled?

Thanks in advance,
-jacobd
Re: Quick Fix on JSP java partition [message #207890 is a reply to message #207754] Fri, 01 February 2008 20:50 Go to previous messageGo to next message
Jacob Danner is currently offline Jacob Danner
Messages: 2
Registered: July 2009
Junior Member
Has anyone seen this work? I was looking through the code and found the
following in StructuredTextEditor, so it appears like it was meant to be
hooked up, but I have still not seen it function.

// StructuredTextViewer Action - requesting
// correction assist to show
// correction proposals for the current position
action = new TextOperationAction(resourceBundle,
StructuredTextEditorActionConstants.ACTION_NAME_QUICK_FIX + UNDERSCORE,
this, StructuredTextViewer.QUICK_FIX, true);
action.setActionDefinitionId(ActionDefinitionIds.QUICK_FIX);
setAction(StructuredTextEditorActionConstants.ACTION_NAME_QU ICK_FIX,
action);
markAsStateDependentAction(StructuredTextEditorActionConstan ts.ACTION_NAME_QUICK_FIX,
true);

Any help is much appreciated. Thanks,
-jacobd


Jacob Danner wrote:
> Hi,
> I was curious about the quick fix feature of the WTP JSP Editor.
> Its mentioned here:
> http://www.eclipse.org/webtools/community/tutorials/Reintrod ucingSSE/ReintroducingSSE.html#quickfix
>
> and
> http://www.eclipse.org/webtools/initial-contribution/IBM/eva lGuides/SSEEval.html?p=1
>
>
> However, I have been unsuccessful at getting it to work within a JSP
> page. I've even tried content like the one from the pictures. (I also
> checked the newsgroups and bugzilla but didn't see anything relevant).
>
> I noticed this issue while trying to get the import statement added
> using the following snippet.
> <%
> List l = new LinkedList();
> %>
>
> Do I need to do anything special for this functionality to be enabled?
>
> Thanks in advance,
> -jacobd
Re: Quick Fix on JSP java partition [message #207947 is a reply to message #207890] Sun, 03 February 2008 09:11 Go to previous message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2274
Registered: July 2009
Senior Member
Jacob Danner wrote:
> Has anyone seen this work? I was looking through the code and found the
> following in StructuredTextEditor, so it appears like it was meant to be
> hooked up, but I have still not seen it function.

It is hooked up, there just aren't many quick fixes provided as of
yet. The editor will try to load quick assist processors using the
extended configuration extension point. I believe something like
this will allow you to contribute a processor for Java scripting
regions:

<extension point="org.eclipse.wst.sse.ui.editorConfiguration">
<provisionalConfiguration
type="org.eclipse.jface.text.quickassist.IQuickAssistProcessor "
class="MyQuickAssistProcessor"
target="org.eclipse.jst.jsp.SCRIPT.JAVA" />
</extension>

Just be aware that this hasn't been finalized as API yet, so it may
change in the future.

---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


---
Nitin Dahyabhai
Eclipse WTP, IBM
Previous Topic:Best strategy to have jars deploy into WEB-INF/lib?
Next Topic:CSS class Attribute within an HTML element
Goto Forum:
  


Current Time: Sat Sep 20 16:15:18 GMT 2014

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

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