Java Code Examples for org.eclipse.xtext.common.types.TypesPackage#JVM_EXECUTABLE__PARAMETERS

The following examples show how to use org.eclipse.xtext.common.types.TypesPackage#JVM_EXECUTABLE__PARAMETERS . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JvmExecutableImpl.java    From xtext-extras with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
	switch (featureID)
	{
		case TypesPackage.JVM_EXECUTABLE__TYPE_PARAMETERS:
			return getTypeParameters();
		case TypesPackage.JVM_EXECUTABLE__PARAMETERS:
			return getParameters();
		case TypesPackage.JVM_EXECUTABLE__EXCEPTIONS:
			return getExceptions();
		case TypesPackage.JVM_EXECUTABLE__VAR_ARGS:
			return isVarArgs();
	}
	return super.eGet(featureID, resolve, coreType);
}
 
Example 2
Source File: JvmExecutableImpl.java    From xtext-extras with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue)
{
	switch (featureID)
	{
		case TypesPackage.JVM_EXECUTABLE__TYPE_PARAMETERS:
			getTypeParameters().clear();
			getTypeParameters().addAll((Collection<? extends JvmTypeParameter>)newValue);
			return;
		case TypesPackage.JVM_EXECUTABLE__PARAMETERS:
			getParameters().clear();
			getParameters().addAll((Collection<? extends JvmFormalParameter>)newValue);
			return;
		case TypesPackage.JVM_EXECUTABLE__EXCEPTIONS:
			getExceptions().clear();
			getExceptions().addAll((Collection<? extends JvmTypeReference>)newValue);
			return;
		case TypesPackage.JVM_EXECUTABLE__VAR_ARGS:
			setVarArgs((Boolean)newValue);
			return;
	}
	super.eSet(featureID, newValue);
}
 
Example 3
Source File: JvmExecutableImpl.java    From xtext-extras with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void eUnset(int featureID)
{
	switch (featureID)
	{
		case TypesPackage.JVM_EXECUTABLE__TYPE_PARAMETERS:
			getTypeParameters().clear();
			return;
		case TypesPackage.JVM_EXECUTABLE__PARAMETERS:
			getParameters().clear();
			return;
		case TypesPackage.JVM_EXECUTABLE__EXCEPTIONS:
			getExceptions().clear();
			return;
		case TypesPackage.JVM_EXECUTABLE__VAR_ARGS:
			setVarArgs(VAR_ARGS_EDEFAULT);
			return;
	}
	super.eUnset(featureID);
}
 
Example 4
Source File: JvmExecutableImpl.java    From xtext-extras with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public boolean eIsSet(int featureID)
{
	switch (featureID)
	{
		case TypesPackage.JVM_EXECUTABLE__TYPE_PARAMETERS:
			return typeParameters != null && !typeParameters.isEmpty();
		case TypesPackage.JVM_EXECUTABLE__PARAMETERS:
			return parameters != null && !parameters.isEmpty();
		case TypesPackage.JVM_EXECUTABLE__EXCEPTIONS:
			return exceptions != null && !exceptions.isEmpty();
		case TypesPackage.JVM_EXECUTABLE__VAR_ARGS:
			return varArgs != VAR_ARGS_EDEFAULT;
	}
	return super.eIsSet(featureID);
}
 
Example 5
Source File: JvmExecutableItemProvider.java    From xtext-eclipse with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * This handles model notifications by calling {@link #updateChildren} to update any cached
 * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void notifyChanged(Notification notification)
{
	updateChildren(notification);

	switch (notification.getFeatureID(JvmExecutable.class))
	{
		case TypesPackage.JVM_EXECUTABLE__VAR_ARGS:
			fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
			return;
		case TypesPackage.JVM_EXECUTABLE__TYPE_PARAMETERS:
		case TypesPackage.JVM_EXECUTABLE__PARAMETERS:
		case TypesPackage.JVM_EXECUTABLE__EXCEPTIONS:
			fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
			return;
	}
	super.notifyChanged(notification);
}
 
Example 6
Source File: JvmExecutableImpl.java    From xtext-extras with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public EList<JvmFormalParameter> getParameters()
{
	if (parameters == null)
	{
		parameters = new EObjectContainmentEList<JvmFormalParameter>(JvmFormalParameter.class, this, TypesPackage.JVM_EXECUTABLE__PARAMETERS);
	}
	return parameters;
}
 
Example 7
Source File: JvmExecutableImpl.java    From xtext-extras with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
{
	switch (featureID)
	{
		case TypesPackage.JVM_EXECUTABLE__TYPE_PARAMETERS:
			return ((InternalEList<?>)getTypeParameters()).basicRemove(otherEnd, msgs);
		case TypesPackage.JVM_EXECUTABLE__PARAMETERS:
			return ((InternalEList<?>)getParameters()).basicRemove(otherEnd, msgs);
		case TypesPackage.JVM_EXECUTABLE__EXCEPTIONS:
			return ((InternalEList<?>)getExceptions()).basicRemove(otherEnd, msgs);
	}
	return super.eInverseRemove(otherEnd, featureID, msgs);
}