private void handleTerminated(final ToolProcess tool) {
   synchronized (this) {
     if (fCurrentTool == tool) {
       if (DEBUG) {
         System.out.println("[tool source] terminated:" + (tool != null ? tool.getLabel() : "-"));
       }
       fireSourceChanged(ISources.WORKBENCH, ACTIVE_TOOL_NAME, tool);
     }
   }
 }
 private void handleActivated(final ToolProcess tool) {
   synchronized (this) {
     if (fCurrentTool == tool || (fCurrentTool == null && tool == null)) {
       return;
     }
     fCurrentTool = tool;
   }
   if (DEBUG) {
     System.out.println("[tool source] changed:" + (tool != null ? tool.getLabel() : "-"));
   }
   final Object value = (tool != null) ? tool : IEvaluationContext.UNDEFINED_VARIABLE;
   fireSourceChanged(ISources.WORKBENCH, ACTIVE_TOOL_NAME, value);
 }