Refactored Javadoc gen replacePackage task
diff --git a/jpa/plugins/org.eclipse.jpt.doc.isv/buildDoc.xml b/jpa/plugins/org.eclipse.jpt.doc.isv/buildDoc.xml
index d7c7624..91ad641 100644
--- a/jpa/plugins/org.eclipse.jpt.doc.isv/buildDoc.xml
+++ b/jpa/plugins/org.eclipse.jpt.doc.isv/buildDoc.xml
@@ -1,155 +1,179 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Copyright (c) 2012 Oracle. All rights reserved.
-  This program and the accompanying materials are made available under the
-  terms of the Eclipse Public License v1.0, which accompanies this distribution
-  and is available at http://www.eclipse.org/legal/epl-v10.html.
-
-  Contributors:
-    Oracle - initial API and implementation
- -->
-
-<project name="JPT Doc ISV Build" default="all"  basedir="." >
-
-	<target name="init">
-		<available file="${basedir}/index" property="index.present"/>
-	</target>
-
-	<target name="all" depends="init" unless="index.present">
-		<!-- <antcall target="convertSchemaToHtml" /> -->
-		<antcall target="generateJavadoc" />
-<!--		<antcall target="build.index" /> /-->
-		<!--antcall target="createDocZip" /-->
-	</target>
-
-	<target name="build.index" description="Builds search index for the plug-in: org.eclipse.jpt.doc.isv." if="eclipse.running">
-		<help.buildHelpIndex manifest="${basedir}/plugin.xml" destination="${basedir}"/>
-	</target>
-
-	<target name="getJavadocPath">
-		<available file="${java.home}/../bin/javadoc.exe" property="javadoc" value="${java.home}/../bin/javadoc.exe"/>
-		<available file="${java.home}/../bin/javadoc" property="javadoc" value="${java.home}/../bin/javadoc" />
-	</target>
-
-
-	<target name="generateJavadoc" depends="getJavadocPath" if="javadoc">
-
-		<property name="optionsFile" value="jptOptions.tmp.txt" />
-		<copy file="jptOptions.txt" tofile="${optionsFile}" overwrite="true" />
-		
-		<condition property="argsListDelimiter" value=":">
-			<os family="unix" />
-		</condition>
-		<condition property="argsListDelimiter" value=";">
-			<os family="windows" />
-		</condition>
-
-		<replace file="${basedir}/${optionsFile}" token="@rt@" value="${bootclasspath}" />
-
-		<antcall target="replaceJptCommonUtility" />
-		<antcall target="replaceJptCommonCore" />
-		<antcall target="replaceJptCommonUi" />
-					
-		<replaceregexp file="${basedir}/${optionsFile}" flags="g" match="(\r\n?|\n);" replace="${argsListDelimiter}" />
-
-<!--
-		<property name="commonCoreSourcepath" file="commonCoreSourcepath.txt" />
-		<replace file="${basedir}/${optionsFile}" token="@commonCoreSourcepath@" value="${commonCoreSourcepath}" />
--->
-
-		<!--scrub isv plugin directories of any preexisting doc content-->
-		<delete dir="index-files"/>
-		<delete dir="org"/>
-		<delete dir="resources"/>
-
-		<exec dir="." executable="${javadoc}" output="doc.bin.log">
-			<arg line="@${basedir}/${optionsFile} -J-Xmx1000M" />
-		</exec>
-	</target>
-
-	<!-- common packages -->
-	<target name="replaceJptCommonUtility" if="optionsFile">
-		<replace 
-			file="${basedir}/${optionsFile}" 
-			propertyfile="${basedir}/jptCommonUtility.properties">
-
-            <replacefilter
-                token="@commonUtilitySourcepath@"
-                property="common.utility.sourcepath"/>
-            <replacefilter
-                token="@commonUtilityPackages@"
-                property="common.utility.packages"/>
-		</replace>
-		
-		<echo message="common.utility.sourcepath = ${common.utility.sourcepath}" />
-		<echo message="common.utility.packages = ${common.utility.packages}" />
-	</target>
-
-	<target name="replaceJptCommonCore" if="optionsFile">
-		<replace 
-			file="${basedir}/${optionsFile}" 
-			propertyfile="${basedir}/jptCommonCore.properties">
-
-            <replacefilter
-                token="@commonCoreSourcepath@"
-                property="common.core.sourcepath"/>
-            <replacefilter
-                token="@commonCoreClasspath@"
-                property="common.core.classpath"/>
-            <replacefilter
-                token="@commonCorePackages@"
-                property="common.core.packages"/>
-		</replace>
-		
-		<echo message="common.core.sourcepath = ${common.core.sourcepath}" />
-		<echo message="common.core.classpath = ${common.core.classpath}" />
-		<echo message="common.core.packages = ${common.core.packages}" />
-	</target>
-
-	<target name="replaceJptCommonUi" if="optionsFile">
-		<replace 
-			file="${basedir}/${optionsFile}" 
-			propertyfile="${basedir}/jptCommonUi.properties">
-
-            <replacefilter
-                token="@commonUiSourcepath@"
-                property="common.ui.sourcepath"/>
-            <replacefilter
-                token="@commonUiClasspath@"
-                property="common.ui.classpath"/>
-            <replacefilter
-                token="@commonUiPackages@"
-                property="common.ui.packages"/>
-		</replace>
-		
-		<echo message="common.ui.sourcepath = ${common.ui.sourcepath}" />
-		<echo message="common.ui.classpath = ${common.ui.classpath}" />
-		<echo message="common.ui.packages = ${common.ui.packages}" />
-	</target>
-
-	<target name="buildJptDoc" unless="jpt.index.present">
-		<ant antfile="buildDoc.xml" dir="../org.eclipse.jpt.doc.isv" />
-	</target>
-
-	<target name="createDocZip">
-		<zip zipfile="${basedir}/doc.zip"
-		basedir="${basedir}"
-		includes="schema.css, book.css, notices.html, about.html, concepts/**, guide/**, tips/**, reference/**, tasks/**, whatsNew/**, images/**"
-	/>
-	</target>
-
-</project>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+<?xml version="1.0" encoding="UTF-8"?>

+<!--

+  Copyright (c) 2012 Oracle. All rights reserved.

+  This program and the accompanying materials are made available under the

+  terms of the Eclipse Public License v1.0, which accompanies this distribution

+  and is available at http://www.eclipse.org/legal/epl-v10.html.

+

+  Contributors:

+    Oracle - initial API and implementation

+ -->

+

+<project name="JPT Doc ISV Build" default="all"  basedir="." >

+

+	<target name="init">

+		<available file="${basedir}/index" property="index.present"/>

+	</target>

+

+	<target name="all" depends="init" unless="index.present">

+		<!-- <antcall target="convertSchemaToHtml" /> -->

+		<antcall target="generateJavadoc" />

+<!--		<antcall target="build.index" /> /-->

+		<!--antcall target="createDocZip" /-->

+	</target>

+

+	<target name="build.index" description="Builds search index for the plug-in: org.eclipse.jpt.doc.isv." if="eclipse.running">

+		<help.buildHelpIndex manifest="${basedir}/plugin.xml" destination="${basedir}"/>

+	</target>

+

+	<target name="getJavadocPath">

+		<available file="${java.home}/../bin/javadoc.exe" property="javadoc" value="${java.home}/../bin/javadoc.exe"/>

+		<available file="${java.home}/../bin/javadoc" property="javadoc" value="${java.home}/../bin/javadoc" />

+	</target>

+

+

+	<target name="generateJavadoc" depends="getJavadocPath" if="javadoc">

+

+		<property name="optionsFile" value="jptOptions.tmp.txt" />

+		<copy file="jptOptions.txt" tofile="${optionsFile}" overwrite="true" />

+		

+		<condition property="argsListDelimiter" value=":">

+			<os family="unix" />

+		</condition>

+		<condition property="argsListDelimiter" value=";">

+			<os family="windows" />

+		</condition>

+

+		<replace file="${basedir}/${optionsFile}" token="@rt@" value="${bootclasspath}" />

+

+		<antcall target="replaceJptCommonUtility" />

+        <antcall target="replacePackage">

+            <param name="packageName" value="jpt.common.core" />

+        </antcall>

+		

+		<replaceregexp file="${basedir}/${optionsFile}" flags="g" match="(\r\n?|\n);" replace="${argsListDelimiter}" />

+

+<!--

+		<antcall target="replaceJptCommonCore" />

+		<antcall target="replaceJptCommonUi" />

+		

+		<property name="commonCoreSourcepath" file="commonCoreSourcepath.txt" />

+		<replace file="${basedir}/${optionsFile}" token="@commonCoreSourcepath@" value="${commonCoreSourcepath}" />

+-->

+

+		<!--scrub isv plugin directories of any preexisting doc content-->

+		<delete dir="index-files"/>

+		<delete dir="org"/>

+		<delete dir="resources"/>

+

+		<exec dir="." executable="${javadoc}" output="doc.bin.log">

+			<arg line="@${basedir}/${optionsFile} -J-Xmx1000M" />

+		</exec>

+	</target>

+

+	<!-- replacePackage -->

+	<target name="replacePackage" if="optionsFile">

+		<replace 

+			file="${basedir}/${optionsFile}" 

+			propertyfile="${basedir}/${packageName}.properties">

+

+            <replacefilter

+                token="@${packageName}.sourcepath@"

+                property="${packageName}.sourcepath"/>

+            <replacefilter

+                token="@${packageName}.classpath@"

+                property="${packageName}.classpath"/>

+            <replacefilter

+                token="@${packageName}.packages@"

+                property="${packageName}.packages"/>

+		</replace>

+

+		<echo message="packageName = ${packageName}" />

+	</target>

+

+	<!-- common packages -->

+	<target name="replaceJptCommonUtility" if="optionsFile">

+		<replace 

+			file="${basedir}/${optionsFile}" 

+			propertyfile="${basedir}/jptCommonUtility.properties">

+

+            <replacefilter

+                token="@commonUtilitySourcepath@"

+                property="common.utility.sourcepath"/>

+            <replacefilter

+                token="@commonUtilityPackages@"

+                property="common.utility.packages"/>

+		</replace>

+

+		<echo message="common.utility.sourcepath = ${common.utility.sourcepath}" />

+		<echo message="common.utility.packages = ${common.utility.packages}" />

+	</target>

+

+	<target name="replaceJptCommonCore" if="optionsFile">

+		<replace 

+			file="${basedir}/${optionsFile}" 

+			propertyfile="${basedir}/jptCommonCore.properties">

+

+            <replacefilter

+                token="@commonCoreSourcepath@"

+                property="common.core.sourcepath"/>

+            <replacefilter

+                token="@commonCoreClasspath@"

+                property="common.core.classpath"/>

+            <replacefilter

+                token="@commonCorePackages@"

+                property="common.core.packages"/>

+		</replace>

+		

+		<echo message="common.core.sourcepath = ${common.core.sourcepath}" />

+		<echo message="common.core.classpath = ${common.core.classpath}" />

+		<echo message="common.core.packages = ${common.core.packages}" />

+	</target>

+

+	<target name="replaceJptCommonUi" if="optionsFile">

+		<replace 

+			file="${basedir}/${optionsFile}" 

+			propertyfile="${basedir}/jptCommonUi.properties">

+

+            <replacefilter

+                token="@commonUiSourcepath@"

+                property="common.ui.sourcepath"/>

+            <replacefilter

+                token="@commonUiClasspath@"

+                property="common.ui.classpath"/>

+            <replacefilter

+                token="@commonUiPackages@"

+                property="common.ui.packages"/>

+		</replace>

+		

+		<echo message="common.ui.sourcepath = ${common.ui.sourcepath}" />

+		<echo message="common.ui.classpath = ${common.ui.classpath}" />

+		<echo message="common.ui.packages = ${common.ui.packages}" />

+	</target>

+

+	<target name="buildJptDoc" unless="jpt.index.present">

+		<ant antfile="buildDoc.xml" dir="../org.eclipse.jpt.doc.isv" />

+	</target>

+

+	<target name="createDocZip">

+		<zip zipfile="${basedir}/doc.zip"

+		basedir="${basedir}"

+		includes="schema.css, book.css, notices.html, about.html, concepts/**, guide/**, tips/**, reference/**, tasks/**, whatsNew/**, images/**"

+	/>

+	</target>

+

+</project>

+

+

+

+

+

+

+

+

+

+

+

+

+

+

diff --git a/jpa/plugins/org.eclipse.jpt.doc.isv/jpt.common.core.properties b/jpa/plugins/org.eclipse.jpt.doc.isv/jpt.common.core.properties
new file mode 100644
index 0000000..21ee566
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.doc.isv/jpt.common.core.properties
@@ -0,0 +1,35 @@
+jpt.common.core.sourcepath = ../org.eclipse.jpt.common.core/src
+
+jpt.common.core.classpath = ../org.eclipse.core.expressions/@dot;\
+								../org.eclipse.core.filebuffers/@dot;\
+								../org.eclipse.core.resources/@dot;\
+								../org.eclipse.core.runtime/@dot;\
+								../org.eclipse.debug.core/@dot;\
+								../org.eclipse.emf.ecore.xmi/@dot;\
+								../org.eclipse.jdt.core/@dot;\
+								../org.eclipse.jdt.launching/@dot;\
+								../org.eclipse.jem.util/@dot;\
+								../org.eclipse.jpt.common.utility/@dot;\
+								../org.eclipse.jst.common.project.facet.core/@dot;\
+								../org.eclipse.jst.j2ee/@dot;\
+								../org.eclipse.jst.j2ee.core/@dot;\
+								../org.eclipse.pde.core/@dot;\
+								../org.eclipse.text/@dot;\
+								../org.eclipse.wst.common.emf/@dot;\
+								../org.eclipse.wst.common.emfworkbench.integration/@dot;\
+								../org.eclipse.wst.common.frameworks/@dot;\
+								../org.eclipse.wst.common.project.facet.core/@dot;\
+								../org.eclipse.wst.sse.core/@dot;\
+								../org.eclipse.wst.validation/@dot;\
+								../org.eclipse.wst.xml.core/@dot
+
+jpt.common.core.packages = org.eclipse.jpt.common.core\n\
+								org.eclipse.jpt.common.core.gen\n\
+								org.eclipse.jpt.common.core.libprov\n\
+								org.eclipse.jpt.common.core.libval\n\
+								org.eclipse.jpt.common.core.resource\n\
+								org.eclipse.jpt.common.core.resource.java\n\
+								org.eclipse.jpt.common.core.resource.xml\n\
+								org.eclipse.jpt.common.core.utility\n\
+								org.eclipse.jpt.common.core.utility.command\n\
+								org.eclipse.jpt.common.core.utility.jdt