protected GridSnapAdvisor snapAdvisor;
private RuntimeDiagramManager runtimeDiagramManager;
+ private Resource runtimeDiagramResourceCache;
private HasDiagramSourceListener hasDiagramSourceListener;
/**
*/
protected WorkbenchSelectionProvider selectionProvider;
- public Resource getRuntime() {
+ protected Resource getRuntimeFromManager() {
RuntimeDiagramManager rtdm = runtimeDiagramManager;
return (rtdm == null) ? null : rtdm.getRuntimeDiagram();
}
+ public Resource getRuntime() {
+ if (runtimeDiagramResourceCache != null)
+ return runtimeDiagramResourceCache;
+ runtimeDiagramResourceCache = getRuntimeFromManager();
+ return runtimeDiagramResourceCache;
+ }
+
public ParametrizedRead<IResourceEditorInput, Boolean> getInputValidator() {
return INPUT_VALIDATOR;
}