[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[henshin-user] Difference between getModule(URI) and getModule(String)?
|
Hello everyone,
I want to change my code for loadin Henshin modules from a concrete full
path to Eclipse mechanisms for getting them out of the plugin content.
Old:
Rule rule=(Rule)
resourceSet.getModule("myfile.henshin",false).getUnit(rule);
According to the Eclipse FAQ, I want to use:
Bundle bundle = Platform.getBundle("my.plugin");
Path path = new Path("myfile.henshin");
URL fileURL = FileLocator.find(bundle, path, null);
(Rule) rule=
resourceSet.getModule(org.eclipse.emf.common.util.URI.createURI(fileURL.toString()),
false).getUnit(rule);
This works fine as long as I don't use Henshin modules with imports (for
example UML profiles).
If I want to do so, I have to set the fixImports flag of getModule to true.
As "fixImports" sounds like that there is a problem Henshin tries to
fix, I want to know what would be the right way.
Do I miss something to provide a reference to the profile that is
imported by the Henshin module when loading via Bundle?
Thanks in advance,
Jens