/**
* Private constructor.
*/
private PreviewUIController() {
PreviewController previewController = Lookup.getDefault().lookup(PreviewController.class);
final GraphController gc = Lookup.getDefault().lookup(GraphController.class);
PreviewModel previewModel = previewController.getModel();
if (previewModel != null) {
graphModel = gc.getModel();
graphModel.addGraphListener(this);
}
ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
pc.addWorkspaceListener(new WorkspaceListener() {
public void initialize(Workspace workspace) {
}
public void select(Workspace workspace) {
//Make sure AttributeModel is created before graph model:
Lookup.getDefault().lookup(AttributeController.class).getModel();
graphModel = gc.getModel();
graphModel.addGraphListener(PreviewUIController.this);
showRefreshNotification();
}
public void unselect(Workspace workspace) {