Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-user] Difference between getModule(URI) and getModule(String)?

Hi Jens,

In principle it should also work without fixImports=true. Do you use generated model classes? In this case, there could be a mismatch between the package references used in the Henshin file and your generated model classes. The fixImports flag is there actually for these cases.

Cheers,
Christian 

2015-10-28 18:37 GMT+01:00 Jens Bürger <buerger@xxxxxxxxxxxxxx>:
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
_______________________________________________
henshin-user mailing list
henshin-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/henshin-user


Back to the top