workspace.add(model);
}
refreshPartitions = true;
GraphModel gm = Lookup.getDefault().lookup(GraphController.class).getModel(workspace);
trachViewChange(gm);
AttributeModel attributeModel = Lookup.getDefault().lookup(AttributeController.class).getModel(workspace);
attributeModel.addAttributeListener(PartitionControllerImpl.this);
}
public void unselect(Workspace workspace) {
GraphModel gm = Lookup.getDefault().lookup(GraphController.class).getModel(workspace);
untrackViewChange(gm);
model = null;
AttributeModel attributeModel = workspace.getLookup().lookup(AttributeModel.class);
attributeModel.removeAttributeListener(PartitionControllerImpl.this);
}
public void close(Workspace workspace) {
}
public void disable() {
untrackViewChange(null);
}
});
if (pc.getCurrentWorkspace() != null) {
refreshPartitions = true;
model = pc.getCurrentWorkspace().getLookup().lookup(PartitionModelImpl.class);
if (model == null) {
model = new PartitionModelImpl();
Workspace workspace = pc.getCurrentWorkspace();
pc.getCurrentWorkspace().add(model);
GraphModel gm = Lookup.getDefault().lookup(GraphController.class).getModel(workspace);
trachViewChange(gm);
AttributeModel attributeModel = Lookup.getDefault().lookup(AttributeController.class).getModel(workspace);
attributeModel.addAttributeListener(PartitionControllerImpl.this);
}
}
}