-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Donatas Čiukšys edited this page Jan 21, 2018
·
8 revisions
- In Eclipse: File -> New -> Project...
- Select Eclipse Modeling Framework -> EMF Project
- Specify project name
- In window "Select a Model Importer" choose "XML Schema"
class Main {
def static void main(String[] args) {
val f = new Bpmn2ResourceFactoryImpl
//val f = new Bpmn2XMIResourceFactoryImpl
val p = Bpmn2Package.eINSTANCE
Resource.Factory.Registry.INSTANCE.extensionToFactoryMap.put(“bpmn”, f)
val rs = new ResourceSetImpl
val r = rs.getResource(URI.createURI(“SampleProcess.bpmn”),true)
r.load(null)
println(”’
«FOR c : r.contents»
«IF c instanceof DocumentRoot»
«IF c.definitions != null»
«c.definitions.rootElements»
«ENDIF»
«ENDIF»
«ENDFOR»
”’)
}
}