Java 类org.eclipse.xtext.Assignment 实例源码

项目:n4js    文件:TokenTypeRewriter.java   
private static void rewriteIdentifiers(N4JSGrammarAccess ga,
        ImmutableMap.Builder<AbstractElement, Integer> builder) {
    ImmutableSet<AbstractRule> identifierRules = ImmutableSet.of(
            ga.getBindingIdentifierRule(),
            ga.getIdentifierNameRule(),
            ga.getIDENTIFIERRule());
    for (ParserRule rule : GrammarUtil.allParserRules(ga.getGrammar())) {
        for (EObject obj : EcoreUtil2.eAllContents(rule.getAlternatives())) {
            if (obj instanceof Assignment) {
                Assignment assignment = (Assignment) obj;
                AbstractElement terminal = assignment.getTerminal();
                int type = InternalN4JSParser.RULE_IDENTIFIER;
                if (terminal instanceof CrossReference) {
                    terminal = ((CrossReference) terminal).getTerminal();
                    type = IDENTIFIER_REF_TOKEN;
                }
                if (terminal instanceof RuleCall) {
                    AbstractRule calledRule = ((RuleCall) terminal).getRule();
                    if (identifierRules.contains(calledRule)) {
                        builder.put(assignment, type);
                    }
                }
            }
        }
    }
}
项目:n4js    文件:AbstractN4JSProposalProvider.java   
public void completeNamespaceImportSpecifier_DeclaredDynamic(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    // subclasses may override
}
项目:n4js    文件:AbstractN4JSProposalProvider.java   
public void completeAnnotatedExportableElement_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:n4js    文件:AbstractN4JSProposalProvider.java   
public void completeDoStatement_Expression(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:Xtext_Xtend_HTML_Generator    文件:AbstractMyDslProposalProvider.java   
public void completeLink_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:n4js    文件:AbstractN4MFProposalProvider.java   
public void completeProjectDescription_LibraryPaths(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:n4js    文件:AbstractN4MFProposalProvider.java   
public void completeSourceFragment_SourceFragmentType(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:OCCI-Studio    文件:AbstractOCCIProposalProvider.java   
public void completeTransition_Target(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
}
项目:n4js    文件:AbstractN4JSProposalProvider.java   
public void completeAnnotatedExportableElement_VarDeclsOrBindings(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:n4js    文件:AbstractTypesProposalProvider.java   
public void completeVirtualBaseType_DeclaredElementType(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:OCCI-Studio    文件:AbstractOCCIProposalProvider.java   
public void completeKind_Constraints(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:n4js    文件:AbstractN4JSProposalProvider.java   
public void completeExportedVariableStatement_VarStmtKeyword(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:n4js    文件:AbstractTypeExpressionsProposalProvider.java   
public void completeFunctionTypeExpressionOLD_OwnedTypeVars(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:n4js    文件:AbstractN4JSProposalProvider.java   
public void completeBindingElementImpl_NestedPattern(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:gw4e.project    文件:AbstractDSLPoliciesProposalProvider.java   
public void completePercentageCondition_Percentage(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:n4js    文件:AbstractTypesProposalProvider.java   
public void completePrimitiveType_AutoboxedType(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
}
项目:n4js    文件:AbstractTypeExpressionsProposalProvider.java   
public void completeDefaultFormalParameter_AstInitializer(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:OCCI-Studio    文件:AbstractOCCIProposalProvider.java   
public void completeStringType_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:n4js    文件:AbstractN4JSProposalProvider.java   
public void completeScript_ScriptElements(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:n4js    文件:AbstractN4JSProposalProvider.java   
public void completeAsyncFunctionExpression_DeclaredAsync(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    // subclasses may override
}
项目:n4js    文件:AbstractTypeExpressionsProposalProvider.java   
public void completeIntersectionTypeExpressionOLD_TypeRefs(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:n4js    文件:AbstractN4JSProposalProvider.java   
public void completeJSXExpression_Expression(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:lcdsl    文件:AbstractLcDslProposalProvider.java   
public void completeProgramArgument_Arguments(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:n4js    文件:AbstractN4JSProposalProvider.java   
public void completeAnnotationNoAtSign_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:OCCI-Studio    文件:AbstractOCCIProposalProvider.java   
public void completeEObjectType_InstanceClassName(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:n4js    文件:AbstractN4JSProposalProvider.java   
public void completeCatchBlock_CatchVariable(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:lcdsl    文件:AbstractLcDslProposalProvider.java   
public void completeWorkingDir_WorkingDir(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:n4js    文件:AbstractRegularExpressionProposalProvider.java   
public void completeExactQuantifier_NonGreedy(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    // subclasses may override
}
项目:n4js    文件:AbstractRegularExpressionProposalProvider.java   
public void completeRegularExpressionBody_Pattern(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:n4js    文件:AbstractN4JSProposalProvider.java   
public void completeBindingProperty_DeclaredName(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:OCCI-Studio    文件:AbstractOCCIProposalProvider.java   
public void completeResource_Kind(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    lookupCrossReference(((CrossReference)assignment.getTerminal()), context, acceptor);
}
项目:n4js    文件:AbstractTypesProposalProvider.java   
public void completeTObjectPrototype_DeclaredElementType(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:n4js    文件:AbstractTypesProposalProvider.java   
public void completeTFunction_DeclaredProvidedByRuntime(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    // subclasses may override
}
项目:OCCI-Studio    文件:AbstractOCCIProposalProvider.java   
public void completeExtension_Mixins(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:lcdsl    文件:AbstractLcDslProposalProvider.java   
public void completeFavorites_Types(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:n4js    文件:AbstractN4JSProposalProvider.java   
public void completeNamedImportSpecifier_Alias(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:n4js    文件:AbstractTypeExpressionsProposalProvider.java   
public void completeTFormalParameter_Variadic(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    // subclasses may override
}
项目:n4js    文件:AbstractN4JSProposalProvider.java   
public void completeArrayElement_Expression(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:n4js    文件:AbstractN4JSProposalProvider.java   
public void completeN4ClassDeclaration_DeclaredModifiers(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
项目:n4js    文件:AbstractN4JSProposalProvider.java   
public void completeClassExtendsClause_SuperClassRef(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
    completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}