The easiest way to play around with OAW is to:
- Install the plugin from an update site (http://www.openarchitectureware.org/updatesite/milestone/site.xml)
- Create a new OAW project and use it to generate the sample code
- Modify this project to handle your new metamodel
- Registering packages and sub packages in OAW
- Throwing exceptions in OAW
- Controlling logging in OAW
- Accessing the AST of a OAW checks file
- Improving the performance of OAW
- Ambiguous templates in OAW
- Resolving Proxy EMF Elements
- Checks Pygments Style
- Xtend Pygments Style
- Integrating OAW checks into the GMF Validation Framework
- Using iacleaner to clean up web application generated code in OAW
Referencing ecore packages in .xpt filesI was trying, unsuccessfully, to reference to my org.name.blah/test.ecore file from a templates/test.xpt file, by trying something like this:
«DEFINE Root FOR org::name::blah::test::ObjectRoot»
The solution is actually to copy your test.ecore file into your src folder. A horrible solution but the only one I know so far. That way you can do this:
«DEFINE Root FOR test::ObjectRoot»
Additional documentationThe Sourceforge package at https://sourceforge.net/project/showfiles.php?groupid=88344&packageid=133207 contains:
Class not found: 'org.eclipse.mwe.emf.Reader'
WARNING: Cannot resolve keyword class org.eclipse.mwe.emf.Reader WARNING: Cannot resolve keyword class org.eclipse.mwe.emf.Writer SEVERE: Class not found: 'org.eclipse.mwe.emf.StandaloneSetup' SEVERE: Class not found: 'org.eclipse.mwe.emf.Reader' SEVERE: Class not found: 'org.eclipse.m2t.type.emf.EmfRegistryMetaModel'
Try adding the org.openarchitectureware.emftools dependency to your plug-in.
"Couldn't find operation '+(String)' for type 'ecore::EString'"This intermittent error seems to strike randomly, I haven't been able to work out when it occurs or how to fix it. It might be something due to project build orders, plugin dependencies, workflow configuration, simply restarting Eclipse, or rebuilding all of your plugins. (reference)
Or, you can use something like this in your extensions file:
String safeNameString(String s) : s; String safeNameString(ecore::EString s) : s;
oaw.xpand2.output.XmlBeautifier has no effect
According to the OAW documentation, this beautifier no longer exists. However, I've also found that
In any case, I wrote my own XML Beautifier (XMLBeautifier) based on the Java XML interface.