@Override public String toString() { StringBuilder buf = new StringBuilder(); if (fContext != null) { buf.append(fContextType).append("::"); // $NON-NLS-1$ } buf.append(fOperation.getName()).append(" - ").append(fOwningModule.getName()); // $NON-NLS-1$ return buf.toString(); }
public QvtOperationalModuleEnv defineLibrary( Library lib, Map<String, List<EOperation>> definedOperations) throws LibraryCreationException { org.eclipse.m2m.internal.qvt.oml.expressions.Library libModule = QvtOperationalStdLibrary.createLibrary(lib.getId()); // FIXME - set isBlackBox=TRUE, as soon is it gets into the AST metamodel QvtOperationalModuleEnv libEnv = initLibEnvironment(lib, libModule); URI libUri = URI.createHierarchicalURI( BlackboxUnitDescriptor.URI_QVTO_SCHEME, BlackboxUnitDescriptor.URI_BLACKBOX_AUTHORITY, null, new String[] {lib.getId()}, null, null); libModule.eResource().setURI(libUri); org.eclipse.m2m.internal.qvt.oml.expressions.Library opModule = QvtOperationalStdLibrary.createLibrary(lib.getId()); QvtOperationalModuleEnv opEnv = initLibEnvironment(lib, opModule); for (LibraryOperation libOp : lib.getLibraryOperations()) { Helper helper = defineOperation(opModule, opEnv, libOp); libEnv.defineImperativeOperation(helper, false, true); List<EOperation> listOp = definedOperations.get(helper.getName()); if (listOp == null) { listOp = new LinkedList<EOperation>(); definedOperations.put(helper.getName(), listOp); } listOp.add(helper); } // FIXME - workaround to make Environment available with the module ASTBindingHelper.createCST2ASTBinding( CSTFactory.eINSTANCE.createLibraryCS(), libEnv.getModuleContextType(), libEnv); return libEnv; }