#!/bin/sh

# Use this script to add the files necessary to force Eclipse to use the sezpoz
# annotator (it would not be necessary if Eclipse's compiler would follow the
# rules set out by the Java specification).

for path in $(find . -name pom.xml)
do
	case $path in
	./envisaje/*|./sandbox/*)
		continue
		;;
	esac

	# skip aggregator modules
	grep -e '<modules>' $path > /dev/null && continue

	directory=${path%/pom.xml}
	factorypath=$directory/.factorypath
	test -f $factorypath || cat > $factorypath << EOF
<factorypath>
    <factorypathentry kind="VARJAR" id="M2_REPO/net/java/sezpoz/sezpoz/1.9/sezpoz-1.9.jar" enabled="true" runInBatchMode="true"/>
</factorypath>
EOF
	prefs=$directory/.settings/org.eclipse.jdt.core.prefs
	test -f $prefs || {
		mkdir -p $directory/.settings
		cat > $prefs << EOF
#$(date)
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.processAnnotations=enabled
org.eclipse.jdt.core.compiler.source=1.6
EOF
		echo "Do not forget to commit $prefs even if it is ignored by Git"
	}
done

Add a script to beat Eclipse into submission
Add a script to beat Eclipse into submission

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>

This used to be revision r4913.
