|Re: Modify OCL Xtext Console plugin [message #780075 is a reply to message #780003]
||Tue, 17 January 2012 01:08
| Ed Willink
Registered: July 2009
It certainly makes sense. The OCL Xtext Console is a demonstration of
the re-use of the EssentialOCL editor. You will find that there is a
further reuse in Papyrus for editing constraints in at least Class
Diagrams. You may be able to exploit the Papyrus reuse more easily since
it is much closer to your requirements.
Currently the Xtext OCL editors have only the default auto-generated
completions which often work well in context such as following the -> in
a->b, but decline to offer any of the huige number of possibilities
potentially available in a less constrained context such as following
the -> in a->. Providing completion here is a responsibility for the
particular Xtext editor and this has not been high on my priority list
when so much else needs auto-generation.
So if you want to enhance completions, please do, and please contribute
the results back so that other can benefit too.
On 17/01/2012 01:19, Frank W wrote:
> first I must say I'm quite new to Eclipse modeling, so bear with me if
> something doesn't seem to make sense :). My problem is: I already have
> a GMF editor for various UML diagram types (not written by me). Now I
> want to add a text editor for adding OCL constraints to these UML
> diagrams (for example for specifying derived attributes in a class
> diagram). One feature I want is that the autocomplete function
> (provided by Xtext) suggests already existing classes/attributes in a
> class diagram. So my idea was to take the OCL Xtext console example
> and modify it. I've read something about customizing the proposal
> provider from Xtext, so maybe that way I could add existing
> classes/attributes from my UML model to autocomplete. Do you think my
> approach does make sense or is my approach total nonsense?
Powered by FUDForum
. Page generated in 0.01520 seconds