Skip to main content



      Home
Home » Archived » Visual Editor (VE) » order of generated setters
order of generated setters [message #128864] Tue, 18 July 2006 08:38 Go to next message
Eclipse UserFriend
Hello,

My ContainmentHandler looks something like this,

public Object contributeToDropRequest(...)
{
if ( .... )
{
preCmds.append(new AddComponentRenderingCommand(....));
}
......
}

My AddComponentRenderingCommand looks something like this :

public class AddComponentRenderingCommand extends CommandWrapper
{
public void execute()
{
setStructuralFeature("property1","\"value1\"");
setStructuralFeature("property2","\"value2\"");
setStructuralFeature("property3","\"value3\"");
}
}

I notice that when dragging my custom composite from Palette, the property
setters are generated in different order, For example:

I expect to see :

setProperty1("value1");
setProperty2("value2");
setProperty3("value3");

However, sometime I see this :
setProperty2("value2");
setProperty3("value3");
setProperty1("value1");

And when VE preview this composite, the setters are executed in some other
orders too.

Can someone tell me what exactly determines the order of the generated
code, and the execution when previewing? Thanks.
Re: order of generated setters [message #128890 is a reply to message #128864] Tue, 18 July 2006 10:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

There is no predefined order. The settings are stored in a map, so it
all depends on the hashorder mostly.

--
Thanks,
Rich Kulp
Re: order of generated setters [message #128902 is a reply to message #128890] Tue, 18 July 2006 11:22 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for the response.
Is it true for both code generation and previewing?
Re: order of generated setters [message #128915 is a reply to message #128902] Tue, 18 July 2006 16:06 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Yes

Hung Lam wrote:
> Thanks for the response.
> Is it true for both code generation and previewing?

--
Thanks,
Rich Kulp
Re: order of generated setters [message #613552 is a reply to message #128864] Tue, 18 July 2006 10:28 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

There is no predefined order. The settings are stored in a map, so it
all depends on the hashorder mostly.

--
Thanks,
Rich Kulp
Re: order of generated setters [message #613553 is a reply to message #128890] Tue, 18 July 2006 11:22 Go to previous message
Eclipse UserFriend
Thanks for the response.
Is it true for both code generation and previewing?
Re: order of generated setters [message #613554 is a reply to message #128902] Tue, 18 July 2006 16:06 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Yes

Hung Lam wrote:
> Thanks for the response.
> Is it true for both code generation and previewing?

--
Thanks,
Rich Kulp
Previous Topic:order of generated setters
Next Topic:generate code
Goto Forum:
  


Current Time: Sun Jun 15 11:33:04 EDT 2025

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

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

Back to the top