Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Missing QuickAssist in XML Editor marker column
Missing QuickAssist in XML Editor marker column [message #468396] Wed, 05 August 2009 11:46 Go to next message
Xavier Coulon is currently offline Xavier CoulonFriend
Messages: 58
Registered: July 2009
Member
Hello,

I'm stuck with the following problem (with both Eclipse 3.4 and 3.5): I'm
developping an extension that performs content validation on log4j.xml
files
I works fine and I get warnings (and errors) both in the problem view and
the XML editor, with "quick fix" available in both views, except from the
editor's left column that contains the warning markers. In this particular
case, i see the marker warning icon, but no little light bubble decorator
indicating that a quick assist (or quick fix) is available from the
contextual menu.


------------------
Below is my plugin.xml

<?xml version="1.0" encoding="UTF-8"?>

<?eclipse version="3.4"?>
<plugin>
<extension
id="org.log4jconfig.editorConfiguration"
name="org.log4jconfig.editorConfiguration"
point="org.eclipse.wst.sse.ui.editorConfiguration">
<sourceViewerConfiguration

class=" org.log4jconfig.xml.editor.Log4jXMLStructuredTextViewerConfi guration "
target="org.log4jconfig.xml.contentType">
</sourceViewerConfiguration>
</extension>

<extension
point="org.eclipse.core.contenttype.contentTypes">
<content-type
base-type="org.eclipse.core.runtime.xml"
default-charset="UTF-8"
file-names="log4j.xml"
id="org.log4jconfig.xml.contentType"
name="log4j XML config file"
priority="normal">
</content-type>
</extension>


<extension
point="org.eclipse.ui.editors">
<editor
class="org.eclipse.wst.sse.ui.StructuredTextEditor"
default="false"
icon="icons/log4jconfig-model-icon16x16.png"
id="org.log4jconfig.xml.editor"
name="Log4j.xml config editor">
<contentTypeBinding
contentTypeId="org.log4jconfig.xml.contentType">
</contentTypeBinding>
</editor>
</extension>
<extension
point="org.eclipse.wst.sse.ui.sourcevalidation">
<validator
class="org.log4jconfig.xml.editor.validation.ContentValidator "
id="org.log4jconfig.xml.editor.validator"
scope="partial">
<contentTypeIdentifier
id="org.log4jconfig.xml.contentType">
<partitionType
id="org.eclipse.wst.xml.XML_DEFAULT"></partitionType>
</contentTypeIdentifier>
</validator>
</extension>
<extension
id="org.log4jconfig.xml.editor.defaultMarker"
name="Log4jconfig marker"
point="org.eclipse.core.resources.markers">
<super
type="org.eclipse.core.resources.problemmarker">
</super>
<persistent
value="false">
</persistent>
</extension>
<extension
id="org.log4jconfig.xml.editor.deprecatedElementMarker"
name="Log4jconfig warning marker for deprecated elements"
point="org.eclipse.core.resources.markers">
<super
type="org.eclipse.core.resources.problemmarker">
</super>
<persistent
value="false">
</persistent>
<attribute
name="problemType">
</attribute>
</extension>
<extension
point="org.eclipse.ui.ide.markerResolution">
<markerResolutionGenerator

class=" org.log4jconfig.xml.editor.quickfix.AnyDeprecatedElementMark erResolutionGenerator "

markerType="org.log4jconfig.xml.editor.deprecatedElementMarker ">
</markerResolutionGenerator>
</extension>
<extension
id=" org.log4jconfig.xml.editor.quickfix.deprecatedElementQuickFi x "
point="org.eclipse.wst.sse.ui.quickFixProcessor">
<quickFixProcessor

class=" org.log4jconfig.xml.editor.quickassist.DeprecatedElementQuic kAssistProcessor ">
</quickFixProcessor>
</extension>

</plugin>

------------------

I also tried adding
<provisionalConfiguration
type="org.eclipse.jface.text.quickassist.IQuickAssistProcessor "
class=" org.log4jconfig.xml.editor.quickassist.DeprecatedElementQuic kAssistProcessor "
target="org.eclipse.wst.xml.XML_DEFAULT" />

to the editorConfiguration extension but it did not change anything.

Also, setting a custom problemType to the marker at runtime with
marker.setAttribute("problemType", problemType);

And adding a problemType attribute in the quickFixProcessor extension does
not work any better...

Yet, I'm sure there must be a way to have this quickfix/quickassist
assistant from the contextual menu in the left column. Both Java Editor
and Ant Editor provide such a feature, so why not XML Editor ?

Can you help me ?

Thank you in advance.

Xavier


PS : I know I already mailed on this mailing list and got some answers
that helped me, but did not fully solved this problem. Thank you again for
taking time to help me ;-)
Re: Missing QuickAssist in XML Editor marker column [message #468447 is a reply to message #468396] Wed, 05 August 2009 14:45 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 2337
Registered: July 2009
Senior Member
Xavier Coulon wrote:
> I'm stuck with the following problem (with both Eclipse 3.4 and 3.5):
> I'm developping an extension that performs content validation on
> log4j.xml files
> I works fine and I get warnings (and errors) both in the problem view
> and the XML editor, with "quick fix" available in both views, except
> from the editor's left column that contains the warning markers. In this
> particular case, i see the marker warning icon, but no little light
> bubble decorator indicating that a quick assist (or quick fix) is
> available from the contextual menu.
>...
> Also, setting a custom problemType to the marker at runtime with
> marker.setAttribute("problemType", problemType);
>
> And adding a problemType attribute in the quickFixProcessor extension
> does not work any better...
> Yet, I'm sure there must be a way to have this quickfix/quickassist
> assistant from the contextual menu in the left column. Both Java Editor
> and Ant Editor provide such a feature, so why not XML Editor ?

For WTP's editors, the committers have been somewhat uncreative in
coming up with Quick Fixes / Quick Assists. So you're not missing
anything, it's just never been implemented.

Want to lend us a hand in doing so? All it takes is a RFE in
Bugzilla to start the ball rolling.

--
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


---
Nitin Dahyabhai
Eclipse WTP, IBM
Re: Missing QuickAssist in XML Editor marker column [message #468456 is a reply to message #468447] Wed, 05 August 2009 15:16 Go to previous message
Xavier Coulon is currently offline Xavier CoulonFriend
Messages: 58
Registered: July 2009
Member
Hello Nitin,

That's done : https://bugs.eclipse.org/bugs/show_bug.cgi?id=285717

Regards,
Xavier


Nitin Dahyabhai wrote:

> Xavier Coulon wrote:
>> I'm stuck with the following problem (with both Eclipse 3.4 and 3.5):
>> I'm developping an extension that performs content validation on
>> log4j.xml files
>> I works fine and I get warnings (and errors) both in the problem view
>> and the XML editor, with "quick fix" available in both views, except
>> from the editor's left column that contains the warning markers. In this
>> particular case, i see the marker warning icon, but no little light
>> bubble decorator indicating that a quick assist (or quick fix) is
>> available from the contextual menu.
> >...
>> Also, setting a custom problemType to the marker at runtime with
>> marker.setAttribute("problemType", problemType);
>>
>> And adding a problemType attribute in the quickFixProcessor extension
>> does not work any better...
>> Yet, I'm sure there must be a way to have this quickfix/quickassist
>> assistant from the contextual menu in the left column. Both Java Editor
>> and Ant Editor provide such a feature, so why not XML Editor ?

> For WTP's editors, the committers have been somewhat uncreative in
> coming up with Quick Fixes / Quick Assists. So you're not missing
> anything, it's just never been implemented.

> Want to lend us a hand in doing so? All it takes is a RFE in
> Bugzilla to start the ball rolling.
Previous Topic:http://www.w3.org/TR/html401/strict.dtd fails Validate?
Next Topic:XDoclet plugin
Goto Forum:
  


Current Time: Sat Nov 29 07:46:39 GMT 2014

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

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