use of org.talend.designer.core.ui.editor.process.TalendEditorDropTargetListener in project tdi-studio-se by Talend.
the class AbstractTalendEditor method initializeGraphicalViewer.
// ------------------------------------------------------------------------
// Abstract methods from GraphicalEditor
@Override
protected void initializeGraphicalViewer() {
super.initializeGraphicalViewer();
// this uses the PartFactory set in configureGraphicalViewer
// to create an EditPart for the diagram and sets it as the
// content for the viewer
IProcess2 process = getProcess();
getGraphicalViewer().setContents(process);
// containers are not correctly updated by default, so update them after all nodes have been added
if (process != null) {
for (ISubjobContainer subjobContainer : process.getSubjobContainers()) {
subjobContainer.updateSubjobContainer();
}
}
getGraphicalViewer().getControl().addMouseListener(new MouseAdapter() {
/*
* (non-Javadoc)
*
* @see org.eclipse.swt.events.MouseAdapter#mouseUp(org.eclipse.swt.events.MouseEvent)
*/
@Override
public void mouseUp(MouseEvent e) {
updateActions(getSelectionActions());
}
});
talendEditorDropTargetListener = new TalendEditorDropTargetListener(this);
getGraphicalViewer().addDropTargetListener(talendEditorDropTargetListener);
}
Aggregations