org.eclipse.e4.ui.model.workbench_0.10.1.v20120523-1955

16:43:00.561 INFO  jd.cli.Main - Decompiling org.eclipse.e4.ui.model.workbench_0.10.1.v20120523-1955.jar
package org.eclipse.e4.ui.model;

import org.eclipse.e4.core.contexts.IEclipseContext;
import org.eclipse.e4.core.services.translation.TranslationService;
import org.eclipse.e4.ui.model.application.MApplicationElement;
import org.eclipse.e4.ui.model.application.ui.MUIElement;
import org.eclipse.e4.ui.model.application.ui.MUILabel;
import org.eclipse.e4.ui.model.internal.ModelUtils;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;

public final class LocalizationHelper
{
  public static String getLocalizedFeature(EStructuralFeature feature, MApplicationElement element)
  {
    Object o = ((EObject)element).eGet(feature);
    if ((o instanceof String)) {
      return getLocalized((String)o, element);
    }
    return null;
  }
  
  public static String getLocalizedAccessibilityPhrase(MUIElement element)
  {
    String key = element.getAccessibilityPhrase();
    if (key == null) {
      return null;
    }
    return getLocalized(key, element);
  }
  
  public static String getLocalizedLabel(MUIElement element)
  {
    if (!(element instanceof MUILabel)) {
      return null;
    }
    String key = ((MUILabel)element).getLabel();
    if (key == null) {
      return null;
    }
    return getLocalized(key, element);
  }
  
  public static String getLocalizedTooltip(MUIElement element)
  {
    if (!(element instanceof MUILabel)) {
      return null;
    }
    String key = ((MUILabel)element).getTooltip();
    if (key == null) {
      return null;
    }
    return getLocalized(key, element);
  }
  
  public static String getLocalized(String key, MApplicationElement element)
  {
    IEclipseContext context = ModelUtils.getContainingContext(element);
    if (context == null) {
      return null;
    }
    return getLocalized(key, element, context);
  }
  
  public static String getLocalized(String key, MApplicationElement element, IEclipseContext context)
  {
    if (key == null) {
      return null;
    }
    TranslationService translation = (TranslationService)context.get(TranslationService.class);
    if (translation == null) {
      return key;
    }
    return translation.translate(key, element.getContributorURI());
  }
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.model.LocalizationHelper
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.model.application;

public abstract interface MAddon
  extends MContribution
{}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.model.application.MAddon
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.model.application;

import java.util.List;
import org.eclipse.e4.ui.model.application.commands.MBindingTableContainer;
import org.eclipse.e4.ui.model.application.commands.MBindings;
import org.eclipse.e4.ui.model.application.commands.MCategory;
import org.eclipse.e4.ui.model.application.commands.MCommand;
import org.eclipse.e4.ui.model.application.commands.MHandlerContainer;
import org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptorContainer;
import org.eclipse.e4.ui.model.application.ui.MContext;
import org.eclipse.e4.ui.model.application.ui.MElementContainer;
import org.eclipse.e4.ui.model.application.ui.MSnippetContainer;
import org.eclipse.e4.ui.model.application.ui.basic.MWindow;
import org.eclipse.e4.ui.model.application.ui.menu.MMenuContributions;
import org.eclipse.e4.ui.model.application.ui.menu.MToolBarContributions;
import org.eclipse.e4.ui.model.application.ui.menu.MTrimContributions;

public abstract interface MApplication
  extends MElementContainer<MWindow>, MContext, MHandlerContainer, MBindingTableContainer, MPartDescriptorContainer, MBindings, MMenuContributions, MToolBarContributions, MTrimContributions, MSnippetContainer
{
  public abstract List<MCommand> getCommands();
  
  public abstract List<MAddon> getAddons();
  
  public abstract List<MCategory> getCategories();
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.model.application.MApplication
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.model.application;

import java.util.List;
import java.util.Map;

public abstract interface MApplicationElement
{
  public abstract String getElementId();
  
  public abstract void setElementId(String paramString);
  
  public abstract Map<String, String> getPersistedState();
  
  public abstract List<String> getTags();
  
  public abstract String getContributorURI();
  
  public abstract void setContributorURI(String paramString);
  
  public abstract Map<String, Object> getTransientData();
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.model.application.MApplicationElement
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.model.application;

import org.eclipse.e4.ui.model.application.impl.ApplicationFactoryImpl;

public abstract interface MApplicationFactory
{
  public static final MApplicationFactory INSTANCE = ApplicationFactoryImpl.eINSTANCE;
  
  public abstract MApplication createApplication();
  
  public abstract MAddon createAddon();
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.model.application.MApplicationFactory
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.model.application;

public abstract interface MContribution
  extends MApplicationElement
{
  public abstract String getContributionURI();
  
  public abstract void setContributionURI(String paramString);
  
  public abstract Object getObject();
  
  public abstract void setObject(Object paramObject);
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.model.application.MContribution
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.model.application.commands;

import java.util.List;
import org.eclipse.e4.ui.model.application.MApplicationElement;

public abstract interface MBindingContext
  extends MApplicationElement
{
  public abstract String getName();
  
  public abstract void setName(String paramString);
  
  public abstract String getDescription();
  
  public abstract void setDescription(String paramString);
  
  public abstract List<MBindingContext> getChildren();
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.model.application.commands.MBindingContext
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.model.application.commands;

import java.util.List;
import org.eclipse.e4.ui.model.application.MApplicationElement;

public abstract interface MBindingTable
  extends MApplicationElement
{
  public abstract List<MKeyBinding> getBindings();
  
  public abstract MBindingContext getBindingContext();
  
  public abstract void setBindingContext(MBindingContext paramMBindingContext);
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.model.application.commands.MBindingTable
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.model.application.commands;

import java.util.List;

public abstract interface MBindingTableContainer
{
  public abstract List<MBindingTable> getBindingTables();
  
  public abstract List<MBindingContext> getRootContext();
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.model.application.commands.MBindingTableContainer
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.model.application.commands;

import java.util.List;

public abstract interface MBindings
{
  public abstract List<MBindingContext> getBindingContexts();
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.model.application.commands.MBindings
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.model.application.commands;

import org.eclipse.e4.ui.model.application.MApplicationElement;

public abstract interface MCategory
  extends MApplicationElement
{
  public abstract String getName();
  
  public abstract void setName(String paramString);
  
  public abstract String getDescription();
  
  public abstract void setDescription(String paramString);
  
  public abstract String getLocalizedName();
  
  public abstract String getLocalizedDescription();
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.model.application.commands.MCategory
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.model.application.commands;

import java.util.List;
import org.eclipse.e4.ui.model.application.MApplicationElement;

public abstract interface MCommand
  extends MApplicationElement
{
  public abstract String getCommandName();
  
  public abstract void setCommandName(String paramString);
  
  public abstract String getDescription();
  
  public abstract void setDescription(String paramString);
  
  public abstract List<MCommandParameter> getParameters();
  
  public abstract MCategory getCategory();
  
  public abstract void setCategory(MCategory paramMCategory);
  
  public abstract String getLocalizedCommandName();
  
  public abstract String getLocalizedDescription();
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.model.application.commands.MCommand
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.model.application.commands;

import org.eclipse.e4.ui.model.application.MApplicationElement;

public abstract interface MCommandParameter
  extends MApplicationElement
{
  public abstract String getName();
  
  public abstract void setName(String paramString);
  
  public abstract String getTypeId();
  
  public abstract void setTypeId(String paramString);
  
  public abstract boolean isOptional();
  
  public abstract void setOptional(boolean paramBoolean);
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.model.application.commands.MCommandParameter
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.model.application.commands;

import org.eclipse.e4.ui.model.application.commands.impl.CommandsFactoryImpl;

public abstract interface MCommandsFactory
{
  public static final MCommandsFactory INSTANCE = CommandsFactoryImpl.eINSTANCE;
  
  public abstract MBindingContext createBindingContext();
  
  public abstract MBindingTable createBindingTable();
  
  public abstract MCommand createCommand();
  
  public abstract MCommandParameter createCommandParameter();
  
  public abstract MHandler createHandler();
  
  public abstract MKeyBinding createKeyBinding();
  
  public abstract MParameter createParameter();
  
  public abstract MCategory createCategory();
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.model.application.commands.MCommandsFactory
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.model.application.commands;

import org.eclipse.e4.ui.model.application.MContribution;

public abstract interface MHandler
  extends MContribution
{
  public abstract MCommand getCommand();
  
  public abstract void setCommand(MCommand paramMCommand);
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.model.application.commands.MHandler
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.model.application.commands;

import java.util.List;

public abstract interface MHandlerContainer
{
  public abstract List<MHandler> getHandlers();
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.model.application.commands.MHandlerContainer
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.model.application.commands;

import java.util.List;
import org.eclipse.e4.ui.model.application.MApplicationElement;

public abstract interface MKeyBinding
  extends MApplicationElement, MKeySequence
{
  public abstract MCommand getCommand();
  
  public abstract void setCommand(MCommand paramMCommand);
  
  public abstract List<MParameter> getParameters();
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.model.application.commands.MKeyBinding
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.model.application.commands;

public abstract interface MKeySequence
{
  public abstract String getKeySequence();
  
  public abstract void setKeySequence(String paramString);
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.model.application.commands.MKeySequence
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.model.application.commands;

import org.eclipse.e4.ui.model.application.MApplicationElement;

public abstract interface MParameter
  extends MApplicationElement
{
  public abstract String getName();
  
  public abstract void setName(String paramString);
  
  public abstract String getValue();
  
  public abstract void setValue(String paramString);
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.model.application.commands.MParameter
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.model.application.commands.impl;

import java.util.Collection;
import java.util.List;
import org.eclipse.e4.ui.model.application.commands.MBindingContext;
import org.eclipse.e4.ui.model.application.impl.ApplicationElementImpl;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;

public class BindingContextImpl
  extends ApplicationElementImpl
  implements MBindingContext
{
  protected static final String NAME_EDEFAULT = null;
  protected String name = NAME_EDEFAULT;
  protected static final String DESCRIPTION_EDEFAULT = null;
  protected String description = DESCRIPTION_EDEFAULT;
  protected EList<MBindingContext> children;
  
  protected EClass eStaticClass()
  {
    return CommandsPackageImpl.Literals.BINDING_CONTEXT;
  }
  
  public String getName()
  {
    return name;
  }
  
  public void setName(String newName)
  {
    String oldName = name;
    name = newName;
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 5, oldName, name));
    }
  }
  
  public String getDescription()
  {
    return description;
  }
  
  public void setDescription(String newDescription)
  {
    String oldDescription = description;
    description = newDescription;
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 6, oldDescription, description));
    }
  }
  
  public List<MBindingContext> getChildren()
  {
    if (children == null) {
      children = new EObjectContainmentEList(MBindingContext.class, this, 7);
    }
    return children;
  }
  
  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
  {
    switch (featureID)
    {
    case 7: 
      return ((InternalEList)getChildren()).basicRemove(otherEnd, msgs);
    }
    return super.eInverseRemove(otherEnd, featureID, msgs);
  }
  
  public Object eGet(int featureID, boolean resolve, boolean coreType)
  {
    switch (featureID)
    {
    case 5: 
      return getName();
    case 6: 
      return getDescription();
    case 7: 
      return getChildren();
    }
    return super.eGet(featureID, resolve, coreType);
  }
  
  public void eSet(int featureID, Object newValue)
  {
    switch (featureID)
    {
    case 5: 
      setName((String)newValue);
      return;
    case 6: 
      setDescription((String)newValue);
      return;
    case 7: 
      getChildren().clear();
      getChildren().addAll((Collection)newValue);
      return;
    }
    super.eSet(featureID, newValue);
  }
  
  public void eUnset(int featureID)
  {
    switch (featureID)
    {
    case 5: 
      setName(NAME_EDEFAULT);
      return;
    case 6: 
      setDescription(DESCRIPTION_EDEFAULT);
      return;
    case 7: 
      getChildren().clear();
      return;
    }
    super.eUnset(featureID);
  }
  
  public boolean eIsSet(int featureID)
  {
    switch (featureID)
    {
    case 5: 
      return name != null;
    case 6: 
      return description != null;
    case 7: 
      return (children != null) && (!children.isEmpty());
    }
    return super.eIsSet(featureID);
  }
  
  public String toString()
  {
    if (eIsProxy()) {
      return super.toString();
    }
    StringBuffer result = new StringBuffer(super.toString());
    result.append(" (name: ");
    result.append(name);
    result.append(", description: ");
    result.append(description);
    result.append(')');
    return result.toString();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.model.application.commands.impl.BindingContextImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.model.application.commands.impl;

import java.util.Collection;
import java.util.List;
import org.eclipse.e4.ui.model.application.commands.MBindingContext;
import org.eclipse.e4.ui.model.application.commands.MBindingTable;
import org.eclipse.e4.ui.model.application.commands.MKeyBinding;
import org.eclipse.e4.ui.model.application.impl.ApplicationElementImpl;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;

public class BindingTableImpl
  extends ApplicationElementImpl
  implements MBindingTable
{
  protected EList<MKeyBinding> bindings;
  protected MBindingContext bindingContext;
  
  protected EClass eStaticClass()
  {
    return CommandsPackageImpl.Literals.BINDING_TABLE;
  }
  
  public List<MKeyBinding> getBindings()
  {
    if (bindings == null) {
      bindings = new EObjectContainmentEList(MKeyBinding.class, this, 5);
    }
    return bindings;
  }
  
  public MBindingContext getBindingContext()
  {
    if ((bindingContext != null) && (((EObject)bindingContext).eIsProxy()))
    {
      InternalEObject oldBindingContext = (InternalEObject)bindingContext;
      bindingContext = ((MBindingContext)eResolveProxy(oldBindingContext));
      if ((bindingContext != oldBindingContext) && 
        (eNotificationRequired())) {
        eNotify(new ENotificationImpl(this, 9, 6, oldBindingContext, bindingContext));
      }
    }
    return bindingContext;
  }
  
  public MBindingContext basicGetBindingContext()
  {
    return bindingContext;
  }
  
  public void setBindingContext(MBindingContext newBindingContext)
  {
    MBindingContext oldBindingContext = bindingContext;
    bindingContext = newBindingContext;
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 6, oldBindingContext, bindingContext));
    }
  }
  
  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
  {
    switch (featureID)
    {
    case 5: 
      return ((InternalEList)getBindings()).basicRemove(otherEnd, msgs);
    }
    return super.eInverseRemove(otherEnd, featureID, msgs);
  }
  
  public Object eGet(int featureID, boolean resolve, boolean coreType)
  {
    switch (featureID)
    {
    case 5: 
      return getBindings();
    case 6: 
      if (resolve) {
        return getBindingContext();
      }
      return basicGetBindingContext();
    }
    return super.eGet(featureID, resolve, coreType);
  }
  
  public void eSet(int featureID, Object newValue)
  {
    switch (featureID)
    {
    case 5: 
      getBindings().clear();
      getBindings().addAll((Collection)newValue);
      return;
    case 6: 
      setBindingContext((MBindingContext)newValue);
      return;
    }
    super.eSet(featureID, newValue);
  }
  
  public void eUnset(int featureID)
  {
    switch (featureID)
    {
    case 5: 
      getBindings().clear();
      return;
    case 6: 
      setBindingContext(null);
      return;
    }
    super.eUnset(featureID);
  }
  
  public boolean eIsSet(int featureID)
  {
    switch (featureID)
    {
    case 5: 
      return (bindings != null) && (!bindings.isEmpty());
    case 6: 
      return bindingContext != null;
    }
    return super.eIsSet(featureID);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.model.application.commands.impl.BindingTableImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.model.application.commands.impl;

import java.lang.reflect.InvocationTargetException;
import org.eclipse.e4.ui.model.LocalizationHelper;
import org.eclipse.e4.ui.model.application.commands.MCategory;
import org.eclipse.e4.ui.model.application.impl.ApplicationElementImpl;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;

public class CategoryImpl
  extends ApplicationElementImpl
  implements MCategory
{
  protected static final String NAME_EDEFAULT = null;
  protected String name = NAME_EDEFAULT;
  protected static final String DESCRIPTION_EDEFAULT = null;
  protected String description = DESCRIPTION_EDEFAULT;
  
  protected EClass eStaticClass()
  {
    return CommandsPackageImpl.Literals.CATEGORY;
  }
  
  public String getName()
  {
    return name;
  }
  
  public void setName(String newName)
  {
    String oldName = name;
    name = newName;
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 5, oldName, name));
    }
  }
  
  public String getDescription()
  {
    return description;
  }
  
  public void setDescription(String newDescription)
  {
    String oldDescription = description;
    description = newDescription;
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 6, oldDescription, description));
    }
  }
  
  public String getLocalizedName()
  {
    return LocalizationHelper.getLocalizedFeature(CommandsPackageImpl.Literals.CATEGORY__NAME, this);
  }
  
  public String getLocalizedDescription()
  {
    return LocalizationHelper.getLocalizedFeature(CommandsPackageImpl.Literals.CATEGORY__DESCRIPTION, this);
  }
  
  public Object eGet(int featureID, boolean resolve, boolean coreType)
  {
    switch (featureID)
    {
    case 5: 
      return getName();
    case 6: 
      return getDescription();
    }
    return super.eGet(featureID, resolve, coreType);
  }
  
  public void eSet(int featureID, Object newValue)
  {
    switch (featureID)
    {
    case 5: 
      setName((String)newValue);
      return;
    case 6: 
      setDescription((String)newValue);
      return;
    }
    super.eSet(featureID, newValue);
  }
  
  public void eUnset(int featureID)
  {
    switch (featureID)
    {
    case 5: 
      setName(NAME_EDEFAULT);
      return;
    case 6: 
      setDescription(DESCRIPTION_EDEFAULT);
      return;
    }
    super.eUnset(featureID);
  }
  
  public boolean eIsSet(int featureID)
  {
    switch (featureID)
    {
    case 5: 
      return name != null;
    case 6: 
      return description != null;
    }
    return super.eIsSet(featureID);
  }
  
  public Object eInvoke(int operationID, EList<?> arguments)
    throws InvocationTargetException
  {
    switch (operationID)
    {
    case 0: 
      return getLocalizedName();
    case 1: 
      return getLocalizedDescription();
    }
    return super.eInvoke(operationID, arguments);
  }
  
  public String toString()
  {
    if (eIsProxy()) {
      return super.toString();
    }
    StringBuffer result = new StringBuffer(super.toString());
    result.append(" (name: ");
    result.append(name);
    result.append(", description: ");
    result.append(description);
    result.append(')');
    return result.toString();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.model.application.commands.impl.CategoryImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.model.application.commands.impl;

import java.lang.reflect.InvocationTargetException;
import java.util.Collection;
import java.util.List;
import org.eclipse.e4.ui.model.LocalizationHelper;
import org.eclipse.e4.ui.model.application.commands.MCategory;
import org.eclipse.e4.ui.model.application.commands.MCommand;
import org.eclipse.e4.ui.model.application.commands.MCommandParameter;
import org.eclipse.e4.ui.model.application.impl.ApplicationElementImpl;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;

public class CommandImpl
  extends ApplicationElementImpl
  implements MCommand
{
  protected static final String COMMAND_NAME_EDEFAULT = null;
  protected String commandName = COMMAND_NAME_EDEFAULT;
  protected static final String DESCRIPTION_EDEFAULT = null;
  protected String description = DESCRIPTION_EDEFAULT;
  protected EList<MCommandParameter> parameters;
  protected MCategory category;
  
  protected EClass eStaticClass()
  {
    return CommandsPackageImpl.Literals.COMMAND;
  }
  
  public String getCommandName()
  {
    return commandName;
  }
  
  public void setCommandName(String newCommandName)
  {
    String oldCommandName = commandName;
    commandName = newCommandName;
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 5, oldCommandName, commandName));
    }
  }
  
  public String getDescription()
  {
    return description;
  }
  
  public void setDescription(String newDescription)
  {
    String oldDescription = description;
    description = newDescription;
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 6, oldDescription, description));
    }
  }
  
  public List<MCommandParameter> getParameters()
  {
    if (parameters == null) {
      parameters = new EObjectContainmentEList(MCommandParameter.class, this, 7);
    }
    return parameters;
  }
  
  public MCategory getCategory()
  {
    if ((category != null) && (((EObject)category).eIsProxy()))
    {
      InternalEObject oldCategory = (InternalEObject)category;
      category = ((MCategory)eResolveProxy(oldCategory));
      if ((category != oldCategory) && 
        (eNotificationRequired())) {
        eNotify(new ENotificationImpl(this, 9, 8, oldCategory, category));
      }
    }
    return category;
  }
  
  public MCategory basicGetCategory()
  {
    return category;
  }
  
  public void setCategory(MCategory newCategory)
  {
    MCategory oldCategory = category;
    category = newCategory;
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 8, oldCategory, category));
    }
  }
  
  public String getLocalizedCommandName()
  {
    return LocalizationHelper.getLocalizedFeature(CommandsPackageImpl.Literals.COMMAND__COMMAND_NAME, this);
  }
  
  public String getLocalizedDescription()
  {
    return LocalizationHelper.getLocalizedFeature(CommandsPackageImpl.Literals.COMMAND__DESCRIPTION, this);
  }
  
  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
  {
    switch (featureID)
    {
    case 7: 
      return ((InternalEList)getParameters()).basicRemove(otherEnd, msgs);
    }
    return super.eInverseRemove(otherEnd, featureID, msgs);
  }
  
  public Object eGet(int featureID, boolean resolve, boolean coreType)
  {
    switch (featureID)
    {
    case 5: 
      return getCommandName();
    case 6: 
      return getDescription();
    case 7: 
      return getParameters();
    case 8: 
      if (resolve) {
        return getCategory();
      }
      return basicGetCategory();
    }
    return super.eGet(featureID, resolve, coreType);
  }
  
  public void eSet(int featureID, Object newValue)
  {
    switch (featureID)
    {
    case 5: 
      setCommandName((String)newValue);
      return;
    case 6: 
      setDescription((String)newValue);
      return;
    case 7: 
      getParameters().clear();
      getParameters().addAll((Collection)newValue);
      return;
    case 8: 
      setCategory((MCategory)newValue);
      return;
    }
    super.eSet(featureID, newValue);
  }
  
  public void eUnset(int featureID)
  {
    switch (featureID)
    {
    case 5: 
      setCommandName(COMMAND_NAME_EDEFAULT);
      return;
    case 6: 
      setDescription(DESCRIPTION_EDEFAULT);
      return;
    case 7: 
      getParameters().clear();
      return;
    case 8: 
      setCategory(null);
      return;
    }
    super.eUnset(featureID);
  }
  
  public boolean eIsSet(int featureID)
  {
    switch (featureID)
    {
    case 5: 
      return commandName != null;
    case 6: 
      return description != null;
    case 7: 
      return (parameters != null) && (!parameters.isEmpty());
    case 8: 
      return category != null;
    }
    return super.eIsSet(featureID);
  }
  
  public Object eInvoke(int operationID, EList<?> arguments)
    throws InvocationTargetException
  {
    switch (operationID)
    {
    case 0: 
      return getLocalizedCommandName();
    case 1: 
      return getLocalizedDescription();
    }
    return super.eInvoke(operationID, arguments);
  }
  
  public String toString()
  {
    if (eIsProxy()) {
      return super.toString();
    }
    StringBuffer result = new StringBuffer(super.toString());
    result.append(" (commandName: ");
    result.append(commandName);
    result.append(", description: ");
    result.append(description);
    result.append(')');
    return result.toString();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.model.application.commands.impl.CommandImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.model.application.commands.impl;

import org.eclipse.e4.ui.model.application.commands.MCommandParameter;
import org.eclipse.e4.ui.model.application.impl.ApplicationElementImpl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;

public class CommandParameterImpl
  extends ApplicationElementImpl
  implements MCommandParameter
{
  protected static final String NAME_EDEFAULT = null;
  protected String name = NAME_EDEFAULT;
  protected static final String TYPE_ID_EDEFAULT = null;
  protected String typeId = TYPE_ID_EDEFAULT;
  protected static final boolean OPTIONAL_EDEFAULT = true;
  protected boolean optional = true;
  
  protected EClass eStaticClass()
  {
    return CommandsPackageImpl.Literals.COMMAND_PARAMETER;
  }
  
  public String getName()
  {
    return name;
  }
  
  public void setName(String newName)
  {
    String oldName = name;
    name = newName;
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 5, oldName, name));
    }
  }
  
  public String getTypeId()
  {
    return typeId;
  }
  
  public void setTypeId(String newTypeId)
  {
    String oldTypeId = typeId;
    typeId = newTypeId;
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 6, oldTypeId, typeId));
    }
  }
  
  public boolean isOptional()
  {
    return optional;
  }
  
  public void setOptional(boolean newOptional)
  {
    boolean oldOptional = optional;
    optional = newOptional;
    if (eNotificationRequired()) {
      eNotify(new ENotificationImpl(this, 1, 7, oldOptional, optional));
    }
  }
  
  public Object eGet(int featureID, boolean resolve, boolean coreType)
  {
    switch (featureID)
    {
    case 5: 
      return getName();
    case 6: 
      return getTypeId();
    case 7: 
      return Boolean.valueOf(isOptional());
    }
    return super.eGet(featureID, resolve, coreType);
  }
  
  public void eSet(int featureID, Object newValue)
  {
    switch (featureID)
    {
    case 5: 
      setName((String)newValue);
      return;
    case 6: 
      setTypeId((String)newValue);
      return;
    case 7: 
      setOptional(((Boolean)newValue).booleanValue());
      return;
    }
    super.eSet(featureID, newValue);
  }
  
  public void eUnset(int featureID)
  {
    switch (featureID)
    {
    case 5: 
      setName(NAME_EDEFAULT);
      return;
    case 6: 
      setTypeId(TYPE_ID_EDEFAULT);
      return;
    case 7: 
      setOptional(true);
      return;
    }
    super.eUnset(featureID);
  }
  
  public boolean eIsSet(int featureID)
  {
    switch (featureID)
    {
    case 5: 
      return name != null;
    case 6: 
      return typeId != null;
    case 7: 
      return !optional;
    }
    return super.eIsSet(featureID);
  }
  
  public String toString()
  {
    if (eIsProxy()) {
      return super.toString();
    }
    StringBuffer result = new StringBuffer(super.toString());
    result.append(" (name: ");
    result.append(name);
    result.append(", typeId: ");
    result.append(typeId);
    result.append(", optional: ");
    result.append(optional);
    result.append(')');
    return result.toString();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.model.application.commands.impl.CommandParameterImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.model.application.commands.impl;

import org.eclipse.e4.ui.model.application.commands.MBindingContext;
import org.eclipse.e4.ui.model.application.commands.MBindingTable;
import org.eclipse.e4.ui.model.application.commands.MCategory;
import org.eclipse.e4.ui.model.application.commands.MCommand;
import org.eclipse.e4.ui.model.application.commands.MCommandParameter;
import org.eclipse.e4.ui.model.application.commands.MCommandsFactory;
import org.eclipse.e4.ui.model.application.commands.MHandler;
import org.eclipse.e4.ui.model.application.commands.MKeyBinding;
import org.eclipse.e4.ui.model.application.commands.MParameter;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage.Registry;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;

public class CommandsFactoryImpl
  extends EFactoryImpl
  implements MCommandsFactory
{
  public static final CommandsFactoryImpl eINSTANCE = ;
  
  public static CommandsFactoryImpl init()
  {
    try
    {
      CommandsFactoryImpl theCommandsFactory = (CommandsFactoryImpl)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/ui/2010/UIModel/application/commands");
      if (theCommandsFactory != null) {
        return theCommandsFactory;
      }
    }
    catch (Exception exception)
    {
      EcorePlugin.INSTANCE.log(exception);
    }
    return new CommandsFactoryImpl();
  }
  
  public EObject create(EClass eClass)
  {
    switch (eClass.getClassifierID())
    {
    case 2: 
      return (EObject)createBindingContext();
    case 3: 
      return (EObject)createBindingTable();
    case 4: 
      return (EObject)createCommand();
    case 5: 
      return (EObject)createCommandParameter();
    case 6: 
      return (EObject)createHandler();
    case 8: 
      return (EObject)createKeyBinding();
    case 10: 
      return (EObject)createParameter();
    case 11: 
      return (EObject)createCategory();
    }
    throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
  }
  
  public Object createFromString(EDataType eDataType, String initialValue)
  {
    eDataType.getClassifierID();
    
    throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
  }
  
  public String convertToString(EDataType eDataType, Object instanceValue)
  {
    eDataType.getClassifierID();
    
    throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
  }
  
  public MBindingContext createBindingContext()
  {
    BindingContextImpl bindingContext = new BindingContextImpl();
    return bindingContext;
  }
  
  public MBindingTable createBindingTable()
  {
    BindingTableImpl bindingTable = new BindingTableImpl();
    return bindingTable;
  }
  
  public MCommand createCommand()
  {
    CommandImpl command = new CommandImpl();
    return command;
  }
  
  public MCommandParameter createCommandParameter()
  {
    CommandParameterImpl commandParameter = new CommandParameterImpl();
    return commandParameter;
  }
  
  public MHandler createHandler()
  {
    HandlerImpl handler = new HandlerImpl();
    return handler;
  }
  
  public MKeyBinding createKeyBinding()
  {
    KeyBindingImpl keyBinding = new KeyBindingImpl();
    return keyBinding;
  }
  
  public MParameter createParameter()
  {
    ParameterImpl parameter = new ParameterImpl();
    return parameter;
  }
  
  public MCategory createCategory()
  {
    CategoryImpl category = new CategoryImpl();
    return category;
  }
  
  public CommandsPackageImpl getCommandsPackage()
  {
    return (CommandsPackageImpl)getEPackage();
  }
  
  @Deprecated
  public static CommandsPackageImpl getPackage()
  {
    return CommandsPackageImpl.eINSTANCE;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.e4.ui.model.application.commands.impl.CommandsFactoryImpl
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.e4.ui.model.application.commands.impl;

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

public abstract interface CommandsPackageImpl$Literals
{
  public static final EClass BINDING_TABLE_CONTAINER = CommandsPackageImpl.eINSTANCE.getBindingTableContainer();
  public static final EReference BINDING_TABLE_CONTAINER__BINDING_TABLES = CommandsPackageImpl.eINSTANCE.getBindingTableContainer_BindingTables();
  public static final EReference BINDING_TABLE_CONTAINER__ROOT_CONTEXT = CommandsPackageImpl.eINSTANCE.getBindingTableContainer_RootContext();
  public static final EClass BINDINGS = CommandsPackageImpl.eINSTANCE.getBindings();
  public static final EReference BINDINGS__BINDING_CONTEXTS = CommandsPackageImpl.eINSTANCE.getBindings_BindingContexts();
  public static final EClass BINDING_CONTEXT = CommandsPackageImpl.eINSTANCE.getBindingContext();
  public static final EAttribute BINDING_CONTEXT__NAME = CommandsPackageImpl.eINSTANCE.getBindingContext_Name();
  public static final EAttribute BINDING_CONTEXT__DESCRIPTION = CommandsPackageImpl.eINSTANCE.getBindingContext_Description();
  public static final EReference BINDING_CONTEXT__CHILDREN = CommandsPackageImpl.eINSTANCE.getBindingContext_Children();
  public static final EClass BINDING_TABLE = CommandsPackageImpl.eINSTANCE.getBindingTable();
  public static final EReference BINDING_TABLE__BINDINGS = CommandsPackageImpl.eINSTANCE.getBindingTable_Bindings();
  public static final EReference BINDING_TABLE__BINDING_CONTEXT = CommandsPackageImpl.eINSTANCE.getBindingTable_BindingContext();
  public static final EClass COMMAND = CommandsPackageImpl.eINSTANCE.getCommand();
  public static final EAttribute COMMAND__COMMAND_NAME = CommandsPackageImpl.eINSTANCE.getCommand_CommandName();
  public static final EAttribute COMMAND__DESCRIPTION = CommandsPackageImpl.eINSTANCE.getCommand_Description();
  public static final EReference COMMAND__PARAMETERS = CommandsPackageImpl.eINSTANCE.getCommand_Parameters();
  public static final EReference COMMAND__CATEGORY = CommandsPackageImpl.eINSTANCE.getCommand_Category();
  public static final EOperation COMMAND___GET_LOCALIZED_COMMAND_NAME = CommandsPackageImpl.eINSTANCE.getCommand__GetLocalizedCommandName();
  public static final EOperation COMMAND___GET_LOCALIZED_DESCRIPTION = CommandsPackageI
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

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