Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Ecore Tools » How to use EType "Sequence"
How to use EType "Sequence" [message #633954] Wed, 20 October 2010 03:36 Go to next message
hutzu  is currently offline hutzu Friend
Messages: 15
Registered: September 2010
Junior Member
I design a stack.ecore and stack.ocl.
stack.ocl showing~
context Stack:: Stack():
post: stack = Sequence{}

context Stack::push(element: Integer):
post: stack = stack@pre->prepend(element)

context Stack::pop():
pre: stack@pre->size() > 0
post: stack = stack@pre->
subSequence(2, stack@pre->size())

context Stack::peek(): Integer
pre: stack@pre->size() > 0
post: result = stack@pre->first()

context Stack::size(): Integer
post: result = stack@pre->size()

and then i want to finish stack.ecore
i suddenly found ecore has no EType "Sequence"
i look for Package org.eclipse.ocl.ecore
it reallys had "SequenceType"
or how to extend it. thanks a lot
hutzu
Re: How to use EType "Sequence" [message #637537 is a reply to message #633954] Sat, 06 November 2010 10:24 Go to previous message
mercedes  is currently offline mercedes Friend
Messages: 1
Registered: November 2010
Junior Member
Thanks for the help! By the way, is there any thread here for newbie like me? I really like to learn all this stuffs... Smile
Previous Topic:Checking the syntax of EMF query...
Next Topic:Howto make a bidirectional linking between two classes
Goto Forum:
  


Current Time: Tue Apr 16 06:42:11 GMT 2024

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

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

Back to the top