private void markCapacityFunctions(PyAppendable it) { final Map<JvmOperation, String> mapping = this.useCapacityMapping; this.useCapacityMapping = new HashMap<>(); final ImportManager imports = it.getImportManager(); for (final Entry<JvmOperation, String> entry : mapping.entrySet()) { final JvmOperation operation = entry.getKey(); final JvmDeclaredType type = operation.getDeclaringType(); imports.addImportFor(type); it.declareVariable(operation, entry.getValue()); } }
private static String getSignatureType(JvmType type, ImportManager importManager) { if (importManager != null) { importManager.addImportFor(type); return type.getSimpleName(); } return type.getIdentifier(); }
/** Generate a constructor call. * * @param expr the call expression. */ public void generate(XConstructorCall expr) { final List<Object> leftOperand = new ArrayList<>(); final List<Object> receiver = new ArrayList<>(); final JvmConstructor feature = expr.getConstructor(); final List<XExpression> args = getActualArguments(expr); final JvmType type = expr.getConstructor().getDeclaringType(); this.codeReceiver.getImportManager().addImportFor(type); internalAppendCall(feature, leftOperand, receiver, type.getSimpleName(), args, null); }
if (importSection != null) { for (XImportDeclaration decl : importSection.getImportDeclarations()) { concreteImports.addImportFor(decl.getImportedType()); if (concreteImports.addImportFor(type) && type instanceof JvmDeclaredType) { XImportDeclaration declaration = XtypeFactory.eINSTANCE.createXImportDeclaration(); declaration.setImportedType((JvmDeclaredType) type);
if (_notEquals) { final ImportManager importManager = this.getImportManager(appendable); importManager.addImportFor(jvmType);
try { typeReference = findType(context, typeName); getImportManager().addImportFor(typeReference.getType()); return (JvmParameterizedTypeReference) typeReference; } catch (TypeNotPresentException exception) {