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
You can see what changes I needed to do in order to support my custom 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 files
I 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»
The Sourceforge package at https://sourceforge.net/project/showfiles.php?group_id=88344&package_id=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
<postprocessor class="org.openarchitectureware.xpand2.output.XMLBeautifier"/> may not work either (cannot find class).
In any case, I wrote my own XML Beautifier (
XMLBeautifier) based on the Java XML interface.