Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Xcore] How to model a customized constructor
[Xcore] How to model a customized constructor [message #1263649] Tue, 04 March 2014 17:08 Go to next message
Alexander R is currently offline Alexander RFriend
Messages: 211
Registered: July 2013
Senior Member
Hello,

I'm trying out some features of Xcore and wondering if it is possible to customize or even model a constructor in Xcore-model?

My model looks like this:
package demo

class Person{
    String name
	
    op Person(String newName){
		this.name = newName
		
	}
}

And of course the model is not valid. Is there a possibility to achieve this by editing the model?

~Alex
Re: [Xcore] How to model a customized constructor [message #1264471 is a reply to message #1263649] Wed, 05 March 2014 08:47 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Alex,

There's no support for defining constructors. Generally instances are
created by the factory methods and those have no arguments so nothing in
the framework would ever call such a constructor...


On 04/03/2014 6:08 PM, Alexander R wrote:
> Hello,
>
> I'm trying out some features of Xcore and wondering if it is possible
> to customize or even model a constructor in Xcore-model?
>
> My model looks like this:
>
> package demo
>
> class Person{
> String name
>
> op Person(String newName){
> this.name = newName
>
> }
> }
> And of course the model is not valid. Is there a possibility to
> achieve this by editing the model?
>
> ~Alex


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [Xcore] How to model a customized constructor [message #1264631 is a reply to message #1264471] Wed, 05 March 2014 11:15 Go to previous message
Alexander R is currently offline Alexander RFriend
Messages: 211
Registered: July 2013
Senior Member
Thanks for the answer.
So Xcore implements the behavioral feature in a more procedural way.

~Alex
Previous Topic:What are the significant performance improvements in 2.9
Next Topic:[Data Binding] Bind list to one table column as aggregation value
Goto Forum:
  


Current Time: Fri Apr 26 19:32:21 GMT 2024

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

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

Back to the top