Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 334380

Summary: Inter-module reference not resolved
Product: [Modeling] Acceleo Reporter: Goulwen Le Fur <goulwen.lefur>
Component: CoreAssignee: Project Inbox <acceleo-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: laurent.goubet
Version: 3.0.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Goulwen Le Fur CLA 2011-01-14 09:46:25 EST
A missing call to the Acceleo bundle resolver prevent to use multi-module acceleo generator.

Code to append : 

	public void initialize(EObject element, File folder, List<? extends Object> arguments) throws IOException {
		ResourceSet resourceSet = element.eResource().getResourceSet();
		resourceSet.setURIConverter(new ExtensibleURIConverterImpl() {
			public URI normalize(URI uri) {
				BundleURLConverter conv = new BundleURLConverter(uri.toString());
				if (conv.resolveBundle() != null) { 
					return URI.createURI(conv.resolveAsPlatformPlugin());
				}
				return super.normalize(uri);
			}
		});

		registerResourceFactories(resourceSet);
		registerPackages(resourceSet);

		addListeners();
		addProperties();

		String moduleName = getModuleName();
		if (moduleName.endsWith('.' + IAcceleoConstants.MTL_FILE_EXTENSION)) {
			moduleName = moduleName.substring(0, moduleName.lastIndexOf('.'));
		}
		if (!moduleName.endsWith('.' + IAcceleoConstants.EMTL_FILE_EXTENSION)) {
			moduleName += '.' + IAcceleoConstants.EMTL_FILE_EXTENSION;
		}

		URL moduleURL = findModuleURL(moduleName);

		if (moduleURL == null) {
			throw new IOException("'" + getModuleName() + ".emtl' not found"); //$NON-NLS-1$ //$NON-NLS-2$
		}
		URI moduleURI = createTemplateURI(moduleURL.toString());
		module = (Module)ModelUtils.load(moduleURI, resourceSet);
		model = element;
		targetFolder = folder;
		generationArguments = arguments;
	}
Comment 1 Laurent Goubet CLA 2011-01-19 04:09:50 EST
This has been fixed on HEAD and 3.0 maintenance. Could you verify that this actually fixes your use case without side effects?
Comment 2 Laurent Goubet CLA 2011-02-07 09:18:11 EST
Verified with EEF 0.9