Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2008 Tom Schindl and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: Tom Schindl <tom.schindl@bestsolution.at> - port to EMF in 295683
package org.eclipse.emf.databinding.edit.internal;

PROVISIONAL: This API is subject to arbitrary change, including renaming or removal.

Since:
2.6
public class EMFEditSetProperty extends EMFSetProperty
  private final EditingDomain editingDomain;

  

Parameters:
editingDomain
eStructuralFeature
  public EMFEditSetProperty(EditingDomain editingDomainEStructuralFeature eStructuralFeature)
  {
    super(eStructuralFeature);
    this. = editingDomain;
  }
  @SuppressWarnings("rawtypes")
  protected void doSetSet(Object sourceSet setSetDiff diff)
  {
    ifdiff.getAdditions() != null && ! diff.getAdditions().isEmpty() ) {
      execute(AddCommand.create(sourcegetFeature(), diff.getAdditions()));
    }
    ifdiff.getRemovals() != null && ! diff.getRemovals().isEmpty() ) {
      execute(RemoveCommand.create(sourcegetFeature(), diff.getRemovals()));
    }
  }
  private boolean execute(Command command)
  {
    if (command.canExecute())
    {
      .getCommandStack().execute(command);
      return true;
    }
    else
    {
      return false;
    }
  }
New to GrepCode? Check out our FAQ X