Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Select DiagramEditpart after opening the Diagram to show the propertysheet for the same.
Select DiagramEditpart after opening the Diagram to show the propertysheet for the same. [message #1698431] Mon, 15 June 2015 16:25 Go to next message
Abhishek Chakraborty is currently offline Abhishek ChakrabortyFriend
Messages: 82
Registered: July 2009
Location: Cologne, Germany
Member

HI All,

I am trying the following code in async call after i called the diagram open programmatically. but the diagrameditpart is always non selectable. Can I do it any other way ???

Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
if (iw != null) {
IEditorPart editorPart = iw.getActivePage().getActiveEditor();
if (editorPart instanceof MappingEditor) {

RootEditPart rootEditPart = ((EMappingEditor) editorPart).getDiagramBehavior().getDiagramContainer().getGraphicalViewer().getRootEditPart();
GraphicalViewer viewer = ((EMappingEditor) editorPart).getDiagramBehavior().getDiagramContainer().getGraphicalViewer();
if (rootEditPart.getChildren() != null && rootEditPart.getChildren().size() > 0) {
DiagramEditPart diagramEditPart = (DiagramEditPart) rootEditPart.getChildren().get(0);
if (diagramEditPart.isSelectable()) {
viewer.reveal(diagramEditPart);
viewer.select(diagramEditPart);
}
}

}
}

}
});


Regards,
Abhishek Chakraborty
Re: Select DiagramEditpart after opening the Diagram to show the propertysheet for the same. [message #1698871 is a reply to message #1698431] Thu, 18 June 2015 13:22 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Abhishek,

it is not possible to select the diagram edit part itself, implicit logic
behind selecting it is to deselct everything else.

Why do you want to do that?

Michael
Previous Topic:generate stand alone java application
Next Topic:hide PaletteCompartmentEntry object
Goto Forum:
  


Current Time: Tue Apr 23 17:09:27 GMT 2024

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

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

Back to the top