Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » using boolean flags
using boolean flags [message #651349] Sat, 29 January 2011 18:00 Go to next message
AJ  is currently offline AJ Friend
Messages: 77
Registered: July 2009
Member
I am changing the default values for the "Boolean Flags Field" property to eFlags and the "Boolean Flags Reserved Bits" to 8, but no code changes occur when I re-generate the model and edit code. Do these properties only affect code that is generated for the first time? Do I need to delete any class before I generate the code again after changing these properties?
Re: using boolean flags [message #651352 is a reply to message #651349] Sat, 29 January 2011 18:17 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6690
Registered: July 2009
Senior Member
Am 29.01.2011 19:00, schrieb AJ:
> I am changing the default values for the "Boolean Flags Field" property to eFlags and the "Boolean Flags Reserved Bits" to 8, but no code changes occur when I re-generate the model and edit code. Do these properties only affect code that is generated for the first time? Do I need to delete any class before I generate the code again after changing these properties?
Just a rough guess: The number of EMF internal flags plus your 8 bits does not require to add to the exising 32 bits of the default int. But who knows. What problem are you experiencing?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: using boolean flags [message #651359 is a reply to message #651352] Sat, 29 January 2011 19:21 Go to previous messageGo to next message
AJ  is currently offline AJ Friend
Messages: 77
Registered: July 2009
Member
Hallo Eike,

I have a large resource and I'm try to improve the loading time performance before I look into other options like creating proxy references or CDO.

The resource is pretty static since it's used as a template to create instances from. It's loaded into a tree viewer and only the top group nodes are displayed so it'll be great if I can load the content on-demand when a node is selected.

I'm not sure if CDO will be an over-kill, but I definitely would like to hear your comment or suggestion.

Thanks!

[Updated on: Sat, 29 January 2011 19:23]

Report message to a moderator

Re: using boolean flags [message #651371 is a reply to message #651349] Sun, 30 January 2011 00:29 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33218
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------090903070306000405020304
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

AJ,

Do you have features of type EBoolean? I'd expect generated methods to
look like this from ETypedElementImpl:

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean isUnique()
{
return (eFlags & UNIQUE_EFLAG) != 0;
}


AJ wrote:
> I am changing the default values for the "Boolean Flags Field"
> property to eFlags and the "Boolean Flags Reserved Bits" to 8, but no
> code changes occur when I re-generate the model and edit code. Do
> these properties only affect code that is generated for the first
> time? Do I need to delete any class before I generate the code again
> after changing these properties?

--------------090903070306000405020304
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
AJ,<br>
<br>
Do you have features of type EBoolean?  I'd expect generated methods to
look like this from ETypedElementImpl:<small><br>
</small>
<blockquote><small>  /**<br>
   * &lt;!-- begin-user-doc --&gt;<br>
   * &lt;!-- end-user-doc --&gt;<br>
   * @generated<br>
   */<br>
  public boolean isUnique()<br>
  {<br>
    return (eFlags &amp; UNIQUE_EFLAG) != 0;<br>
  }</small><br>
</blockquote>
<br>
AJ wrote:
<blockquote cite="mid:ii1k8i$hen$1@news.eclipse.org" type="cite">I am
changing the default values for the "Boolean Flags Field" property to
eFlags and the "Boolean Flags Reserved Bits" to 8, but no code changes
occur when I re-generate the model and edit code.  Do these properties
only affect code that is generated for the first time?  Do I need to
delete any class before I generate the code again after changing these
properties?
<br>
</blockquote>
</body>
</html>

--------------090903070306000405020304--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: using boolean flags [message #651380 is a reply to message #651359] Sun, 30 January 2011 06:53 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6690
Registered: July 2009
Senior Member
Am 29.01.2011 20:21, schrieb AJ:
> Hallo Eike,
>
> I have a large resource and I'm try to improve the loading time performance before I look into other options like creating proxy references or CDO.
>
> The resource is pretty static since it's used as template to create instances from. It's loaded into a tree viewer and only the top group nodes are displayed so it will be great if I can load the content on-demand when a node is selected.
Sounds to me as if containment proxies or normal cross references could help.

>
> I'm not sure if CDO will be an over-kill, but I definitely would like to hear your comment or suggestion.
Hard to say if CDO is the best solution for your challenges. CDO solves so many problems, scalability, multi-threading, fine-grained transactionality, distribution, persistence among them. On the other hand a multi-user environment comes with some new concepts like invalid objects due to remote deletion. All I can say here is: it's easy to try out. There are tutorials in the wiki, presentations on the homepage, etc.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Previous Topic:tooltips in properties view
Next Topic:[EMF] EMFResourceMapping example
Goto Forum:
  


Current Time: Thu Sep 26 12:28:31 GMT 2024

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

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

Back to the top