Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Modify OCL Xtext Console plugin(Use OCL Console together with GMF editor, useful approach?)
Modify OCL Xtext Console plugin [message #780003] Tue, 17 January 2012 01:19 Go to next message
Frank W is currently offline Frank WFriend
Messages: 3
Registered: January 2012
Junior Member
Hi,
first I must say I'm quite new to Eclipse modeling, so bear with me if something doesn't seem to make sense Smile. 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?
Re: Modify OCL Xtext Console plugin [message #780075 is a reply to message #780003] Tue, 17 January 2012 06:08 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4188
Registered: July 2009
Senior Member
Hi

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.

Regards

Ed Willink


On 17/01/2012 01:19, Frank W wrote:
> Hi,
> 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?
Previous Topic:Running .ocl against a model
Next Topic:describing function call between two classes
Goto Forum:
  


Current Time: Sat Dec 20 23:00:56 GMT 2014

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

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