Esempio n. 1
0
  @Override
  public void addReference(final IReference reference) throws CouldntSaveDataException {
    Preconditions.checkNotNull(reference, "IE00221: Reference argument can not be null");
    Preconditions.checkArgument(
        !references.contains(reference), "IE00222: Reference can not be added twice");
    provider.addReference(this, reference.getTarget(), reference.getType());
    references.add(reference);

    for (final INaviOperandTreeNodeListener listener : listeners) {
      try {
        listener.addedReference(this, reference);
      } catch (final Exception exception) {
        CUtilityFunctions.logException(exception);
      }
    }
  }
Esempio n. 2
0
  @Override
  public void deleteReference(final IReference reference) throws CouldntDeleteException {
    Preconditions.checkNotNull(reference, "IE00223: Reference argument can not be null");
    Preconditions.checkArgument(
        references.contains(reference), "IE00224: No such reference at this node");
    provider.deleteReference(this, reference.getTarget(), reference.getType());

    references.remove(reference);

    for (final INaviOperandTreeNodeListener listener : listeners) {
      try {
        listener.removedReference(this, reference);
      } catch (final Exception exception) {
        CUtilityFunctions.logException(exception);
      }
    }
  }