Home » Modeling » OCL » extending OCL MDT with "just" a temporal operator always
| | | |
Re: extending OCL MDT with "just" a temporal operator always [message #988684 is a reply to message #937006] |
Sat, 01 December 2012 09:03 |
Fy Za Messages: 245 Registered: March 2010 |
Senior Member |
|
|
Hi Ed,
I succeeded to extend CompleteOCL with always operator (as you said, I should follow the 'not' operator).
However, my extension was defined in the code level. I edit some classes like for example org.eclipse.ocl.examples.library.oclstdlib.OCLstdlibTables.java.
However, when I try to generate this class with some modifications defined in the OCL-2.4.oclstdlib using org.eclipse.ocl.examples.codegen.tables.model2tables.mtl,
I have many errors in org.eclipse.ocl.examples.library.oclstdlib.OCLstdlibTables.java.
.
What is the element that should be clicked to run the model2tables.mtl? the OCL-2.4.oclstdlib file? or all the package?
I 'd like to know if I should use this model2tables.mtl directly or using a mwe2 workflow ?
Best regards,
Ed Willink wrote on Mon, 08 October 2012 11:05Hi
Extending the OCL grammars is possible, but not supported; no tutorials etc.
Since you are extending with something very similar to 'not' you can
search out/step through resolution of a not expression.
Regards
Ed Willink
On 08/10/2012 15:57, Fy Za wrote:
> Hi all,
> As defined in the title, I try to add "just" a temporal operator "always"
> in the MDT/OCL.
> I add it in the EssentialOCL xtext grammar
>
> EssentialOCLPrefixOperator:
> '-' | 'not'
> | 'always';
>
> but when I try to write some constraints,
> I has this error "Unresolved Operation 'Boolean::always()'"
>
> I find that I should extend oclstdlib, pivot, etc.
> but I don't know the order of changes. what are the several steps?
>
> Best regards,
> Fy Za
|
|
| | |
Re: extending OCL MDT with "just" a temporal operator always [message #988699 is a reply to message #988687] |
Sat, 01 December 2012 14:27 |
Ed Willink Messages: 7655 Registered: July 2009 |
Senior Member |
|
|
Hi
In principle you can just do GenerateAll but it has a registration bug.
I think
Generate OCLstdlib model,
Generate Pivot Models,
Generate Xtext Models,
Generate All Editors
can be run in any order; probably better to run Generate Xtext Models
before Generate All Editors (or just one of the editors).
Regards
Ed Willink
On 01/12/2012 10:00, Fy Za wrote:
> Hi Ed.
> Thank you for the quickly reply.
> I run Generate OCLstdlib model MWE2
> before these 3 MWE2 (Generate Pivot Models, Generate Xtext Models,
> Generate All Editors) or after?
>
> best regards,
> Fy Za
> Ed Willink wrote on Mon, 17 September 2012 09:27
>> Hi
>>
>> The Acceleo builder is flaky, particularly on a 'clean' project. As
>> with many things in Eclipse, sometimes the incremental updates are
>> outwitted so sometimes you need to refresh and clean some/all
>> projects. I hope this fixes it.
>>
>> --- hang on you said GenerateAll -- someone else said this doesn't work.
>>
>> I never use it, since I know how to sequence the relevant sub-generators
>>
>> Generate Pivot Models
>> Generate Xtext Models
>> Generate All Editors
>>
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=389720 raised
>>
>> Regards
>>
>> Ed
>
> Ed Willink wrote on Sat, 01 December 2012 04:20
>> Hi
>>
>> Don't run the *.mtl directly. Use the Generate OCLstdlib model MWE2
>> script. (Nearly all automation uses an MWE2 script.
>>
>> Regards
>>
>> Ed
>
>
|
|
| | | | |
Goto Forum:
Current Time: Thu Apr 25 02:29:09 GMT 2024
Powered by FUDForum. Page generated in 0.04129 seconds
|