Skip to main content



      Home
Home » Modeling » Epsilon » [EuGENia | EOL] Adding new label problem
[EuGENia | EOL] Adding new label problem [message #482899] Fri, 28 August 2009 09:44 Go to next message
Eclipse UserFriend
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 09:47 Go to previous messageGo to next message
Eclipse UserFriend
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 11:35 Go to previous message
Eclipse UserFriend
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 09:47 Go to previous message
Eclipse UserFriend
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 11:35 Go to previous message
Eclipse UserFriend
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: Tue Jul 22 18:14:30 EDT 2025

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

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

Back to the top