public void init(ProjectPaneTree tree) {
    myTree = tree;

    myGenStatusVisitor.setUpdater(myUpdater).setExecutor(myExecutor);
    myErrorVisitor.setUpdater(myUpdater).setExecutor(myExecutor);
    myModifiedMarker.setUpdater(myUpdater).setExecutor(myExecutor);

    myTree.addTreeNodeListener(myNodeListener);

    MessageBusConnection connection = myTree.getProject().getMessageBus().connect();
    Disposer.register(myTree, connection);
    connection.subscribe(DumbService.DUMB_MODE, new MyDumbModeListener());
  }
 public void dispose() {
   myTree.removeTreeNodeListener(myNodeListener);
   if (myModuleListeners != null) {
     myModuleListeners.stopListening();
     myModuleListeners = null;
   }
   if (myModelListeners != null) {
     myModelListeners.stopListening();
     myModelListeners = null;
   }
   myGenStatusVisitor.setUpdater(null).setExecutor(null);
   myErrorVisitor.setUpdater(null).setExecutor(null);
   myModifiedMarker.setUpdater(null).setExecutor(null);
 }
Ejemplo n.º 3
0
 private void visitNode(SModelTreeNode modelNode) {
   myGenStatusVisitor.visitNode(modelNode);
   myErrorVisitor.visitNode(modelNode);
   myModifiedMarker.visitNode(modelNode);
 }