Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Inactive PE disappears
Inactive PE disappears [message #667873] Mon, 02 May 2011 14:36 Go to next message
Volker Wegert is currently offline Volker WegertFriend
Messages: 182
Registered: July 2009
Senior Member
Hello,

I'm not sure whether this is a bug... I've added an action to my editor to "pin" a certain background element in place so that it isn't selectable. This makes it easier for users to handle the foreground elements that have to be moved around inside this element. I've done this by setting the 'active' property of the background element to false to pin it in place. As long as I keep the editor open, everything works as desired.

The 'active' flag is persisted with the diagram model, with an unexpected side effect: The next time I open the editor, the background element is not displayed at all. Now if I set the 'active' property back to true and then save and reopen the editor, the element appears again.

Unfortunately, the documentation on the active attribute only consists of "If the meaning of the 'active' attribute isn't clear, there really should be more of a description here...", so I was guessing that an element being 'active' only concerns its 'selectability' - especially since there's a separate attribute 'visible'.

Did I make a mistake here or did I trigger a bug?

Thanks
Volker
Re: Inactive PE disappears [message #668019 is a reply to message #667873] Tue, 03 May 2011 12:17 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Volker,

to achieve this behavior of "pinning" an object, I would recommend to
disable move, resize and potentially the delete and remove features for that
object (e.g. by setting a property for the PE when the user action is
triggered.

The inactive flag's intention is slightly different; its basic intention is
to make PEs not respond to dropping request (basically not EditPart is
created for inactive PEs).

Nevertheless there are 2 issues indicated by you:
1) There is no real documentation available for the inactive flag. Graphiti
should provide this. Would you open a bugzilla for this missing docu?
2) The behavior is inconsistent: after setting the inactive flag theEditPart
should be removed as it is not being created on opening a new editor. It
seems, Graphiti can currently not handle switching the inactive flag for
already existing PEs. Would you open a second bugzilla to track this?

Thanks,
Michael


"Volker Wegert" wrote in message news:ipmf1f$6ng$1@news.eclipse.org...

Hello,

I'm not sure whether this is a bug... I've added an action to my editor to
"pin" a certain background element in place so that it isn't selectable.
This makes it easier for users to handle the foreground elements that have
to be moved around inside this element. I've done this by setting the
'active' property of the background element to false to pin it in place. As
long as I keep the editor open, everything works as desired.

The 'active' flag is persisted with the diagram model, with an unexpected
side effect: The next time I open the editor, the background element is not
displayed at all. Now if I set the 'active' property back to true and then
save and reopen the editor, the element appears again.

Unfortunately, the documentation on the active attribute only consists of
"If the meaning of the 'active' attribute isn't clear, there really should
be more of a description here...", so I was guessing that an element being
'active' only concerns its 'selectability' - especially since there's a
separate attribute 'visible'.

Did I make a mistake here or did I trigger a bug?

Thanks
Volker
Previous Topic:Petri Net: how to model transition
Next Topic:auto update policy
Goto Forum:
  


Current Time: Fri Apr 26 05:58:39 GMT 2024

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

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

Back to the top