Skip to main content



      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 12:25 Go to next message
Eclipse UserFriend
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);
}
}

}
}

}
});
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 09:22 Go to previous message
Eclipse UserFriend
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: Wed May 07 04:39:55 EDT 2025

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

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

Back to the top