Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Suggestion for enhancement: jdt-like tools
Suggestion for enhancement: jdt-like tools [message #53443] Sat, 27 June 2009 16:48 Go to next message
Antony Wilkins is currently offline Antony WilkinsFriend
Messages: 22
Registered: July 2009
Junior Member
The generated UI for a DSL is pretty cool - we get lots of nice features,
driven by our DSL "core" (structure/grammar/scoping/validation), like
hyperlinking model elements, code completion that respects scope, etc...

It's very JDT-like - which makes me think, there might be *even* more you
could do - like:

* refactoring tools:

** It should be possible (I think), using the existing linking, to be able
to do a "JDT-like" element rename (like Refactor->Rename... in the JDT
UI). The effect would be to change the name of the reference to the
element you've selected, the declaration, and all other references in the
workspace. Of course - anything not present in the workspace wouldn't be
changed - just like JDT rename refactors.

** Domain specific refactors - e.g. for a StateMachine model I might want
to "extract substates" or for a "Entity" model I might want to "Extract
Entity" etc. I wouldn't expect much help here from the XText framework,
because these are inherently specific to the domain you're in, but perhaps
you could generate an extention point and an empty concrete subclass -
like you do for Scoping/validation/content assist.

* Quick fixes
** JDT will suggest names that already exist in your scope, if you have a
typo (within reason) - should be possible to reuse their pattern matching
to do something similar.
** Again - would be nice to do this as an extention point with the
starting point generated for the DSL developer as a concrete subclass in
their src directory like scoping/validation/content assist.

* Show "Callers" - like JDT "Open Call Hierarchy" - a search for all
referrers to a model element - displayed in a search results tree of
callers like JDT does.

It may be that these features are already effectively there under some
other guise or set of steps, or simply not required because I've missed a
point somewhere - but they all seem valid under some circumstances
(refactoring should be something the user does carefully, of course).

A valid response to my suggestion would - "alright then - *you* write
them". My response would be "alright then :)" - but I think I'd have a
lot of learning about the under-the-covers stuff to do before doing a good
job of it. I'd be very happy to try, or to work with you on such
enhancements...
Re: Suggestion for enhancement: jdt-like tools [message #53609 is a reply to message #53443] Sat, 27 June 2009 19:12 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Antony,

thanks for your suggestions. We had most am them already in mind. Many
of the features that you mentiones will be easier to implement with the
EMF index, so expect some progress in the field of IDE integration in
future versions of Xtext.

Most propably we will come up with nice hooks, that allow the DSL
developer to implement language specific refactorings, quick fixed, and
so on. Some of them are kind of low hanging fruits and can be
implemented in a generic way (rename, find references, safe delete, ..),
others are tightly coupled to your language.

Maybe we can use this thread to collect and identify more ideas and use
cases in the field of model refactorings?

Regards,
Sebastian

Am 27.06.2009 18:48 Uhr, schrieb Antony Wilkins:
> The generated UI for a DSL is pretty cool - we get lots of nice
> features, driven by our DSL "core"
> (structure/grammar/scoping/validation), like hyperlinking model
> elements, code completion that respects scope, etc...
>
> It's very JDT-like - which makes me think, there might be *even* more
> you could do - like:
>
> * refactoring tools:
> ** It should be possible (I think), using the existing linking, to be
> able to do a "JDT-like" element rename (like Refactor->Rename... in the
> JDT UI). The effect would be to change the name of the reference to the
> element you've selected, the declaration, and all other references in
> the workspace. Of course - anything not present in the workspace
> wouldn't be changed - just like JDT rename refactors.
>
> ** Domain specific refactors - e.g. for a StateMachine model I might
> want to "extract substates" or for a "Entity" model I might want to
> "Extract Entity" etc. I wouldn't expect much help here from the XText
> framework, because these are inherently specific to the domain you're
> in, but perhaps you could generate an extention point and an empty
> concrete subclass - like you do for Scoping/validation/content assist.
>
> * Quick fixes
> ** JDT will suggest names that already exist in your scope, if you have
> a typo (within reason) - should be possible to reuse their pattern
> matching to do something similar.
> ** Again - would be nice to do this as an extention point with the
> starting point generated for the DSL developer as a concrete subclass in
> their src directory like scoping/validation/content assist.
>
> * Show "Callers" - like JDT "Open Call Hierarchy" - a search for all
> referrers to a model element - displayed in a search results tree of
> callers like JDT does.
> It may be that these features are already effectively there under some
> other guise or set of steps, or simply not required because I've missed
> a point somewhere - but they all seem valid under some circumstances
> (refactoring should be something the user does carefully, of course).
>
> A valid response to my suggestion would - "alright then - *you* write
> them". My response would be "alright then :)" - but I think I'd have a
> lot of learning about the under-the-covers stuff to do before doing a
> good job of it. I'd be very happy to try, or to work with you on such
> enhancements...
>
Re: Suggestion for enhancement: jdt-like tools [message #53711 is a reply to message #53609] Sat, 27 June 2009 21:37 Go to previous messageGo to next message
Antony Wilkins is currently offline Antony WilkinsFriend
Messages: 22
Registered: July 2009
Junior Member
Thanks :) Looking forward to the enhancements and any ideas people have...
Re: Suggestion for enhancement: jdt-like tools [message #632468 is a reply to message #53711] Wed, 13 October 2010 06:12 Go to previous messageGo to next message
Roland S. is currently offline Roland S.Friend
Messages: 36
Registered: September 2009
Member
Did anything happen so far? I'm interested in a JDT-like Open Call Hierarchy. The required informations should be available in the builder state. Or do I have to implement this feature on my own?

Thanks,
Roland
Re: Suggestion for enhancement: jdt-like tools [message #632478 is a reply to message #632468] Wed, 13 October 2010 06:38 Go to previous message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
An open call hierarchy would be pretty much language specific.
However, we want to provide a tree view framework, with which it should
be easy to define such views.

For now, you'll have to implement it based on JFace and
EObjectDescriptions. But it shouldn't be too hard.

Am 10/13/10 8:12 AM, schrieb Roland S.:
> Did anything happen so far? I'm interested in a JDT-like Open Call
> Hierarchy. The required informations should be available in the builder
> state. Or do I have to implement this feature on my own?
>
> Thanks,
> Roland


--
Need professional support for Xtext or other Eclipse Modeling technologies?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : http://blog.efftinge.de
Previous Topic:[Xtext] Use Xtend in generator project -- how to define metamodels
Next Topic:existing ecore model
Goto Forum:
  


Current Time: Thu Dec 26 12:23:38 GMT 2024

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

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

Back to the top