Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/TargetPlatformTaskImpl.java')
-rw-r--r--plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/TargetPlatformTaskImpl.java234
1 files changed, 0 insertions, 234 deletions
diff --git a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/TargetPlatformTaskImpl.java b/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/TargetPlatformTaskImpl.java
deleted file mode 100644
index 077c420d8a..0000000000
--- a/plugins/org.eclipse.emf.cdo.releng.setup/src/org/eclipse/emf/cdo/releng/setup/impl/TargetPlatformTaskImpl.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * Copyright (c) 2013 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.emf.cdo.releng.setup.impl;
-
-import org.eclipse.emf.cdo.releng.setup.SetupPackage;
-import org.eclipse.emf.cdo.releng.setup.SetupTaskContext;
-import org.eclipse.emf.cdo.releng.setup.TargetPlatformTask;
-import org.eclipse.emf.cdo.releng.setup.Trigger;
-import org.eclipse.emf.cdo.releng.setup.log.ProgressLogMonitor;
-import org.eclipse.emf.cdo.releng.setup.util.TargetPlatformUtil;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-
-import org.eclipse.pde.core.target.ITargetDefinition;
-
-import java.util.Set;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Target Platform Task</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.emf.cdo.releng.setup.impl.TargetPlatformTaskImpl#getName <em>Name</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class TargetPlatformTaskImpl extends SetupTaskImpl implements TargetPlatformTask
-{
- /**
- * The default value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
- private ITargetDefinition targetPlatform;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected TargetPlatformTaskImpl()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return SetupPackage.Literals.TARGET_PLATFORM_TASK;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setName(String newName)
- {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- {
- eNotify(new ENotificationImpl(this, Notification.SET, SetupPackage.TARGET_PLATFORM_TASK__NAME, oldName, name));
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case SetupPackage.TARGET_PLATFORM_TASK__NAME:
- return getName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case SetupPackage.TARGET_PLATFORM_TASK__NAME:
- setName((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case SetupPackage.TARGET_PLATFORM_TASK__NAME:
- setName(NAME_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case SetupPackage.TARGET_PLATFORM_TASK__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy())
- {
- return super.toString();
- }
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (name: ");
- result.append(name);
- result.append(')');
- return result.toString();
- }
-
- @Override
- public Set<Trigger> getValidTriggers()
- {
- return Trigger.IDE_TRIGGERS;
- }
-
- public boolean isNeeded(SetupTaskContext context) throws Exception
- {
- if (context.getTrigger() == Trigger.MANUAL)
- {
- return true;
- }
-
- initTargetPlatform(context);
- ITargetDefinition activeTargetPlatform = TargetPlatformUtil.getActiveTargetPlatform();
- return targetPlatform == null || activeTargetPlatform == null
- || !targetPlatform.getHandle().equals(activeTargetPlatform.getHandle());
- }
-
- private void initTargetPlatform(SetupTaskContext context)
- {
- targetPlatform = TargetPlatformUtil.getTargetPlatform(getName(), context);
- }
-
- public void perform(SetupTaskContext context) throws Exception
- {
- if (targetPlatform == null)
- {
- initTargetPlatform(context);
- }
-
- if (targetPlatform != null)
- {
- TargetPlatformUtil.setTargetActive(targetPlatform, new ProgressLogMonitor(context));
- }
- }
-
-} // TargetPlatformTaskImpl

Back to the top