org.eclipse.emf.common.util.Enumerator Java Examples

The following examples show how to use org.eclipse.emf.common.util.Enumerator. 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: RouterPropertiesEditionPartImpl.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * 
 * @see com.github.lbroudoux.dsl.eip.parts.RouterPropertiesEditionPart#setType(Enumerator newValue)
 * 
 */
public void setType(Enumerator newValue) {
	type.modelUpdating(new StructuredSelection(newValue));
	boolean eefElementEditorReadOnlyState = isReadOnly(EipViewsRepository.Router.Properties.type);
	if (eefElementEditorReadOnlyState && type.isEnabled()) {
		type.setEnabled(false);
		type.setToolTipText(EipMessages.Router_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !type.isEnabled()) {
		type.setEnabled(true);
	}	
	
}
 
Example #2
Source File: ResequencerPropertiesEditionPartImpl.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * 
 * @see com.github.lbroudoux.dsl.eip.parts.ResequencerPropertiesEditionPart#initPart(Object input, Enumerator current)
 */
public void initPart(Object input, Enumerator current) {
	part.setInput(input);
	part.modelUpdating(new StructuredSelection(current));
	boolean eefElementEditorReadOnlyState = isReadOnly(EipViewsRepository.Resequencer.Properties.part);
	if (eefElementEditorReadOnlyState && part.isEnabled()) {
		part.setEnabled(false);
		part.setToolTipText(EipMessages.Resequencer_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !part.isEnabled()) {
		part.setEnabled(true);
	}	
	
}
 
Example #3
Source File: RoutePropertiesEditionPartImpl.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * 
 * @see com.github.lbroudoux.dsl.eip.parts.RoutePropertiesEditionPart#setExchangeType(Enumerator newValue)
 * 
 */
public void setExchangeType(Enumerator newValue) {
	exchangeType.modelUpdating(new StructuredSelection(newValue));
	boolean eefElementEditorReadOnlyState = isReadOnly(EipViewsRepository.Route.Properties.exchangeType);
	if (eefElementEditorReadOnlyState && exchangeType.isEnabled()) {
		exchangeType.setEnabled(false);
		exchangeType.setToolTipText(EipMessages.Route_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !exchangeType.isEnabled()) {
		exchangeType.setEnabled(true);
	}	
	
}
 
Example #4
Source File: UnaryExpressionImpl.java    From statecharts with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public Enumerator getOperator() {
	// TODO: implement this method
	// Ensure that you remove @generated or mark it @generated NOT
	throw new UnsupportedOperationException();
}
 
Example #5
Source File: LogicalAndExpressionImpl.java    From statecharts with Eclipse Public License 1.0 5 votes vote down vote up
@Override
/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated NOT
 */
public Enumerator getOperator() {
	return LogicalOperator.AND;
}
 
Example #6
Source File: RoutePropertiesEditionPartForm.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * 
 * @see com.github.lbroudoux.dsl.eip.parts.RoutePropertiesEditionPart#initExchangeType(Object input, Enumerator current)
 */
public void initExchangeType(Object input, Enumerator current) {
	exchangeType.setInput(input);
	exchangeType.modelUpdating(new StructuredSelection(current));
	boolean eefElementEditorReadOnlyState = isReadOnly(EipViewsRepository.Route.Properties.exchangeType);
	if (eefElementEditorReadOnlyState && exchangeType.isEnabled()) {
		exchangeType.setEnabled(false);
		exchangeType.setToolTipText(EipMessages.Route_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !exchangeType.isEnabled()) {
		exchangeType.setEnabled(true);
	}	
	
}
 
Example #7
Source File: PackageJsonUtils.java    From n4js with Eclipse Public License 1.0 5 votes vote down vote up
private static <T extends Enumerator> T parseEnumLiteral(EEnum emfEnumType, Class<T> javaEnumType,
		String enumLiteralStr) {
	EEnumLiteral emfLit = enumLiteralStr != null ? emfEnumType.getELiterals().stream()
			.filter(lit -> lit.getName().equalsIgnoreCase(enumLiteralStr))
			.findFirst().orElse(null) : null;
	if (emfLit == null) {
		return null;
	}
	final Enumerator javaLit = emfLit.getInstance();
	@SuppressWarnings("unchecked")
	T javaLitCasted = javaEnumType.isInstance(javaLit) ? (T) javaLit : null;
	return javaLitCasted;
}
 
Example #8
Source File: RecipientListRouterPropertiesEditionPartForm.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * 
 * @see com.github.lbroudoux.dsl.eip.parts.RecipientListRouterPropertiesEditionPart#initType(Object input, Enumerator current)
 */
public void initType(Object input, Enumerator current) {
	type.setInput(input);
	type.modelUpdating(new StructuredSelection(current));
	boolean eefElementEditorReadOnlyState = isReadOnly(EipViewsRepository.RecipientListRouter.Properties.type);
	if (eefElementEditorReadOnlyState && type.isEnabled()) {
		type.setEnabled(false);
		type.setToolTipText(EipMessages.RecipientListRouter_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !type.isEnabled()) {
		type.setEnabled(true);
	}	
	
}
 
Example #9
Source File: RecipientListRouterPropertiesEditionPartForm.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * 
 * @see com.github.lbroudoux.dsl.eip.parts.RecipientListRouterPropertiesEditionPart#setType(Enumerator newValue)
 * 
 */
public void setType(Enumerator newValue) {
	type.modelUpdating(new StructuredSelection(newValue));
	boolean eefElementEditorReadOnlyState = isReadOnly(EipViewsRepository.RecipientListRouter.Properties.type);
	if (eefElementEditorReadOnlyState && type.isEnabled()) {
		type.setEnabled(false);
		type.setToolTipText(EipMessages.RecipientListRouter_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !type.isEnabled()) {
		type.setEnabled(true);
	}	
	
}
 
Example #10
Source File: EnricherPropertiesEditionPartForm.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * 
 * @see com.github.lbroudoux.dsl.eip.parts.EnricherPropertiesEditionPart#initPart(Object input, Enumerator current)
 */
public void initPart(Object input, Enumerator current) {
	part.setInput(input);
	part.modelUpdating(new StructuredSelection(current));
	boolean eefElementEditorReadOnlyState = isReadOnly(EipViewsRepository.Enricher.Properties.part);
	if (eefElementEditorReadOnlyState && part.isEnabled()) {
		part.setEnabled(false);
		part.setToolTipText(EipMessages.Enricher_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !part.isEnabled()) {
		part.setEnabled(true);
	}	
	
}
 
Example #11
Source File: EnricherPropertiesEditionPartForm.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * 
 * @see com.github.lbroudoux.dsl.eip.parts.EnricherPropertiesEditionPart#setPart(Enumerator newValue)
 * 
 */
public void setPart(Enumerator newValue) {
	part.modelUpdating(new StructuredSelection(newValue));
	boolean eefElementEditorReadOnlyState = isReadOnly(EipViewsRepository.Enricher.Properties.part);
	if (eefElementEditorReadOnlyState && part.isEnabled()) {
		part.setEnabled(false);
		part.setToolTipText(EipMessages.Enricher_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !part.isEnabled()) {
		part.setEnabled(true);
	}	
	
}
 
Example #12
Source File: RouterPropertiesEditionPartForm.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * 
 * @see com.github.lbroudoux.dsl.eip.parts.RouterPropertiesEditionPart#initType(Object input, Enumerator current)
 */
public void initType(Object input, Enumerator current) {
	type.setInput(input);
	type.modelUpdating(new StructuredSelection(current));
	boolean eefElementEditorReadOnlyState = isReadOnly(EipViewsRepository.Router.Properties.type);
	if (eefElementEditorReadOnlyState && type.isEnabled()) {
		type.setEnabled(false);
		type.setToolTipText(EipMessages.Router_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !type.isEnabled()) {
		type.setEnabled(true);
	}	
	
}
 
Example #13
Source File: RouterPropertiesEditionPartForm.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * 
 * @see com.github.lbroudoux.dsl.eip.parts.RouterPropertiesEditionPart#setType(Enumerator newValue)
 * 
 */
public void setType(Enumerator newValue) {
	type.modelUpdating(new StructuredSelection(newValue));
	boolean eefElementEditorReadOnlyState = isReadOnly(EipViewsRepository.Router.Properties.type);
	if (eefElementEditorReadOnlyState && type.isEnabled()) {
		type.setEnabled(false);
		type.setToolTipText(EipMessages.Router_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !type.isEnabled()) {
		type.setEnabled(true);
	}	
	
}
 
Example #14
Source File: ResequencerPropertiesEditionPartForm.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * 
 * @see com.github.lbroudoux.dsl.eip.parts.ResequencerPropertiesEditionPart#setPart(Enumerator newValue)
 * 
 */
public void setPart(Enumerator newValue) {
	part.modelUpdating(new StructuredSelection(newValue));
	boolean eefElementEditorReadOnlyState = isReadOnly(EipViewsRepository.Resequencer.Properties.part);
	if (eefElementEditorReadOnlyState && part.isEnabled()) {
		part.setEnabled(false);
		part.setToolTipText(EipMessages.Resequencer_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !part.isEnabled()) {
		part.setEnabled(true);
	}	
	
}
 
Example #15
Source File: RoutePropertiesEditionPartForm.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * 
 * @see com.github.lbroudoux.dsl.eip.parts.RoutePropertiesEditionPart#setExchangeType(Enumerator newValue)
 * 
 */
public void setExchangeType(Enumerator newValue) {
	exchangeType.modelUpdating(new StructuredSelection(newValue));
	boolean eefElementEditorReadOnlyState = isReadOnly(EipViewsRepository.Route.Properties.exchangeType);
	if (eefElementEditorReadOnlyState && exchangeType.isEnabled()) {
		exchangeType.setEnabled(false);
		exchangeType.setToolTipText(EipMessages.Route_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !exchangeType.isEnabled()) {
		exchangeType.setEnabled(true);
	}	
	
}
 
Example #16
Source File: AggregatorPropertiesEditionPartImpl.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * 
 * @see com.github.lbroudoux.dsl.eip.parts.AggregatorPropertiesEditionPart#setPart(Enumerator newValue)
 * 
 */
public void setPart(Enumerator newValue) {
	part.modelUpdating(new StructuredSelection(newValue));
	boolean eefElementEditorReadOnlyState = isReadOnly(EipViewsRepository.Aggregator.Properties.part);
	if (eefElementEditorReadOnlyState && part.isEnabled()) {
		part.setEnabled(false);
		part.setToolTipText(EipMessages.Aggregator_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !part.isEnabled()) {
		part.setEnabled(true);
	}	
	
}
 
Example #17
Source File: AggregatorPropertiesEditionPartImpl.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * 
 * @see com.github.lbroudoux.dsl.eip.parts.AggregatorPropertiesEditionPart#initPart(Object input, Enumerator current)
 */
public void initPart(Object input, Enumerator current) {
	part.setInput(input);
	part.modelUpdating(new StructuredSelection(current));
	boolean eefElementEditorReadOnlyState = isReadOnly(EipViewsRepository.Aggregator.Properties.part);
	if (eefElementEditorReadOnlyState && part.isEnabled()) {
		part.setEnabled(false);
		part.setToolTipText(EipMessages.Aggregator_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !part.isEnabled()) {
		part.setEnabled(true);
	}	
	
}
 
Example #18
Source File: RecipientListRouterPropertiesEditionPartImpl.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * 
 * @see com.github.lbroudoux.dsl.eip.parts.RecipientListRouterPropertiesEditionPart#setType(Enumerator newValue)
 * 
 */
public void setType(Enumerator newValue) {
	type.modelUpdating(new StructuredSelection(newValue));
	boolean eefElementEditorReadOnlyState = isReadOnly(EipViewsRepository.RecipientListRouter.Properties.type);
	if (eefElementEditorReadOnlyState && type.isEnabled()) {
		type.setEnabled(false);
		type.setToolTipText(EipMessages.RecipientListRouter_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !type.isEnabled()) {
		type.setEnabled(true);
	}	
	
}
 
Example #19
Source File: RecipientListRouterPropertiesEditionPartImpl.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * 
 * @see com.github.lbroudoux.dsl.eip.parts.RecipientListRouterPropertiesEditionPart#initType(Object input, Enumerator current)
 */
public void initType(Object input, Enumerator current) {
	type.setInput(input);
	type.modelUpdating(new StructuredSelection(current));
	boolean eefElementEditorReadOnlyState = isReadOnly(EipViewsRepository.RecipientListRouter.Properties.type);
	if (eefElementEditorReadOnlyState && type.isEnabled()) {
		type.setEnabled(false);
		type.setToolTipText(EipMessages.RecipientListRouter_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !type.isEnabled()) {
		type.setEnabled(true);
	}	
	
}
 
Example #20
Source File: EnricherPropertiesEditionPartImpl.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * 
 * @see com.github.lbroudoux.dsl.eip.parts.EnricherPropertiesEditionPart#setPart(Enumerator newValue)
 * 
 */
public void setPart(Enumerator newValue) {
	part.modelUpdating(new StructuredSelection(newValue));
	boolean eefElementEditorReadOnlyState = isReadOnly(EipViewsRepository.Enricher.Properties.part);
	if (eefElementEditorReadOnlyState && part.isEnabled()) {
		part.setEnabled(false);
		part.setToolTipText(EipMessages.Enricher_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !part.isEnabled()) {
		part.setEnabled(true);
	}	
	
}
 
Example #21
Source File: EnricherPropertiesEditionPartImpl.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * 
 * @see com.github.lbroudoux.dsl.eip.parts.EnricherPropertiesEditionPart#initPart(Object input, Enumerator current)
 */
public void initPart(Object input, Enumerator current) {
	part.setInput(input);
	part.modelUpdating(new StructuredSelection(current));
	boolean eefElementEditorReadOnlyState = isReadOnly(EipViewsRepository.Enricher.Properties.part);
	if (eefElementEditorReadOnlyState && part.isEnabled()) {
		part.setEnabled(false);
		part.setToolTipText(EipMessages.Enricher_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !part.isEnabled()) {
		part.setEnabled(true);
	}	
	
}
 
Example #22
Source File: ResequencerPropertiesEditionPartImpl.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * 
 * @see com.github.lbroudoux.dsl.eip.parts.ResequencerPropertiesEditionPart#setPart(Enumerator newValue)
 * 
 */
public void setPart(Enumerator newValue) {
	part.modelUpdating(new StructuredSelection(newValue));
	boolean eefElementEditorReadOnlyState = isReadOnly(EipViewsRepository.Resequencer.Properties.part);
	if (eefElementEditorReadOnlyState && part.isEnabled()) {
		part.setEnabled(false);
		part.setToolTipText(EipMessages.Resequencer_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !part.isEnabled()) {
		part.setEnabled(true);
	}	
	
}
 
Example #23
Source File: AggregatorPropertiesEditionPartForm.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * 
 * @see com.github.lbroudoux.dsl.eip.parts.AggregatorPropertiesEditionPart#setPart(Enumerator newValue)
 * 
 */
public void setPart(Enumerator newValue) {
	part.modelUpdating(new StructuredSelection(newValue));
	boolean eefElementEditorReadOnlyState = isReadOnly(EipViewsRepository.Aggregator.Properties.part);
	if (eefElementEditorReadOnlyState && part.isEnabled()) {
		part.setEnabled(false);
		part.setToolTipText(EipMessages.Aggregator_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !part.isEnabled()) {
		part.setEnabled(true);
	}	
	
}
 
Example #24
Source File: AggregatorPropertiesEditionPartForm.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * 
 * @see com.github.lbroudoux.dsl.eip.parts.AggregatorPropertiesEditionPart#initPart(Object input, Enumerator current)
 */
public void initPart(Object input, Enumerator current) {
	part.setInput(input);
	part.modelUpdating(new StructuredSelection(current));
	boolean eefElementEditorReadOnlyState = isReadOnly(EipViewsRepository.Aggregator.Properties.part);
	if (eefElementEditorReadOnlyState && part.isEnabled()) {
		part.setEnabled(false);
		part.setToolTipText(EipMessages.Aggregator_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !part.isEnabled()) {
		part.setEnabled(true);
	}	
	
}
 
Example #25
Source File: ResequencerPropertiesEditionPartForm.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 * 
 * @see com.github.lbroudoux.dsl.eip.parts.ResequencerPropertiesEditionPart#initPart(Object input, Enumerator current)
 */
public void initPart(Object input, Enumerator current) {
	part.setInput(input);
	part.modelUpdating(new StructuredSelection(current));
	boolean eefElementEditorReadOnlyState = isReadOnly(EipViewsRepository.Resequencer.Properties.part);
	if (eefElementEditorReadOnlyState && part.isEnabled()) {
		part.setEnabled(false);
		part.setToolTipText(EipMessages.Resequencer_ReadOnly);
	} else if (!eefElementEditorReadOnlyState && !part.isEnabled()) {
		part.setEnabled(true);
	}	
	
}
 
Example #26
Source File: InternalBug307519TestLanguageParser.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public final Enumerator ruleEnumT() throws RecognitionException {
    Enumerator current = null;

    Token enumLiteral_0=null;
    Token enumLiteral_1=null;


    	enterRule();

    try {
        // InternalBug307519TestLanguage.g:215:2: ( ( (enumLiteral_0= 'T1' ) | (enumLiteral_1= 'T2' ) ) )
        // InternalBug307519TestLanguage.g:216:2: ( (enumLiteral_0= 'T1' ) | (enumLiteral_1= 'T2' ) )
        {
        // InternalBug307519TestLanguage.g:216:2: ( (enumLiteral_0= 'T1' ) | (enumLiteral_1= 'T2' ) )
        int alt2=2;
        int LA2_0 = input.LA(1);

        if ( (LA2_0==14) ) {
            alt2=1;
        }
        else if ( (LA2_0==15) ) {
            alt2=2;
        }
        else {
            NoViableAltException nvae =
                new NoViableAltException("", 2, 0, input);

            throw nvae;
        }
        switch (alt2) {
            case 1 :
                // InternalBug307519TestLanguage.g:217:3: (enumLiteral_0= 'T1' )
                {
                // InternalBug307519TestLanguage.g:217:3: (enumLiteral_0= 'T1' )
                // InternalBug307519TestLanguage.g:218:4: enumLiteral_0= 'T1'
                {
                enumLiteral_0=(Token)match(input,14,FollowSets000.FOLLOW_2); 

                				current = grammarAccess.getEnumTAccess().getT1EnumLiteralDeclaration_0().getEnumLiteral().getInstance();
                				newLeafNode(enumLiteral_0, grammarAccess.getEnumTAccess().getT1EnumLiteralDeclaration_0());
                			

                }


                }
                break;
            case 2 :
                // InternalBug307519TestLanguage.g:225:3: (enumLiteral_1= 'T2' )
                {
                // InternalBug307519TestLanguage.g:225:3: (enumLiteral_1= 'T2' )
                // InternalBug307519TestLanguage.g:226:4: enumLiteral_1= 'T2'
                {
                enumLiteral_1=(Token)match(input,15,FollowSets000.FOLLOW_2); 

                				current = grammarAccess.getEnumTAccess().getT2EnumLiteralDeclaration_1().getEnumLiteral().getInstance();
                				newLeafNode(enumLiteral_1, grammarAccess.getEnumTAccess().getT2EnumLiteralDeclaration_1());
                			

                }


                }
                break;

        }


        }


        	leaveRule();

    }

        catch (RecognitionException re) {
            recover(input,re);
            appendSkippedTokens();
        }
    finally {
    }
    return current;
}
 
Example #27
Source File: InternalRegionAccessTestLanguageParser.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
public final Enumerator ruleEnum() throws RecognitionException {
    Enumerator current = null;

    Token enumLiteral_0=null;
    Token enumLiteral_1=null;


    	enterRule();

    try {
        // InternalRegionAccessTestLanguage.g:972:2: ( ( (enumLiteral_0= 'lit1' ) | (enumLiteral_1= 'lit2' ) ) )
        // InternalRegionAccessTestLanguage.g:973:2: ( (enumLiteral_0= 'lit1' ) | (enumLiteral_1= 'lit2' ) )
        {
        // InternalRegionAccessTestLanguage.g:973:2: ( (enumLiteral_0= 'lit1' ) | (enumLiteral_1= 'lit2' ) )
        int alt15=2;
        int LA15_0 = input.LA(1);

        if ( (LA15_0==31) ) {
            alt15=1;
        }
        else if ( (LA15_0==32) ) {
            alt15=2;
        }
        else {
            NoViableAltException nvae =
                new NoViableAltException("", 15, 0, input);

            throw nvae;
        }
        switch (alt15) {
            case 1 :
                // InternalRegionAccessTestLanguage.g:974:3: (enumLiteral_0= 'lit1' )
                {
                // InternalRegionAccessTestLanguage.g:974:3: (enumLiteral_0= 'lit1' )
                // InternalRegionAccessTestLanguage.g:975:4: enumLiteral_0= 'lit1'
                {
                enumLiteral_0=(Token)match(input,31,FollowSets000.FOLLOW_2); 

                				current = grammarAccess.getEnumAccess().getLit1EnumLiteralDeclaration_0().getEnumLiteral().getInstance();
                				newLeafNode(enumLiteral_0, grammarAccess.getEnumAccess().getLit1EnumLiteralDeclaration_0());
                			

                }


                }
                break;
            case 2 :
                // InternalRegionAccessTestLanguage.g:982:3: (enumLiteral_1= 'lit2' )
                {
                // InternalRegionAccessTestLanguage.g:982:3: (enumLiteral_1= 'lit2' )
                // InternalRegionAccessTestLanguage.g:983:4: enumLiteral_1= 'lit2'
                {
                enumLiteral_1=(Token)match(input,32,FollowSets000.FOLLOW_2); 

                				current = grammarAccess.getEnumAccess().getLit2EnumLiteralDeclaration_1().getEnumLiteral().getInstance();
                				newLeafNode(enumLiteral_1, grammarAccess.getEnumAccess().getLit2EnumLiteralDeclaration_1());
                			

                }


                }
                break;

        }


        }


        	leaveRule();

    }

        catch (RecognitionException re) {
            recover(input,re);
            appendSkippedTokens();
        }
    finally {
    }
    return current;
}
 
Example #28
Source File: InternalBug332217TestLanguageParser.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public final Enumerator ruleTableViewStyle() throws RecognitionException {
    Enumerator current = null;

    Token enumLiteral_0=null;
    Token enumLiteral_1=null;


    	enterRule();

    try {
        // InternalBug332217TestLanguage.g:1585:2: ( ( (enumLiteral_0= 'Plain' ) | (enumLiteral_1= 'Grouped' ) ) )
        // InternalBug332217TestLanguage.g:1586:2: ( (enumLiteral_0= 'Plain' ) | (enumLiteral_1= 'Grouped' ) )
        {
        // InternalBug332217TestLanguage.g:1586:2: ( (enumLiteral_0= 'Plain' ) | (enumLiteral_1= 'Grouped' ) )
        int alt21=2;
        int LA21_0 = input.LA(1);

        if ( (LA21_0==38) ) {
            alt21=1;
        }
        else if ( (LA21_0==39) ) {
            alt21=2;
        }
        else {
            NoViableAltException nvae =
                new NoViableAltException("", 21, 0, input);

            throw nvae;
        }
        switch (alt21) {
            case 1 :
                // InternalBug332217TestLanguage.g:1587:3: (enumLiteral_0= 'Plain' )
                {
                // InternalBug332217TestLanguage.g:1587:3: (enumLiteral_0= 'Plain' )
                // InternalBug332217TestLanguage.g:1588:4: enumLiteral_0= 'Plain'
                {
                enumLiteral_0=(Token)match(input,38,FollowSets000.FOLLOW_2); 

                				current = grammarAccess.getTableViewStyleAccess().getPlainEnumLiteralDeclaration_0().getEnumLiteral().getInstance();
                				newLeafNode(enumLiteral_0, grammarAccess.getTableViewStyleAccess().getPlainEnumLiteralDeclaration_0());
                			

                }


                }
                break;
            case 2 :
                // InternalBug332217TestLanguage.g:1595:3: (enumLiteral_1= 'Grouped' )
                {
                // InternalBug332217TestLanguage.g:1595:3: (enumLiteral_1= 'Grouped' )
                // InternalBug332217TestLanguage.g:1596:4: enumLiteral_1= 'Grouped'
                {
                enumLiteral_1=(Token)match(input,39,FollowSets000.FOLLOW_2); 

                				current = grammarAccess.getTableViewStyleAccess().getGroupedEnumLiteralDeclaration_1().getEnumLiteral().getInstance();
                				newLeafNode(enumLiteral_1, grammarAccess.getTableViewStyleAccess().getGroupedEnumLiteralDeclaration_1());
                			

                }


                }
                break;

        }


        }


        	leaveRule();

    }

        catch (RecognitionException re) {
            recover(input,re);
            appendSkippedTokens();
        }
    finally {
    }
    return current;
}
 
Example #29
Source File: InternalBug287941TestLanguageParser.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
public final Enumerator ruleBooleanOperator() throws RecognitionException {
    Enumerator current = null;

    Token enumLiteral_0=null;
    Token enumLiteral_1=null;


    	enterRule();

    try {
        // InternalBug287941TestLanguage.g:1832:2: ( ( (enumLiteral_0= '=' ) | (enumLiteral_1= '!=' ) ) )
        // InternalBug287941TestLanguage.g:1833:2: ( (enumLiteral_0= '=' ) | (enumLiteral_1= '!=' ) )
        {
        // InternalBug287941TestLanguage.g:1833:2: ( (enumLiteral_0= '=' ) | (enumLiteral_1= '!=' ) )
        int alt24=2;
        int LA24_0 = input.LA(1);

        if ( (LA24_0==32) ) {
            alt24=1;
        }
        else if ( (LA24_0==37) ) {
            alt24=2;
        }
        else {
            NoViableAltException nvae =
                new NoViableAltException("", 24, 0, input);

            throw nvae;
        }
        switch (alt24) {
            case 1 :
                // InternalBug287941TestLanguage.g:1834:3: (enumLiteral_0= '=' )
                {
                // InternalBug287941TestLanguage.g:1834:3: (enumLiteral_0= '=' )
                // InternalBug287941TestLanguage.g:1835:4: enumLiteral_0= '='
                {
                enumLiteral_0=(Token)match(input,32,FollowSets000.FOLLOW_2); 

                				current = grammarAccess.getBooleanOperatorAccess().getEqualEnumLiteralDeclaration_0().getEnumLiteral().getInstance();
                				newLeafNode(enumLiteral_0, grammarAccess.getBooleanOperatorAccess().getEqualEnumLiteralDeclaration_0());
                			

                }


                }
                break;
            case 2 :
                // InternalBug287941TestLanguage.g:1842:3: (enumLiteral_1= '!=' )
                {
                // InternalBug287941TestLanguage.g:1842:3: (enumLiteral_1= '!=' )
                // InternalBug287941TestLanguage.g:1843:4: enumLiteral_1= '!='
                {
                enumLiteral_1=(Token)match(input,37,FollowSets000.FOLLOW_2); 

                				current = grammarAccess.getBooleanOperatorAccess().getNotEqualEnumLiteralDeclaration_1().getEnumLiteral().getInstance();
                				newLeafNode(enumLiteral_1, grammarAccess.getBooleanOperatorAccess().getNotEqualEnumLiteralDeclaration_1());
                			

                }


                }
                break;

        }


        }


        	leaveRule();

    }

        catch (RecognitionException re) {
            recover(input,re);
            appendSkippedTokens();
        }
    finally {
    }
    return current;
}
 
Example #30
Source File: InternalEnumAndReferenceTestLanguageParser.java    From xtext-extras with Eclipse Public License 2.0 4 votes vote down vote up
public final Enumerator ruleKindOfKeyword() throws RecognitionException {
    Enumerator current = null;

    Token enumLiteral_0=null;
    Token enumLiteral_1=null;


    	enterRule();

    try {
        // InternalEnumAndReferenceTestLanguage.g:144:2: ( ( (enumLiteral_0= 'kindOfKeyword' ) | (enumLiteral_1= 'anotherEnumLiteral' ) ) )
        // InternalEnumAndReferenceTestLanguage.g:145:2: ( (enumLiteral_0= 'kindOfKeyword' ) | (enumLiteral_1= 'anotherEnumLiteral' ) )
        {
        // InternalEnumAndReferenceTestLanguage.g:145:2: ( (enumLiteral_0= 'kindOfKeyword' ) | (enumLiteral_1= 'anotherEnumLiteral' ) )
        int alt1=2;
        int LA1_0 = input.LA(1);

        if ( (LA1_0==12) ) {
            alt1=1;
        }
        else if ( (LA1_0==13) ) {
            alt1=2;
        }
        else {
            NoViableAltException nvae =
                new NoViableAltException("", 1, 0, input);

            throw nvae;
        }
        switch (alt1) {
            case 1 :
                // InternalEnumAndReferenceTestLanguage.g:146:3: (enumLiteral_0= 'kindOfKeyword' )
                {
                // InternalEnumAndReferenceTestLanguage.g:146:3: (enumLiteral_0= 'kindOfKeyword' )
                // InternalEnumAndReferenceTestLanguage.g:147:4: enumLiteral_0= 'kindOfKeyword'
                {
                enumLiteral_0=(Token)match(input,12,FollowSets000.FOLLOW_2); 

                				current = grammarAccess.getKindOfKeywordAccess().getKindOfKeywordEnumLiteralDeclaration_0().getEnumLiteral().getInstance();
                				newLeafNode(enumLiteral_0, grammarAccess.getKindOfKeywordAccess().getKindOfKeywordEnumLiteralDeclaration_0());
                			

                }


                }
                break;
            case 2 :
                // InternalEnumAndReferenceTestLanguage.g:154:3: (enumLiteral_1= 'anotherEnumLiteral' )
                {
                // InternalEnumAndReferenceTestLanguage.g:154:3: (enumLiteral_1= 'anotherEnumLiteral' )
                // InternalEnumAndReferenceTestLanguage.g:155:4: enumLiteral_1= 'anotherEnumLiteral'
                {
                enumLiteral_1=(Token)match(input,13,FollowSets000.FOLLOW_2); 

                				current = grammarAccess.getKindOfKeywordAccess().getAnotherEnumLiteralEnumLiteralDeclaration_1().getEnumLiteral().getInstance();
                				newLeafNode(enumLiteral_1, grammarAccess.getKindOfKeywordAccess().getAnotherEnumLiteralEnumLiteralDeclaration_1());
                			

                }


                }
                break;

        }


        }


        	leaveRule();

    }

        catch (RecognitionException re) {
            recover(input,re);
            appendSkippedTokens();
        }
    finally {
    }
    return current;
}