예제 #1
0
    @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());
      }
    }