Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext 2.0: rename refactoring - how to update non-xtext resources
Xtext 2.0: rename refactoring - how to update non-xtext resources [message #661933] Mon, 28 March 2011 14:36 Go to next message
Henrik Rentz-Reichert is currently offline Henrik Rentz-ReichertFriend
Messages: 261
Registered: July 2009
Senior Member
Hi Jan,

we discussed this in short during the EclipseCon.

If I use the new rename refactoring I need a hook where I can place custom code to adjust the fragments in non-xtext resources (in
this case my Graphiti diagrams referencing Xtext resources).

Can you give me again a hint where I have to look?

Thanks,
Henrik
Re: Xtext 2.0: rename refactoring - how to update non-xtext resources [message #662219 is a reply to message #661933] Tue, 29 March 2011 18:32 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Henrik,

all you have to do is to provide an IResourceServiceProvider. Have a
look at the
org.eclipse.xtext.ui.tests.refactoring.ReferringXmiResourceM odule and
friends in org.eclipse.xtext.ui.tests to get the idea.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 28.03.11 16:36, schrieb Henrik Rentz-Reichert:
> Hi Jan,
>
> we discussed this in short during the EclipseCon.
>
> If I use the new rename refactoring I need a hook where I can place custom code to adjust the fragments in non-xtext resources (in
> this case my Graphiti diagrams referencing Xtext resources).
>
> Can you give me again a hint where I have to look?
>
> Thanks,
> Henrik
Re: Xtext 2.0: rename refactoring - how to update non-xtext resources [message #663004 is a reply to message #662219] Fri, 01 April 2011 21:37 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Are there any editors currently using refactoring? neither Xtext nor
MWE2 seem to have a Refactor menu option where I'm looking for it.

I have an IResourceServiceProvider so I tried just throwing in a

fragment = refactoring.RefactorElementNameFragment {}

but it made no obvious difference.

Any more clues?

Regards

Ed Willink


On 29/03/2011 19:32, Sebastian Zarnekow wrote:
> Hi Henrik,
>
> all you have to do is to provide an IResourceServiceProvider. Have a
> look at the
> org.eclipse.xtext.ui.tests.refactoring.ReferringXmiResourceM odule and
> friends in org.eclipse.xtext.ui.tests to get the idea.
>
> Regards,
> Sebastian
Re: Xtext 2.0: rename refactoring - how to update non-xtext resources [message #663695 is a reply to message #663004] Wed, 06 April 2011 08:52 Go to previous messageGo to next message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
We haven't enabled refactoring for Xtext because it's dependencies to
the Ecore model are kind of tricky. For MWE, we'd have to integrate with
JDT's refactoring which we haven't done so far.

Did you update the plugin.xml for your language after regenerating? Are
the referring resources indexed?

Regards
Jan

Am 01.04.11 23:37, schrieb Ed Willink:
> Are there any editors currently using refactoring? neither Xtext nor
> MWE2 seem to have a Refactor menu option where I'm looking for it.
>
> I have an IResourceServiceProvider so I tried just throwing in a
>
> fragment = refactoring.RefactorElementNameFragment {}
>
> but it made no obvious difference.
>
> Any more clues?
>
> Regards
>
> Ed Willink
>
>
> On 29/03/2011 19:32, Sebastian Zarnekow wrote:
>> Hi Henrik,
>>
>> all you have to do is to provide an IResourceServiceProvider. Have a
>> look at the
>> org.eclipse.xtext.ui.tests.refactoring.ReferringXmiResourceM odule and
>> friends in org.eclipse.xtext.ui.tests to get the idea.
>>
>> Regards,
>> Sebastian
>


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


---
Get professional support from the Xtext committers at www.typefox.io
Re: Xtext 2.0: rename refactoring - how to update non-xtext resources [message #663707 is a reply to message #663695] Wed, 06 April 2011 09:11 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Ji Jan
On 06/04/2011 09:52, Jan Koehnlein wrote:
> We haven't enabled refactoring for Xtext because it's dependencies to
> the Ecore model are kind of tricky. For MWE, we'd have to integrate
> with JDT's refactoring which we haven't done so far.
>
> Did you update the plugin.xml for your language after regenerating?
No. I have now. Thanks. Makes a big difference.

I now have a menu entry that does something ... a JDT compiler problem
exception that I can hopefully debug ...
> Are the referring resources indexed?
I don't know what this means. May be it explains the JDT compiler
problem exception.

Regards

Ed
>
> Regards
> Jan
>
> Am 01.04.11 23:37, schrieb Ed Willink:
>> Are there any editors currently using refactoring? neither Xtext nor
>> MWE2 seem to have a Refactor menu option where I'm looking for it.
>>
>> I have an IResourceServiceProvider so I tried just throwing in a
>>
>> fragment = refactoring.RefactorElementNameFragment {}
>>
>> but it made no obvious difference.
>>
>> Any more clues?
>>
>> Regards
>>
>> Ed Willink
>>
>>
>> On 29/03/2011 19:32, Sebastian Zarnekow wrote:
>>> Hi Henrik,
>>>
>>> all you have to do is to provide an IResourceServiceProvider. Have a
>>> look at the
>>> org.eclipse.xtext.ui.tests.refactoring.ReferringXmiResourceM odule and
>>> friends in org.eclipse.xtext.ui.tests to get the idea.
>>>
>>> Regards,
>>> Sebastian
>>
>
>
Previous Topic:[Xtend2] Error compiling abstract Xtend class
Next Topic:[xtext 2] Is Refactoring available in Indigo M6?
Goto Forum:
  


Current Time: Thu Apr 25 14:57:19 GMT 2024

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

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

Back to the top