Missing QuickAssist in XML Editor marker column [message #468396] |
Wed, 05 August 2009 07:46  |
Eclipse User |
|
|
|
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 10:45   |
Eclipse User |
|
|
|
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
|
|
|
Re: Missing QuickAssist in XML Editor marker column [message #468456 is a reply to message #468447] |
Wed, 05 August 2009 11:16  |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.03080 seconds