org.eclipse.xtext.xtext.ParameterConfigHelper Java Examples
The following examples show how to use
org.eclipse.xtext.xtext.ParameterConfigHelper.
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: ParserBasedContentAssistContextFactory.java From xtext-eclipse with Eclipse Public License 2.0 | 6 votes |
@Override public Boolean caseRuleCall(RuleCall object) { if (!visitedRuleCalls.add(object)) return isOptional(object); acceptor.accept(object); Set<Parameter> oldConfig = currentConfig; try { if (!object.getArguments().isEmpty()) { currentConfig = ParameterConfigHelper.getAssignedArguments(object, getParameterValues(object)); } else { currentConfig = Collections.emptySet(); } Boolean result = doSwitch(object.getRule()) || isOptional(object); visitedRuleCalls.remove(object); return result; } finally { currentConfig = oldConfig; } }
Example #2
Source File: FollowElementCalculator.java From xtext-core with Eclipse Public License 2.0 | 6 votes |
@Override public Boolean caseRuleCall(RuleCall object) { if (!visitedRuleCalls.add(object)) return isOptional(object); acceptor.accept(object); Set<Parameter> oldConfig = currentConfig; try { if (!object.getArguments().isEmpty()) { currentConfig = ParameterConfigHelper.getAssignedArguments(object, getParameterValues(object)); } else { currentConfig = Collections.emptySet(); } Boolean result = doSwitch(object.getRule()) || isOptional(object); visitedRuleCalls.remove(object); return result; } finally { currentConfig = oldConfig; } }
Example #3
Source File: CustomN4JSParser.java From n4js with Eclipse Public License 1.0 | 5 votes |
private int getParamConfig(ICompositeNode node) { List<RuleCall> callStack = new ArrayList<>(); recreateCallStack(node, callStack); Set<Parameter> params = getParamConfig(callStack); int result = ParameterConfigHelper.getParameterConfig(params); return result; }
Example #4
Source File: ParserBasedContentAssistContextFactory.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
private Set<Parameter> getParameterValues(AbstractElement object) { Set<Parameter> parameterValues = Collections.emptySet(); if (currentConfig != null) { parameterValues = currentConfig; } else { parameterValues = ParameterConfigHelper.getAssignedParameters(object, parameterConfig); } return parameterValues; }
Example #5
Source File: FollowElementCalculator.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
private Set<Parameter> getParameterValues(AbstractElement object) { Set<Parameter> parameterValues = Collections.emptySet(); if (currentConfig != null) { parameterValues = currentConfig; } else { parameterValues = ParameterConfigHelper.getAssignedParameters(object, parameterConfig); } return parameterValues; }