Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [EuGENia | EOL] Adding new label problem
[EuGENia | EOL] Adding new label problem [message #482899] Fri, 28 August 2009 13:44 Go to next message
Mihir is currently offline Mihir
Messages: 83
Registered: July 2009
Member
Hello,

I'm trying to add a new label to the compartment of XXX node. But it is
not working out.


var label = new GmfGraph!Label("temp");
CompartmentFigure.children.add(label);

If I do this then it allows me to all blank label where I want but, when
I try to add name and text to label it is not working.

var label = new GmfGraph!Label;
label.name = "RuleNacsCompartmentFigureLabel";
label.text = "NACs Compartment";
CompartmentFigure.children.add(label);


Please help me with this.

Many thanks,
Mihir
Re: [EuGENia | EOL] Adding new label problem [message #482907 is a reply to message #482899] Fri, 28 August 2009 13:47 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Mihir,

EOL doesn't support constructors with parameters for model elements such
as GmfGraph!Label("temp").

Also, in EOL strings are placed within '' (support for "" will be added
in the next version) so you should try:

var label = new GmfGraph!Label;
label.name = 'RuleNacsCompartmentFigureLabel';
label.text = 'NACs Compartment';
CompartmentFigure.children.add(label);

Cheers,
Dimitris

Mihir wrote:
> Hello,
>
> I'm trying to add a new label to the compartment of XXX node. But it is
> not working out.
>
>
> var label = new GmfGraph!Label("temp");
> CompartmentFigure.children.add(label);
>
> If I do this then it allows me to all blank label where I want but, when
> I try to add name and text to label it is not working.
>
> var label = new GmfGraph!Label;
> label.name = "RuleNacsCompartmentFigureLabel";
> label.text = "NACs Compartment";
> CompartmentFigure.children.add(label);
>
>
> Please help me with this.
>
> Many thanks,
> Mihir


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
{solved} [EuGENia | EOL] Adding new label problem [message #482941 is a reply to message #482907] Fri, 28 August 2009 15:35 Go to previous message
Mihir is currently offline Mihir
Messages: 83
Registered: July 2009
Member
Hi Dimitris,

Thanks for your help.

Actually I was just experimenting with the constructor if it works and
so I forgot to remove it while pasting that bit of code here in the post. :)

After changing "" to '', it works fine.. :)

Thanks a million,
Mihir



Dimitris Kolovos wrote:
> Hi Mihir,
>
> EOL doesn't support constructors with parameters for model elements such
> as GmfGraph!Label("temp").
>
> Also, in EOL strings are placed within '' (support for "" will be added
> in the next version) so you should try:
>
> var label = new GmfGraph!Label;
> label.name = 'RuleNacsCompartmentFigureLabel';
> label.text = 'NACs Compartment';
> CompartmentFigure.children.add(label);
>
> Cheers,
> Dimitris
>
> Mihir wrote:
>> Hello,
>>
>> I'm trying to add a new label to the compartment of XXX node. But it
>> is not working out.
>>
>>
>> var label = new GmfGraph!Label("temp");
>> CompartmentFigure.children.add(label);
>>
>> If I do this then it allows me to all blank label where I want but,
>> when I try to add name and text to label it is not working.
>>
>> var label = new GmfGraph!Label;
>> label.name = "RuleNacsCompartmentFigureLabel";
>> label.text = "NACs Compartment";
>> CompartmentFigure.children.add(label);
>>
>>
>> Please help me with this.
>>
>> Many thanks,
>> Mihir
>
>
Re: [EuGENia | EOL] Adding new label problem [message #579841 is a reply to message #482899] Fri, 28 August 2009 13:47 Go to previous message
Dimitrios Kolovos is currently offline Dimitrios Kolovos
Messages: 1776
Registered: July 2009
Senior Member
Hi Mihir,

EOL doesn't support constructors with parameters for model elements such
as GmfGraph!Label("temp").

Also, in EOL strings are placed within '' (support for "" will be added
in the next version) so you should try:

var label = new GmfGraph!Label;
label.name = 'RuleNacsCompartmentFigureLabel';
label.text = 'NACs Compartment';
CompartmentFigure.children.add(label);

Cheers,
Dimitris

Mihir wrote:
> Hello,
>
> I'm trying to add a new label to the compartment of XXX node. But it is
> not working out.
>
>
> var label = new GmfGraph!Label("temp");
> CompartmentFigure.children.add(label);
>
> If I do this then it allows me to all blank label where I want but, when
> I try to add name and text to label it is not working.
>
> var label = new GmfGraph!Label;
> label.name = "RuleNacsCompartmentFigureLabel";
> label.text = "NACs Compartment";
> CompartmentFigure.children.add(label);
>
>
> Please help me with this.
>
> Many thanks,
> Mihir


--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
{solved} [EuGENia | EOL] Adding new label problem [message #579858 is a reply to message #482907] Fri, 28 August 2009 15:35 Go to previous message
Mihir is currently offline Mihir
Messages: 83
Registered: July 2009
Member
Hi Dimitris,

Thanks for your help.

Actually I was just experimenting with the constructor if it works and
so I forgot to remove it while pasting that bit of code here in the post. :)

After changing "" to '', it works fine.. :)

Thanks a million,
Mihir



Dimitris Kolovos wrote:
> Hi Mihir,
>
> EOL doesn't support constructors with parameters for model elements such
> as GmfGraph!Label("temp").
>
> Also, in EOL strings are placed within '' (support for "" will be added
> in the next version) so you should try:
>
> var label = new GmfGraph!Label;
> label.name = 'RuleNacsCompartmentFigureLabel';
> label.text = 'NACs Compartment';
> CompartmentFigure.children.add(label);
>
> Cheers,
> Dimitris
>
> Mihir wrote:
>> Hello,
>>
>> I'm trying to add a new label to the compartment of XXX node. But it
>> is not working out.
>>
>>
>> var label = new GmfGraph!Label("temp");
>> CompartmentFigure.children.add(label);
>>
>> If I do this then it allows me to all blank label where I want but,
>> when I try to add name and text to label it is not working.
>>
>> var label = new GmfGraph!Label;
>> label.name = "RuleNacsCompartmentFigureLabel";
>> label.text = "NACs Compartment";
>> CompartmentFigure.children.add(label);
>>
>>
>> Please help me with this.
>>
>> Many thanks,
>> Mihir
>
>
Previous Topic:[EuGENia | EOL] Adding new label problem
Next Topic:[EuGENia | FixGMFGen.eol]
Goto Forum:
  


Current Time: Sun Sep 21 00:12:00 GMT 2014

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

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