All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.joinedworkz.common.DiagramCartridge.xtend Maven / Gradle / Ivy

There is a newer version: 1.3.46
Show newest version
package org.joinedworkz.common

import org.joinedworkz.common.generator.CmnDiagramGenerator
import org.joinedworkz.common.helper.CmnModelHelper
import org.joinedworkz.core.facility.AbstractCartridge
import org.joinedworkz.core.facility.Outlet
import org.joinedworkz.core.facility.Outlets
import org.joinedworkz.core.model.CmnModel
import org.joinedworkz.core.model.CmnObject

class DiagramCartridge extends AbstractCartridge {
	
	protected extension CmnModelHelper cmnModelHelper = new CmnModelHelper
	
	override void apply(CmnObject obj, Outlets osa) {
		val diagramOutlet = osa.get("generatedDiagram")
		
		if (obj instanceof CmnModel) {
			obj.generateDiagram(diagramOutlet)
		}
	}

	def void generateDiagram(CmnModel model, Outlet diagramOutlet) {
		new CmnDiagramGenerator(model,diagramOutlet).generateDiagram();
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy