}
protected String getPopupId() {
- return "#ModelingDiagramPopup";
+ return "#ModelingDiagramPopup"; //$NON-NLS-1$
}
protected void getPreferences() {
swt = SWTThread.getThreadAccess(parent.getDisplay());
statusLineManager = getEditorSite().getActionBars().getStatusLineManager();
- Object task = BEGIN("DV.initSession");
+ Object task = BEGIN("DV.initSession"); //$NON-NLS-1$
initSession();
END(task);
readNames();
getPreferences();
- task = BEGIN("DV.createChassis");
+ task = BEGIN("DV.createChassis"); //$NON-NLS-1$
createChassis(parent);
END(task);
}
protected void initializeCanvas() {
- Object canvasInit = BEGIN("DV.canvasInitialization");
+ Object canvasInit = BEGIN("DV.canvasInitialization"); //$NON-NLS-1$
- Object task = BEGIN("DV.createViewerCanvas");
+ Object task = BEGIN("DV.createViewerCanvas"); //$NON-NLS-1$
// ThreadUtils.syncExec(AWTThread.getThreadAccess(), new Runnable() {
// @Override
// public void run() {
//FullscreenUtils.addFullScreenHandler(canvasContext, s, canvasProvider);
- task = BEGIN("DV.setCanvasContext");
+ task = BEGIN("DV.setCanvasContext"); //$NON-NLS-1$
setCanvasContext(canvasContext);
END(task);
try {
- task = BEGIN("DV.loadDiagram");
+ task = BEGIN("DV.loadDiagram"); //$NON-NLS-1$
sourceDiagram = loadDiagram(diagramResource);
END(task);
// Zoom to fit
- task = BEGIN("DV.scheduleZoomToFit");
+ task = BEGIN("DV.scheduleZoomToFit"); //$NON-NLS-1$
// canvasContext.getDefaultHintContext().setHint(Hints.KEY_CANVAS_TRANSFORM, new AffineTransform());
// canvasContext.getContentContext().setDirty();
// Start an activation for the input resource.
// This will activate mapping if necessary.
- task = BEGIN("DV.performActivation");
+ task = BEGIN("DV.performActivation"); //$NON-NLS-1$
performActivation();
END(task);
- task = BEGIN("DV.activate context");
+ task = BEGIN("DV.activate context"); //$NON-NLS-1$
contextUtil.activate(DiagramViewer.DIAGRAMMING_CONTEXT);
END(task);
- task = BEGIN("DV.onCreated");
+ task = BEGIN("DV.onCreated"); //$NON-NLS-1$
onCreated();
END(task);
protected void scheduleZoomToFit() {
if (sourceDiagram == null)
- throw new IllegalStateException("source diagram is null");
+ throw new IllegalStateException("source diagram is null"); //$NON-NLS-1$
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 {
- SubMonitor mon = SubMonitor.convert(monitor, "Loading Diagram", 100);
+ SubMonitor mon = SubMonitor.convert(monitor, Messages.SheetViewer_MonitorLoadingDiagram, 100);
try {
dc.set( loadDiagram(mon.newChild(100), r) );
} catch (DatabaseException e) {
}
protected IDiagram loadDiagram(IProgressMonitor monitor, Resource r) throws DatabaseException {
- SubMonitor mon = SubMonitor.convert(monitor, "Loading Diagram", 100);
+ SubMonitor mon = SubMonitor.convert(monitor, Messages.SheetViewer_MonitorLoadingDiagram, 100);
- Object task = BEGIN("DV.DiagramLoadQuery");
+ Object task = BEGIN("DV.DiagramLoadQuery"); //$NON-NLS-1$
IDiagram d = sessionContext.getSession().syncRequest(DiagramRequests.loadDiagram(mon.newChild(100), getResourceInput2().getModel(null), r, null, structuralPath, synchronizer, null));
END(task);
- task = BEGIN("DV.setDiagramHint");
+ task = BEGIN("DV.setDiagramHint"); //$NON-NLS-1$
canvasContext.getDefaultHintContext().setHint(DiagramHints.KEY_DIAGRAM, d);
END(task);
- task = BEGIN("DV.set other hints");
+ task = BEGIN("DV.set other hints"); //$NON-NLS-1$
// 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);
}
});
} catch (DatabaseException e) {
- throw new UnsupportedOperationException("Failed to initialize data model synchronizer", e);
+ throw new UnsupportedOperationException("Failed to initialize data model synchronizer", e); //$NON-NLS-1$
}
}
CanvasContext ctx = new CanvasContext(thread);
IHintContext h = ctx.getDefaultHintContext();
- Object task = BEGIN("createSynchronizer");
+ Object task = BEGIN("createSynchronizer"); //$NON-NLS-1$
this.synchronizer = createSynchronizer(ctx, sessionContext);
END(task);
@Override
public void init(IEditorSite site, IEditorInput input) throws PartInitException {
if (!(input instanceof IResourceEditorInput))
- throw new PartInitException("Invalid input: must be IResourceEditorInput");
+ throw new PartInitException("Invalid input: must be IResourceEditorInput"); //$NON-NLS-1$
setSite(site);
setInput(input);
support = new ResourceEditorSupport(this);