Tabnine Logo
CommandParameter
Code IndexAdd Tabnine to your IDE (free)

How to use
CommandParameter
in
org.eclipse.emf.edit.command

Best Java code snippets using org.eclipse.emf.edit.command.CommandParameter (Showing top 20 results out of 315)

origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.edit

/**
 * This is a convenience method that creates a <code>CommandParameter</code>
 * for a given parent feature and child object.
 */
protected CommandParameter createChildParameter(Object feature, Object child)
{
 return new CommandParameter(null, feature, child);
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.edit

/**
 * Implements creation of a set, copy, or drag-and-drop command by calling out to {@link #createSetCommand
 * createSetCommand}, {@link #createCopyCommand createCopyCommand}, or {@link #createDragAndDropCommand
 * createDragAndDropCommand}.
 */
public Command baseCreateCommand(Object object, EditingDomain domain, Class<? extends Command> commandClass, CommandParameter commandParameter)
{
 if (commandClass == SetCommand.class)
 {
  return 
   createSetCommand
    (domain, commandParameter.getOwner(), commandParameter.getFeature(), commandParameter.getValue(), commandParameter.getIndex());
 }
 else if (commandClass == CopyCommand.class)
 {
  return createCopyCommand(domain, commandParameter.getOwner(), (CopyCommand.Helper)commandParameter.getValue());
 }
 else if (commandClass == DragAndDropCommand.class)
 {
  DragAndDropCommand.Detail detail = (DragAndDropCommand.Detail)commandParameter.getFeature();
  return 
   createDragAndDropCommand
    (domain, commandParameter.getOwner(), detail.location, detail.operations, detail.operation, commandParameter.getCollection());
 }
 else
 {
  return UnexecutableCommand.INSTANCE;
 }
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.edit

Collection<?> collection = commandParameter.getCollection();
Object value = commandParameter.getValue();
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.edit

 createSetCommand
  (domain, 
   commandParameter.getEOwner(), 
   commandParameter.getEStructuralFeature() != null ?
    commandParameter.getEStructuralFeature() :
    getSetFeature(commandParameter.getEOwner(), commandParameter.getValue()),
   commandParameter.getValue(),
   commandParameter.getIndex());
result = createCopyCommand(domain, commandParameter.getEOwner(), (CopyCommand.Helper)commandParameter.getValue());
result = createCreateCopyCommand(domain, commandParameter.getEOwner(), (CopyCommand.Helper)commandParameter.getValue());
result = createInitializeCopyCommand(domain, commandParameter.getEOwner(), (CopyCommand.Helper)commandParameter.getValue());
if (commandParameter.getEStructuralFeature() != null)
 result = createRemoveCommand(domain, commandParameter.getEOwner(), commandParameter.getEStructuralFeature(), commandParameter.getCollection());
if (commandParameter.getEStructuralFeature() != null)
    commandParameter.getEOwner(), 
    commandParameter.getEStructuralFeature(), 
    commandParameter.getCollection(),
    commandParameter.getIndex());
if (commandParameter.getEStructuralFeature() != null)
    commandParameter.getEOwner(), 
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.edit

Collection<?> oldCollection = commandParameter.getCollection();
Object oldValue = commandParameter.getValue();
Object newValue = unwrap(oldValue);
 commandParameter = new CommandParameter(
  commandParameter.owner,
  commandParameter.feature,
origin: org.eclipse.emf/org.eclipse.emf.mapping

@Override
public Command createCommand(Object object, EditingDomain editingDomain, Class<? extends Command> commandClass, CommandParameter commandParameter)
{
 if (editingDomain instanceof MappingDomain)
 {
  MappingDomain mappingDomain = (MappingDomain)editingDomain;
  if (commandClass == NameMatchMappingCommand.class)
  {
   return createNameMatchMappingCommand(mappingDomain, (Mapping)commandParameter.getOwner());
  }
  else if (commandClass == TypeMatchMappingCommand.class)
  {
   return createTypeMatchMappingCommand(mappingDomain, (Mapping)commandParameter.getOwner());
  }
 }
 // This ensures that we are dealing with actual MOF objects.
 //
 commandParameter.collection = (Collection<?>)substituteMappedObject((Mapping)object, commandParameter.getCollection());
 commandParameter.value = substituteMappedObject((Mapping)object, commandParameter.getValue());
 return super.createCommand(object, editingDomain, commandClass, commandParameter);
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.edit

final EObject eObject = commandParameter.getEOwner();
final Object value = commandParameter.getValue();
int index = commandParameter.getIndex();
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.edit

if (commandParameter.getCollection() == null || commandParameter.getCollection().isEmpty())
final EObject eObject = commandParameter.getEOwner();
final List<Object> list = new ArrayList<Object>(commandParameter.getCollection());
int index = commandParameter.getIndex();
origin: org.eclipse.emf/org.eclipse.xsd.edit

commandParameter.setOwner(owner);
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.edit

if (commandParameter.getCollection() == null || commandParameter.getCollection().isEmpty())
final EObject eObject = commandParameter.getEOwner();
final List<Object> list = new ArrayList<Object>(commandParameter.getCollection());
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.edit

EStructuralFeature childFeature = parameter.getEStructuralFeature();
Object child = parameter.getValue();
if (childFeature != null && child != null)
 EStructuralFeature childFeature = parameter.getEStructuralFeature();
 if (childFeature == null || !childFeature.isMany())
origin: org.eclipse.emf/org.eclipse.emf.mapping

@Override
public Command createCommand(Object object, EditingDomain editingDomain, Class<? extends Command> commandClass, CommandParameter commandParameter)
{
 if (editingDomain instanceof MappingDomain) // && commandParameter instanceof MappingCommandParameter)
 {
  MappingDomain mappingDomain = (MappingDomain)editingDomain;
  if (commandClass == CreateMappingCommand.class)
  {
   return createCreateMappingCommand(mappingDomain, commandParameter.getCollection());
  }
  else if (commandClass == AddMappingCommand.class)
  {
   return createAddMappingCommand(mappingDomain, commandParameter.getCollection());
  }
  else if (commandClass == RemoveMappingCommand.class)
  {
   return createRemoveMappingCommand(mappingDomain, commandParameter.getCollection());
  }
  else if (commandClass == RestoreInitialStateCommand.class)
  {
   return createRestoreInitialStateCommand(mappingDomain);
  }
 }
 return super.createCommand(object, editingDomain, commandClass, commandParameter);
}
origin: org.eclipse/org.eclipse.emf.mapping

@Override
public Command createCommand(Object object, EditingDomain editingDomain, Class<? extends Command> commandClass, CommandParameter commandParameter)
{
 if (editingDomain instanceof MappingDomain)
 {
  MappingDomain mappingDomain = (MappingDomain)editingDomain;
  if (commandClass == NameMatchMappingCommand.class)
  {
   return createNameMatchMappingCommand(mappingDomain, (Mapping)commandParameter.getOwner());
  }
  else if (commandClass == TypeMatchMappingCommand.class)
  {
   return createTypeMatchMappingCommand(mappingDomain, (Mapping)commandParameter.getOwner());
  }
 }
 // This ensures that we are dealing with actual MOF objects.
 //
 commandParameter.collection = (Collection<?>)substituteMappedObject((Mapping)object, commandParameter.getCollection());
 commandParameter.value = substituteMappedObject((Mapping)object, commandParameter.getValue());
 return super.createCommand(object, editingDomain, commandClass, commandParameter);
}
origin: org.eclipse.emf/org.eclipse.xsd.edit

commandParameter.setOwner(owner);
origin: org.eclipse/org.eclipse.emf.mapping

@Override
public Command createCommand(Object object, EditingDomain editingDomain, Class<? extends Command> commandClass, CommandParameter commandParameter)
{
 if (editingDomain instanceof MappingDomain) // && commandParameter instanceof MappingCommandParameter)
 {
  MappingDomain mappingDomain = (MappingDomain)editingDomain;
  if (commandClass == CreateMappingCommand.class)
  {
   return createCreateMappingCommand(mappingDomain, commandParameter.getCollection());
  }
  else if (commandClass == AddMappingCommand.class)
  {
   return createAddMappingCommand(mappingDomain, commandParameter.getCollection());
  }
  else if (commandClass == RemoveMappingCommand.class)
  {
   return createRemoveMappingCommand(mappingDomain, commandParameter.getCollection());
  }
  else if (commandClass == RestoreInitialStateCommand.class)
  {
   return createRestoreInitialStateCommand(mappingDomain);
  }
 }
 return super.createCommand(object, editingDomain, commandClass, commandParameter);
}
origin: de.dentrassi.eclipse.neoscada.ide/org.eclipse.scada.configuration.component.edit

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected CommandParameter createChildParameter ( Object feature, Object child )
{
  return new CommandParameter ( null, feature, child );
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.edit

DragAndDropCommand.Detail detail = (DragAndDropCommand.Detail)commandParameter.getFeature();
return createDragAndDropCommand(domain, commandParameter.getOwner(), detail.location, detail.operations, detail.operation, commandParameter.getCollection());
 Object feature = commandParameter.getFeature();
 result = SetCommand.create(domain, commandOwner, feature, commandParameter.getValue(), commandParameter.getIndex());
 commandParameter.setOwner(commandOwner);
 result = ((IEditingDomainItemProvider)delegateItemProvider).createCommand(commandOwner, domain, commandClass, commandParameter);        
origin: org.eclipse.emf/org.eclipse.xsd.edit

/**
 * This is a convenience method for creating <code>CommandParameter</code>s
 * for a given parent feature and child object.
 */
protected CommandParameter createChildParameter(EReference feature,
                        XSDConcreteComponent child)
{
 return new CommandParameter(null, feature, child);
}
origin: org.eclipse/org.eclipse.emf.mapping

   !(commandParameter.getOwner() instanceof Mapping) &&
   !(commandParameter.getOwner() instanceof MappedObjectItemProvider) &&
   commandParameter.getFeature() == null && 
   commandParameter.getValue() instanceof Collection)
 boolean inputToOutput = mappingRoot.isOutputObject(commandParameter.getOwner());
 boolean okay = true;
 for (Object object : (Collection<?>)commandParameter.getValue())
  Collection<Object> mappedObjects = new ArrayList<Object>((Collection<?>)commandParameter.getValue());
  mappedObjects.add(commandParameter.getOwner());
  return CreateMappingCommand.create(this, mappedObjects);
else if (commandClass == RemoveCommand.class && commandParameter.getOwner() == null)
 Collection<?> collection = commandParameter.getCollection();
 if (mappingRoot.getMappedObjects().containsAll(collection))
  commandParameter.setOwner(mappingRoot);
if ((mappingRoot.isInputObject(commandParameter.getOwner()) ||
      mappingRoot.isOutputReadOnly() && mappingRoot.isOutputObject(commandParameter.getOwner())) && 
      (commandClass == AddCommand.class ||
       commandClass == MoveCommand.class ||
origin: org.eclipse.neoscada.ide/org.eclipse.scada.configuration.component.edit

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected CommandParameter createChildParameter ( Object feature, Object child )
{
  return new CommandParameter ( null, feature, child );
}
org.eclipse.emf.edit.commandCommandParameter

Javadoc

This is a convenient common base class for all the command parameters need by the various types of commands. It provides particular support for the encodings need by the basic EMF-based command implementations.

Most used methods

  • <init>
    This creates an instance specifying an owner, a feature, a collection of values, and an index.
  • setOwner
    This sets the owner to the specified value.
  • getCollection
    This returns the specified collection.
  • getFeature
    This returns the specified feature.
  • getIndex
    This returns the specified index.
  • getOwner
    This returns the specified owner.
  • getValue
    This returns the specified value.
  • collectionToString
  • getEOwner
    This returns the specified owner as a EObject, if it is one.
  • getEStructuralFeature
    This returns the specified feature as a EStructuralFeature, if it is one.
  • getOwnerList
    This is a safe way to get the list affected by the parameters for an add or remove specification. It
  • getOwnerList

Popular in Java

  • Parsing JSON documents to java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • requestLocationUpdates (LocationManager)
  • getSharedPreferences (Context)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now