Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » GEF conditional multi selection?
GEF conditional multi selection? [message #244160] Tue, 08 July 2008 03:08 Go to next message
Ben Xu is currently offline Ben XuFriend
Messages: 20
Registered: July 2009
Junior Member
Does anybody implement the following requirement on GEF:

EditPart A contains EditPart B and EditPart C.

Each EditPart can be single selected from responding figure.(common in GEF)

Multi-Selcted EditPart must be at the same level. This means that:
B and C can be multi-selected.

A and B can't be multi-selected together.
(from viewer, you keydown ctrl key, use mouse to select A, and then try
top select B . B should not be selected since A and B are not in same
level and nothing happens on B's figure)


I can't find an easy common way to do this. It looks like GEF doesn't
provide such things. Anybody know?

Now, i am trying to customize a "SelectEditPartTracker" to do such things
:(
Re: GEF conditional multi selection? [message #244201 is a reply to message #244160] Wed, 09 July 2008 03:37 Go to previous message
Ben Xu is currently offline Ben XuFriend
Messages: 20
Registered: July 2009
Junior Member
solved this problem by customized a "GraphicalViewer" by rewrite its
"appendSelection" method.

public void appendSelection(EditPart editpart) {
List parts = this.getSelectedEditParts();
if (parts != null && parts.size() > 0) {
EditPart part = (EditPart) parts.get(0);
if (part.getParent() != editpart.getParent()) {
return;
}
}
super.appendSelection(editpart);
}
Previous Topic:Placing Palette Entry on Eclipse Coolbar
Next Topic:Zooming problem: class org.eclipse.draw2d.ScaledGraphics has not implemented this new graphics funct
Goto Forum:
  


Current Time: Sun Dec 21 03:36:08 GMT 2014

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

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