use of org.talend.designer.business.model.business.diagram.providers.BusinessDiagramActionProvider in project tdi-studio-se by Talend.
the class BusinessDiagramEditor method configureGraphicalViewer.
/**
* @generated
*/
@Override
protected void configureGraphicalViewer() {
super.configureGraphicalViewer();
IDiagramGraphicalViewer viewer = getDiagramGraphicalViewer();
// customize popup menu
ContextMenuProvider provider = new BusinessDiagramActionProvider(this, viewer);
viewer.setContextMenu(provider);
getSite().registerContextMenu(ActionIds.DIAGRAM_EDITOR_CONTEXT_MENU, provider, viewer);
DiagramRootEditPart root = (DiagramRootEditPart) getDiagramGraphicalViewer().getRootEditPart();
LayeredPane printableLayers = (LayeredPane) root.getLayer(LayerConstants.PRINTABLE_LAYERS);
FreeformLayer extLabelsLayer = new FreeformLayer();
extLabelsLayer.setLayoutManager(new DelegatingLayout());
printableLayers.addLayerAfter(extLabelsLayer, BusinessEditPartFactory.EXTERNAL_NODE_LABELS_LAYER, LayerConstants.PRIMARY_LAYER);
LayeredPane scalableLayers = (LayeredPane) root.getLayer(LayerConstants.SCALABLE_LAYERS);
FreeformLayer scaledFeedbackLayer = new FreeformLayer();
scaledFeedbackLayer.setEnabled(false);
scalableLayers.addLayerAfter(scaledFeedbackLayer, LayerConstants.SCALED_FEEDBACK_LAYER, DiagramRootEditPart.DECORATION_UNPRINTABLE_LAYER);
}
Aggregations