コード例 #1
0
  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());
  }
コード例 #2
0
 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);
 }