Web frontend for language, only unattributed variant (or incorrectly partially attributed) for now
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/language/server/web/language.web.api/build.xml Mon Jul 16 17:32:27 2012 +0200
1.3 @@ -0,0 +1,74 @@
1.4 +<?xml version="1.0" encoding="UTF-8"?>
1.5 +<!-- You may freely edit this file. See commented blocks below for -->
1.6 +<!-- some examples of how to customize the build. -->
1.7 +<!-- (If you delete it and reopen the project it will be recreated.) -->
1.8 +<!-- By default, only the Clean and Build commands use this build script. -->
1.9 +<!-- Commands such as Run, Debug, and Test only use this build script if -->
1.10 +<!-- the Compile on Save feature is turned off for the project. -->
1.11 +<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
1.12 +<!-- in the project's Project Properties dialog box.-->
1.13 +<project name="language.web.api" default="default" basedir=".">
1.14 + <description>Builds, tests, and runs the project language.web.api.</description>
1.15 + <import file="nbproject/build-impl.xml"/>
1.16 + <!--
1.17 +
1.18 + There exist several targets which are by default empty and which can be
1.19 + used for execution of your tasks. These targets are usually executed
1.20 + before and after some main targets. They are:
1.21 +
1.22 + -pre-init: called before initialization of project properties
1.23 + -post-init: called after initialization of project properties
1.24 + -pre-compile: called before javac compilation
1.25 + -post-compile: called after javac compilation
1.26 + -pre-compile-single: called before javac compilation of single file
1.27 + -post-compile-single: called after javac compilation of single file
1.28 + -pre-compile-test: called before javac compilation of JUnit tests
1.29 + -post-compile-test: called after javac compilation of JUnit tests
1.30 + -pre-compile-test-single: called before javac compilation of single JUnit test
1.31 + -post-compile-test-single: called after javac compilation of single JUunit test
1.32 + -pre-jar: called before JAR building
1.33 + -post-jar: called after JAR building
1.34 + -post-clean: called after cleaning build products
1.35 +
1.36 + (Targets beginning with '-' are not intended to be called on their own.)
1.37 +
1.38 + Example of inserting an obfuscator after compilation could look like this:
1.39 +
1.40 + <target name="-post-compile">
1.41 + <obfuscate>
1.42 + <fileset dir="${build.classes.dir}"/>
1.43 + </obfuscate>
1.44 + </target>
1.45 +
1.46 + For list of available properties check the imported
1.47 + nbproject/build-impl.xml file.
1.48 +
1.49 +
1.50 + Another way to customize the build is by overriding existing main targets.
1.51 + The targets of interest are:
1.52 +
1.53 + -init-macrodef-javac: defines macro for javac compilation
1.54 + -init-macrodef-junit: defines macro for junit execution
1.55 + -init-macrodef-debug: defines macro for class debugging
1.56 + -init-macrodef-java: defines macro for class execution
1.57 + -do-jar-with-manifest: JAR building (if you are using a manifest)
1.58 + -do-jar-without-manifest: JAR building (if you are not using a manifest)
1.59 + run: execution of project
1.60 + -javadoc-build: Javadoc generation
1.61 + test-report: JUnit report generation
1.62 +
1.63 + An example of overriding the target for project execution could look like this:
1.64 +
1.65 + <target name="run" depends="language.web.api-impl.jar">
1.66 + <exec dir="bin" executable="launcher.exe">
1.67 + <arg file="${dist.jar}"/>
1.68 + </exec>
1.69 + </target>
1.70 +
1.71 + Notice that the overridden target depends on the jar target and not only on
1.72 + the compile target as the regular run target does. Again, for a list of available
1.73 + properties which you can use, check the target you are overriding in the
1.74 + nbproject/build-impl.xml file.
1.75 +
1.76 + -->
1.77 +</project>
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/language/server/web/language.web.api/manifest.mf Mon Jul 16 17:32:27 2012 +0200
2.3 @@ -0,0 +1,3 @@
2.4 +Manifest-Version: 1.0
2.5 +X-COMMENT: Main-Class will be added automatically by build
2.6 +
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/language/server/web/language.web.api/nbproject/build-impl.xml Mon Jul 16 17:32:27 2012 +0200
3.3 @@ -0,0 +1,1467 @@
3.4 +<?xml version="1.0" encoding="UTF-8"?>
3.5 +<!--
3.6 +*** GENERATED FROM project.xml - DO NOT EDIT ***
3.7 +*** EDIT ../build.xml INSTEAD ***
3.8 +
3.9 +For the purpose of easier reading the script
3.10 +is divided into following sections:
3.11 +
3.12 + - initialization
3.13 + - compilation
3.14 + - jar
3.15 + - execution
3.16 + - debugging
3.17 + - javadoc
3.18 + - test compilation
3.19 + - test execution
3.20 + - test debugging
3.21 + - applet
3.22 + - cleanup
3.23 +
3.24 + -->
3.25 +<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="language.web.api-impl">
3.26 + <fail message="Please build using Ant 1.8.0 or higher.">
3.27 + <condition>
3.28 + <not>
3.29 + <antversion atleast="1.8.0"/>
3.30 + </not>
3.31 + </condition>
3.32 + </fail>
3.33 + <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
3.34 + <!--
3.35 + ======================
3.36 + INITIALIZATION SECTION
3.37 + ======================
3.38 + -->
3.39 + <target name="-pre-init">
3.40 + <!-- Empty placeholder for easier customization. -->
3.41 + <!-- You can override this target in the ../build.xml file. -->
3.42 + </target>
3.43 + <target depends="-pre-init" name="-init-private">
3.44 + <property file="nbproject/private/config.properties"/>
3.45 + <property file="nbproject/private/configs/${config}.properties"/>
3.46 + <property file="nbproject/private/private.properties"/>
3.47 + </target>
3.48 + <target name="-pre-init-libraries">
3.49 + <property location="../../../../lib/nblibraries.properties" name="libraries.path"/>
3.50 + <dirname file="${libraries.path}" property="libraries.dir.nativedirsep"/>
3.51 + <pathconvert dirsep="/" property="libraries.dir">
3.52 + <path path="${libraries.dir.nativedirsep}"/>
3.53 + </pathconvert>
3.54 + <basename file="${libraries.path}" property="libraries.basename" suffix=".properties"/>
3.55 + <available file="${libraries.dir}/${libraries.basename}-private.properties" property="private.properties.available"/>
3.56 + </target>
3.57 + <target depends="-pre-init-libraries" if="private.properties.available" name="-init-private-libraries">
3.58 + <loadproperties encoding="ISO-8859-1" srcfile="${libraries.dir}/${libraries.basename}-private.properties">
3.59 + <filterchain>
3.60 + <replacestring from="$${base}" to="${libraries.dir}"/>
3.61 + <escapeunicode/>
3.62 + </filterchain>
3.63 + </loadproperties>
3.64 + </target>
3.65 + <target depends="-pre-init,-init-private,-init-private-libraries" name="-init-libraries">
3.66 + <loadproperties encoding="ISO-8859-1" srcfile="${libraries.path}">
3.67 + <filterchain>
3.68 + <replacestring from="$${base}" to="${libraries.dir}"/>
3.69 + <escapeunicode/>
3.70 + </filterchain>
3.71 + </loadproperties>
3.72 + </target>
3.73 + <target depends="-pre-init,-init-private,-init-libraries" name="-init-user">
3.74 + <property file="${user.properties.file}"/>
3.75 + <!-- The two properties below are usually overridden -->
3.76 + <!-- by the active platform. Just a fallback. -->
3.77 + <property name="default.javac.source" value="1.4"/>
3.78 + <property name="default.javac.target" value="1.4"/>
3.79 + </target>
3.80 + <target depends="-pre-init,-init-private,-init-libraries,-init-user" name="-init-project">
3.81 + <property file="nbproject/configs/${config}.properties"/>
3.82 + <property file="nbproject/project.properties"/>
3.83 + </target>
3.84 + <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-init-macrodef-property" name="-do-init">
3.85 + <available file="${manifest.file}" property="manifest.available"/>
3.86 + <condition property="splashscreen.available">
3.87 + <and>
3.88 + <not>
3.89 + <equals arg1="${application.splash}" arg2="" trim="true"/>
3.90 + </not>
3.91 + <available file="${application.splash}"/>
3.92 + </and>
3.93 + </condition>
3.94 + <condition property="main.class.available">
3.95 + <and>
3.96 + <isset property="main.class"/>
3.97 + <not>
3.98 + <equals arg1="${main.class}" arg2="" trim="true"/>
3.99 + </not>
3.100 + </and>
3.101 + </condition>
3.102 + <condition property="manifest.available+main.class">
3.103 + <and>
3.104 + <isset property="manifest.available"/>
3.105 + <isset property="main.class.available"/>
3.106 + </and>
3.107 + </condition>
3.108 + <condition property="do.archive">
3.109 + <not>
3.110 + <istrue value="${jar.archive.disabled}"/>
3.111 + </not>
3.112 + </condition>
3.113 + <condition property="do.mkdist">
3.114 + <and>
3.115 + <isset property="do.archive"/>
3.116 + <isset property="libs.CopyLibs.classpath"/>
3.117 + <not>
3.118 + <istrue value="${mkdist.disabled}"/>
3.119 + </not>
3.120 + </and>
3.121 + </condition>
3.122 + <condition property="manifest.available+main.class+mkdist.available">
3.123 + <and>
3.124 + <istrue value="${manifest.available+main.class}"/>
3.125 + <isset property="do.mkdist"/>
3.126 + </and>
3.127 + </condition>
3.128 + <condition property="do.archive+manifest.available">
3.129 + <and>
3.130 + <isset property="manifest.available"/>
3.131 + <istrue value="${do.archive}"/>
3.132 + </and>
3.133 + </condition>
3.134 + <condition property="do.archive+main.class.available">
3.135 + <and>
3.136 + <isset property="main.class.available"/>
3.137 + <istrue value="${do.archive}"/>
3.138 + </and>
3.139 + </condition>
3.140 + <condition property="do.archive+splashscreen.available">
3.141 + <and>
3.142 + <isset property="splashscreen.available"/>
3.143 + <istrue value="${do.archive}"/>
3.144 + </and>
3.145 + </condition>
3.146 + <condition property="do.archive+manifest.available+main.class">
3.147 + <and>
3.148 + <istrue value="${manifest.available+main.class}"/>
3.149 + <istrue value="${do.archive}"/>
3.150 + </and>
3.151 + </condition>
3.152 + <condition property="manifest.available-mkdist.available">
3.153 + <or>
3.154 + <istrue value="${manifest.available}"/>
3.155 + <isset property="do.mkdist"/>
3.156 + </or>
3.157 + </condition>
3.158 + <condition property="manifest.available+main.class-mkdist.available">
3.159 + <or>
3.160 + <istrue value="${manifest.available+main.class}"/>
3.161 + <isset property="do.mkdist"/>
3.162 + </or>
3.163 + </condition>
3.164 + <condition property="have.tests">
3.165 + <or>
3.166 + <available file="${test.src.dir}"/>
3.167 + </or>
3.168 + </condition>
3.169 + <condition property="have.sources">
3.170 + <or>
3.171 + <available file="${src.dir}"/>
3.172 + </or>
3.173 + </condition>
3.174 + <condition property="netbeans.home+have.tests">
3.175 + <and>
3.176 + <isset property="netbeans.home"/>
3.177 + <isset property="have.tests"/>
3.178 + </and>
3.179 + </condition>
3.180 + <condition property="no.javadoc.preview">
3.181 + <and>
3.182 + <isset property="javadoc.preview"/>
3.183 + <isfalse value="${javadoc.preview}"/>
3.184 + </and>
3.185 + </condition>
3.186 + <property name="run.jvmargs" value=""/>
3.187 + <property name="run.jvmargs.ide" value=""/>
3.188 + <property name="javac.compilerargs" value=""/>
3.189 + <property name="work.dir" value="${basedir}"/>
3.190 + <condition property="no.deps">
3.191 + <and>
3.192 + <istrue value="${no.dependencies}"/>
3.193 + </and>
3.194 + </condition>
3.195 + <property name="javac.debug" value="true"/>
3.196 + <property name="javadoc.preview" value="true"/>
3.197 + <property name="application.args" value=""/>
3.198 + <property name="source.encoding" value="${file.encoding}"/>
3.199 + <property name="runtime.encoding" value="${source.encoding}"/>
3.200 + <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
3.201 + <and>
3.202 + <isset property="javadoc.encoding"/>
3.203 + <not>
3.204 + <equals arg1="${javadoc.encoding}" arg2=""/>
3.205 + </not>
3.206 + </and>
3.207 + </condition>
3.208 + <property name="javadoc.encoding.used" value="${source.encoding}"/>
3.209 + <property name="includes" value="**"/>
3.210 + <property name="excludes" value=""/>
3.211 + <property name="do.depend" value="false"/>
3.212 + <condition property="do.depend.true">
3.213 + <istrue value="${do.depend}"/>
3.214 + </condition>
3.215 + <path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
3.216 + <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
3.217 + <length length="0" string="${endorsed.classpath}" when="greater"/>
3.218 + </condition>
3.219 + <condition else="false" property="jdkBug6558476">
3.220 + <and>
3.221 + <matches pattern="1\.[56]" string="${java.specification.version}"/>
3.222 + <not>
3.223 + <os family="unix"/>
3.224 + </not>
3.225 + </and>
3.226 + </condition>
3.227 + <property name="javac.fork" value="${jdkBug6558476}"/>
3.228 + <property name="jar.index" value="false"/>
3.229 + <property name="jar.index.metainf" value="${jar.index}"/>
3.230 + <property name="copylibs.rebase" value="true"/>
3.231 + <available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
3.232 + <condition property="junit.available">
3.233 + <or>
3.234 + <available classname="org.junit.Test" classpath="${run.test.classpath}"/>
3.235 + <available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
3.236 + </or>
3.237 + </condition>
3.238 + <condition property="testng.available">
3.239 + <available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
3.240 + </condition>
3.241 + <condition property="junit+testng.available">
3.242 + <and>
3.243 + <istrue value="${junit.available}"/>
3.244 + <istrue value="${testng.available}"/>
3.245 + </and>
3.246 + </condition>
3.247 + <condition else="testng" property="testng.mode" value="mixed">
3.248 + <istrue value="${junit+testng.available}"/>
3.249 + </condition>
3.250 + <condition else="" property="testng.debug.mode" value="-mixed">
3.251 + <istrue value="${junit+testng.available}"/>
3.252 + </condition>
3.253 + </target>
3.254 + <target name="-post-init">
3.255 + <!-- Empty placeholder for easier customization. -->
3.256 + <!-- You can override this target in the ../build.xml file. -->
3.257 + </target>
3.258 + <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init" name="-init-check">
3.259 + <fail unless="src.dir">Must set src.dir</fail>
3.260 + <fail unless="test.src.dir">Must set test.src.dir</fail>
3.261 + <fail unless="build.dir">Must set build.dir</fail>
3.262 + <fail unless="dist.dir">Must set dist.dir</fail>
3.263 + <fail unless="build.classes.dir">Must set build.classes.dir</fail>
3.264 + <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
3.265 + <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
3.266 + <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
3.267 + <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
3.268 + <fail unless="dist.jar">Must set dist.jar</fail>
3.269 + </target>
3.270 + <target name="-init-macrodef-property">
3.271 + <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
3.272 + <attribute name="name"/>
3.273 + <attribute name="value"/>
3.274 + <sequential>
3.275 + <property name="@{name}" value="${@{value}}"/>
3.276 + </sequential>
3.277 + </macrodef>
3.278 + </target>
3.279 + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
3.280 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
3.281 + <attribute default="${src.dir}" name="srcdir"/>
3.282 + <attribute default="${build.classes.dir}" name="destdir"/>
3.283 + <attribute default="${javac.classpath}" name="classpath"/>
3.284 + <attribute default="${javac.processorpath}" name="processorpath"/>
3.285 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
3.286 + <attribute default="${includes}" name="includes"/>
3.287 + <attribute default="${excludes}" name="excludes"/>
3.288 + <attribute default="${javac.debug}" name="debug"/>
3.289 + <attribute default="${empty.dir}" name="sourcepath"/>
3.290 + <attribute default="${empty.dir}" name="gensrcdir"/>
3.291 + <element name="customize" optional="true"/>
3.292 + <sequential>
3.293 + <property location="${build.dir}/empty" name="empty.dir"/>
3.294 + <mkdir dir="${empty.dir}"/>
3.295 + <mkdir dir="@{apgeneratedsrcdir}"/>
3.296 + <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
3.297 + <src>
3.298 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
3.299 + <include name="*"/>
3.300 + </dirset>
3.301 + </src>
3.302 + <classpath>
3.303 + <path path="@{classpath}"/>
3.304 + </classpath>
3.305 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
3.306 + <compilerarg line="${javac.compilerargs}"/>
3.307 + <compilerarg value="-processorpath"/>
3.308 + <compilerarg path="@{processorpath}:${empty.dir}"/>
3.309 + <compilerarg line="${ap.processors.internal}"/>
3.310 + <compilerarg line="${annotation.processing.processor.options}"/>
3.311 + <compilerarg value="-s"/>
3.312 + <compilerarg path="@{apgeneratedsrcdir}"/>
3.313 + <compilerarg line="${ap.proc.none.internal}"/>
3.314 + <customize/>
3.315 + </javac>
3.316 + </sequential>
3.317 + </macrodef>
3.318 + </target>
3.319 + <target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
3.320 + <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
3.321 + <attribute default="${src.dir}" name="srcdir"/>
3.322 + <attribute default="${build.classes.dir}" name="destdir"/>
3.323 + <attribute default="${javac.classpath}" name="classpath"/>
3.324 + <attribute default="${javac.processorpath}" name="processorpath"/>
3.325 + <attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
3.326 + <attribute default="${includes}" name="includes"/>
3.327 + <attribute default="${excludes}" name="excludes"/>
3.328 + <attribute default="${javac.debug}" name="debug"/>
3.329 + <attribute default="${empty.dir}" name="sourcepath"/>
3.330 + <attribute default="${empty.dir}" name="gensrcdir"/>
3.331 + <element name="customize" optional="true"/>
3.332 + <sequential>
3.333 + <property location="${build.dir}/empty" name="empty.dir"/>
3.334 + <mkdir dir="${empty.dir}"/>
3.335 + <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
3.336 + <src>
3.337 + <dirset dir="@{gensrcdir}" erroronmissingdir="false">
3.338 + <include name="*"/>
3.339 + </dirset>
3.340 + </src>
3.341 + <classpath>
3.342 + <path path="@{classpath}"/>
3.343 + </classpath>
3.344 + <compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
3.345 + <compilerarg line="${javac.compilerargs}"/>
3.346 + <customize/>
3.347 + </javac>
3.348 + </sequential>
3.349 + </macrodef>
3.350 + </target>
3.351 + <target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
3.352 + <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
3.353 + <attribute default="${src.dir}" name="srcdir"/>
3.354 + <attribute default="${build.classes.dir}" name="destdir"/>
3.355 + <attribute default="${javac.classpath}" name="classpath"/>
3.356 + <sequential>
3.357 + <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
3.358 + <classpath>
3.359 + <path path="@{classpath}"/>
3.360 + </classpath>
3.361 + </depend>
3.362 + </sequential>
3.363 + </macrodef>
3.364 + <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
3.365 + <attribute default="${build.classes.dir}" name="destdir"/>
3.366 + <sequential>
3.367 + <fail unless="javac.includes">Must set javac.includes</fail>
3.368 + <pathconvert pathsep="${line.separator}" property="javac.includes.binary">
3.369 + <path>
3.370 + <filelist dir="@{destdir}" files="${javac.includes}"/>
3.371 + </path>
3.372 + <globmapper from="*.java" to="*.class"/>
3.373 + </pathconvert>
3.374 + <tempfile deleteonexit="true" property="javac.includesfile.binary"/>
3.375 + <echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
3.376 + <delete>
3.377 + <files includesfile="${javac.includesfile.binary}"/>
3.378 + </delete>
3.379 + <delete>
3.380 + <fileset file="${javac.includesfile.binary}"/>
3.381 + </delete>
3.382 + </sequential>
3.383 + </macrodef>
3.384 + </target>
3.385 + <target if="${junit.available}" name="-init-macrodef-junit-init">
3.386 + <condition else="false" property="nb.junit.batch" value="true">
3.387 + <and>
3.388 + <istrue value="${junit.available}"/>
3.389 + <not>
3.390 + <isset property="test.method"/>
3.391 + </not>
3.392 + </and>
3.393 + </condition>
3.394 + <condition else="false" property="nb.junit.single" value="true">
3.395 + <and>
3.396 + <istrue value="${junit.available}"/>
3.397 + <isset property="test.method"/>
3.398 + </and>
3.399 + </condition>
3.400 + </target>
3.401 + <target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
3.402 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
3.403 + <attribute default="${includes}" name="includes"/>
3.404 + <attribute default="${excludes}" name="excludes"/>
3.405 + <attribute default="**" name="testincludes"/>
3.406 + <attribute default="" name="testmethods"/>
3.407 + <element name="customize" optional="true"/>
3.408 + <sequential>
3.409 + <property name="junit.forkmode" value="perTest"/>
3.410 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
3.411 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
3.412 + <syspropertyset>
3.413 + <propertyref prefix="test-sys-prop."/>
3.414 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
3.415 + </syspropertyset>
3.416 + <formatter type="brief" usefile="false"/>
3.417 + <formatter type="xml"/>
3.418 + <jvmarg value="-ea"/>
3.419 + <customize/>
3.420 + </junit>
3.421 + </sequential>
3.422 + </macrodef>
3.423 + </target>
3.424 + <target if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
3.425 + <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
3.426 + <attribute default="${includes}" name="includes"/>
3.427 + <attribute default="${excludes}" name="excludes"/>
3.428 + <attribute default="**" name="testincludes"/>
3.429 + <attribute default="" name="testmethods"/>
3.430 + <element name="customize" optional="true"/>
3.431 + <sequential>
3.432 + <property name="junit.forkmode" value="perTest"/>
3.433 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
3.434 + <batchtest todir="${build.test.results.dir}">
3.435 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
3.436 + <filename name="@{testincludes}"/>
3.437 + </fileset>
3.438 + </batchtest>
3.439 + <syspropertyset>
3.440 + <propertyref prefix="test-sys-prop."/>
3.441 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
3.442 + </syspropertyset>
3.443 + <formatter type="brief" usefile="false"/>
3.444 + <formatter type="xml"/>
3.445 + <jvmarg value="-ea"/>
3.446 + <customize/>
3.447 + </junit>
3.448 + </sequential>
3.449 + </macrodef>
3.450 + </target>
3.451 + <target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
3.452 + <target if="${testng.available}" name="-init-macrodef-testng">
3.453 + <macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
3.454 + <attribute default="${includes}" name="includes"/>
3.455 + <attribute default="${excludes}" name="excludes"/>
3.456 + <attribute default="**" name="testincludes"/>
3.457 + <attribute default="" name="testmethods"/>
3.458 + <element name="customize" optional="true"/>
3.459 + <sequential>
3.460 + <condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
3.461 + <isset property="test.method"/>
3.462 + </condition>
3.463 + <union id="test.set">
3.464 + <fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
3.465 + <filename name="@{testincludes}"/>
3.466 + </fileset>
3.467 + </union>
3.468 + <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
3.469 + <testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="language.web.api" testname="TestNG tests" workingDir="${work.dir}">
3.470 + <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
3.471 + <propertyset>
3.472 + <propertyref prefix="test-sys-prop."/>
3.473 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
3.474 + </propertyset>
3.475 + <customize/>
3.476 + </testng>
3.477 + </sequential>
3.478 + </macrodef>
3.479 + </target>
3.480 + <target name="-init-macrodef-test-impl">
3.481 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
3.482 + <attribute default="${includes}" name="includes"/>
3.483 + <attribute default="${excludes}" name="excludes"/>
3.484 + <attribute default="**" name="testincludes"/>
3.485 + <attribute default="" name="testmethods"/>
3.486 + <element implicit="true" name="customize" optional="true"/>
3.487 + <sequential>
3.488 + <echo>No tests executed.</echo>
3.489 + </sequential>
3.490 + </macrodef>
3.491 + </target>
3.492 + <target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
3.493 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
3.494 + <attribute default="${includes}" name="includes"/>
3.495 + <attribute default="${excludes}" name="excludes"/>
3.496 + <attribute default="**" name="testincludes"/>
3.497 + <attribute default="" name="testmethods"/>
3.498 + <element implicit="true" name="customize" optional="true"/>
3.499 + <sequential>
3.500 + <j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
3.501 + <customize/>
3.502 + </j2seproject3:junit>
3.503 + </sequential>
3.504 + </macrodef>
3.505 + </target>
3.506 + <target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
3.507 + <macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
3.508 + <attribute default="${includes}" name="includes"/>
3.509 + <attribute default="${excludes}" name="excludes"/>
3.510 + <attribute default="**" name="testincludes"/>
3.511 + <attribute default="" name="testmethods"/>
3.512 + <element implicit="true" name="customize" optional="true"/>
3.513 + <sequential>
3.514 + <j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
3.515 + <customize/>
3.516 + </j2seproject3:testng>
3.517 + </sequential>
3.518 + </macrodef>
3.519 + </target>
3.520 + <target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
3.521 + <macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
3.522 + <attribute default="${includes}" name="includes"/>
3.523 + <attribute default="${excludes}" name="excludes"/>
3.524 + <attribute default="**" name="testincludes"/>
3.525 + <attribute default="" name="testmethods"/>
3.526 + <sequential>
3.527 + <j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
3.528 + <customize>
3.529 + <classpath>
3.530 + <path path="${run.test.classpath}"/>
3.531 + </classpath>
3.532 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
3.533 + <jvmarg line="${run.jvmargs}"/>
3.534 + <jvmarg line="${run.jvmargs.ide}"/>
3.535 + </customize>
3.536 + </j2seproject3:test-impl>
3.537 + </sequential>
3.538 + </macrodef>
3.539 + </target>
3.540 + <target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
3.541 + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
3.542 + <attribute default="${includes}" name="includes"/>
3.543 + <attribute default="${excludes}" name="excludes"/>
3.544 + <attribute default="**" name="testincludes"/>
3.545 + <attribute default="" name="testmethods"/>
3.546 + <element name="customize" optional="true"/>
3.547 + <sequential>
3.548 + <property name="junit.forkmode" value="perTest"/>
3.549 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
3.550 + <test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
3.551 + <syspropertyset>
3.552 + <propertyref prefix="test-sys-prop."/>
3.553 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
3.554 + </syspropertyset>
3.555 + <formatter type="brief" usefile="false"/>
3.556 + <formatter type="xml"/>
3.557 + <jvmarg value="-ea"/>
3.558 + <jvmarg line="${debug-args-line}"/>
3.559 + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
3.560 + <customize/>
3.561 + </junit>
3.562 + </sequential>
3.563 + </macrodef>
3.564 + </target>
3.565 + <target if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
3.566 + <macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
3.567 + <attribute default="${includes}" name="includes"/>
3.568 + <attribute default="${excludes}" name="excludes"/>
3.569 + <attribute default="**" name="testincludes"/>
3.570 + <attribute default="" name="testmethods"/>
3.571 + <element name="customize" optional="true"/>
3.572 + <sequential>
3.573 + <property name="junit.forkmode" value="perTest"/>
3.574 + <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
3.575 + <batchtest todir="${build.test.results.dir}">
3.576 + <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
3.577 + <filename name="@{testincludes}"/>
3.578 + </fileset>
3.579 + </batchtest>
3.580 + <syspropertyset>
3.581 + <propertyref prefix="test-sys-prop."/>
3.582 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
3.583 + </syspropertyset>
3.584 + <formatter type="brief" usefile="false"/>
3.585 + <formatter type="xml"/>
3.586 + <jvmarg value="-ea"/>
3.587 + <jvmarg line="${debug-args-line}"/>
3.588 + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
3.589 + <customize/>
3.590 + </junit>
3.591 + </sequential>
3.592 + </macrodef>
3.593 + </target>
3.594 + <target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
3.595 + <macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
3.596 + <attribute default="${includes}" name="includes"/>
3.597 + <attribute default="${excludes}" name="excludes"/>
3.598 + <attribute default="**" name="testincludes"/>
3.599 + <attribute default="" name="testmethods"/>
3.600 + <element implicit="true" name="customize" optional="true"/>
3.601 + <sequential>
3.602 + <j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
3.603 + <customize/>
3.604 + </j2seproject3:junit-debug>
3.605 + </sequential>
3.606 + </macrodef>
3.607 + </target>
3.608 + <target if="${testng.available}" name="-init-macrodef-testng-debug">
3.609 + <macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
3.610 + <attribute default="${main.class}" name="testClass"/>
3.611 + <attribute default="" name="testMethod"/>
3.612 + <element name="customize2" optional="true"/>
3.613 + <sequential>
3.614 + <condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
3.615 + <isset property="test.method"/>
3.616 + </condition>
3.617 + <condition else="-suitename language.web.api -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
3.618 + <matches pattern=".*\.xml" string="@{testClass}"/>
3.619 + </condition>
3.620 + <delete dir="${build.test.results.dir}" quiet="true"/>
3.621 + <mkdir dir="${build.test.results.dir}"/>
3.622 + <j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
3.623 + <customize>
3.624 + <customize2/>
3.625 + <jvmarg value="-ea"/>
3.626 + <arg line="${testng.debug.mode}"/>
3.627 + <arg line="-d ${build.test.results.dir}"/>
3.628 + <arg line="-listener org.testng.reporters.VerboseReporter"/>
3.629 + <arg line="${testng.cmd.args}"/>
3.630 + </customize>
3.631 + </j2seproject3:debug>
3.632 + </sequential>
3.633 + </macrodef>
3.634 + </target>
3.635 + <target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
3.636 + <macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
3.637 + <attribute default="${main.class}" name="testClass"/>
3.638 + <attribute default="" name="testMethod"/>
3.639 + <element implicit="true" name="customize2" optional="true"/>
3.640 + <sequential>
3.641 + <j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
3.642 + <customize2/>
3.643 + </j2seproject3:testng-debug>
3.644 + </sequential>
3.645 + </macrodef>
3.646 + </target>
3.647 + <target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
3.648 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
3.649 + <attribute default="${includes}" name="includes"/>
3.650 + <attribute default="${excludes}" name="excludes"/>
3.651 + <attribute default="**" name="testincludes"/>
3.652 + <attribute default="" name="testmethods"/>
3.653 + <attribute default="${main.class}" name="testClass"/>
3.654 + <attribute default="" name="testMethod"/>
3.655 + <sequential>
3.656 + <j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
3.657 + <customize>
3.658 + <classpath>
3.659 + <path path="${run.test.classpath}"/>
3.660 + </classpath>
3.661 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
3.662 + <jvmarg line="${run.jvmargs}"/>
3.663 + <jvmarg line="${run.jvmargs.ide}"/>
3.664 + </customize>
3.665 + </j2seproject3:test-debug-impl>
3.666 + </sequential>
3.667 + </macrodef>
3.668 + </target>
3.669 + <target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
3.670 + <macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
3.671 + <attribute default="${includes}" name="includes"/>
3.672 + <attribute default="${excludes}" name="excludes"/>
3.673 + <attribute default="**" name="testincludes"/>
3.674 + <attribute default="" name="testmethods"/>
3.675 + <attribute default="${main.class}" name="testClass"/>
3.676 + <attribute default="" name="testMethod"/>
3.677 + <sequential>
3.678 + <j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
3.679 + <customize2>
3.680 + <syspropertyset>
3.681 + <propertyref prefix="test-sys-prop."/>
3.682 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
3.683 + </syspropertyset>
3.684 + </customize2>
3.685 + </j2seproject3:testng-debug-impl>
3.686 + </sequential>
3.687 + </macrodef>
3.688 + </target>
3.689 + <target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
3.690 + <!--
3.691 + pre NB7.2 profiling section; consider it deprecated
3.692 + -->
3.693 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
3.694 + <target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
3.695 + <!-- Empty placeholder for easier customization. -->
3.696 + <!-- You can override this target in the ../build.xml file. -->
3.697 + </target>
3.698 + <target if="profiler.info.jvmargs.agent" name="-profile-post-init">
3.699 + <!-- Empty placeholder for easier customization. -->
3.700 + <!-- You can override this target in the ../build.xml file. -->
3.701 + </target>
3.702 + <target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
3.703 + <macrodef name="resolve">
3.704 + <attribute name="name"/>
3.705 + <attribute name="value"/>
3.706 + <sequential>
3.707 + <property name="@{name}" value="${env.@{value}}"/>
3.708 + </sequential>
3.709 + </macrodef>
3.710 + <macrodef name="profile">
3.711 + <attribute default="${main.class}" name="classname"/>
3.712 + <element name="customize" optional="true"/>
3.713 + <sequential>
3.714 + <property environment="env"/>
3.715 + <resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
3.716 + <java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
3.717 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
3.718 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
3.719 + <jvmarg line="${profiler.info.jvmargs}"/>
3.720 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
3.721 + <arg line="${application.args}"/>
3.722 + <classpath>
3.723 + <path path="${run.classpath}"/>
3.724 + </classpath>
3.725 + <syspropertyset>
3.726 + <propertyref prefix="run-sys-prop."/>
3.727 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
3.728 + </syspropertyset>
3.729 + <customize/>
3.730 + </java>
3.731 + </sequential>
3.732 + </macrodef>
3.733 + </target>
3.734 + <target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
3.735 + <fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
3.736 + <fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
3.737 + </target>
3.738 + <!--
3.739 + end of pre NB7.2 profiling section
3.740 + -->
3.741 + <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
3.742 + <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
3.743 + <attribute default="${main.class}" name="name"/>
3.744 + <attribute default="${debug.classpath}" name="classpath"/>
3.745 + <attribute default="" name="stopclassname"/>
3.746 + <sequential>
3.747 + <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
3.748 + <classpath>
3.749 + <path path="@{classpath}"/>
3.750 + </classpath>
3.751 + </nbjpdastart>
3.752 + </sequential>
3.753 + </macrodef>
3.754 + <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
3.755 + <attribute default="${build.classes.dir}" name="dir"/>
3.756 + <sequential>
3.757 + <nbjpdareload>
3.758 + <fileset dir="@{dir}" includes="${fix.classes}">
3.759 + <include name="${fix.includes}*.class"/>
3.760 + </fileset>
3.761 + </nbjpdareload>
3.762 + </sequential>
3.763 + </macrodef>
3.764 + </target>
3.765 + <target name="-init-debug-args">
3.766 + <property name="version-output" value="java version "${ant.java.version}"/>
3.767 + <condition property="have-jdk-older-than-1.4">
3.768 + <or>
3.769 + <contains string="${version-output}" substring="java version "1.0"/>
3.770 + <contains string="${version-output}" substring="java version "1.1"/>
3.771 + <contains string="${version-output}" substring="java version "1.2"/>
3.772 + <contains string="${version-output}" substring="java version "1.3"/>
3.773 + </or>
3.774 + </condition>
3.775 + <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
3.776 + <istrue value="${have-jdk-older-than-1.4}"/>
3.777 + </condition>
3.778 + <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
3.779 + <os family="windows"/>
3.780 + </condition>
3.781 + <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
3.782 + <isset property="debug.transport"/>
3.783 + </condition>
3.784 + </target>
3.785 + <target depends="-init-debug-args" name="-init-macrodef-debug">
3.786 + <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
3.787 + <attribute default="${main.class}" name="classname"/>
3.788 + <attribute default="${debug.classpath}" name="classpath"/>
3.789 + <element name="customize" optional="true"/>
3.790 + <sequential>
3.791 + <java classname="@{classname}" dir="${work.dir}" fork="true">
3.792 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
3.793 + <jvmarg line="${debug-args-line}"/>
3.794 + <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
3.795 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
3.796 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
3.797 + <jvmarg line="${run.jvmargs}"/>
3.798 + <jvmarg line="${run.jvmargs.ide}"/>
3.799 + <classpath>
3.800 + <path path="@{classpath}"/>
3.801 + </classpath>
3.802 + <syspropertyset>
3.803 + <propertyref prefix="run-sys-prop."/>
3.804 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
3.805 + </syspropertyset>
3.806 + <customize/>
3.807 + </java>
3.808 + </sequential>
3.809 + </macrodef>
3.810 + </target>
3.811 + <target name="-init-macrodef-java">
3.812 + <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
3.813 + <attribute default="${main.class}" name="classname"/>
3.814 + <attribute default="${run.classpath}" name="classpath"/>
3.815 + <attribute default="jvm" name="jvm"/>
3.816 + <element name="customize" optional="true"/>
3.817 + <sequential>
3.818 + <java classname="@{classname}" dir="${work.dir}" fork="true">
3.819 + <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
3.820 + <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
3.821 + <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
3.822 + <jvmarg line="${run.jvmargs}"/>
3.823 + <jvmarg line="${run.jvmargs.ide}"/>
3.824 + <classpath>
3.825 + <path path="@{classpath}"/>
3.826 + </classpath>
3.827 + <syspropertyset>
3.828 + <propertyref prefix="run-sys-prop."/>
3.829 + <mapper from="run-sys-prop.*" to="*" type="glob"/>
3.830 + </syspropertyset>
3.831 + <customize/>
3.832 + </java>
3.833 + </sequential>
3.834 + </macrodef>
3.835 + </target>
3.836 + <target name="-init-macrodef-copylibs">
3.837 + <macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
3.838 + <attribute default="${manifest.file}" name="manifest"/>
3.839 + <element name="customize" optional="true"/>
3.840 + <sequential>
3.841 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
3.842 + <pathconvert property="run.classpath.without.build.classes.dir">
3.843 + <path path="${run.classpath}"/>
3.844 + <map from="${build.classes.dir.resolved}" to=""/>
3.845 + </pathconvert>
3.846 + <pathconvert pathsep=" " property="jar.classpath">
3.847 + <path path="${run.classpath.without.build.classes.dir}"/>
3.848 + <chainedmapper>
3.849 + <flattenmapper/>
3.850 + <filtermapper>
3.851 + <replacestring from=" " to="%20"/>
3.852 + </filtermapper>
3.853 + <globmapper from="*" to="lib/*"/>
3.854 + </chainedmapper>
3.855 + </pathconvert>
3.856 + <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
3.857 + <copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
3.858 + <fileset dir="${build.classes.dir}"/>
3.859 + <manifest>
3.860 + <attribute name="Class-Path" value="${jar.classpath}"/>
3.861 + <customize/>
3.862 + </manifest>
3.863 + </copylibs>
3.864 + </sequential>
3.865 + </macrodef>
3.866 + </target>
3.867 + <target name="-init-presetdef-jar">
3.868 + <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
3.869 + <jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
3.870 + <j2seproject1:fileset dir="${build.classes.dir}"/>
3.871 + </jar>
3.872 + </presetdef>
3.873 + </target>
3.874 + <target name="-init-ap-cmdline-properties">
3.875 + <property name="annotation.processing.enabled" value="true"/>
3.876 + <property name="annotation.processing.processors.list" value=""/>
3.877 + <property name="annotation.processing.processor.options" value=""/>
3.878 + <property name="annotation.processing.run.all.processors" value="true"/>
3.879 + <property name="javac.processorpath" value="${javac.classpath}"/>
3.880 + <property name="javac.test.processorpath" value="${javac.test.classpath}"/>
3.881 + <condition property="ap.supported.internal" value="true">
3.882 + <not>
3.883 + <matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
3.884 + </not>
3.885 + </condition>
3.886 + </target>
3.887 + <target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
3.888 + <condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
3.889 + <isfalse value="${annotation.processing.run.all.processors}"/>
3.890 + </condition>
3.891 + <condition else="" property="ap.proc.none.internal" value="-proc:none">
3.892 + <isfalse value="${annotation.processing.enabled}"/>
3.893 + </condition>
3.894 + </target>
3.895 + <target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
3.896 + <property name="ap.cmd.line.internal" value=""/>
3.897 + </target>
3.898 + <target depends="-pre-init,-init-private,-init-libraries,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
3.899 + <!--
3.900 + ===================
3.901 + COMPILATION SECTION
3.902 + ===================
3.903 + -->
3.904 + <target name="-deps-jar-init" unless="built-jar.properties">
3.905 + <property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
3.906 + <delete file="${built-jar.properties}" quiet="true"/>
3.907 + </target>
3.908 + <target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
3.909 + <echo level="warn" message="Cycle detected: language.web.api was already built"/>
3.910 + </target>
3.911 + <target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
3.912 + <mkdir dir="${build.dir}"/>
3.913 + <touch file="${built-jar.properties}" verbose="false"/>
3.914 + <property file="${built-jar.properties}" prefix="already.built.jar."/>
3.915 + <antcall target="-warn-already-built-jar"/>
3.916 + <propertyfile file="${built-jar.properties}">
3.917 + <entry key="${basedir}" value=""/>
3.918 + </propertyfile>
3.919 + <antcall target="-maybe-call-dep">
3.920 + <param name="call.built.properties" value="${built-jar.properties}"/>
3.921 + <param location="${project.base_web_api}" name="call.subproject"/>
3.922 + <param location="${project.base_web_api}/build.xml" name="call.script"/>
3.923 + <param name="call.target" value="jar"/>
3.924 + <param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
3.925 + </antcall>
3.926 + <antcall target="-maybe-call-dep">
3.927 + <param name="call.built.properties" value="${built-jar.properties}"/>
3.928 + <param location="${project.org_netbeans_modules_jackpot30_indexing}" name="call.subproject"/>
3.929 + <param location="${project.org_netbeans_modules_jackpot30_indexing}/build.xml" name="call.script"/>
3.930 + <param name="call.target" value="netbeans"/>
3.931 + <param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
3.932 + </antcall>
3.933 + <antcall target="-maybe-call-dep">
3.934 + <param name="call.built.properties" value="${built-jar.properties}"/>
3.935 + <param location="${project.source_web_api}" name="call.subproject"/>
3.936 + <param location="${project.source_web_api}/build.xml" name="call.script"/>
3.937 + <param name="call.target" value="jar"/>
3.938 + <param name="transfer.built-jar.properties" value="${built-jar.properties}"/>
3.939 + </antcall>
3.940 + </target>
3.941 + <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
3.942 + <target depends="init" name="-check-automatic-build">
3.943 + <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
3.944 + </target>
3.945 + <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
3.946 + <antcall target="clean"/>
3.947 + </target>
3.948 + <target depends="init,deps-jar" name="-pre-pre-compile">
3.949 + <mkdir dir="${build.classes.dir}"/>
3.950 + </target>
3.951 + <target name="-pre-compile">
3.952 + <!-- Empty placeholder for easier customization. -->
3.953 + <!-- You can override this target in the ../build.xml file. -->
3.954 + </target>
3.955 + <target if="do.depend.true" name="-compile-depend">
3.956 + <pathconvert property="build.generated.subdirs">
3.957 + <dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
3.958 + <include name="*"/>
3.959 + </dirset>
3.960 + </pathconvert>
3.961 + <j2seproject3:depend srcdir="${src.dir}:${build.generated.subdirs}"/>
3.962 + </target>
3.963 + <target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
3.964 + <j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
3.965 + <copy todir="${build.classes.dir}">
3.966 + <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
3.967 + </copy>
3.968 + </target>
3.969 + <target if="has.persistence.xml" name="-copy-persistence-xml">
3.970 + <mkdir dir="${build.classes.dir}/META-INF"/>
3.971 + <copy todir="${build.classes.dir}/META-INF">
3.972 + <fileset dir="${meta.inf.dir}" includes="persistence.xml"/>
3.973 + </copy>
3.974 + </target>
3.975 + <target name="-post-compile">
3.976 + <!-- Empty placeholder for easier customization. -->
3.977 + <!-- You can override this target in the ../build.xml file. -->
3.978 + </target>
3.979 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
3.980 + <target name="-pre-compile-single">
3.981 + <!-- Empty placeholder for easier customization. -->
3.982 + <!-- You can override this target in the ../build.xml file. -->
3.983 + </target>
3.984 + <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
3.985 + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
3.986 + <j2seproject3:force-recompile/>
3.987 + <j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.dir}"/>
3.988 + </target>
3.989 + <target name="-post-compile-single">
3.990 + <!-- Empty placeholder for easier customization. -->
3.991 + <!-- You can override this target in the ../build.xml file. -->
3.992 + </target>
3.993 + <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
3.994 + <!--
3.995 + ====================
3.996 + JAR BUILDING SECTION
3.997 + ====================
3.998 + -->
3.999 + <target depends="init" name="-pre-pre-jar">
3.1000 + <dirname file="${dist.jar}" property="dist.jar.dir"/>
3.1001 + <mkdir dir="${dist.jar.dir}"/>
3.1002 + </target>
3.1003 + <target name="-pre-jar">
3.1004 + <!-- Empty placeholder for easier customization. -->
3.1005 + <!-- You can override this target in the ../build.xml file. -->
3.1006 + </target>
3.1007 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
3.1008 + <j2seproject1:jar/>
3.1009 + </target>
3.1010 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
3.1011 + <j2seproject1:jar manifest="${manifest.file}"/>
3.1012 + </target>
3.1013 + <target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
3.1014 + <j2seproject1:jar manifest="${manifest.file}">
3.1015 + <j2seproject1:manifest>
3.1016 + <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
3.1017 + </j2seproject1:manifest>
3.1018 + </j2seproject1:jar>
3.1019 + <echo level="info">To run this application from the command line without Ant, try:</echo>
3.1020 + <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
3.1021 + <property location="${dist.jar}" name="dist.jar.resolved"/>
3.1022 + <pathconvert property="run.classpath.with.dist.jar">
3.1023 + <path path="${run.classpath}"/>
3.1024 + <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
3.1025 + </pathconvert>
3.1026 + <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
3.1027 + </target>
3.1028 + <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">
3.1029 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
3.1030 + <touch file="${tmp.manifest.file}" verbose="false"/>
3.1031 + </target>
3.1032 + <target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest">
3.1033 + <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
3.1034 + <copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
3.1035 + </target>
3.1036 + <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main">
3.1037 + <manifest file="${tmp.manifest.file}" mode="update">
3.1038 + <attribute name="Main-Class" value="${main.class}"/>
3.1039 + </manifest>
3.1040 + </target>
3.1041 + <target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen">
3.1042 + <basename file="${application.splash}" property="splashscreen.basename"/>
3.1043 + <mkdir dir="${build.classes.dir}/META-INF"/>
3.1044 + <copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
3.1045 + <manifest file="${tmp.manifest.file}" mode="update">
3.1046 + <attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
3.1047 + </manifest>
3.1048 + </target>
3.1049 + <target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack">
3.1050 + <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
3.1051 + <echo level="info">To run this application from the command line without Ant, try:</echo>
3.1052 + <property location="${dist.jar}" name="dist.jar.resolved"/>
3.1053 + <echo level="info">java -jar "${dist.jar.resolved}"</echo>
3.1054 + </target>
3.1055 + <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">
3.1056 + <delete>
3.1057 + <fileset file="${tmp.manifest.file}"/>
3.1058 + </delete>
3.1059 + </target>
3.1060 + <target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/>
3.1061 + <target name="-post-jar">
3.1062 + <!-- Empty placeholder for easier customization. -->
3.1063 + <!-- You can override this target in the ../build.xml file. -->
3.1064 + </target>
3.1065 + <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
3.1066 + <!--
3.1067 + =================
3.1068 + EXECUTION SECTION
3.1069 + =================
3.1070 + -->
3.1071 + <target depends="init,compile" description="Run a main class." name="run">
3.1072 + <j2seproject1:java>
3.1073 + <customize>
3.1074 + <arg line="${application.args}"/>
3.1075 + </customize>
3.1076 + </j2seproject1:java>
3.1077 + </target>
3.1078 + <target name="-do-not-recompile">
3.1079 + <property name="javac.includes.binary" value=""/>
3.1080 + </target>
3.1081 + <target depends="init,compile-single" name="run-single">
3.1082 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
3.1083 + <j2seproject1:java classname="${run.class}"/>
3.1084 + </target>
3.1085 + <target depends="init,compile-test-single" name="run-test-with-main">
3.1086 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
3.1087 + <j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
3.1088 + </target>
3.1089 + <!--
3.1090 + =================
3.1091 + DEBUGGING SECTION
3.1092 + =================
3.1093 + -->
3.1094 + <target depends="init" if="netbeans.home" name="-debug-start-debugger">
3.1095 + <j2seproject1:nbjpdastart name="${debug.class}"/>
3.1096 + </target>
3.1097 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
3.1098 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
3.1099 + </target>
3.1100 + <target depends="init,compile" name="-debug-start-debuggee">
3.1101 + <j2seproject3:debug>
3.1102 + <customize>
3.1103 + <arg line="${application.args}"/>
3.1104 + </customize>
3.1105 + </j2seproject3:debug>
3.1106 + </target>
3.1107 + <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
3.1108 + <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
3.1109 + <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
3.1110 + </target>
3.1111 + <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
3.1112 + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
3.1113 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
3.1114 + <j2seproject3:debug classname="${debug.class}"/>
3.1115 + </target>
3.1116 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
3.1117 + <target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
3.1118 + <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
3.1119 + <j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
3.1120 + </target>
3.1121 + <target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
3.1122 + <target depends="init" name="-pre-debug-fix">
3.1123 + <fail unless="fix.includes">Must set fix.includes</fail>
3.1124 + <property name="javac.includes" value="${fix.includes}.java"/>
3.1125 + </target>
3.1126 + <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
3.1127 + <j2seproject1:nbjpdareload/>
3.1128 + </target>
3.1129 + <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
3.1130 + <!--
3.1131 + =================
3.1132 + PROFILING SECTION
3.1133 + =================
3.1134 + -->
3.1135 + <!--
3.1136 + pre NB7.2 profiler integration
3.1137 + -->
3.1138 + <target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
3.1139 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
3.1140 + <nbprofiledirect>
3.1141 + <classpath>
3.1142 + <path path="${run.classpath}"/>
3.1143 + </classpath>
3.1144 + </nbprofiledirect>
3.1145 + <profile/>
3.1146 + </target>
3.1147 + <target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
3.1148 + <fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
3.1149 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
3.1150 + <nbprofiledirect>
3.1151 + <classpath>
3.1152 + <path path="${run.classpath}"/>
3.1153 + </classpath>
3.1154 + </nbprofiledirect>
3.1155 + <profile classname="${profile.class}"/>
3.1156 + </target>
3.1157 + <target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
3.1158 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
3.1159 + <nbprofiledirect>
3.1160 + <classpath>
3.1161 + <path path="${run.classpath}"/>
3.1162 + </classpath>
3.1163 + </nbprofiledirect>
3.1164 + <profile classname="sun.applet.AppletViewer">
3.1165 + <customize>
3.1166 + <arg value="${applet.url}"/>
3.1167 + </customize>
3.1168 + </profile>
3.1169 + </target>
3.1170 + <target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
3.1171 + <fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
3.1172 + <nbprofiledirect>
3.1173 + <classpath>
3.1174 + <path path="${run.test.classpath}"/>
3.1175 + </classpath>
3.1176 + </nbprofiledirect>
3.1177 + <junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
3.1178 + <env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
3.1179 + <jvmarg value="${profiler.info.jvmargs.agent}"/>
3.1180 + <jvmarg line="${profiler.info.jvmargs}"/>
3.1181 + <test name="${profile.class}"/>
3.1182 + <classpath>
3.1183 + <path path="${run.test.classpath}"/>
3.1184 + </classpath>
3.1185 + <syspropertyset>
3.1186 + <propertyref prefix="test-sys-prop."/>
3.1187 + <mapper from="test-sys-prop.*" to="*" type="glob"/>
3.1188 + </syspropertyset>
3.1189 + <formatter type="brief" usefile="false"/>
3.1190 + <formatter type="xml"/>
3.1191 + </junit>
3.1192 + </target>
3.1193 + <!--
3.1194 + end of pre NB72 profiling section
3.1195 + -->
3.1196 + <target if="netbeans.home" name="-profile-check">
3.1197 + <condition property="profiler.configured">
3.1198 + <or>
3.1199 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
3.1200 + <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
3.1201 + </or>
3.1202 + </condition>
3.1203 + </target>
3.1204 + <target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
3.1205 + <startprofiler/>
3.1206 + <antcall target="run"/>
3.1207 + </target>
3.1208 + <target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent">
3.1209 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
3.1210 + <startprofiler/>
3.1211 + <antcall target="run-single"/>
3.1212 + </target>
3.1213 + <target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
3.1214 + <target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
3.1215 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
3.1216 + <startprofiler/>
3.1217 + <antcall target="test-single"/>
3.1218 + </target>
3.1219 + <target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
3.1220 + <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
3.1221 + <startprofiler/>
3.1222 + <antcal target="run-test-with-main"/>
3.1223 + </target>
3.1224 + <target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
3.1225 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
3.1226 + <startprofiler/>
3.1227 + <antcall target="run-applet"/>
3.1228 + </target>
3.1229 + <!--
3.1230 + ===============
3.1231 + JAVADOC SECTION
3.1232 + ===============
3.1233 + -->
3.1234 + <target depends="init" if="have.sources" name="-javadoc-build">
3.1235 + <mkdir dir="${dist.javadoc.dir}"/>
3.1236 + <condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
3.1237 + <and>
3.1238 + <isset property="endorsed.classpath.cmd.line.arg"/>
3.1239 + <not>
3.1240 + <equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
3.1241 + </not>
3.1242 + </and>
3.1243 + </condition>
3.1244 + <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
3.1245 + <classpath>
3.1246 + <path path="${javac.classpath}"/>
3.1247 + </classpath>
3.1248 + <fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}">
3.1249 + <filename name="**/*.java"/>
3.1250 + </fileset>
3.1251 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
3.1252 + <include name="**/*.java"/>
3.1253 + <exclude name="*.java"/>
3.1254 + </fileset>
3.1255 + <arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
3.1256 + </javadoc>
3.1257 + <copy todir="${dist.javadoc.dir}">
3.1258 + <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
3.1259 + <filename name="**/doc-files/**"/>
3.1260 + </fileset>
3.1261 + <fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
3.1262 + <include name="**/doc-files/**"/>
3.1263 + </fileset>
3.1264 + </copy>
3.1265 + </target>
3.1266 + <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
3.1267 + <nbbrowse file="${dist.javadoc.dir}/index.html"/>
3.1268 + </target>
3.1269 + <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
3.1270 + <!--
3.1271 + =========================
3.1272 + TEST COMPILATION SECTION
3.1273 + =========================
3.1274 + -->
3.1275 + <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
3.1276 + <mkdir dir="${build.test.classes.dir}"/>
3.1277 + </target>
3.1278 + <target name="-pre-compile-test">
3.1279 + <!-- Empty placeholder for easier customization. -->
3.1280 + <!-- You can override this target in the ../build.xml file. -->
3.1281 + </target>
3.1282 + <target if="do.depend.true" name="-compile-test-depend">
3.1283 + <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
3.1284 + </target>
3.1285 + <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
3.1286 + <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/>
3.1287 + <copy todir="${build.test.classes.dir}">
3.1288 + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
3.1289 + </copy>
3.1290 + </target>
3.1291 + <target name="-post-compile-test">
3.1292 + <!-- Empty placeholder for easier customization. -->
3.1293 + <!-- You can override this target in the ../build.xml file. -->
3.1294 + </target>
3.1295 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
3.1296 + <target name="-pre-compile-test-single">
3.1297 + <!-- Empty placeholder for easier customization. -->
3.1298 + <!-- You can override this target in the ../build.xml file. -->
3.1299 + </target>
3.1300 + <target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
3.1301 + <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
3.1302 + <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
3.1303 + <j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
3.1304 + <copy todir="${build.test.classes.dir}">
3.1305 + <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
3.1306 + </copy>
3.1307 + </target>
3.1308 + <target name="-post-compile-test-single">
3.1309 + <!-- Empty placeholder for easier customization. -->
3.1310 + <!-- You can override this target in the ../build.xml file. -->
3.1311 + </target>
3.1312 + <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
3.1313 + <!--
3.1314 + =======================
3.1315 + TEST EXECUTION SECTION
3.1316 + =======================
3.1317 + -->
3.1318 + <target depends="init" if="have.tests" name="-pre-test-run">
3.1319 + <mkdir dir="${build.test.results.dir}"/>
3.1320 + </target>
3.1321 + <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
3.1322 + <j2seproject3:test testincludes="**/*Test.java"/>
3.1323 + </target>
3.1324 + <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
3.1325 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
3.1326 + </target>
3.1327 + <target depends="init" if="have.tests" name="test-report"/>
3.1328 + <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
3.1329 + <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
3.1330 + <target depends="init" if="have.tests" name="-pre-test-run-single">
3.1331 + <mkdir dir="${build.test.results.dir}"/>
3.1332 + </target>
3.1333 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
3.1334 + <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
3.1335 + <j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
3.1336 + </target>
3.1337 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
3.1338 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
3.1339 + </target>
3.1340 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
3.1341 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
3.1342 + <fail unless="test.class">Must select some files in the IDE or set test.class</fail>
3.1343 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
3.1344 + <j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
3.1345 + </target>
3.1346 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
3.1347 + <fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
3.1348 + </target>
3.1349 + <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
3.1350 + <!--
3.1351 + =======================
3.1352 + TEST DEBUGGING SECTION
3.1353 + =======================
3.1354 + -->
3.1355 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
3.1356 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
3.1357 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
3.1358 + </target>
3.1359 + <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
3.1360 + <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
3.1361 + <fail unless="test.method">Must select some method in the IDE or set test.method</fail>
3.1362 + <j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
3.1363 + </target>
3.1364 + <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
3.1365 + <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
3.1366 + </target>
3.1367 + <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
3.1368 + <target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
3.1369 + <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
3.1370 + <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
3.1371 + </target>
3.1372 + <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
3.1373 + <!--
3.1374 + =========================
3.1375 + APPLET EXECUTION SECTION
3.1376 + =========================
3.1377 + -->
3.1378 + <target depends="init,compile-single" name="run-applet">
3.1379 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
3.1380 + <j2seproject1:java classname="sun.applet.AppletViewer">
3.1381 + <customize>
3.1382 + <arg value="${applet.url}"/>
3.1383 + </customize>
3.1384 + </j2seproject1:java>
3.1385 + </target>
3.1386 + <!--
3.1387 + =========================
3.1388 + APPLET DEBUGGING SECTION
3.1389 + =========================
3.1390 + -->
3.1391 + <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
3.1392 + <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
3.1393 + <j2seproject3:debug classname="sun.applet.AppletViewer">
3.1394 + <customize>
3.1395 + <arg value="${applet.url}"/>
3.1396 + </customize>
3.1397 + </j2seproject3:debug>
3.1398 + </target>
3.1399 + <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
3.1400 + <!--
3.1401 + ===============
3.1402 + CLEANUP SECTION
3.1403 + ===============
3.1404 + -->
3.1405 + <target name="-deps-clean-init" unless="built-clean.properties">
3.1406 + <property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
3.1407 + <delete file="${built-clean.properties}" quiet="true"/>
3.1408 + </target>
3.1409 + <target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
3.1410 + <echo level="warn" message="Cycle detected: language.web.api was already built"/>
3.1411 + </target>
3.1412 + <target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
3.1413 + <mkdir dir="${build.dir}"/>
3.1414 + <touch file="${built-clean.properties}" verbose="false"/>
3.1415 + <property file="${built-clean.properties}" prefix="already.built.clean."/>
3.1416 + <antcall target="-warn-already-built-clean"/>
3.1417 + <propertyfile file="${built-clean.properties}">
3.1418 + <entry key="${basedir}" value=""/>
3.1419 + </propertyfile>
3.1420 + <antcall target="-maybe-call-dep">
3.1421 + <param name="call.built.properties" value="${built-clean.properties}"/>
3.1422 + <param location="${project.base_web_api}" name="call.subproject"/>
3.1423 + <param location="${project.base_web_api}/build.xml" name="call.script"/>
3.1424 + <param name="call.target" value="clean"/>
3.1425 + <param name="transfer.built-clean.properties" value="${built-clean.properties}"/>
3.1426 + </antcall>
3.1427 + <antcall target="-maybe-call-dep">
3.1428 + <param name="call.built.properties" value="${built-clean.properties}"/>
3.1429 + <param location="${project.org_netbeans_modules_jackpot30_indexing}" name="call.subproject"/>
3.1430 + <param location="${project.org_netbeans_modules_jackpot30_indexing}/build.xml" name="call.script"/>
3.1431 + <param name="call.target" value="clean"/>
3.1432 + <param name="transfer.built-clean.properties" value="${built-clean.properties}"/>
3.1433 + </antcall>
3.1434 + <antcall target="-maybe-call-dep">
3.1435 + <param name="call.built.properties" value="${built-clean.properties}"/>
3.1436 + <param location="${project.source_web_api}" name="call.subproject"/>
3.1437 + <param location="${project.source_web_api}/build.xml" name="call.script"/>
3.1438 + <param name="call.target" value="clean"/>
3.1439 + <param name="transfer.built-clean.properties" value="${built-clean.properties}"/>
3.1440 + </antcall>
3.1441 + </target>
3.1442 + <target depends="init" name="-do-clean">
3.1443 + <delete dir="${build.dir}"/>
3.1444 + <delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
3.1445 + </target>
3.1446 + <target name="-post-clean">
3.1447 + <!-- Empty placeholder for easier customization. -->
3.1448 + <!-- You can override this target in the ../build.xml file. -->
3.1449 + </target>
3.1450 + <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
3.1451 + <target name="-check-call-dep">
3.1452 + <property file="${call.built.properties}" prefix="already.built."/>
3.1453 + <condition property="should.call.dep">
3.1454 + <and>
3.1455 + <not>
3.1456 + <isset property="already.built.${call.subproject}"/>
3.1457 + </not>
3.1458 + <available file="${call.script}"/>
3.1459 + </and>
3.1460 + </condition>
3.1461 + </target>
3.1462 + <target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
3.1463 + <ant antfile="${call.script}" inheritall="false" target="${call.target}">
3.1464 + <propertyset>
3.1465 + <propertyref prefix="transfer."/>
3.1466 + <mapper from="transfer.*" to="*" type="glob"/>
3.1467 + </propertyset>
3.1468 + </ant>
3.1469 + </target>
3.1470 +</project>
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/language/server/web/language.web.api/nbproject/genfiles.properties Mon Jul 16 17:32:27 2012 +0200
4.3 @@ -0,0 +1,8 @@
4.4 +build.xml.data.CRC32=1a6695bf
4.5 +build.xml.script.CRC32=7dcc1ec0
4.6 +build.xml.stylesheet.CRC32=28e38971@1.54.0.46
4.7 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
4.8 +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
4.9 +nbproject/build-impl.xml.data.CRC32=1a6695bf
4.10 +nbproject/build-impl.xml.script.CRC32=a2c87df6
4.11 +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6@1.54.0.46
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/language/server/web/language.web.api/nbproject/project.properties Mon Jul 16 17:32:27 2012 +0200
5.3 @@ -0,0 +1,113 @@
5.4 +annotation.processing.enabled=true
5.5 +annotation.processing.enabled.in.editor=false
5.6 +annotation.processing.processors.list=
5.7 +annotation.processing.run.all.processors=true
5.8 +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
5.9 +application.title=language.web.api
5.10 +application.vendor=lahvac
5.11 +build.classes.dir=${build.dir}/classes
5.12 +build.classes.excludes=**/*.java,**/*.form
5.13 +# This directory is removed when the project is cleaned:
5.14 +build.dir=build
5.15 +build.generated.dir=${build.dir}/generated
5.16 +build.generated.sources.dir=${build.dir}/generated-sources
5.17 +# Only compile against the classpath explicitly listed here:
5.18 +build.sysclasspath=ignore
5.19 +build.test.classes.dir=${build.dir}/test/classes
5.20 +build.test.results.dir=${build.dir}/test/results
5.21 +# Uncomment to specify the preferred debugger connection transport:
5.22 +#debug.transport=dt_socket
5.23 +debug.classpath=\
5.24 + ${run.classpath}
5.25 +debug.test.classpath=\
5.26 + ${run.test.classpath}
5.27 +# This directory is removed when the project is cleaned:
5.28 +dist.dir=dist
5.29 +dist.jar=${dist.dir}/language.web.api.jar
5.30 +dist.javadoc.dir=${dist.dir}/javadoc
5.31 +endorsed.classpath=
5.32 +excludes=
5.33 +file.reference.org-netbeans-lib-nbjavac.jar=${var.nbplatform.default.netbeans.dest.dir}/java/modules/org-netbeans-lib-nbjavac.jar
5.34 +file.reference.org-netbeans-modules-java-source.jar=../../../../lib/org-netbeans-modules-java-source.jar
5.35 +file.reference.org-netbeans-modules-parsing-api.jar=../../../../lib/org-netbeans-modules-parsing-api.jar
5.36 +file.reference.org-netbeans-modules-parsing-lucene.jar=../../../../lib/org-netbeans-modules-parsing-lucene.jar
5.37 +file.reference.org-netbeans-spi-java-hints.jar=../../../../lib/org-netbeans-spi-java-hints.jar
5.38 +file.reference.org-openide-filesystems.jar=../../../../lib/org-openide-filesystems.jar
5.39 +file.reference.util-commons.jar=../../../../remoting/ide/api/external/util-commons.jar
5.40 +file.reference.util-pojson.jar=../../../../remoting/ide/api/external/util-pojson.jar
5.41 +includes=**
5.42 +jar.archive.disabled=${jnlp.enabled}
5.43 +jar.compress=false
5.44 +jar.index=${jnlp.enabled}
5.45 +javac.classpath=\
5.46 + ${libs.jersey.classpath}:\
5.47 + ${libs.lucene.classpath}:\
5.48 + ${file.reference.org-netbeans-modules-parsing-api.jar}:\
5.49 + ${file.reference.org-openide-filesystems.jar}:\
5.50 + ${file.reference.org-netbeans-modules-parsing-lucene.jar}:\
5.51 + ${file.reference.util-commons.jar}:\
5.52 + ${file.reference.util-pojson.jar}:\
5.53 + ${reference.base_web_api.jar}:\
5.54 + ${file.reference.org-netbeans-spi-java-hints.jar}:\
5.55 + ${libs.javac.classpath}:\
5.56 + ${reference.org_netbeans_modules_jackpot30_indexing.module}:\
5.57 + ${reference.source_web_api.jar}:\
5.58 + ${file.reference.org-netbeans-modules-java-source.jar}:\
5.59 + ${libs.freemarker.classpath}:\
5.60 + ${file.reference.org-netbeans-lib-nbjavac.jar}
5.61 +# Space-separated list of extra javac options
5.62 +javac.compilerargs=
5.63 +javac.deprecation=false
5.64 +javac.processorpath=\
5.65 + ${javac.classpath}
5.66 +javac.source=1.6
5.67 +javac.target=1.6
5.68 +javac.test.classpath=\
5.69 + ${javac.classpath}:\
5.70 + ${build.classes.dir}
5.71 +javac.test.processorpath=\
5.72 + ${javac.test.classpath}
5.73 +javadoc.additionalparam=
5.74 +javadoc.author=false
5.75 +javadoc.encoding=${source.encoding}
5.76 +javadoc.noindex=false
5.77 +javadoc.nonavbar=false
5.78 +javadoc.notree=false
5.79 +javadoc.private=false
5.80 +javadoc.splitindex=true
5.81 +javadoc.use=true
5.82 +javadoc.version=false
5.83 +javadoc.windowtitle=
5.84 +jnlp.codebase.type=no.codebase
5.85 +jnlp.descriptor=application
5.86 +jnlp.enabled=false
5.87 +jnlp.mixed.code=default
5.88 +jnlp.offline-allowed=false
5.89 +jnlp.signed=false
5.90 +jnlp.signing=
5.91 +jnlp.signing.alias=
5.92 +jnlp.signing.keystore=
5.93 +main.class=
5.94 +manifest.file=manifest.mf
5.95 +meta.inf.dir=${src.dir}/META-INF
5.96 +mkdist.disabled=false
5.97 +platform.active=default_platform
5.98 +project.base_web_api=../../../../remoting/server/web/base.web.api
5.99 +project.org_netbeans_modules_jackpot30_indexing=../../../ide/indexing
5.100 +project.source_web_api=../../../../remoting/server/web/source.web.api
5.101 +reference.base_web_api.jar=${project.base_web_api}/dist/base.web.api.jar
5.102 +reference.org_netbeans_modules_jackpot30_indexing.module=${project.org_netbeans_modules_jackpot30_indexing}/../build/cluster/modules/org-netbeans-modules-jackpot30-indexing.jar
5.103 +reference.source_web_api.jar=${project.source_web_api}/dist/source.web.api.jar
5.104 +run.classpath=\
5.105 + ${javac.classpath}:\
5.106 + ${build.classes.dir}
5.107 +# Space-separated list of JVM arguments used when running the project
5.108 +# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
5.109 +# or test-sys-prop.name=value to set system properties for unit tests):
5.110 +run.jvmargs=
5.111 +run.test.classpath=\
5.112 + ${javac.test.classpath}:\
5.113 + ${build.test.classes.dir}
5.114 +source.encoding=UTF-8
5.115 +src.dir=src
5.116 +test.src.dir=test
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/language/server/web/language.web.api/nbproject/project.xml Mon Jul 16 17:32:27 2012 +0200
6.3 @@ -0,0 +1,44 @@
6.4 +<?xml version="1.0" encoding="UTF-8"?>
6.5 +<project xmlns="http://www.netbeans.org/ns/project/1">
6.6 + <type>org.netbeans.modules.java.j2seproject</type>
6.7 + <configuration>
6.8 + <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
6.9 + <name>language.web.api</name>
6.10 + <source-roots>
6.11 + <root id="src.dir"/>
6.12 + </source-roots>
6.13 + <test-roots>
6.14 + <root id="test.src.dir"/>
6.15 + </test-roots>
6.16 + </data>
6.17 + <libraries xmlns="http://www.netbeans.org/ns/ant-project-libraries/1">
6.18 + <definitions>../../../../lib/nblibraries.properties</definitions>
6.19 + </libraries>
6.20 + <references xmlns="http://www.netbeans.org/ns/ant-project-references/1">
6.21 + <reference>
6.22 + <foreign-project>base_web_api</foreign-project>
6.23 + <artifact-type>jar</artifact-type>
6.24 + <script>build.xml</script>
6.25 + <target>jar</target>
6.26 + <clean-target>clean</clean-target>
6.27 + <id>jar</id>
6.28 + </reference>
6.29 + <reference>
6.30 + <foreign-project>org_netbeans_modules_jackpot30_indexing</foreign-project>
6.31 + <artifact-type>jar</artifact-type>
6.32 + <script>build.xml</script>
6.33 + <target>netbeans</target>
6.34 + <clean-target>clean</clean-target>
6.35 + <id>module</id>
6.36 + </reference>
6.37 + <reference>
6.38 + <foreign-project>source_web_api</foreign-project>
6.39 + <artifact-type>jar</artifact-type>
6.40 + <script>build.xml</script>
6.41 + <target>jar</target>
6.42 + <clean-target>clean</clean-target>
6.43 + <id>jar</id>
6.44 + </reference>
6.45 + </references>
6.46 + </configuration>
6.47 +</project>
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/language/server/web/language.web.api/src/org/netbeans/modules/jackpot30/backend/language/api/API.java Mon Jul 16 17:32:27 2012 +0200
7.3 @@ -0,0 +1,195 @@
7.4 +/*
7.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
7.6 + *
7.7 + * Copyright 2009-2010 Sun Microsystems, Inc. All rights reserved.
7.8 + *
7.9 + * The contents of this file are subject to the terms of either the GNU
7.10 + * General Public License Version 2 only ("GPL") or the Common
7.11 + * Development and Distribution License("CDDL") (collectively, the
7.12 + * "License"). You may not use this file except in compliance with the
7.13 + * License. You can obtain a copy of the License at
7.14 + * http://www.netbeans.org/cddl-gplv2.html
7.15 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
7.16 + * specific language governing permissions and limitations under the
7.17 + * License. When distributing the software, include this License Header
7.18 + * Notice in each file and include the License file at
7.19 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
7.20 + * particular file as subject to the "Classpath" exception as provided
7.21 + * by Sun in the GPL Version 2 section of the License file that
7.22 + * accompanied this code. If applicable, add the following below the
7.23 + * License Header, with the fields enclosed by brackets [] replaced by
7.24 + * your own identifying information:
7.25 + * "Portions Copyrighted [year] [name of copyright owner]"
7.26 + *
7.27 + * If you wish your version of this file to be governed by only the CDDL
7.28 + * or only the GPL Version 2, indicate your decision by adding
7.29 + * "[Contributor] elects to include this software in this distribution
7.30 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
7.31 + * single choice of license, a recipient has the option to distribute
7.32 + * your version of this file under either the CDDL, the GPL Version 2 or
7.33 + * to extend the choice of license to its licensees as provided above.
7.34 + * However, if you add GPL Version 2 code and therefore, elected the GPL
7.35 + * Version 2 license, then the option applies only if the new code is
7.36 + * made subject to such option by the copyright holder.
7.37 + *
7.38 + * Contributor(s):
7.39 + *
7.40 + * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
7.41 + */
7.42 +
7.43 +package org.netbeans.modules.jackpot30.backend.language.api;
7.44 +
7.45 +import com.sun.source.tree.CompilationUnitTree;
7.46 +import com.sun.source.tree.Tree;
7.47 +import com.sun.source.util.TreePath;
7.48 +import com.sun.source.util.Trees;
7.49 +import com.sun.tools.javac.api.JavacTaskImpl;
7.50 +import java.io.IOException;
7.51 +import java.net.URI;
7.52 +import java.util.Arrays;
7.53 +import java.util.Collection;
7.54 +import java.util.Collections;
7.55 +import java.util.LinkedList;
7.56 +import javax.tools.Diagnostic;
7.57 +import javax.tools.JavaCompiler;
7.58 +import javax.tools.JavaFileObject;
7.59 +import javax.tools.JavaFileObject.Kind;
7.60 +import javax.tools.SimpleJavaFileObject;
7.61 +import javax.tools.ToolProvider;
7.62 +import javax.ws.rs.GET;
7.63 +import javax.ws.rs.Path;
7.64 +import javax.ws.rs.Produces;
7.65 +import javax.ws.rs.QueryParam;
7.66 +import org.apache.lucene.queryParser.ParseException;
7.67 +import org.netbeans.lib.nbjavac.services.NBParserFactory;
7.68 +import org.netbeans.lib.nbjavac.services.NBTreeMaker;
7.69 +import org.netbeans.modules.jackpot30.backend.base.CategoryStorage;
7.70 +import org.netbeans.modules.jackpot30.indexing.index.IndexQuery;
7.71 +import org.netbeans.modules.java.hints.jackpot.spi.PatternConvertor;
7.72 +import org.netbeans.modules.java.hints.providers.spi.HintDescription;
7.73 +import org.netbeans.modules.java.hints.providers.spi.HintDescription.AdditionalQueryConstraints;
7.74 +import org.netbeans.modules.java.hints.providers.spi.Trigger.PatternDescription;
7.75 +import org.netbeans.modules.java.hints.spiimpl.Utilities;
7.76 +import org.netbeans.modules.java.hints.spiimpl.pm.BulkSearch;
7.77 +import org.netbeans.modules.java.hints.spiimpl.pm.BulkSearch.BulkPattern;
7.78 +
7.79 +/**
7.80 + *
7.81 + * @author lahvac
7.82 + */
7.83 +@Path("/index/language")
7.84 +public class API {
7.85 +
7.86 + @GET
7.87 + @Path("/search")
7.88 + @Produces("text/plain")
7.89 + public String find(@QueryParam("path") String segment, @QueryParam("pattern") String pattern) throws IOException, InterruptedException, ParseException {
7.90 + CategoryStorage category = CategoryStorage.forId(segment);
7.91 + StringBuilder sb = new StringBuilder();
7.92 + BulkPattern bulkPattern = preparePattern(pattern, null);
7.93 +
7.94 + for (String candidate : IndexQuery.performLocalQuery(category.getIndex(), bulkPattern, false).keySet()) {
7.95 + sb.append(candidate);
7.96 + sb.append("\n");
7.97 + }
7.98 +
7.99 + return sb.toString();
7.100 + }
7.101 +
7.102 + @GET
7.103 + @Path("/searchSpans")
7.104 + @Produces("text/plain")
7.105 + public String findSpans(@QueryParam("path") String segment, @QueryParam("relativePath") String relativePath, @QueryParam("pattern") String pattern) throws IOException, InterruptedException {
7.106 + CategoryStorage category = CategoryStorage.forId(segment);
7.107 + StringBuilder sb = new StringBuilder();
7.108 + BulkPattern bulkPattern = preparePattern(pattern, null);
7.109 + CharSequence source = org.netbeans.modules.jackpot30.source.api.API.readFileContent(category, relativePath);
7.110 + JavacTaskImpl jti = prepareJavacTaskImpl();
7.111 + CompilationUnitTree cut = jti.parse(new JFOImpl(source)).iterator().next();
7.112 + Collection<TreePath> paths = new LinkedList<TreePath>();
7.113 +
7.114 + for (Collection<TreePath> c : BulkSearch.getDefault().match(null, new TreePath(cut), bulkPattern).values()) {
7.115 + paths.addAll(c);
7.116 + }
7.117 +
7.118 + Trees t = Trees.instance(jti);
7.119 +
7.120 + for (TreePath tp : paths) {
7.121 + sb.append(t.getSourcePositions().getStartPosition(cut, tp.getLeaf()));
7.122 + sb.append(":");
7.123 + sb.append(t.getSourcePositions().getEndPosition(cut, tp.getLeaf()));
7.124 + sb.append(":");
7.125 + }
7.126 +
7.127 + if (sb.length() > 0) {
7.128 + sb.delete(sb.length() - 1, sb.length());
7.129 + }
7.130 +
7.131 + return sb.toString();
7.132 + }
7.133 +
7.134 + @GET
7.135 + @Path("/errors")
7.136 + @Produces("text/plain")
7.137 + public String errors(@QueryParam("pattern") String pattern) throws IOException {
7.138 + StringBuilder sb = new StringBuilder();
7.139 + Collection<Diagnostic<? extends JavaFileObject>> errors = new LinkedList<Diagnostic<? extends JavaFileObject>>();
7.140 +
7.141 + preparePattern(pattern, errors);
7.142 +
7.143 + for (Diagnostic<? extends JavaFileObject> d : errors) {
7.144 + sb.append(d.getMessage(null));
7.145 + sb.append("\n");
7.146 + }
7.147 +
7.148 + return sb.toString();
7.149 + }
7.150 +
7.151 + private static BulkPattern preparePattern(String pattern, Collection<Diagnostic<? extends JavaFileObject>> errors) {
7.152 + return preparePattern(PatternConvertor.create(pattern), errors);
7.153 + }
7.154 +
7.155 + //XXX: copied from BatchSearch, may be possible to merge once CompilationInfo is accessible in server mode
7.156 + private static BulkPattern preparePattern(final Iterable<? extends HintDescription> patterns, Collection<Diagnostic<? extends JavaFileObject>> errors) {
7.157 + JavacTaskImpl javac = prepareJavacTaskImpl();
7.158 + Collection<String> code = new LinkedList<String>();
7.159 + Collection<Tree> trees = new LinkedList<Tree>();
7.160 + Collection<AdditionalQueryConstraints> additionalConstraints = new LinkedList<AdditionalQueryConstraints>();
7.161 +
7.162 + for (HintDescription pattern : patterns) {
7.163 + String textPattern = ((PatternDescription) pattern.getTrigger()).getPattern();
7.164 +
7.165 + code.add(textPattern);
7.166 + trees.add(Utilities.parseAndAttribute(javac, textPattern, errors));
7.167 + additionalConstraints.add(pattern.getAdditionalConstraints());
7.168 + }
7.169 +
7.170 + return BulkSearch.getDefault().create(code, trees, additionalConstraints);
7.171 + }
7.172 +
7.173 + private static JavacTaskImpl prepareJavacTaskImpl() {
7.174 + final String bootPath = System.getProperty("sun.boot.class.path"); //NOI18N
7.175 + final JavaCompiler tool = ToolProvider.getSystemJavaCompiler();
7.176 +
7.177 + assert tool != null;
7.178 +
7.179 + JavacTaskImpl ct = (JavacTaskImpl) tool.getTask(null, null, null, Arrays.asList("-bootclasspath", bootPath, "-Xjcov"), null, Collections.<JavaFileObject>emptyList());
7.180 +
7.181 + NBParserFactory.preRegister(ct.getContext());
7.182 + NBTreeMaker.preRegister(ct.getContext());
7.183 +
7.184 + return ct;
7.185 + }
7.186 +
7.187 + private static final class JFOImpl extends SimpleJavaFileObject {
7.188 + private final CharSequence code;
7.189 + public JFOImpl(CharSequence code) {
7.190 + super(URI.create(""), Kind.SOURCE);
7.191 + this.code = code;
7.192 + }
7.193 + @Override
7.194 + public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException {
7.195 + return code;
7.196 + }
7.197 + }
7.198 +}
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/language/server/web/language.web.api/src/org/netbeans/modules/jackpot30/backend/language/api/UI.java Mon Jul 16 17:32:27 2012 +0200
8.3 @@ -0,0 +1,265 @@
8.4 +/*
8.5 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
8.6 + *
8.7 + * Copyright 2009-2010 Sun Microsystems, Inc. All rights reserved.
8.8 + *
8.9 + * The contents of this file are subject to the terms of either the GNU
8.10 + * General Public License Version 2 only ("GPL") or the Common
8.11 + * Development and Distribution License("CDDL") (collectively, the
8.12 + * "License"). You may not use this file except in compliance with the
8.13 + * License. You can obtain a copy of the License at
8.14 + * http://www.netbeans.org/cddl-gplv2.html
8.15 + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
8.16 + * specific language governing permissions and limitations under the
8.17 + * License. When distributing the software, include this License Header
8.18 + * Notice in each file and include the License file at
8.19 + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
8.20 + * particular file as subject to the "Classpath" exception as provided
8.21 + * by Sun in the GPL Version 2 section of the License file that
8.22 + * accompanied this code. If applicable, add the following below the
8.23 + * License Header, with the fields enclosed by brackets [] replaced by
8.24 + * your own identifying information:
8.25 + * "Portions Copyrighted [year] [name of copyright owner]"
8.26 + *
8.27 + * If you wish your version of this file to be governed by only the CDDL
8.28 + * or only the GPL Version 2, indicate your decision by adding
8.29 + * "[Contributor] elects to include this software in this distribution
8.30 + * under the [CDDL or GPL Version 2] license." If you do not indicate a
8.31 + * single choice of license, a recipient has the option to distribute
8.32 + * your version of this file under either the CDDL, the GPL Version 2 or
8.33 + * to extend the choice of license to its licensees as provided above.
8.34 + * However, if you add GPL Version 2 code and therefore, elected the GPL
8.35 + * Version 2 license, then the option applies only if the new code is
8.36 + * made subject to such option by the copyright holder.
8.37 + *
8.38 + * Contributor(s):
8.39 + *
8.40 + * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
8.41 + */
8.42 +
8.43 +package org.netbeans.modules.jackpot30.backend.language.api;
8.44 +
8.45 +import freemarker.cache.TemplateLoader;
8.46 +import freemarker.template.Configuration;
8.47 +import freemarker.template.Template;
8.48 +import freemarker.template.TemplateException;
8.49 +import java.io.IOException;
8.50 +import java.io.InputStream;
8.51 +import java.io.InputStreamReader;
8.52 +import java.io.Reader;
8.53 +import java.io.StringWriter;
8.54 +import java.net.URI;
8.55 +import java.net.URISyntaxException;
8.56 +import java.util.ArrayList;
8.57 +import java.util.Collections;
8.58 +import java.util.HashMap;
8.59 +import java.util.LinkedList;
8.60 +import java.util.List;
8.61 +import java.util.Map;
8.62 +import javax.ws.rs.GET;
8.63 +import javax.ws.rs.Path;
8.64 +import javax.ws.rs.Produces;
8.65 +import javax.ws.rs.QueryParam;
8.66 +import javax.ws.rs.core.Response;
8.67 +import org.codeviation.pojson.Pojson;
8.68 +import org.netbeans.modules.jackpot30.backend.base.WebUtilities;
8.69 +import static org.netbeans.modules.jackpot30.backend.base.WebUtilities.escapeForQuery;
8.70 +
8.71 +/**
8.72 + *
8.73 + * @author lahvac
8.74 + */
8.75 +@Path("/index/languageui")
8.76 +public class UI {
8.77 +
8.78 + @GET
8.79 + @Path("/search")
8.80 + @Produces("text/html")
8.81 + public String search(@QueryParam("path") String path, @QueryParam("pattern") String pattern) throws URISyntaxException, IOException, TemplateException {
8.82 + Map<String, Object> configurationData = new HashMap<String, Object>();
8.83 +
8.84 + configurationData.put("paths", list());
8.85 + configurationData.put("selectedPath", path);
8.86 + configurationData.put("pattern", pattern);
8.87 + configurationData.put("patternEscaped", escapeForQuery(pattern));
8.88 +
8.89 + if (pattern != null && path != null) {
8.90 + URI u = new URI("http://localhost:9998/index/language/search?path=" + escapeForQuery(path) + "&pattern=" + escapeForQuery(pattern));
8.91 + List<Map<String, Object>> results = new LinkedList<Map<String, Object>>();
8.92 + long queryTime = System.currentTimeMillis();
8.93 + List<String> candidates = new ArrayList<String>(WebUtilities.requestStringArrayResponse(u));
8.94 +
8.95 + queryTime = System.currentTimeMillis() - queryTime;
8.96 +
8.97 + Collections.sort(candidates);
8.98 +
8.99 + for (String c : candidates) {
8.100 + Map<String, Object> found = new HashMap<String, Object>(3);
8.101 +
8.102 + found.put("relativePath", c);
8.103 +
8.104 + results.add(found);
8.105 + }
8.106 +
8.107 + configurationData.put("results", results);
8.108 +
8.109 + Map<String, Object> statistics = new HashMap<String, Object>();
8.110 +
8.111 + statistics.put("files", candidates.size());
8.112 + statistics.put("queryTime", queryTime);
8.113 +
8.114 + configurationData.put("statistics", statistics);
8.115 + }
8.116 +
8.117 + return processTemplate("/org/netbeans/modules/jackpot30/backend/language/api/ui-search.html", configurationData);
8.118 + }
8.119 +
8.120 + @GET
8.121 + @Path("/show")
8.122 + @Produces("text/html")
8.123 + public Response show(@QueryParam("path") String path, @QueryParam("relative") String relativePath, @QueryParam("pattern") String pattern) throws URISyntaxException, IOException, TemplateException {
8.124 + URI spansURL = new URI("http://localhost:9998/index/language/searchSpans?path=" + escapeForQuery(path) + "&relativePath=" + escapeForQuery(relativePath) + "&pattern=" + escapeForQuery(pattern));
8.125 + return Response.temporaryRedirect(new URI("/index/ui/show?path=" + escapeForQuery(path) + "&relative=" + escapeForQuery(relativePath) + "&highlight=" + escapeForQuery(Pojson.save(parseSpans2(WebUtilities.requestStringResponse(spansURL)))))).build();
8.126 + }
8.127 +
8.128 + @GET
8.129 + @Path("/snippet")
8.130 + @Produces("text/html")
8.131 + public String snippet(@QueryParam("path") String path, @QueryParam("relative") String relativePath, @QueryParam("pattern") String pattern) throws URISyntaxException, IOException, TemplateException {
8.132 + List<Map<String, String>> snippets = new LinkedList<Map<String, String>>();
8.133 +
8.134 + URI codeURL = new URI("http://localhost:9998/index/source/cat?path=" + escapeForQuery(path) + "&relative=" + escapeForQuery(relativePath));
8.135 + String code = WebUtilities.requestStringResponse(codeURL);
8.136 + URI spansURL = new URI("http://localhost:9998/index/language/searchSpans?path=" + escapeForQuery(path) + "&relativePath=" + escapeForQuery(relativePath) + "&pattern=" + escapeForQuery(pattern));
8.137 +
8.138 + for (int[] span : parseSpans(WebUtilities.requestStringResponse(spansURL))) {
8.139 + snippets.add(prepareSnippet(code, span));
8.140 + }
8.141 +
8.142 + return processTemplate("/org/netbeans/modules/jackpot30/backend/language/api/ui-snippet.html", Collections.<String, Object>singletonMap("snippets", snippets));
8.143 + }
8.144 +
8.145 + private static List<Map<String, String>> list() throws URISyntaxException {
8.146 + List<Map<String, String>> result = new LinkedList<Map<String, String>>();
8.147 +
8.148 + for (String enc : WebUtilities.requestStringArrayResponse(new URI("http://localhost:9998/index/list"))) {
8.149 + Map<String, String> rootDesc = new HashMap<String, String>();
8.150 + String[] col = enc.split(":", 2);
8.151 +
8.152 + rootDesc.put("segment", col[0]);
8.153 + rootDesc.put("displayName", col[1]);
8.154 + result.add(rootDesc);
8.155 + }
8.156 +
8.157 + return result;
8.158 + }
8.159 +
8.160 + private static Iterable<int[]> parseSpans(String from) {
8.161 + if (from.isEmpty()) {
8.162 + return Collections.emptyList();
8.163 + }
8.164 + String[] split = from.split(":");
8.165 + List<int[]> result = new LinkedList<int[]>();
8.166 +
8.167 + for (int i = 0; i < split.length; i += 2) {
8.168 + result.add(new int[] {
8.169 + Integer.parseInt(split[i + 0].trim()),
8.170 + Integer.parseInt(split[i + 1].trim())
8.171 + });
8.172 + }
8.173 +
8.174 + return result;
8.175 + }
8.176 +
8.177 + private static Iterable<Long> parseSpans2(String from) {
8.178 + if (from.isEmpty()) {
8.179 + return Collections.emptyList();
8.180 + }
8.181 + String[] split = from.split(":");
8.182 + List<Long> result = new LinkedList<Long>();
8.183 +
8.184 + for (String s : split) {
8.185 + result.add(Long.parseLong(s.trim()));
8.186 + }
8.187 +
8.188 + return result;
8.189 + }
8.190 +
8.191 + private static final int DESIRED_CONTEXT = 2;
8.192 +
8.193 + private static Map<String, String> prepareSnippet(String code, int[] span) {
8.194 + int grandStart = span[0];
8.195 + int firstLineStart = grandStart = lineStart(code, grandStart);
8.196 +
8.197 + while (grandStart > 0 && contextLength(code.substring(grandStart, firstLineStart)) < DESIRED_CONTEXT)
8.198 + grandStart = lineStart(code, grandStart - 1);
8.199 +
8.200 + int grandEnd = span[1];
8.201 + int firstLineEnd = grandEnd = lineEnd(code, grandEnd);
8.202 +
8.203 + while (grandEnd < code.length() - 1 && contextLength(code.substring(firstLineEnd, grandEnd)) < DESIRED_CONTEXT)
8.204 + grandEnd = lineEnd(code, grandEnd + 1);
8.205 +
8.206 + Map<String, String> result = new HashMap<String, String>();
8.207 +
8.208 + result.put("prefix", WebUtilities.escapeForHTMLElement(code.substring(grandStart, span[0])));
8.209 + result.put("occurrence", WebUtilities.escapeForHTMLElement(code.substring(span[0], span[1])));
8.210 + result.put("suffix", WebUtilities.escapeForHTMLElement(code.substring(span[1], grandEnd)));
8.211 +
8.212 + return result;
8.213 + }
8.214 +
8.215 + private static int lineStart(String code, int o) {
8.216 + while (o > 0 && code.charAt(o) != '\n') {
8.217 + o--;
8.218 + }
8.219 +
8.220 + return o;
8.221 + }
8.222 +
8.223 + private static int lineEnd(String code, int o) {
8.224 + while (o < code.length() - 1 && code.charAt(o) != '\n') {
8.225 + o++;
8.226 + }
8.227 +
8.228 + return o;
8.229 + }
8.230 +
8.231 + private static int contextLength(String in) {
8.232 + return in.replaceAll("\n[ \t]*\n", "\n").trim().split("\n").length;
8.233 + }
8.234 +
8.235 + private static String processTemplate(String template, Map<String, Object> configurationData) throws TemplateException, IOException {
8.236 + Configuration conf = new Configuration();
8.237 +
8.238 + conf.setTemplateLoader(new TemplateLoaderImpl());
8.239 +
8.240 + Template templ = conf.getTemplate(template);
8.241 + StringWriter out = new StringWriter();
8.242 +
8.243 + templ.process(configurationData, out);
8.244 +
8.245 + return out.toString();
8.246 + }
8.247 +
8.248 + private static final class TemplateLoaderImpl implements TemplateLoader {
8.249 +
8.250 + public Object findTemplateSource(String name) throws IOException {
8.251 + return TemplateLoaderImpl.class.getResourceAsStream("/" + name);
8.252 + }
8.253 +
8.254 + public long getLastModified(Object templateSource) {
8.255 + return 0L;
8.256 + }
8.257 +
8.258 + public Reader getReader(Object templateSource, String encoding) throws IOException {
8.259 + InputStream in = (InputStream) templateSource;
8.260 +
8.261 + return new InputStreamReader(in);
8.262 + }
8.263 +
8.264 + public void closeTemplateSource(Object templateSource) throws IOException {
8.265 + }
8.266 + }
8.267 +
8.268 +}
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
9.2 +++ b/language/server/web/language.web.api/src/org/netbeans/modules/jackpot30/backend/language/api/ui-search.html Mon Jul 16 17:32:27 2012 +0200
9.3 @@ -0,0 +1,70 @@
9.4 +<html>
9.5 +<head>
9.6 + <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
9.7 +<#if results??>
9.8 + <script type="text/javascript">
9.9 + $(document).ready(function() {
9.10 + $('#list').find('dd').hide().end().find('dt').click(function() {
9.11 + current_dd=$(this).next();
9.12 + //XXX: will do the AJAX call for both show and hide!
9.13 + $.get("snippet?path=${selectedPath}&relative=" + current_dd.attr("id") + "&pattern=${patternEscaped}",function(data) {
9.14 + current_dd.html(data).slideToggle();
9.15 + })
9.16 + });
9.17 + });
9.18 + </script>
9.19 +</#if>
9.20 + <style type="text/css">
9.21 + .occurrence {BACKGROUND: #DDDD00;}
9.22 + </style>
9.23 +</head>
9.24 +<body>
9.25 +<form method="get">
9.26 +
9.27 +<label for="path">Project:</label>
9.28 +<select size="1" name="path">");
9.29 + <#list paths as path>
9.30 + <option <#if selectedPath?? && path.segment == selectedPath>selected</#if> value="${path.segment}">
9.31 + ${path.displayName}
9.32 + </option>
9.33 + </#list>
9.34 +</select>
9.35 +<br>
9.36 +<label for="pattern">Pattern:</label><br>
9.37 +<textarea rows="10" cols="40" name="pattern">
9.38 +<#if pattern??>
9.39 +${pattern}
9.40 +</#if>
9.41 +</textarea><br>
9.42 +<input type="submit" name="Find Candidates"/>
9.43 +</form>
9.44 +
9.45 +<div class="examples">
9.46 +<#if examples??>
9.47 + Examples:
9.48 + <dl id="examples-list">
9.49 + <#list examples as example>
9.50 + <dt>${example.displayName}</dt>
9.51 + <dd><pre>${example.pattern}</pre>
9.52 + </dd>
9.53 + </#list>
9.54 + </dl>
9.55 +</#if>
9.56 +</div>
9.57 +
9.58 +<#if results??>
9.59 + Found candidates for pattern: ${pattern}
9.60 + <dl id="list">
9.61 + <#list results as result>
9.62 + <dt>${result.relativePath}<a href="/index/languageui/show?path=${selectedPath}&relative=${result.relativePath}&pattern=${patternEscaped}">show</a></dt>
9.63 + <dd id="${result.relativePath}">
9.64 + </dd>
9.65 + </#list>
9.66 + </dl>
9.67 +</#if>
9.68 +
9.69 +<#if statistics??>
9.70 + Query time: ${statistics.queryTime}ms, matching files: ${statistics.files}.
9.71 +</#if>
9.72 +</body>
9.73 +</html>
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/language/server/web/language.web.api/src/org/netbeans/modules/jackpot30/backend/language/api/ui-snippet.html Mon Jul 16 17:32:27 2012 +0200
10.3 @@ -0,0 +1,7 @@
10.4 +<#if snippets??>
10.5 + <#list snippets as snippet>
10.6 + <pre>${snippet.prefix}<span class="occurrence">${snippet.occurrence}</span>${snippet.suffix}</pre><br>
10.7 + </#list>
10.8 +<#else>
10.9 + No occurrences.
10.10 +</#if>
11.1 --- a/lib/download.xml Mon Jul 16 16:54:54 2012 +0200
11.2 +++ b/lib/download.xml Mon Jul 16 17:32:27 2012 +0200
11.3 @@ -87,5 +87,6 @@
11.4 <copy file="${nbplatform.active.dir}/ide/modules/org-netbeans-modules-lexer.jar" todir="." />
11.5 <copy file="${nbplatform.active.dir}/java/modules/org-netbeans-modules-java-lexer.jar" todir="." />
11.6 <copy file="${nbplatform.active.dir}/ide/modules/org-netbeans-modules-editor-util.jar" todir="." />
11.7 + <copy file="${nbplatform.active.dir}/java/modules/org-netbeans-spi-java-hints.jar" todir="." />
11.8 </target>
11.9 </project>
12.1 --- a/remoting/server/web/source.web.api/src/org/netbeans/modules/jackpot30/source/api/API.java Mon Jul 16 16:54:54 2012 +0200
12.2 +++ b/remoting/server/web/source.web.api/src/org/netbeans/modules/jackpot30/source/api/API.java Mon Jul 16 17:32:27 2012 +0200
12.3 @@ -80,6 +80,11 @@
12.4 @Produces("text/plain")
12.5 public String cat(@QueryParam("path") String segment, @QueryParam("relative") String relative) throws IOException, InterruptedException {
12.6 CategoryStorage category = CategoryStorage.forId(segment);
12.7 +
12.8 + return readFileContent(category, relative);
12.9 + }
12.10 +
12.11 + public static String readFileContent(CategoryStorage category, String relative) throws IOException, InterruptedException {
12.12 Index idx = category.getIndex();
12.13 Query query = Queries.createQuery("relativePath", "does-not-exist", relative, QueryKind.EXACT);
12.14 List<String> found = new ArrayList<String>();