Suggestion for enhancement: jdt-like tools [message #53443] |
Sat, 27 June 2009 16:48 |
Antony Wilkins 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 |
Sebastian Zarnekow 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...
>
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04749 seconds