swt = SWTThread.getThreadAccess(parent.getDisplay());
statusLineManager = getEditorSite().getActionBars().getStatusLineManager();
swt = SWTThread.getThreadAccess(parent.getDisplay());
statusLineManager = getEditorSite().getActionBars().getStatusLineManager();
// canvasContext.getDefaultHintContext().setHint(Hints.KEY_CANVAS_TRANSFORM, new AffineTransform());
// canvasContext.getContentContext().setDirty();
// canvasContext.getDefaultHintContext().setHint(Hints.KEY_CANVAS_TRANSFORM, new AffineTransform());
// canvasContext.getContentContext().setDirty();
sourceDiagram.setHint(Hints.KEY_DISABLE_PAINTING, Boolean.TRUE);
sourceDiagram.setHint(DiagramHints.KEY_INITIAL_ZOOM_TO_FIT, Boolean.TRUE);
sourceDiagram.setHint(Hints.KEY_DISABLE_PAINTING, Boolean.TRUE);
sourceDiagram.setHint(DiagramHints.KEY_INITIAL_ZOOM_TO_FIT, Boolean.TRUE);
PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
PlatformUI.getWorkbench().getProgressService().busyCursorWhile(new IRunnableWithProgress() {
@Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
try {
dc.set( loadDiagram(mon.newChild(100), r) );
} catch (DatabaseException e) {
try {
dc.set( loadDiagram(mon.newChild(100), r) );
} catch (DatabaseException e) {
IDiagram d = sessionContext.getSession().syncRequest(DiagramRequests.loadDiagram(mon.newChild(100), getResourceInput2().getModel(null), r, null, structuralPath, synchronizer, null));
END(task);
IDiagram d = sessionContext.getSession().syncRequest(DiagramRequests.loadDiagram(mon.newChild(100), getResourceInput2().getModel(null), r, null, structuralPath, synchronizer, null));
END(task);
// Setup a copy advisor for the synchronizer
//d.setHint(SynchronizationHints.COPY_ADVISOR, new MappedElementCopyAdvisor(new ComponentCopyAdvisor()));
d.setHint(DiagramHints.KEY_USE_CONNECTION_FLAGS, Boolean.FALSE);
// Setup a copy advisor for the synchronizer
//d.setHint(SynchronizationHints.COPY_ADVISOR, new MappedElementCopyAdvisor(new ComponentCopyAdvisor()));
d.setHint(DiagramHints.KEY_USE_CONNECTION_FLAGS, Boolean.FALSE);
@Override
public void init(IEditorSite site, IEditorInput input) throws PartInitException {
if (!(input instanceof IResourceEditorInput))
@Override
public void init(IEditorSite site, IEditorInput input) throws PartInitException {
if (!(input instanceof IResourceEditorInput))