public void checkStateChanged(CheckStateChangedEvent event) {
   PlainVariable element = (PlainVariable) event.getElement();
   enabledVariableMap.put(element, event.getChecked());
   int index = getColumnIndex(element);
   if (event.getChecked())
     sliceProfileTableViewer.getTable().getColumn(index).setWidth(columnWidthMap.get(element));
   else sliceProfileTableViewer.getTable().getColumn(index).setWidth(0);
   updateMetrics();
 }
Esempio n. 2
0
 void doCheckStateChanged(CheckStateChangedEvent e) {
   if (e.getChecked()) {
     @SuppressWarnings("unchecked")
     T elem = (T) e.getElement();
     fCheckElements.add(elem);
   } else {
     fCheckElements.remove(e.getElement());
   }
   checkStateChanged();
 }
 public void checkStateChanged(final CheckStateChangedEvent event) {
   if (event.getElement() instanceof IProfile) {
     final IProfile profile = (IProfile) event.getElement();
     if (event.getChecked() && !getProfiles().contains(profile)) {
       profiles.add(profile);
     } else if (!event.getChecked() && getProfiles().contains(profile)) {
       profiles.remove(profile);
     }
   }
 }
Esempio n. 4
0
 /* (non-Javadoc)
  * @see org.eclipse.jface.viewers.ICheckStateListener#checkStateChanged(org.eclipse.jface.viewers.CheckStateChangedEvent)
  */
 public void checkStateChanged(CheckStateChangedEvent event) {
   Object data = event.getElement();
   if (data instanceof PVariableInfo) {
     try {
       getUIManager()
           .getJobVariableManager()
           .updateVariableStatus((PVariableInfo) data, event.getChecked());
     } catch (CoreException e) {
       e.printStackTrace();
     }
   }
 }
    /**
     * @see org.eclipse.jface.viewers.ICheckStateListener#checkStateChanged
     *     (org.eclipse.jface.viewers.CheckStateChangedEvent)
     */
    public void checkStateChanged(CheckStateChangedEvent event) {

      Object element = event.getElement();
      if (element instanceof IFilter) {
        IFilter filter = (IFilter) element;
        if (!filter.isReadonly()) {
          filter.setEnabled(event.getChecked());
        } else {
          event.getCheckable().setChecked(event.getElement(), true);
        }
      }
    }
 protected void forceExistingChecked(CheckStateChangedEvent event) {
   if (fExisting != null) {
     Object elem = event.getElement();
     if (fExisting.contains(elem)) {
       fViewer.setChecked(elem, true);
     }
   }
 }
    @Override
    public void checkStateChanged(CheckStateChangedEvent event) {
      ITreeNode node = (ITreeNode) event.getElement();
      IModelTransferNode model = node.getElement();

      // apply the check state to the model
      if (event.getChecked()) {
        config.addModelToTransfer(model.getPrimaryResourceURI());
      } else {
        config.removeModelToTransfer(model);
      }

      // propagate the check state to other occurrences of the same model
      for (ITreeNode next : nodes.get(model)) {
        event.getCheckable().setChecked(next, event.getChecked());
      }
    }
  public void checkStateChanged(CheckStateChangedEvent event) {
    if (ignoreCheckStateChanges) {
      return;
    }

    ICheckboxTreeContentProvider contentProvider = contentProvider();
    Object element = event.getElement();

    // Update the model
    contentProvider.setCheckedState(element, event.getChecked());

    // Update the UI
    ignoreCheckStateChanges = true;
    try {
      updateTreeCheckboxesForAncestor(element);
      updateTableCheckboxes();
    } finally {
      ignoreCheckStateChanges = false;
    }
  }
 /* (non-Javadoc)
  * @see org.eclipse.jface.viewers.ICheckStateListener#checkStateChanged(org.eclipse.jface.viewers.CheckStateChangedEvent)
  */
 public void checkStateChanged(CheckStateChangedEvent event) {
   //		long start = System.currentTimeMillis();
   RootNode rootNode = validityView.getValidityManager().getRootNode();
   assert rootNode != null;
   Object element = event.getElement();
   //		System.out.format(Thread.currentThread().getName() + " %3.3f update start\n",
   // (System.currentTimeMillis() - start) * 0.001);
   if (element instanceof AbstractNode) {
     AbstractNode abstractNode = (AbstractNode) element;
     boolean enabled = event.getChecked();
     abstractNode.setEnabled(enabled);
     /*
      * Propagate the new checked/enabled state of this node to all non-Result children and at the leaves across to the other tree's results.
      */
     updateEnabledState(abstractNode, enabled);
     /*
      * Propgation of the corresponding grayed states up is performed as a total traversal during redraw since this ensures that
      * each node is visited just once, whereas propagating across and up is surprisingly wasteful.
      */
   }
   validityView.redraw();
   //		System.out.format(Thread.currentThread().getName() + " %3.3f redraw end\n",
   // (System.currentTimeMillis() - start) * 0.001);
 }
 @Override
 public void checkStateChanged(CheckStateChangedEvent event) {
   if (event.getChecked()) {
     if (event.getElement() instanceof KernelProviderComponent) {
       fTracepointsViewer.setSubtreeChecked(event.getElement(), true);
     }
   } else {
     if (event.getElement() instanceof KernelProviderComponent) {
       fTracepointsViewer.setSubtreeChecked(event.getElement(), false);
     } else {
       ITraceControlComponent component = (ITraceControlComponent) event.getElement();
       fTracepointsViewer.setChecked(component.getParent(), false);
     }
   }
 }
 public void checkStateChanged(CheckStateChangedEvent event) {
   SupportRecord sr = (SupportRecord) event.getElement();
   if (event.getChecked()) supportManager.addSupport(sr);
   else supportManager.removeSupport(sr);
 }
 @Override
 protected void remove(ICartridge cartridge, CheckStateChangedEvent event) {
   // undo visual change only
   event.getCheckable().setChecked(cartridge, true);
 }