org.eclipse.emf.mapping_2.7.0.v20120130-0943

16:43:44.284 INFO  jd.cli.Main - Decompiling org.eclipse.emf.mapping_2.7.0.v20120130-0943.jar
package org.eclipse.emf.mapping;

public abstract interface ComplexTypeConverter
  extends TypeConverter
{
  public abstract Mapping getIn2out();
  
  public abstract void setIn2out(Mapping paramMapping);
  
  public abstract Mapping getOut2in();
  
  public abstract void setOut2in(Mapping paramMapping);
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.ComplexTypeConverter
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping;

public abstract interface FunctionNamePair
  extends TypeConverter
{
  public abstract String getIn2out();
  
  public abstract void setIn2out(String paramString);
  
  public abstract String getOut2in();
  
  public abstract void setOut2in(String paramString);
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.FunctionNamePair
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping;

import org.eclipse.emf.ecore.EOperation;

public abstract interface FunctionPair
  extends TypeConverter
{
  public abstract EOperation getIn2out();
  
  public abstract void setIn2out(EOperation paramEOperation);
  
  public abstract EOperation getOut2in();
  
  public abstract void setOut2in(EOperation paramEOperation);
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.FunctionPair
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping;

import java.util.Collection;
import org.eclipse.emf.edit.provider.IChangeNotifier;

public abstract interface MappedObjectState
  extends IChangeNotifier
{
  public abstract boolean isInput();
  
  public abstract void setInput();
  
  public abstract boolean isOutput();
  
  public abstract void setOutput();
  
  public abstract Object getOriginatingInput();
  
  public abstract void setOriginatingInput(Object paramObject);
  
  public abstract Collection<Mapping> getMappings();
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.MappedObjectState
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping;

import java.util.Collection;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.ecore.EObject;

public abstract interface Mapping
  extends EObject
{
  public abstract MappingHelper getHelper();
  
  public abstract void setHelper(MappingHelper paramMappingHelper);
  
  public abstract EList<Mapping> getNested();
  
  public abstract Mapping getNestedIn();
  
  public abstract void setNestedIn(Mapping paramMapping);
  
  public abstract EList<EObject> getInputs();
  
  public abstract EList<EObject> getOutputs();
  
  public abstract Mapping getTypeMapping();
  
  public abstract void setTypeMapping(Mapping paramMapping);
  
  public abstract Collection<? extends EObject> getMappedObjects();
  
  public abstract EList<EObject> getTops();
  
  public abstract EList<EObject> getBottoms();
  
  public abstract MappingRoot getMappingRoot();
  
  public abstract boolean isReverse();
  
  public abstract EList<EObject> getSenders();
  
  public abstract EList<EObject> getReceivers();
  
  public abstract MappingHelper getEffectiveHelper();
  
  public abstract TreeIterator<Mapping> treeIterator();
  
  public abstract TreeIterator<Mapping> treeIterator(boolean paramBoolean);
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.Mapping
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping;

import org.eclipse.emf.ecore.EFactory;
import org.eclipse.emf.mapping.impl.MappingFactoryImpl;

public abstract interface MappingFactory
  extends EFactory
{
  public static final MappingFactory eINSTANCE = ;
  
  public abstract MappingHelper createMappingHelper();
  
  public abstract Mapping createMapping();
  
  public abstract TypeConverter createTypeConverter();
  
  public abstract FunctionPair createFunctionPair();
  
  public abstract FunctionNamePair createFunctionNamePair();
  
  public abstract MappingStrategy createMappingStrategy();
  
  public abstract MappingRoot createMappingRoot();
  
  public abstract ComplexTypeConverter createComplexTypeConverter();
  
  public abstract MappingPackage getMappingPackage();
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.MappingFactory
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping;

import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;

public abstract interface MappingHelper
  extends EObject
{
  public abstract Mapping getMapper();
  
  public abstract void setMapper(Mapping paramMapping);
  
  public abstract EObject getHelpedObject();
  
  public abstract void setHelpedObject(EObject paramEObject);
  
  public abstract MappingHelper getNestedIn();
  
  public abstract void setNestedIn(MappingHelper paramMappingHelper);
  
  public abstract EList<MappingHelper> getNested();
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.MappingHelper
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping;

import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EReference;

public abstract interface MappingPackage$Literals
{
  public static final EClass MAPPING_HELPER = MappingPackage.eINSTANCE.getMappingHelper();
  public static final EReference MAPPING_HELPER__MAPPER = MappingPackage.eINSTANCE.getMappingHelper_Mapper();
  public static final EReference MAPPING_HELPER__HELPED_OBJECT = MappingPackage.eINSTANCE.getMappingHelper_HelpedObject();
  public static final EReference MAPPING_HELPER__NESTED_IN = MappingPackage.eINSTANCE.getMappingHelper_NestedIn();
  public static final EReference MAPPING_HELPER__NESTED = MappingPackage.eINSTANCE.getMappingHelper_Nested();
  public static final EClass MAPPING = MappingPackage.eINSTANCE.getMapping();
  public static final EReference MAPPING__HELPER = MappingPackage.eINSTANCE.getMapping_Helper();
  public static final EReference MAPPING__NESTED = MappingPackage.eINSTANCE.getMapping_Nested();
  public static final EReference MAPPING__NESTED_IN = MappingPackage.eINSTANCE.getMapping_NestedIn();
  public static final EReference MAPPING__INPUTS = MappingPackage.eINSTANCE.getMapping_Inputs();
  public static final EReference MAPPING__OUTPUTS = MappingPackage.eINSTANCE.getMapping_Outputs();
  public static final EReference MAPPING__TYPE_MAPPING = MappingPackage.eINSTANCE.getMapping_TypeMapping();
  public static final EClass TYPE_CONVERTER = MappingPackage.eINSTANCE.getTypeConverter();
  public static final EClass FUNCTION_PAIR = MappingPackage.eINSTANCE.getFunctionPair();
  public static final EReference FUNCTION_PAIR__IN2OUT = MappingPackage.eINSTANCE.getFunctionPair_In2out();
  public static final EReference FUNCTION_PAIR__OUT2IN = MappingPackage.eINSTANCE.getFunctionPair_Out2in();
  public static final EClass FUNCTION_NAME_PAIR = MappingPackage.eINSTANCE.getFunctionNamePair();
  public static final EAttribute FUNCTION_NAME_PAIR__IN2OUT = MappingPackage.eINSTANCE.getFunctionNamePair_In2out();
  public static final EAttribute FUNCTION_NAME_PAIR__OUT2IN = MappingPackage.eINSTANCE.getFunctionNamePair_Out2in();
  public static final EClass MAPPING_STRATEGY = MappingPackage.eINSTANCE.getMappingStrategy();
  public static final EClass MAPPING_ROOT = MappingPackage.eINSTANCE.getMappingRoot();
  public static final EAttribute MAPPING_ROOT__OUTPUT_READ_ONLY = MappingPackage.eINSTANCE.getMappingRoot_OutputReadOnly();
  public static final EAttribute MAPPING_ROOT__TOP_TO_BOTTOM = MappingPackage.eINSTANCE.getMappingRoot_TopToBottom();
  public static final EAttribute MAPPING_ROOT__COMMAND_STACK = MappingPackage.eINSTANCE.getMappingRoot_CommandStack();
  public static final EClass COMPLEX_TYPE_CONVERTER = MappingPackage.eINSTANCE.getComplexTypeConverter();
  public static final EReference COMPLEX_TYPE_CONVERTER__IN2OUT = MappingPackage.eINSTANCE.getComplexTypeConverter_In2out();
  public static final EReference COMPLEX_TYPE_CONVERTER__OUT2IN = MappingPackage.eINSTANCE.getComplexTypeConverter_Out2in();
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.MappingPackage.Literals
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping;

import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.mapping.impl.MappingPackageImpl;

public abstract interface MappingPackage
  extends EPackage
{
  public static final String eNAME = "mapping";
  public static final String eNS_URI = "http://www.eclipse.org/emf/2002/Mapping";
  public static final String eNS_PREFIX = "mapping";
  public static final MappingPackage eINSTANCE = ;
  public static final int MAPPING_HELPER = 0;
  public static final int MAPPING_HELPER__MAPPER = 0;
  public static final int MAPPING_HELPER__HELPED_OBJECT = 1;
  public static final int MAPPING_HELPER__NESTED_IN = 2;
  public static final int MAPPING_HELPER__NESTED = 3;
  public static final int MAPPING_HELPER_FEATURE_COUNT = 4;
  public static final int MAPPING = 1;
  public static final int MAPPING__HELPER = 0;
  public static final int MAPPING__NESTED = 1;
  public static final int MAPPING__NESTED_IN = 2;
  public static final int MAPPING__INPUTS = 3;
  public static final int MAPPING__OUTPUTS = 4;
  public static final int MAPPING__TYPE_MAPPING = 5;
  public static final int MAPPING_FEATURE_COUNT = 6;
  public static final int TYPE_CONVERTER = 2;
  public static final int TYPE_CONVERTER__MAPPER = 0;
  public static final int TYPE_CONVERTER__HELPED_OBJECT = 1;
  public static final int TYPE_CONVERTER__NESTED_IN = 2;
  public static final int TYPE_CONVERTER__NESTED = 3;
  public static final int TYPE_CONVERTER_FEATURE_COUNT = 4;
  public static final int FUNCTION_PAIR = 3;
  public static final int FUNCTION_PAIR__MAPPER = 0;
  public static final int FUNCTION_PAIR__HELPED_OBJECT = 1;
  public static final int FUNCTION_PAIR__NESTED_IN = 2;
  public static final int FUNCTION_PAIR__NESTED = 3;
  public static final int FUNCTION_PAIR__IN2OUT = 4;
  public static final int FUNCTION_PAIR__OUT2IN = 5;
  public static final int FUNCTION_PAIR_FEATURE_COUNT = 6;
  public static final int FUNCTION_NAME_PAIR = 4;
  public static final int FUNCTION_NAME_PAIR__MAPPER = 0;
  public static final int FUNCTION_NAME_PAIR__HELPED_OBJECT = 1;
  public static final int FUNCTION_NAME_PAIR__NESTED_IN = 2;
  public static final int FUNCTION_NAME_PAIR__NESTED = 3;
  public static final int FUNCTION_NAME_PAIR__IN2OUT = 4;
  public static final int FUNCTION_NAME_PAIR__OUT2IN = 5;
  public static final int FUNCTION_NAME_PAIR_FEATURE_COUNT = 6;
  public static final int MAPPING_STRATEGY = 5;
  public static final int MAPPING_STRATEGY__MAPPER = 0;
  public static final int MAPPING_STRATEGY__HELPED_OBJECT = 1;
  public static final int MAPPING_STRATEGY__NESTED_IN = 2;
  public static final int MAPPING_STRATEGY__NESTED = 3;
  public static final int MAPPING_STRATEGY_FEATURE_COUNT = 4;
  public static final int MAPPING_ROOT = 6;
  public static final int MAPPING_ROOT__HELPER = 0;
  public static final int MAPPING_ROOT__NESTED = 1;
  public static final int MAPPING_ROOT__NESTED_IN = 2;
  public static final int MAPPING_ROOT__INPUTS = 3;
  public static final int MAPPING_ROOT__OUTPUTS = 4;
  public static final int MAPPING_ROOT__TYPE_MAPPING = 5;
  public static final int MAPPING_ROOT__OUTPUT_READ_ONLY = 6;
  public static final int MAPPING_ROOT__TOP_TO_BOTTOM = 7;
  public static final int MAPPING_ROOT__COMMAND_STACK = 8;
  public static final int MAPPING_ROOT_FEATURE_COUNT = 9;
  public static final int COMPLEX_TYPE_CONVERTER = 7;
  public static final int COMPLEX_TYPE_CONVERTER__MAPPER = 0;
  public static final int COMPLEX_TYPE_CONVERTER__HELPED_OBJECT = 1;
  public static final int COMPLEX_TYPE_CONVERTER__NESTED_IN = 2;
  public static final int COMPLEX_TYPE_CONVERTER__NESTED = 3;
  public static final int COMPLEX_TYPE_CONVERTER__IN2OUT = 4;
  public static final int COMPLEX_TYPE_CONVERTER__OUT2IN = 5;
  public static final int COMPLEX_TYPE_CONVERTER_FEATURE_COUNT = 6;
  
  public abstract EClass getMappingHelper();
  
  public abstract EReference getMappingHelper_Mapper();
  
  public abstract EReference getMappingHelper_HelpedObject();
  
  public abstract EReference getMappingHelper_NestedIn();
  
  public abstract EReference getMappingHelper_Nested();
  
  public abstract EClass getMapping();
  
  public abstract EReference getMapping_Helper();
  
  public abstract EReference getMapping_Nested();
  
  public abstract EReference getMapping_NestedIn();
  
  public abstract EReference getMapping_Inputs();
  
  public abstract EReference getMapping_Outputs();
  
  public abstract EReference getMapping_TypeMapping();
  
  public abstract EClass getTypeConverter();
  
  public abstract EClass getFunctionPair();
  
  public abstract EReference getFunctionPair_In2out();
  
  public abstract EReference getFunctionPair_Out2in();
  
  public abstract EClass getFunctionNamePair();
  
  public abstract EAttribute getFunctionNamePair_In2out();
  
  public abstract EAttribute getFunctionNamePair_Out2in();
  
  public abstract EClass getMappingStrategy();
  
  public abstract EClass getMappingRoot();
  
  public abstract EAttribute getMappingRoot_OutputReadOnly();
  
  public abstract EAttribute getMappingRoot_TopToBottom();
  
  public abstract EAttribute getMappingRoot_CommandStack();
  
  public abstract EClass getComplexTypeConverter();
  
  public abstract EReference getComplexTypeConverter_In2out();
  
  public abstract EReference getComplexTypeConverter_Out2in();
  
  public abstract MappingFactory getMappingFactory();
  
  public static abstract interface Literals
  {
    public static final EClass MAPPING_HELPER = MappingPackage.eINSTANCE.getMappingHelper();
    public static final EReference MAPPING_HELPER__MAPPER = MappingPackage.eINSTANCE.getMappingHelper_Mapper();
    public static final EReference MAPPING_HELPER__HELPED_OBJECT = MappingPackage.eINSTANCE.getMappingHelper_HelpedObject();
    public static final EReference MAPPING_HELPER__NESTED_IN = MappingPackage.eINSTANCE.getMappingHelper_NestedIn();
    public static final EReference MAPPING_HELPER__NESTED = MappingPackage.eINSTANCE.getMappingHelper_Nested();
    public static final EClass MAPPING = MappingPackage.eINSTANCE.getMapping();
    public static final EReference MAPPING__HELPER = MappingPackage.eINSTANCE.getMapping_Helper();
    public static final EReference MAPPING__NESTED = MappingPackage.eINSTANCE.getMapping_Nested();
    public static final EReference MAPPING__NESTED_IN = MappingPackage.eINSTANCE.getMapping_NestedIn();
    public static final EReference MAPPING__INPUTS = MappingPackage.eINSTANCE.getMapping_Inputs();
    public static final EReference MAPPING__OUTPUTS = MappingPackage.eINSTANCE.getMapping_Outputs();
    public static final EReference MAPPING__TYPE_MAPPING = MappingPackage.eINSTANCE.getMapping_TypeMapping();
    public static final EClass TYPE_CONVERTER = MappingPackage.eINSTANCE.getTypeConverter();
    public static final EClass FUNCTION_PAIR = MappingPackage.eINSTANCE.getFunctionPair();
    public static final EReference FUNCTION_PAIR__IN2OUT = MappingPackage.eINSTANCE.getFunctionPair_In2out();
    public static final EReference FUNCTION_PAIR__OUT2IN = MappingPackage.eINSTANCE.getFunctionPair_Out2in();
    public static final EClass FUNCTION_NAME_PAIR = MappingPackage.eINSTANCE.getFunctionNamePair();
    public static final EAttribute FUNCTION_NAME_PAIR__IN2OUT = MappingPackage.eINSTANCE.getFunctionNamePair_In2out();
    public static final EAttribute FUNCTION_NAME_PAIR__OUT2IN = MappingPackage.eINSTANCE.getFunctionNamePair_Out2in();
    public static final EClass MAPPING_STRATEGY = MappingPackage.eINSTANCE.getMappingStrategy();
    public static final EClass MAPPING_ROOT = MappingPackage.eINSTANCE.getMappingRoot();
    public static final EAttribute MAPPING_ROOT__OUTPUT_READ_ONLY = MappingPackage.eINSTANCE.getMappingRoot_OutputReadOnly();
    public static final EAttribute MAPPING_ROOT__TOP_TO_BOTTOM = MappingPackage.eINSTANCE.getMappingRoot_TopToBottom();
    public static final EAttribute MAPPING_ROOT__COMMAND_STACK = MappingPackage.eINSTANCE.getMappingRoot_CommandStack();
    public static final EClass COMPLEX_TYPE_CONVERTER = MappingPackage.eINSTANCE.getComplexTypeConverter();
    public static final EReference COMPLEX_TYPE_CONVERTER__IN2OUT = MappingPackage.eINSTANCE.getComplexTypeConverter_In2out();
    public static final EReference COMPLEX_TYPE_CONVERTER__OUT2IN = MappingPackage.eINSTANCE.getComplexTypeConverter_Out2in();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.MappingPackage
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping;

import org.eclipse.emf.common.EMFPlugin.EclipsePlugin;

public class MappingPlugin$Implementation
  extends EMFPlugin.EclipsePlugin
{
  public MappingPlugin$Implementation()
  {
    MappingPlugin.access$0(this);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.MappingPlugin.Implementation
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping;

import org.eclipse.emf.common.EMFPlugin;
import org.eclipse.emf.common.EMFPlugin.EclipsePlugin;
import org.eclipse.emf.common.util.ResourceLocator;

public final class MappingPlugin
  extends EMFPlugin
{
  public static final MappingPlugin INSTANCE = new MappingPlugin();
  private static Implementation plugin;
  
  public MappingPlugin()
  {
    super(new ResourceLocator[0]);
  }
  
  public ResourceLocator getPluginResourceLocator()
  {
    return plugin;
  }
  
  public static Implementation getPlugin()
  {
    return plugin;
  }
  
  public static class Implementation
    extends EMFPlugin.EclipsePlugin
  {
    public Implementation()
    {
      MappingPlugin.plugin = this;
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.MappingPlugin
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping;

import java.util.Collection;
import org.eclipse.emf.mapping.domain.MappingDomain;

public abstract interface MappingRoot
  extends Mapping
{
  public abstract boolean isOutputReadOnly();
  
  public abstract void setOutputReadOnly(boolean paramBoolean);
  
  public abstract boolean isTopToBottom();
  
  public abstract void setTopToBottom(boolean paramBoolean);
  
  public abstract String getCommandStack();
  
  public abstract void setCommandStack(String paramString);
  
  public abstract MappingDomain getDomain();
  
  public abstract void setDomain(MappingDomain paramMappingDomain);
  
  public abstract void refreshMappedObjectStates(Mapping paramMapping);
  
  public abstract Collection<? extends Mapping> getMappings(Object paramObject);
  
  public abstract Collection<? extends Mapping> getAllMappings(Collection<?> paramCollection);
  
  public abstract Collection<? extends Mapping> getExactMappings(Collection<?> paramCollection);
  
  public abstract Mapping getParentMapping(Collection<?> paramCollection);
  
  public abstract boolean canCreateMapping(Collection<?> paramCollection1, Collection<?> paramCollection2, Mapping paramMapping);
  
  public abstract boolean canRemoveMapping(Mapping paramMapping);
  
  public abstract Mapping createMapping(Collection<?> paramCollection1, Collection<?> paramCollection2);
  
  public abstract void resetDirty();
  
  public abstract boolean isDirty();
  
  public abstract boolean isOutputDirty();
  
  public abstract void setOutputDirty(boolean paramBoolean);
  
  public abstract boolean isInputObject(Object paramObject);
  
  public abstract boolean isOutputObject(Object paramObject);
  
  public abstract boolean isTopObject(Object paramObject);
  
  public abstract boolean isBottomObject(Object paramObject);
  
  public abstract boolean isAttachedObject(Object paramObject);
  
  public abstract void register(Mapping paramMapping);
  
  public abstract void deregister(Mapping paramMapping);
  
  public abstract MappedObjectState getMappedObjectState(Object paramObject);
  
  public abstract MappingRoot getTypeMappingRoot();
  
  public abstract void dispose();
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.MappingRoot
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping;

public abstract interface MappingStrategy
  extends MappingHelper
{}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.MappingStrategy
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping;

public abstract interface TypeConverter
  extends MappingHelper
{}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.TypeConverter
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping.command;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import org.eclipse.emf.common.command.AbstractCommand;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.command.CompoundCommand;
import org.eclipse.emf.edit.command.AddCommand;
import org.eclipse.emf.edit.command.CommandParameter;
import org.eclipse.emf.edit.command.RemoveCommand;
import org.eclipse.emf.mapping.Mapping;
import org.eclipse.emf.mapping.MappingPackage;
import org.eclipse.emf.mapping.MappingPlugin;
import org.eclipse.emf.mapping.MappingPlugin.Implementation;
import org.eclipse.emf.mapping.MappingRoot;
import org.eclipse.emf.mapping.domain.MappingDomain;

public class AddMappingCommand
  extends AbstractCommand
{
  public static Command create(MappingDomain domain, Collection<?> collection)
  {
    return 
      domain.createCommand(
      AddMappingCommand.class, 
      new CommandParameter(domain.getMappingRoot(), null, collection));
  }
  
  public static Command create(MappingDomain domain, Mapping mapping)
  {
    return create(domain, Collections.singleton(mapping));
  }
  
  protected static final String LABEL = MappingPlugin.getPlugin().getString("_UI_AddMappingCommand_label");
  protected static final String DESCRIPTION = MappingPlugin.getPlugin().getString("_UI_AddMappingCommand_description");
  protected MappingDomain domain;
  protected Collection<?> collection;
  Command subcommand;
  
  public AddMappingCommand(MappingDomain domain, Collection<?> collection)
  {
    super(LABEL, DESCRIPTION);
    
    this.domain = domain;
    this.collection = collection;
  }
  
  protected boolean prepare()
  {
    boolean result = domain != null;
    for (Object object : collection) {
      if (!(object instanceof Mapping))
      {
        result = false;
        break;
      }
    }
    return result;
  }
  
  public void execute()
  {
    CompoundCommand subcommands = new CompoundCommand();
    for (Object object : collection)
    {
      Mapping mapping = (Mapping)object;
      
      Mapping parentMapping = domain.getMappingRoot().getParentMapping(mapping.getMappedObjects());
      
      domain.getMappingRoot().register(mapping);
      if (subcommands.appendAndExecute(new AddCommand(domain, parentMapping, MappingPackage.eINSTANCE.getMapping_Nested(), mapping)))
      {
        Collection<Mapping> siblingsToReparent = new ArrayList();
        for (Mapping siblingMapping : parentMapping.getNested()) {
          if (siblingMapping != mapping) {
            if (domain.getMappingRoot().getParentMapping(siblingMapping.getMappedObjects()) == mapping) {
              siblingsToReparent.add(siblingMapping);
            }
          }
        }
        if (!siblingsToReparent.isEmpty())
        {
          subcommands.appendAndExecute(
          
            new RemoveCommand(domain, parentMapping, MappingPackage.eINSTANCE.getMapping_Nested(), siblingsToReparent));
          
          subcommands.appendAndExecute(
          
            new AddCommand(domain, mapping, MappingPackage.eINSTANCE.getMapping_Nested(), siblingsToReparent));
        }
      }
    }
    subcommand = subcommands.unwrap();
  }
  
  public void undo()
  {
    for (Object object : collection)
    {
      Mapping mapping = (Mapping)object;
      domain.getMappingRoot().deregister(mapping);
    }
    subcommand.undo();
  }
  
  public void redo()
  {
    for (Object object : collection)
    {
      Mapping mapping = (Mapping)object;
      domain.getMappingRoot().register(mapping);
    }
    subcommand.redo();
  }
  
  public Collection<?> getResult()
  {
    return collection;
  }
  
  public Collection<?> getAffectedObjects()
  {
    return collection;
  }
  
  public void dispose()
  {
    if (subcommand != null) {
      subcommand.dispose();
    }
    super.dispose();
  }
  
  public String toString()
  {
    StringBuffer result = new StringBuffer(super.toString());
    result.append(" (domain: " + domain + ")");
    result.append(" (collection: " + collection + ")");
    result.append(" (subcommand: " + subcommand + ")");
    
    return result.toString();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.command.AddMappingCommand
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping.command;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import org.eclipse.emf.common.command.AbstractCommand;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.command.CompoundCommand;
import org.eclipse.emf.edit.command.AddCommand;
import org.eclipse.emf.mapping.MappedObjectState;
import org.eclipse.emf.mapping.MappingRoot;
import org.eclipse.emf.mapping.domain.MappingDomain;

public class AddOverrideCommand
  extends AbstractCommand
{
  protected MappingDomain mappingDomain;
  protected AddCommand addCommand;
  protected Command mapCommand;
  
  public AddOverrideCommand(MappingDomain domain, AddCommand addCommand)
  {
    super(addCommand.doGetLabel(), addCommand.doGetDescription());
    
    mappingDomain = domain;
    this.addCommand = addCommand;
  }
  
  protected boolean prepare()
  {
    return addCommand.doCanExecute();
  }
  
  public void execute()
  {
    addCommand.doExecute();
    
    MappingRoot mappingRoot = mappingDomain.getMappingRoot();
    CompoundCommand subcommands = new CompoundCommand();
    Iterator<?> objects;
    for (Iterator localIterator = addCommand.getCollection().iterator(); localIterator.hasNext(); objects.hasNext())
    {
      Object addition = localIterator.next();
      
      objects = mappingDomain.treeIterator(addition); continue;
      
      Object object = objects.next();
      MappedObjectState mappedObjectState = mappingRoot.getMappedObjectState(object);
      Object originatingInput = mappedObjectState.getOriginatingInput();
      if (originatingInput == null) {
        mappedObjectState.setOutput();
      } else if (mappingRoot.isAttachedObject(object)) {
        mapOutputObject(object, originatingInput, subcommands);
      }
    }
    mapCommand = (!subcommands.isEmpty() ? subcommands.unwrap() : null);
  }
  
  protected void mapOutputObject(Object outputObject, Object originatingInput, CompoundCommand subcommands)
  {
    subcommands.appendAndExecute(CreateMappingCommand.create(mappingDomain, originatingInput, outputObject));
  }
  
  public void undo()
  {
    if (mapCommand != null) {
      mapCommand.undo();
    }
    addCommand.doUndo();
  }
  
  public void redo()
  {
    addCommand.doRedo();
    if (mapCommand != null) {
      mapCommand.redo();
    }
  }
  
  public void dispose()
  {
    if (mapCommand != null) {
      mapCommand.dispose();
    }
    addCommand.doDispose();
  }
  
  public Collection<?> getResult()
  {
    Collection<Object> result = new ArrayList();
    result.addAll(addCommand.doGetResult());
    if (mapCommand != null) {
      result.addAll(mapCommand.getResult());
    }
    return result;
  }
  
  public Collection<?> getAffectedObjects()
  {
    Collection<Object> result = new ArrayList();
    result.addAll(addCommand.doGetAffectedObjects());
    if (mapCommand != null) {
      result.addAll(mapCommand.getAffectedObjects());
    }
    return result;
  }
  
  public String toString()
  {
    StringBuffer result = new StringBuffer(super.toString());
    result.append(" (mappingDomain: " + mappingDomain + ")");
    result.append(" (mapCommand: " + mapCommand + ")");
    
    return result.toString();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.command.AddOverrideCommand
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping.command;

import java.util.Collection;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.command.IdentityCommand;
import org.eclipse.emf.edit.command.CopyCommand;
import org.eclipse.emf.edit.command.CopyToClipboardCommand;
import org.eclipse.emf.mapping.domain.MappingDomain;

public class CopyToClipboardOverrideCommand
  extends CopyToClipboardCommand
{
  protected Collection<?> inputObjects;
  
  public CopyToClipboardOverrideCommand(MappingDomain domain, Collection<?> nonInputObjects, Collection<?> inputObjects)
  {
    super(domain, nonInputObjects);
    
    this.inputObjects = inputObjects;
  }
  
  protected boolean prepare()
  {
    copyCommand = new IdentityCommand(inputObjects);
    if (sourceObjects.size() > 0) {
      copyCommand = copyCommand.chain(CopyCommand.create(domain, sourceObjects));
    }
    return copyCommand.canExecute();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.command.CopyToClipboardOverrideCommand
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping.command;

import java.util.Collection;
import java.util.Collections;
import org.eclipse.emf.common.command.AbstractCommand;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EFactory;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.edit.command.ChildrenToCopyProvider;
import org.eclipse.emf.edit.command.CopyCommand.Helper;
import org.eclipse.emf.edit.command.CreateCopyCommand;
import org.eclipse.emf.mapping.MappedObjectState;
import org.eclipse.emf.mapping.MappingRoot;
import org.eclipse.emf.mapping.domain.MappingDomain;

public class CreateCopyOverrideCommand
  extends AbstractCommand
  implements ChildrenToCopyProvider
{
  protected MappingDomain mappingDomain;
  protected EObject owner;
  protected EObject copy;
  protected CopyCommand.Helper copyHelper;
  
  public CreateCopyOverrideCommand(MappingDomain domain, CreateCopyCommand createCommand)
  {
    super(createCommand.doGetLabel(), createCommand.doGetDescription());
    
    mappingDomain = domain;
    owner = createCommand.getOwner();
    copyHelper = createCommand.getCopyHelper();
  }
  
  protected boolean prepare()
  {
    return true;
  }
  
  public void execute()
  {
    EClass outputType = (EClass)mappingDomain.getOutputMetaObject(owner.eClass());
    if (outputType != null)
    {
      copy = outputType.getEPackage().getEFactoryInstance().create(outputType);
      
      copyHelper.put(owner, copy);
      
      MappingRoot mappingRoot = mappingDomain.getMappingRoot();
      if (mappingRoot.isInputObject(owner))
      {
        MappedObjectState mappedObjectState = mappingRoot.getMappedObjectState(copy);
        if (mappedObjectState != null) {
          mappedObjectState.setOriginatingInput(owner);
        }
      }
    }
  }
  
  public void undo()
  {
    copyHelper.remove(owner);
  }
  
  public void redo()
  {
    copyHelper.put(owner, copy);
  }
  
  public Collection<?> getResult()
  {
    return Collections.singleton(copy);
  }
  
  public Collection<?> getChildrenToCopy()
  {
    return mappingDomain.getChildren(owner);
  }
  
  public String toString()
  {
    StringBuffer result = new StringBuffer(super.toString());
    result.append(" (mappingDomain: " + mappingDomain + ")");
    result.append(" (owner: " + owner + ")");
    result.append(" (copy: " + copy + ")");
    result.append(" (copyHelper: " + copyHelper + ")");
    
    return result.toString();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.command.CreateCopyOverrideCommand
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping.command;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import org.eclipse.emf.common.command.AbstractCommand;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.command.StrictCompoundCommand;
import org.eclipse.emf.edit.command.CommandParameter;
import org.eclipse.emf.mapping.Mapping;
import org.eclipse.emf.mapping.MappingPlugin;
import org.eclipse.emf.mapping.MappingPlugin.Implementation;
import org.eclipse.emf.mapping.MappingRoot;
import org.eclipse.emf.mapping.domain.MappingDomain;

public class CreateMappingCommand
  extends AbstractCommand
{
  @Deprecated
  public static final int ENABLE_MULTIPLE_INPUTS = 1;
  @Deprecated
  public static final int ENABLE_MULTIPLE_OUTPUTS = 2;
  @Deprecated
  public static final int ENABLE_MAPPED_INPUTS = 4;
  @Deprecated
  public static final int ENABLE_MAPPED_OUTPUTS = 8;
  @Deprecated
  public static final int ENABLE_INCOMPATIBLE_METAOBJECTS = 16;
  @Deprecated
  public static final int ENABLE_INCOMPATIBLE_TYPE_CLASSIFIERS = 32;
  @Deprecated
  public static final int ENABLE_EMPTY_INPUTS = 64;
  @Deprecated
  public static final int ENABLE_EMPTY_OUTPUTS = 128;
  @Deprecated
  public static final int ENABLE_UNMAPPED_PARENTS = 256;
  @Deprecated
  public static final int ENABLE_ALL = 65535;
  
  public static Command create(MappingDomain domain, Collection<?> collection)
  {
    return 
      domain.createCommand(
      CreateMappingCommand.class, 
      new CommandParameter(domain.getMappingRoot(), null, collection));
  }
  
  public static Command create(MappingDomain domain, Object input, Object output)
  {
    Collection<Object> collection = new ArrayList();
    collection.add(input);
    collection.add(output);
    return create(domain, collection);
  }
  
  public static Command create(MappingDomain domain, Collection<?> inputs, Collection<?> outputs)
  {
    Collection<Object> collection = new ArrayList();
    collection.addAll(inputs);
    collection.addAll(outputs);
    return create(domain, collection);
  }
  
  public static Command create(MappingDomain domain, Collection<?> inputs, Object output)
  {
    Collection<Object> collection = new ArrayList();
    collection.addAll(inputs);
    collection.add(output);
    return create(domain, collection);
  }
  
  public static Command create(MappingDomain domain, Object input, Collection<?> outputs)
  {
    Collection<Object> collection = new ArrayList();
    collection.add(input);
    collection.addAll(outputs);
    return create(domain, collection);
  }
  
  protected static final String LABEL = MappingPlugin.getPlugin().getString("_UI_CreateMappingCommand_label");
  protected static final String DESCRIPTION = MappingPlugin.getPlugin().getString("_UI_CreateMappingCommand_description");
  protected MappingDomain domain;
  protected Collection<?> inputs;
  protected Collection<?> outputs;
  protected Mapping newMapping;
  protected Command subcommand;
  
  @Deprecated
  public CreateMappingCommand(MappingDomain domain, Collection<?> collection, int enablementFlags)
  {
    this(domain, collection);
  }
  
  public CreateMappingCommand(MappingDomain domain, Collection<?> collection)
  {
    super(LABEL, DESCRIPTION);
    
    this.domain = domain;
    
    ArrayList<Object> newInputs = new ArrayList();
    ArrayList<Object> newOutputs = new ArrayList();
    inputs = newInputs;
    outputs = newOutputs;
    for (Object object : collection) {
      if (domain.getMappingRoot().isInputObject(object))
      {
        newInputs.add(object);
      }
      else if (domain.getMappingRoot().isOutputObject(object))
      {
        newOutputs.add(object);
      }
      else
      {
        inputs = (outputs = null);
        break;
      }
    }
  }
  
  protected boolean prepare()
  {
    boolean result = 
      (domain != null) && 
      (inputs != null) && 
      (outputs != null) && 
      (domain.getMappingRoot().canCreateMapping(inputs, outputs, null));
    
    return result;
  }
  
  public void execute()
  {
    newMapping = domain.getMappingRoot().createMapping(inputs, outputs);
    
    StrictCompoundCommand subcommands = new StrictCompoundCommand();
    subcommands.appendAndExecute(AddMappingCommand.create(domain, newMapping));
    subcommand = subcommands.unwrap();
  }
  
  public void undo()
  {
    subcommand.undo();
  }
  
  public void redo()
  {
    subcommand.redo();
  }
  
  public Collection<?> getResult()
  {
    return Collections.singleton(newMapping);
  }
  
  public Collection<?> getAffectedObjects()
  {
    return Collections.singleton(newMapping);
  }
  
  public void dispose()
  {
    if (subcommand != null) {
      subcommand.dispose();
    }
    super.dispose();
  }
  
  public String getLabel()
  {
    if ((inputs == null) || (inputs.isEmpty()) || (outputs == null) || (outputs.isEmpty())) {
      return MappingPlugin.getPlugin().getString("_UI_CreateMappingCommand_onesided_label");
    }
    return super.getLabel();
  }
  
  public String getDescription()
  {
    if ((inputs == null) || (inputs.isEmpty()) || (outputs == null) || (outputs.isEmpty())) {
      return MappingPlugin.getPlugin().getString("_UI_CreateMappingCommand_onesided_description");
    }
    return super.getDescription();
  }
  
  public String toString()
  {
    StringBuffer result = new StringBuffer(super.toString());
    result.append(" (domain: " + domain + ")");
    result.append(" (inputs: " + inputs + ")");
    result.append(" (outputs: " + outputs + ")");
    result.append(" (newMapping: " + newMapping + ")");
    result.append(" (subcommand: " + subcommand + ")");
    
    return result.toString();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.command.CreateMappingCommand
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.emf.mapping.command;

import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.command.CompoundCommand;
import org.eclipse.emf.edit.command.AddCommand;
import org.eclipse.emf.edit.command.CopyCommand.Helper;
import org.eclipse.emf.edit.command.CreateCopyCommand;
import org.eclipse.emf.edit.command.DragAndDropCommand;
import org.eclipse.emf.mapping.domain.MappingDomain;

public class DragAndDropOverrideCommand
  extends DragAndDropCommand
{
  public DragAndDropOverrideCommand(MappingDomain domain, DragAndDropCommand command)
  {
    super(domain, command.getOwner(), command.getLocation(), command.getOperations(), command.getOperation(), command.getCollection(), domain.getOptimizeCopy());
  }
  
  protected boolean optimizedCanExecute()
  {
    if (collection == null) {
      return false;
    }
    CopyCommand.Helper copyHelper = new CopyCommand.Helper();
    CompoundCommand shallowCopyCommand = new CompoundCommand(Integer.MAX_VALUE);
    for (Object object : collection) {
      if (!shallowCopyCommand.appendAndExecute(CreateCopyCommand.create(domain, object, copyHelper)))
      {
        shallowCopyCommand.dispose();
        return false;
      }
    }
    Command addCommand = AddCommand.create(domain, owner, null, shallowCopyCommand.getResult());
    boolean result = addCommand.canExecute();
    
    shallowCopyCommand.dispose();
    addCommand.dispose();
    
    return result;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.emf.mapping.command.DragAndDropOverrideCommand
 * Java Class Vers
1 2 3 4 5 6 7 8

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd