# This file is part of the Coral project.
# Please read the copyright notice in the LICENSE file.
#UI_FILES:=coral/lgen/pegen/unittests/
PEGEN:=../../lgen/pegen/pegen.py
FIELDHANDLER:=../../lgen/pegen/fieldhandler.py
ESMD_FILE:=CQUERY10_PE.xml
PYTHON=python

all: propertyeditors.py


propertyeditors.py: $(PEGEN) $(ESMD_FILE) $(FIELDHANDLER) extendededitors.py queryelementeditor.ui
	$(PYTHON) $(PEGEN) -u ./ --license -p "coral.addins.CQUERY10" $(ESMD_FILE) /
	# Trigger fixing of the .py files
	touch queryelementeditor.ui
	UI_FILES="queryelementeditor.ui" make -e -f ../../modeler/dlg/makefile
	sed -i s/propertyeditors.QueryElementEditor/extendededitors.QueryElement/ propertyeditors.mnf.xmi
	#sed -i s/propertyeditors.DiagramElementEditor/extendededitors.ExtendedDiagramElementEditor/ propertyeditors.mnf.xmi
	#sed -i s/propertyeditors.ContainedEditor/extendededitors.ExtendedContainedEditor/ propertyeditors.mnf.xmi

$(ESMD_FILE):

$(FIELDHANDLER):

clean:
	-rm -f propertyeditors.py
	-rm -f propertyeditors.mnf.xmi
	-rm -f queryelementeditor.py
