Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334380 - Inter-module reference not resolved
Summary: Inter-module reference not resolved
Status: CLOSED FIXED
Alias: None
Product: Acceleo
Classification: Modeling
Component: Core (show other bugs)
Version: 3.0.0   Edit
Hardware: PC Linux
: P3 normal
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-14 09:46 EST by Goulwen Le Fur CLA
Modified: 2011-02-07 09:18 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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