public void infer(final EObject machine, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) { if (machine instanceof MachineDecl) { _infer((MachineDecl)machine, acceptor, isPreIndexingPhase); return; } else if (machine instanceof NameSpace) { _infer((NameSpace)machine, acceptor, isPreIndexingPhase); return; } else if (machine instanceof UseDecl) { _infer((UseDecl)machine, acceptor, isPreIndexingPhase); return; } else if (machine != null) { _infer(machine, acceptor, isPreIndexingPhase); return; } else { throw new IllegalArgumentException("Unhandled parameter types: " + Arrays.<Object>asList(machine, acceptor, isPreIndexingPhase).toString()); } }
public void infer(final EObject element, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) { if (element instanceof Model) { _infer((Model)element, acceptor, isPreIndexingPhase); return; } else if (element != null) { _infer(element, acceptor, isPreIndexingPhase); return; } else { throw new IllegalArgumentException("Unhandled parameter types: " + Arrays.<Object>asList(element, acceptor, isPreIndexingPhase).toString()); } }
protected void _infer(final Model m, final IJvmDeclaredTypeAcceptor acceptor, final boolean prelinkingPhase) { final XBlockExpression e = m.getBlock(); final Procedure1<JvmGenericType> _function = (JvmGenericType it) -> { EList<JvmMember> _members = it.getMembers(); final Procedure1<JvmOperation> _function_1 = (JvmOperation it_1) -> { EList<JvmTypeReference> _exceptions = it_1.getExceptions(); JvmTypeReference _typeRef = this._typeReferenceBuilder.typeRef(Throwable.class); this._jvmTypesBuilder.<JvmTypeReference>operator_add(_exceptions, _typeRef); this._jvmTypesBuilder.setBody(it_1, e); }; JvmOperation _method = this._jvmTypesBuilder.toMethod(e, "myMethod", this._jvmTypesBuilder.inferredType(), _function_1); this._jvmTypesBuilder.<JvmOperation>operator_add(_members, _method); }; acceptor.<JvmGenericType>accept(this._jvmTypesBuilder.toClass(e, this.name(e.eResource())), _function); }
public void infer(final EObject m, final IJvmDeclaredTypeAcceptor acceptor, final boolean prelinkingPhase) { if (m instanceof Model) { _infer((Model)m, acceptor, prelinkingPhase); return; } else if (m != null) { _infer(m, acceptor, prelinkingPhase); return; } else { throw new IllegalArgumentException("Unhandled parameter types: " + Arrays.<Object>asList(m, acceptor, prelinkingPhase).toString()); } }
@Override public void infer(final EObject e, final IJvmDeclaredTypeAcceptor acceptor, final boolean prelinkingPhase) { final Procedure1<JvmGenericType> _function = (JvmGenericType it) -> { EList<JvmMember> _members = it.getMembers(); final Procedure1<JvmOperation> _function_1 = (JvmOperation it_1) -> { EList<JvmFormalParameter> _parameters = it_1.getParameters(); JvmFormalParameter _parameter = this._jvmTypesBuilder.toParameter(e, "s", this.references.getTypeForName(String.class, e)); this._jvmTypesBuilder.<JvmFormalParameter>operator_add(_parameters, _parameter); this._jvmTypesBuilder.setBody(it_1, ((XExpression) e)); }; JvmOperation _method = this._jvmTypesBuilder.toMethod(e, "doStuff", this.references.getTypeForName(String.class, e), _function_1); this._jvmTypesBuilder.<JvmOperation>operator_add(_members, _method); }; acceptor.<JvmGenericType>accept(this._jvmTypesBuilder.toClass(((XExpression) e), "Test"), _function); }
protected void _infer(final Bug462047Element element, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) { String _name = element.getName(); String _plus = ("CORE." + _name); final Procedure1<JvmGenericType> _function = (JvmGenericType it) -> { StringConcatenation _builder = new StringConcatenation(); JvmGenericType _ref = element.getRef(); String _qualifiedName = null; if (_ref!=null) { _qualifiedName=_ref.getQualifiedName(); } _builder.append(_qualifiedName); this._jvmTypesBuilder.setDocumentation(it, _builder.toString()); }; acceptor.<JvmGenericType>accept(this._jvmTypesBuilder.toClass(element, _plus), _function); }
public void infer(final EObject element, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) { if (element instanceof Bug462047Element) { _infer((Bug462047Element)element, acceptor, isPreIndexingPhase); return; } else if (element != null) { _infer(element, acceptor, isPreIndexingPhase); return; } else { throw new IllegalArgumentException("Unhandled parameter types: " + Arrays.<Object>asList(element, acceptor, isPreIndexingPhase).toString()); } }
public void infer(final EObject element, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) { if (element instanceof ContentAssistFragmentTestLanguageRoot) { _infer((ContentAssistFragmentTestLanguageRoot)element, acceptor, isPreIndexingPhase); return; } else if (element != null) { _infer(element, acceptor, isPreIndexingPhase); return; } else { throw new IllegalArgumentException("Unhandled parameter types: " + Arrays.<Object>asList(element, acceptor, isPreIndexingPhase).toString()); } }
public void infer(final EObject element, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) { if (element instanceof Root) { _infer((Root)element, acceptor, isPreIndexingPhase); return; } else if (element != null) { _infer(element, acceptor, isPreIndexingPhase); return; } else { throw new IllegalArgumentException("Unhandled parameter types: " + Arrays.<Object>asList(element, acceptor, isPreIndexingPhase).toString()); } }
public void infer(final EObject file, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) { if (file instanceof BuildFile) { _infer((BuildFile)file, acceptor, isPreIndexingPhase); return; } else if (file != null) { _infer(file, acceptor, isPreIndexingPhase); return; } else { throw new IllegalArgumentException("Unhandled parameter types: " + Arrays.<Object>asList(file, acceptor, isPreIndexingPhase).toString()); } }
public void infer(final EObject model, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) { if (model instanceof ExpressionsModel) { _infer((ExpressionsModel)model, acceptor, isPreIndexingPhase); return; } else if (model != null) { _infer(model, acceptor, isPreIndexingPhase); return; } else { throw new IllegalArgumentException("Unhandled parameter types: " + Arrays.<Object>asList(model, acceptor, isPreIndexingPhase).toString()); } }
public void infer(final EObject entity, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) { if (entity instanceof Entity) { _infer((Entity)entity, acceptor, isPreIndexingPhase); return; } else if (entity != null) { _infer(entity, acceptor, isPreIndexingPhase); return; } else { throw new IllegalArgumentException("Unhandled parameter types: " + Arrays.<Object>asList(entity, acceptor, isPreIndexingPhase).toString()); } }
protected void _infer(final NameSpace namespace, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) { String _name = namespace.getName(); this.namespaceStr.append(_name); super.infer(namespace, acceptor, isPreIndexingPhase); }
protected void _infer(final UseDecl use, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) { super.infer(use, acceptor, isPreIndexingPhase); }
/** * The dispatch method {@code infer} is called for each instance of the * given element's type that is contained in a resource. * * @param element * the model to create one or more * {@link org.eclipse.xtext.common.types.JvmDeclaredType declared * types} from. * @param acceptor * each created * {@link org.eclipse.xtext.common.types.JvmDeclaredType type} * without a container should be passed to the acceptor in order * get attached to the current resource. The acceptor's * {@link IJvmDeclaredTypeAcceptor#accept(org.eclipse.xtext.common.types.JvmDeclaredType) * accept(..)} method takes the constructed empty type for the * pre-indexing phase. This one is further initialized in the * indexing phase using the closure you pass to the returned * {@link org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor.IPostIndexingInitializing#initializeLater(org.eclipse.xtext.xbase.lib.Procedures.Procedure1) * initializeLater(..)}. * @param isPreIndexingPhase * whether the method is called in a pre-indexing phase, i.e. * when the global index is not yet fully updated. You must not * rely on linking using the index if isPreIndexingPhase is * <code>true</code>. */ protected void _infer(final ContentAssistFragmentTestLanguageRoot element, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) { final Procedure1<JvmGenericType> _function = (JvmGenericType it) -> { EList<JvmMember> _members = it.getMembers(); final Procedure1<JvmOperation> _function_1 = (JvmOperation it_1) -> { this._jvmTypesBuilder.setBody(it_1, element.getExpression()); }; JvmOperation _method = this._jvmTypesBuilder.toMethod(element, "hello", this._typeReferenceBuilder.typeRef(Void.class), _function_1); this._jvmTypesBuilder.<JvmOperation>operator_add(_members, _method); }; acceptor.<JvmGenericType>accept(this._jvmTypesBuilder.toClass(element, "my.test.MyClass"), _function); }
/** * The dispatch method {@code infer} is called for each instance of the * given element's type that is contained in a resource. * * @param element * the model to create one or more * {@link org.eclipse.xtext.common.types.JvmDeclaredType declared * types} from. * @param acceptor * each created * {@link org.eclipse.xtext.common.types.JvmDeclaredType type} * without a container should be passed to the acceptor in order * get attached to the current resource. The acceptor's * {@link IJvmDeclaredTypeAcceptor#accept(org.eclipse.xtext.common.types.JvmDeclaredType) * accept(..)} method takes the constructed empty type for the * pre-indexing phase. This one is further initialized in the * indexing phase using the lambda you pass as the last argument. * @param isPreIndexingPhase * whether the method is called in a pre-indexing phase, i.e. * when the global index is not yet fully updated. You must not * rely on linking using the index if isPreIndexingPhase is * <code>true</code>. */ protected void _infer(final Model element, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) { }
/** * The dispatch method {@code infer} is called for each instance of the * given element's type that is contained in a resource. * * @param element * the model to create one or more * {@link org.eclipse.xtext.common.types.JvmDeclaredType declared * types} from. * @param acceptor * each created * {@link org.eclipse.xtext.common.types.JvmDeclaredType type} * without a container should be passed to the acceptor in order * get attached to the current resource. The acceptor's * {@link IJvmDeclaredTypeAcceptor#accept(org.eclipse.xtext.common.types.JvmDeclaredType) * accept(..)} method takes the constructed empty type for the * pre-indexing phase. This one is further initialized in the * indexing phase using the closure you pass to the returned * {@link org.eclipse.xtext.xbase.jvmmodel.IJvmDeclaredTypeAcceptor.IPostIndexingInitializing#initializeLater(org.eclipse.xtext.xbase.lib.Procedures.Procedure1) * initializeLater(..)}. * @param isPreIndexingPhase * whether the method is called in a pre-indexing phase, i.e. * when the global index is not yet fully updated. You must not * rely on linking using the index if isPreIndexingPhase is * <code>true</code>. */ protected void _infer(final Root element, final IJvmDeclaredTypeAcceptor acceptor, final boolean isPreIndexingPhase) { }