blob: 1b391c224ca2910fa1aaa234f86592a2b5da1677 [file] [log] [blame]
/**
* Copyright (c) 2009-2010 Thales Corporate Services S.A.S.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v2.0
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Thales Corporate Services S.A.S - initial API and implementation
*
* $Id$
*/
package org.eclipse.egf.portfolio.eclipse.build.buildscm.impl;
import org.eclipse.egf.portfolio.eclipse.build.builddeploy.impl.GenerationLocationImpl;
import org.eclipse.egf.portfolio.eclipse.build.buildscm.BuildscmPackage;
import org.eclipse.egf.portfolio.eclipse.build.buildscm.GITGenerationLocation;
import org.eclipse.egf.portfolio.eclipse.build.buildscm.GITLocation;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>GIT Generation Location</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.egf.portfolio.eclipse.build.buildscm.impl.GITGenerationLocationImpl#getGitLocation <em>Git Location</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class GITGenerationLocationImpl extends GenerationLocationImpl implements GITGenerationLocation {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final String copyright = " Copyright (c) 2009-2010 Thales Corporate Services S.A.S.\r\n This program and the accompanying materials\r\n are made available under the terms of the Eclipse Public License v2.0\r\n which accompanies this distribution, and is available at\r\n https://www.eclipse.org/legal/epl-v2.0\r\n \r\n SPDX-License-Identifier: EPL-2.0\r\n \r\n Contributors:\r\n Thales Corporate Services S.A.S - initial API and implementation";
/**
* The cached value of the '{@link #getGitLocation() <em>Git Location</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getGitLocation()
* @generated
* @ordered
*/
protected GITLocation gitLocation;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected GITGenerationLocationImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return BuildscmPackage.Literals.GIT_GENERATION_LOCATION;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public GITLocation getGitLocation() {
if (gitLocation != null && gitLocation.eIsProxy()) {
InternalEObject oldGitLocation = (InternalEObject)gitLocation;
gitLocation = (GITLocation)eResolveProxy(oldGitLocation);
if (gitLocation != oldGitLocation) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, BuildscmPackage.GIT_GENERATION_LOCATION__GIT_LOCATION, oldGitLocation, gitLocation));
}
}
return gitLocation;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public GITLocation basicGetGitLocation() {
return gitLocation;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setGitLocation(GITLocation newGitLocation) {
GITLocation oldGitLocation = gitLocation;
gitLocation = newGitLocation;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, BuildscmPackage.GIT_GENERATION_LOCATION__GIT_LOCATION, oldGitLocation, gitLocation));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case BuildscmPackage.GIT_GENERATION_LOCATION__GIT_LOCATION:
if (resolve) return getGitLocation();
return basicGetGitLocation();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case BuildscmPackage.GIT_GENERATION_LOCATION__GIT_LOCATION:
setGitLocation((GITLocation)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case BuildscmPackage.GIT_GENERATION_LOCATION__GIT_LOCATION:
setGitLocation((GITLocation)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case BuildscmPackage.GIT_GENERATION_LOCATION__GIT_LOCATION:
return gitLocation != null;
}
return super.eIsSet(featureID);
}
} //GITGenerationLocationImpl