Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Qualified Quick Fix labels
Qualified Quick Fix labels [message #986808] Wed, 21 November 2012 17:32 Go to next message
Ed Willink is currently offline Ed Willink
Messages: 4046
Registered: July 2009
Senior Member
Hi

An unresolved symbol may result in multiple quick fix suggestions with
the same replacement name but for different reasons, e.g alternate
overloads of the same function. It would therefore be nice to format
each quick fix suggestion as

name - qualifiedName

I can see how to do this by overloading EObjectDescription and/or
QualifiedName and/or DefaultQuickFix in ways that were not internded and
so are likely to break in Xtext 2.5. Is there an easier way?

Regards

Ed Willink
Re: Qualified Quick Fix labels [message #986910 is a reply to message #986808] Thu, 22 November 2012 10:49 Go to previous messageGo to next message
Jan Koehnlein is currently offline Jan Koehnlein
Messages: 656
Registered: July 2009
Senior Member
That happens in
org.eclipse.xtext.ui.editor.quickfix.DefaultQuickfixProvider.createLinkingIssueResolutions(Issue,
IssueResolutionAcceptor) which is not internal in the sense of internal
API, but a bunch of code to override, including an anonymous class.

Am 21.11.12 18:32, schrieb Ed Willink:
> Hi
>
> An unresolved symbol may result in multiple quick fix suggestions with
> the same replacement name but for different reasons, e.g alternate
> overloads of the same function. It would therefore be nice to format
> each quick fix suggestion as
>
> name - qualifiedName
>
> I can see how to do this by overloading EObjectDescription and/or
> QualifiedName and/or DefaultQuickFix in ways that were not internded and
> so are likely to break in Xtext 2.5. Is there an easier way?
>
> Regards
>
> Ed Willink


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: Qualified Quick Fix labels [message #987169 is a reply to message #986910] Fri, 23 November 2012 23:05 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 4046
Registered: July 2009
Senior Member
Hi Jan

It is only the createResolution method of the anonymous class that I
need to override, but since it is in an anonymous class it is not
extensible. It is therefore necessary to reimplement 70 lines rather
than just 15 lines. If createResolution, like fixCrossReferenceLabel was
in the outer class, extension would be much easier.

Regards

Ed

On 22/11/2012 10:49, Jan Koehnlein wrote:
> That happens in
> org.eclipse.xtext.ui.editor.quickfix.DefaultQuickfixProvider.createLinkingIssueResolutions(Issue,
> IssueResolutionAcceptor) which is not internal in the sense of
> internal API, but a bunch of code to override, including an anonymous
> class.
>
> Am 21.11.12 18:32, schrieb Ed Willink:
>> Hi
>>
>> An unresolved symbol may result in multiple quick fix suggestions with
>> the same replacement name but for different reasons, e.g alternate
>> overloads of the same function. It would therefore be nice to format
>> each quick fix suggestion as
>>
>> name - qualifiedName
>>
>> I can see how to do this by overloading EObjectDescription and/or
>> QualifiedName and/or DefaultQuickFix in ways that were not internded and
>> so are likely to break in Xtext 2.5. Is there an easier way?
>>
>> Regards
>>
>> Ed Willink
>
>
Previous Topic:expressing inheritance in xtext
Next Topic:Question about @Pure annotation
Goto Forum:
  


Current Time: Mon Sep 22 06:29:25 GMT 2014

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

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