You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by po...@apache.org on 2017/09/03 17:33:40 UTC

[47/51] [partial] incubator-netbeans-jackpot30 git commit: INFRA-15006 Import for http://bits.netbeans.org/download/apache-donation

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/cmdline/compiler/src/org/netbeans/modules/jackpot30/compiler/IndexingAnnotationProcessor.java
----------------------------------------------------------------------
diff --git a/cmdline/compiler/src/org/netbeans/modules/jackpot30/compiler/IndexingAnnotationProcessor.java b/cmdline/compiler/src/org/netbeans/modules/jackpot30/compiler/IndexingAnnotationProcessor.java
new file mode 100644
index 0000000..4edfa21
--- /dev/null
+++ b/cmdline/compiler/src/org/netbeans/modules/jackpot30/compiler/IndexingAnnotationProcessor.java
@@ -0,0 +1,177 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2009-2011 Sun Microsystems, Inc. All rights reserved.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common
+ * Development and Distribution License("CDDL") (collectively, the
+ * "License"). You may not use this file except in compliance with the
+ * License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html
+ * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+ * specific language governing permissions and limitations under the
+ * License.  When distributing the software, include this License Header
+ * Notice in each file and include the License file at
+ * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the
+ * License Header, with the fields enclosed by brackets [] replaced by
+ * your own identifying information:
+ * "Portions Copyrighted [year] [name of copyright owner]"
+ *
+ * If you wish your version of this file to be governed by only the CDDL
+ * or only the GPL Version 2, indicate your decision by adding
+ * "[Contributor] elects to include this software in this distribution
+ * under the [CDDL or GPL Version 2] license." If you do not indicate a
+ * single choice of license, a recipient has the option to distribute
+ * your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above.
+ * However, if you add GPL Version 2 code and therefore, elected the GPL
+ * Version 2 license, then the option applies only if the new code is
+ * made subject to such option by the copyright holder.
+ *
+ * Contributor(s):
+ *
+ * Portions Copyrighted 2009 Sun Microsystems, Inc.
+ */
+package org.netbeans.modules.jackpot30.compiler;
+
+import com.sun.source.tree.MemberSelectTree;
+import com.sun.source.tree.Tree;
+import com.sun.source.tree.Tree.Kind;
+import com.sun.source.util.Trees;
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import javax.annotation.processing.ProcessingEnvironment;
+import javax.tools.Diagnostic;
+import org.netbeans.api.java.source.ClasspathInfo.PathKind;
+import org.netbeans.api.java.source.CompilationInfoHack;
+import org.netbeans.modules.jackpot30.indexing.index.Indexer;
+import org.netbeans.modules.java.preprocessorbridge.spi.JavaIndexerPlugin;
+import org.netbeans.modules.parsing.impl.indexing.CacheFolder;
+import org.netbeans.modules.parsing.impl.indexing.FileObjectIndexable;
+import org.netbeans.modules.parsing.impl.indexing.SPIAccessor;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.FileUtil;
+import org.openide.util.Exceptions;
+import org.openide.util.Lookup;
+import org.openide.util.lookup.Lookups;
+import org.openide.util.lookup.ServiceProvider;
+
+/**
+ *
+ * @author lahvac
+ */
+@ServiceProvider(service=AbstractHintsAnnotationProcessing.class)
+public class IndexingAnnotationProcessor extends AbstractHintsAnnotationProcessing {
+
+    static final String CACHE_ROOT = "jackpot30_cache_root";
+    static final String SOURCE_ROOT = "jackpot30_root";
+    static final String INDEXED_FILES = "jackpot30_indexed_files";
+
+    public static final Set<String> OPTIONS = Collections.unmodifiableSet(new HashSet<String>(Arrays.asList(
+            CACHE_ROOT,
+            SOURCE_ROOT,
+            INDEXED_FILES
+    )));
+
+    private boolean enabled;
+    private Map<FileObject, JavaIndexerPlugin> writers;
+
+    @Override
+    protected boolean initialize(ProcessingEnvironment processingEnv) {
+        String cacheRoot = processingEnv.getOptions().get(CACHE_ROOT);
+
+        if (cacheRoot == null) return false;
+
+        enabled = true;
+
+        File cache = new File(cacheRoot);
+        cache.mkdirs();
+
+        cache = FileUtil.normalizeFile(cache);
+        FileUtil.refreshFor(cache.getParentFile());
+        CacheFolder.setCacheFolder(FileUtil.toFileObject(cache));
+
+        writers = new HashMap<FileObject, JavaIndexerPlugin>();
+
+        return true;
+    }
+
+    @Override
+    protected void doProcess(CompilationInfoHack info, ProcessingEnvironment processingEnv, Reporter reporter) {
+        try {
+            if (!enabled) return;
+
+            FileObject root;
+
+            if (processingEnv.getOptions().containsKey(SOURCE_ROOT)) {
+                File rootFile = new File(processingEnv.getOptions().get(SOURCE_ROOT));
+
+                root = FileUtil.toFileObject(FileUtil.normalizeFile(rootFile));
+
+                if (root == null) {
+                    processingEnv.getMessager().printMessage(Diagnostic.Kind.ERROR, "Specified root (" + rootFile.getAbsolutePath() + ") does not exist");
+                    return;
+                }
+            } else {
+                root = info.getClasspathInfo().getClassPath(PathKind.SOURCE).findOwnerRoot(info.getFileObject());
+                
+                if (root == null) {
+                    //try to find the source path from the package clause:
+                    root = info.getFileObject().getParent();
+
+                    if (info.getCompilationUnit().getPackageName() != null) {
+                        Tree t = info.getCompilationUnit().getPackageName();
+
+                        while (t.getKind() == Kind.MEMBER_SELECT) {
+                            root = root.getParent();
+                            t = ((MemberSelectTree) t).getExpression();
+                        }
+
+                        root = root.getParent();
+                    }
+                }
+            }
+
+            JavaIndexerPlugin w = writers.get(root);
+            URL sourceRoot = root.toURL();
+
+            if (w == null) {
+                writers.put(root, w = new Indexer.FactoryImpl().create(sourceRoot, Indexer.resolveCacheFolder(sourceRoot)));
+            }
+            
+            Lookup services = Lookups.fixed(processingEnv.getElementUtils(), processingEnv.getTypeUtils(), Trees.instance(processingEnv));
+
+            w.process(info.getCompilationUnit(), SPIAccessor.getInstance().create(new FileObjectIndexable(root, info.getFileObject())), services);
+        } catch (IOException ex) {
+            Exceptions.printStackTrace(ex);
+        }
+    }
+
+    @Override
+    protected void finish() {
+        if (!enabled) return;
+
+        for (JavaIndexerPlugin w : writers.values()) {
+            w.finish();
+        }
+
+        writers = null;
+    }
+
+    @Override
+    public Set<String> getSupportedOptions() {
+        return OPTIONS;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/cmdline/compiler/src/org/netbeans/modules/java/source/parsing/HackAccessor.java
----------------------------------------------------------------------
diff --git a/cmdline/compiler/src/org/netbeans/modules/java/source/parsing/HackAccessor.java b/cmdline/compiler/src/org/netbeans/modules/java/source/parsing/HackAccessor.java
new file mode 100644
index 0000000..a1f10f7
--- /dev/null
+++ b/cmdline/compiler/src/org/netbeans/modules/java/source/parsing/HackAccessor.java
@@ -0,0 +1,54 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2009-2010 Sun Microsystems, Inc. All rights reserved.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common
+ * Development and Distribution License("CDDL") (collectively, the
+ * "License"). You may not use this file except in compliance with the
+ * License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html
+ * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+ * specific language governing permissions and limitations under the
+ * License.  When distributing the software, include this License Header
+ * Notice in each file and include the License file at
+ * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the
+ * License Header, with the fields enclosed by brackets [] replaced by
+ * your own identifying information:
+ * "Portions Copyrighted [year] [name of copyright owner]"
+ *
+ * If you wish your version of this file to be governed by only the CDDL
+ * or only the GPL Version 2, indicate your decision by adding
+ * "[Contributor] elects to include this software in this distribution
+ * under the [CDDL or GPL Version 2] license." If you do not indicate a
+ * single choice of license, a recipient has the option to distribute
+ * your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above.
+ * However, if you add GPL Version 2 code and therefore, elected the GPL
+ * Version 2 license, then the option applies only if the new code is
+ * made subject to such option by the copyright holder.
+ *
+ * Contributor(s):
+ *
+ * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
+ */
+
+package org.netbeans.modules.java.source.parsing;
+
+import org.netbeans.api.java.source.ClasspathInfo;
+
+/**
+ *
+ * @author lahvac
+ */
+public class HackAccessor {
+
+    public static CompilationInfoImpl createCII(ClasspathInfo cpInfo) {
+        return new CompilationInfoImpl(cpInfo);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/cmdline/compiler/src/org/netbeans/modules/parsing/api/SnapshotHack.java
----------------------------------------------------------------------
diff --git a/cmdline/compiler/src/org/netbeans/modules/parsing/api/SnapshotHack.java b/cmdline/compiler/src/org/netbeans/modules/parsing/api/SnapshotHack.java
new file mode 100644
index 0000000..cab654b
--- /dev/null
+++ b/cmdline/compiler/src/org/netbeans/modules/parsing/api/SnapshotHack.java
@@ -0,0 +1,54 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2009-2010 Sun Microsystems, Inc. All rights reserved.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common
+ * Development and Distribution License("CDDL") (collectively, the
+ * "License"). You may not use this file except in compliance with the
+ * License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html
+ * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+ * specific language governing permissions and limitations under the
+ * License.  When distributing the software, include this License Header
+ * Notice in each file and include the License file at
+ * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the
+ * License Header, with the fields enclosed by brackets [] replaced by
+ * your own identifying information:
+ * "Portions Copyrighted [year] [name of copyright owner]"
+ *
+ * If you wish your version of this file to be governed by only the CDDL
+ * or only the GPL Version 2, indicate your decision by adding
+ * "[Contributor] elects to include this software in this distribution
+ * under the [CDDL or GPL Version 2] license." If you do not indicate a
+ * single choice of license, a recipient has the option to distribute
+ * your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above.
+ * However, if you add GPL Version 2 code and therefore, elected the GPL
+ * Version 2 license, then the option applies only if the new code is
+ * made subject to such option by the copyright holder.
+ *
+ * Contributor(s):
+ *
+ * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
+ */
+
+package org.netbeans.modules.parsing.api;
+
+import org.netbeans.api.editor.mimelookup.MimePath;
+
+/**
+ *
+ * @author lahvac
+ */
+public class SnapshotHack {
+
+    public static Snapshot create(String text) {
+        return Snapshot.create(text, new int[0], null, MimePath.get("text/x-java"), new int[][] {new int[] {0, 0}}, new int[][] {new int[] {0, 0}});
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/cmdline/compiler/test/scripted/config
----------------------------------------------------------------------
diff --git a/cmdline/compiler/test/scripted/config b/cmdline/compiler/test/scripted/config
new file mode 100755
index 0000000..24bc639
--- /dev/null
+++ b/cmdline/compiler/test/scripted/config
@@ -0,0 +1,44 @@
+#!/bin/bash
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+#
+# The contents of this file are subject to the terms of either the GNU
+# General Public License Version 2 only ("GPL") or the Common
+# Development and Distribution License("CDDL") (collectively, the
+# "License"). You may not use this file except in compliance with the
+# License. You can obtain a copy of the License at
+# http://www.netbeans.org/cddl-gplv2.html
+# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+# specific language governing permissions and limitations under the
+# License.  When distributing the software, include this License Header
+# Notice in each file and include the License file at
+# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun in the GPL Version 2 section of the License file that
+# accompanied this code. If applicable, add the following below the
+# License Header, with the fields enclosed by brackets [] replaced by
+# your own identifying information:
+# "Portions Copyrighted [year] [name of copyright owner]"
+#
+# If you wish your version of this file to be governed by only the CDDL
+# or only the GPL Version 2, indicate your decision by adding
+# "[Contributor] elects to include this software in this distribution
+# under the [CDDL or GPL Version 2] license." If you do not indicate a
+# single choice of license, a recipient has the option to distribute
+# your version of this file under either the CDDL, the GPL Version 2 or
+# to extend the choice of license to its licensees as provided above.
+# However, if you add GPL Version 2 code and therefore, elected the GPL
+# Version 2 license, then the option applies only if the new code is
+# made subject to such option by the copyright holder.
+#
+# Contributor(s):
+#
+# Portions Copyrighted 2010 Sun Microsystems, Inc.
+
+TOOL_NAME=jackpotc
+
+run_tool() {
+    "${TOOL_NAME}"/"${TOOL_NAME}" -sourcepath src -d build "$@"
+}

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/cmdline/compiler/test/scripted/test-ant-1
----------------------------------------------------------------------
diff --git a/cmdline/compiler/test/scripted/test-ant-1 b/cmdline/compiler/test/scripted/test-ant-1
new file mode 100755
index 0000000..71bca21
--- /dev/null
+++ b/cmdline/compiler/test/scripted/test-ant-1
@@ -0,0 +1,80 @@
+#!/bin/bash
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+#
+# The contents of this file are subject to the terms of either the GNU
+# General Public License Version 2 only ("GPL") or the Common
+# Development and Distribution License("CDDL") (collectively, the
+# "License"). You may not use this file except in compliance with the
+# License. You can obtain a copy of the License at
+# http://www.netbeans.org/cddl-gplv2.html
+# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+# specific language governing permissions and limitations under the
+# License.  When distributing the software, include this License Header
+# Notice in each file and include the License file at
+# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun in the GPL Version 2 section of the License file that
+# accompanied this code. If applicable, add the following below the
+# License Header, with the fields enclosed by brackets [] replaced by
+# your own identifying information:
+# "Portions Copyrighted [year] [name of copyright owner]"
+#
+# If you wish your version of this file to be governed by only the CDDL
+# or only the GPL Version 2, indicate your decision by adding
+# "[Contributor] elects to include this software in this distribution
+# under the [CDDL or GPL Version 2] license." If you do not indicate a
+# single choice of license, a recipient has the option to distribute
+# your version of this file under either the CDDL, the GPL Version 2 or
+# to extend the choice of license to its licensees as provided above.
+# However, if you add GPL Version 2 code and therefore, elected the GPL
+# Version 2 license, then the option applies only if the new code is
+# made subject to such option by the copyright holder.
+#
+# Contributor(s):
+#
+# Portions Copyrighted 2010 Sun Microsystems, Inc.
+
+perform_test() {
+    create_file src/test/Test.java <<EOF
+package test;
+public class Test {
+    private void test() {
+        Character.toLowerCase('a');
+    }
+}
+EOF
+
+    create_file src/META-INF/upgrade/test.hint <<EOF
+'test':
+java.lang.Character.toLowerCase(\$1) :: \$1 instanceof char => java.lang.Character.toUpperCase($1) ;;
+EOF
+
+    create_file build.xml <<EOF
+<project name="test">
+    <target name="compile">
+        <javac srcdir="src"
+               destdir="build"/>
+    </target>
+</project>
+EOF
+
+    ant -lib $WORK_DIR/jackpotc -Dbuild.compiler=org.netbeans.modules.jackpot30.compiler.ant.JackpotCompiler compile
+
+    assert_file_content build/META-INF/upgrade/upgrade.diff <<EOF
+--- $WORK_DIR/src/test/Test.java
++++ $WORK_DIR/src/test/Test.java
+@@ -1,6 +1,6 @@
+ package test;
+ public class Test {
+     private void test() {
+-        Character.toLowerCase('a');
++        Character.toUpperCase();
+     }
+ }
+EOF
+}
+
+. `dirname $0`/harness

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/cmdline/compiler/test/scripted/test-ant-with-params
----------------------------------------------------------------------
diff --git a/cmdline/compiler/test/scripted/test-ant-with-params b/cmdline/compiler/test/scripted/test-ant-with-params
new file mode 100755
index 0000000..b3d241f
--- /dev/null
+++ b/cmdline/compiler/test/scripted/test-ant-with-params
@@ -0,0 +1,80 @@
+#!/bin/bash
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+#
+# The contents of this file are subject to the terms of either the GNU
+# General Public License Version 2 only ("GPL") or the Common
+# Development and Distribution License("CDDL") (collectively, the
+# "License"). You may not use this file except in compliance with the
+# License. You can obtain a copy of the License at
+# http://www.netbeans.org/cddl-gplv2.html
+# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+# specific language governing permissions and limitations under the
+# License.  When distributing the software, include this License Header
+# Notice in each file and include the License file at
+# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun in the GPL Version 2 section of the License file that
+# accompanied this code. If applicable, add the following below the
+# License Header, with the fields enclosed by brackets [] replaced by
+# your own identifying information:
+# "Portions Copyrighted [year] [name of copyright owner]"
+#
+# If you wish your version of this file to be governed by only the CDDL
+# or only the GPL Version 2, indicate your decision by adding
+# "[Contributor] elects to include this software in this distribution
+# under the [CDDL or GPL Version 2] license." If you do not indicate a
+# single choice of license, a recipient has the option to distribute
+# your version of this file under either the CDDL, the GPL Version 2 or
+# to extend the choice of license to its licensees as provided above.
+# However, if you add GPL Version 2 code and therefore, elected the GPL
+# Version 2 license, then the option applies only if the new code is
+# made subject to such option by the copyright holder.
+#
+# Contributor(s):
+#
+# Portions Copyrighted 2010 Sun Microsystems, Inc.
+
+perform_test() {
+    create_file src/test/Test.java <<EOF
+package test;
+public class Test {
+    private void test() {
+        Character.toLowerCase('a');
+    }
+}
+EOF
+
+    create_file test.h <<EOF
+'test':
+java.lang.Character.toLowerCase(\$1) :: \$1 instanceof char => java.lang.Character.toUpperCase($1) ;;
+EOF
+
+    create_file build.xml <<EOF
+<project name="test">
+    <target name="compile">
+        <javac srcdir="src"
+               destdir="build"/>
+    </target>
+</project>
+EOF
+
+    ant -lib $WORK_DIR/jackpotc -Dbuild.compiler=org.netbeans.modules.jackpot30.compiler.ant.JackpotCompiler -Djackpot30_extra_hints=test.h compile
+
+    assert_file_content build/META-INF/upgrade/upgrade.diff <<EOF
+--- $WORK_DIR/src/test/Test.java
++++ $WORK_DIR/src/test/Test.java
+@@ -1,6 +1,6 @@
+ package test;
+ public class Test {
+     private void test() {
+-        Character.toLowerCase('a');
++        Character.toUpperCase();
+     }
+ }
+EOF
+}
+
+. `dirname $0`/harness

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/cmdline/compiler/test/scripted/test-cmdline-1
----------------------------------------------------------------------
diff --git a/cmdline/compiler/test/scripted/test-cmdline-1 b/cmdline/compiler/test/scripted/test-cmdline-1
new file mode 100755
index 0000000..c28dd1c
--- /dev/null
+++ b/cmdline/compiler/test/scripted/test-cmdline-1
@@ -0,0 +1,71 @@
+#!/bin/bash
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+#
+# The contents of this file are subject to the terms of either the GNU
+# General Public License Version 2 only ("GPL") or the Common
+# Development and Distribution License("CDDL") (collectively, the
+# "License"). You may not use this file except in compliance with the
+# License. You can obtain a copy of the License at
+# http://www.netbeans.org/cddl-gplv2.html
+# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+# specific language governing permissions and limitations under the
+# License.  When distributing the software, include this License Header
+# Notice in each file and include the License file at
+# nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun in the GPL Version 2 section of the License file that
+# accompanied this code. If applicable, add the following below the
+# License Header, with the fields enclosed by brackets [] replaced by
+# your own identifying information:
+# "Portions Copyrighted [year] [name of copyright owner]"
+#
+# If you wish your version of this file to be governed by only the CDDL
+# or only the GPL Version 2, indicate your decision by adding
+# "[Contributor] elects to include this software in this distribution
+# under the [CDDL or GPL Version 2] license." If you do not indicate a
+# single choice of license, a recipient has the option to distribute
+# your version of this file under either the CDDL, the GPL Version 2 or
+# to extend the choice of license to its licensees as provided above.
+# However, if you add GPL Version 2 code and therefore, elected the GPL
+# Version 2 license, then the option applies only if the new code is
+# made subject to such option by the copyright holder.
+#
+# Contributor(s):
+#
+# Portions Copyrighted 2010 Sun Microsystems, Inc.
+
+perform_test() {
+    create_file src/test/Test.java <<EOF
+package test;
+public class Test {
+    private void test() {
+        Character.toLowerCase('a');
+    }
+}
+EOF
+
+    create_file src/META-INF/upgrade/test.hint <<EOF
+'test':
+java.lang.Character.toLowerCase(\$1) :: \$1 instanceof char => java.lang.Character.toUpperCase($1) ;;
+EOF
+
+    run_tool src/test/Test.java
+
+    assert_file_content build/META-INF/upgrade/upgrade.diff <<EOF
+--- $WORK_DIR/src/test/Test.java
++++ $WORK_DIR/src/test/Test.java
+@@ -1,6 +1,6 @@
+ package test;
+ public class Test {
+     private void test() {
+-        Character.toLowerCase('a');
++        Character.toUpperCase();
+     }
+ }
+EOF
+}
+
+. `dirname $0`/harness

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/cmdline/compiler/test/unit/src/org/netbeans/modules/jackpot30/compiler/CreateStandaloneCompilerJar.java
----------------------------------------------------------------------
diff --git a/cmdline/compiler/test/unit/src/org/netbeans/modules/jackpot30/compiler/CreateStandaloneCompilerJar.java b/cmdline/compiler/test/unit/src/org/netbeans/modules/jackpot30/compiler/CreateStandaloneCompilerJar.java
new file mode 100644
index 0000000..8c9759e
--- /dev/null
+++ b/cmdline/compiler/test/unit/src/org/netbeans/modules/jackpot30/compiler/CreateStandaloneCompilerJar.java
@@ -0,0 +1,64 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2009-2010 Sun Microsystems, Inc. All rights reserved.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common
+ * Development and Distribution License("CDDL") (collectively, the
+ * "License"). You may not use this file except in compliance with the
+ * License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html
+ * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+ * specific language governing permissions and limitations under the
+ * License.  When distributing the software, include this License Header
+ * Notice in each file and include the License file at
+ * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the
+ * License Header, with the fields enclosed by brackets [] replaced by
+ * your own identifying information:
+ * "Portions Copyrighted [year] [name of copyright owner]"
+ *
+ * If you wish your version of this file to be governed by only the CDDL
+ * or only the GPL Version 2, indicate your decision by adding
+ * "[Contributor] elects to include this software in this distribution
+ * under the [CDDL or GPL Version 2] license." If you do not indicate a
+ * single choice of license, a recipient has the option to distribute
+ * your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above.
+ * However, if you add GPL Version 2 code and therefore, elected the GPL
+ * Version 2 license, then the option applies only if the new code is
+ * made subject to such option by the copyright holder.
+ *
+ * Contributor(s):
+ *
+ * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
+ */
+package org.netbeans.modules.jackpot30.compiler;
+
+import org.netbeans.modules.jackpot30.cmdline.lib.CreateStandaloneJar;
+import javax.annotation.processing.Processor;
+import org.netbeans.modules.jackpot30.cmdline.lib.StandaloneTools.UtilitiesSPIImpl;
+import org.netbeans.modules.java.hints.spiimpl.Utilities;
+
+/**
+ *
+ * @author lahvac
+ */
+public class CreateStandaloneCompilerJar extends CreateStandaloneJar {
+
+    public CreateStandaloneCompilerJar(String name) {
+        super(name, "jackpotc");
+    }
+
+    @Override
+    protected Info computeInfo() {
+        return new Info().addAdditionalRoots(UtilitiesSPIImpl.class.getName(), "com.sun.tools.javac.Main", HintsAnnotationProcessing.class.getName(), HintsAnnotationProcessingImpl.class.getName(), IndexingAnnotationProcessor.class.getName())
+                         .addMetaInfRegistrations(new MetaInfRegistration(Utilities.SPI.class, UtilitiesSPIImpl.class))
+                         .addMetaInfRegistrations(new MetaInfRegistration(Processor.class, HintsAnnotationProcessingImpl.class))
+                         .addMetaInfRegistrationToCopy(AbstractHintsAnnotationProcessing.class.getName());
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/cmdline/compiler/test/unit/src/org/netbeans/modules/jackpot30/compiler/CreateStandaloneCompilerJarTest.java
----------------------------------------------------------------------
diff --git a/cmdline/compiler/test/unit/src/org/netbeans/modules/jackpot30/compiler/CreateStandaloneCompilerJarTest.java b/cmdline/compiler/test/unit/src/org/netbeans/modules/jackpot30/compiler/CreateStandaloneCompilerJarTest.java
new file mode 100644
index 0000000..c0c72b9
--- /dev/null
+++ b/cmdline/compiler/test/unit/src/org/netbeans/modules/jackpot30/compiler/CreateStandaloneCompilerJarTest.java
@@ -0,0 +1,85 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common
+ * Development and Distribution License("CDDL") (collectively, the
+ * "License"). You may not use this file except in compliance with the
+ * License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html
+ * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+ * specific language governing permissions and limitations under the
+ * License.  When distributing the software, include this License Header
+ * Notice in each file and include the License file at
+ * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the
+ * License Header, with the fields enclosed by brackets [] replaced by
+ * your own identifying information:
+ * "Portions Copyrighted [year] [name of copyright owner]"
+ *
+ * If you wish your version of this file to be governed by only the CDDL
+ * or only the GPL Version 2, indicate your decision by adding
+ * "[Contributor] elects to include this software in this distribution
+ * under the [CDDL or GPL Version 2] license." If you do not indicate a
+ * single choice of license, a recipient has the option to distribute
+ * your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above.
+ * However, if you add GPL Version 2 code and therefore, elected the GPL
+ * Version 2 license, then the option applies only if the new code is
+ * made subject to such option by the copyright holder.
+ *
+ * Contributor(s):
+ *
+ * Portions Copyrighted 2010 Sun Microsystems, Inc.
+ */
+
+package org.netbeans.modules.jackpot30.compiler;
+
+import java.io.File;
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import org.netbeans.junit.NbTestCase;
+import org.netbeans.junit.NbTestSuite;
+
+/**
+ *
+ * @author lahvac
+ */
+public class CreateStandaloneCompilerJarTest extends NbTestCase {
+
+    public CreateStandaloneCompilerJarTest(String name) {
+        super(name);
+    }
+
+    public static Test suite() {
+        NbTestSuite suite = new NbTestSuite();
+        
+        suite.addTestSuite(HintsAnnotationProcessingTest.class);
+        suite.addTestSuite(IndexingAnnotationProcessorTest.class);
+
+        return new TestSetup(suite) {
+            private File compiler;
+            private File hintsList;
+            protected void setUp() throws Exception {
+                compiler = File.createTempFile("jackpotc", ".jar");
+                hintsList = File.createTempFile("hints", "list");
+
+//                if (!compiler.canRead()) {
+                    new CreateStandaloneCompilerJar("").createCompiler(compiler, hintsList);
+//                }
+                System.setProperty("test.javacJar", compiler.getAbsolutePath());
+            }
+            protected void tearDown() {
+                compiler.delete();
+                hintsList.delete();
+                compiler = null;
+                hintsList = null;
+            }
+        };
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/cmdline/compiler/test/unit/src/org/netbeans/modules/jackpot30/compiler/HintsAnnotationProcessingTest.java
----------------------------------------------------------------------
diff --git a/cmdline/compiler/test/unit/src/org/netbeans/modules/jackpot30/compiler/HintsAnnotationProcessingTest.java b/cmdline/compiler/test/unit/src/org/netbeans/modules/jackpot30/compiler/HintsAnnotationProcessingTest.java
new file mode 100644
index 0000000..1c7904a
--- /dev/null
+++ b/cmdline/compiler/test/unit/src/org/netbeans/modules/jackpot30/compiler/HintsAnnotationProcessingTest.java
@@ -0,0 +1,256 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2009-2010 Sun Microsystems, Inc. All rights reserved.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common
+ * Development and Distribution License("CDDL") (collectively, the
+ * "License"). You may not use this file except in compliance with the
+ * License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html
+ * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+ * specific language governing permissions and limitations under the
+ * License.  When distributing the software, include this License Header
+ * Notice in each file and include the License file at
+ * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the
+ * License Header, with the fields enclosed by brackets [] replaced by
+ * your own identifying information:
+ * "Portions Copyrighted [year] [name of copyright owner]"
+ *
+ * If you wish your version of this file to be governed by only the CDDL
+ * or only the GPL Version 2, indicate your decision by adding
+ * "[Contributor] elects to include this software in this distribution
+ * under the [CDDL or GPL Version 2] license." If you do not indicate a
+ * single choice of license, a recipient has the option to distribute
+ * your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above.
+ * However, if you add GPL Version 2 code and therefore, elected the GPL
+ * Version 2 license, then the option applies only if the new code is
+ * made subject to such option by the copyright holder.
+ *
+ * Contributor(s):
+ *
+ * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
+ */
+package org.netbeans.modules.jackpot30.compiler;
+
+import java.io.File;
+import java.util.Collections;
+import javax.lang.model.type.TypeMirror;
+import org.netbeans.spi.editor.hints.ErrorDescription;
+import org.netbeans.spi.java.hints.ErrorDescriptionFactory;
+import org.netbeans.spi.java.hints.Hint;
+import org.netbeans.spi.java.hints.HintContext;
+import org.netbeans.spi.java.hints.JavaFix;
+import org.netbeans.spi.java.hints.JavaFixUtilities;
+import org.netbeans.spi.java.hints.TriggerPattern;
+
+/**
+ *
+ * @author lahvac
+ */
+public class HintsAnnotationProcessingTest extends HintsAnnotationProcessingTestBase {
+
+    public HintsAnnotationProcessingTest(String name) {
+        super(name);
+    }
+
+    public void testRunCompiler1() throws Exception {
+        String golden =
+                "--- {0}/src/test/Test.java\n" +
+                "+++ {0}/src/test/Test.java\n" +
+                "@@ -1 +1 @@\n" +
+                "-package test; public class Test {private void test(java.io.File f) {f.isDirectory();}}\n" +
+                "+package test; public class Test {private void test(java.io.File f) {!f.isFile();}}\n";
+
+        doRunCompiler(golden, "src/test/Test.java",
+                              "package test; public class Test {private void test(java.io.File f) {f.isDirectory();}}\n",
+                              "src/META-INF/upgrade/joFile.hint",
+                              "'test':\n$1.isDirectory() :: $1 instanceof java.io.File => !$1.isFile();;",
+                              null,
+                              "-A" + HintsAnnotationProcessing.CLASSPATH_HINTS_ENABLE + "=true",
+                              "-A" + HintsAnnotationProcessing.CLASSPATH_HINTS_FIXES_ENABLE + "=true");
+    }
+
+    public void testRunCompiler2() throws Exception {
+        String golden =
+                "--- {0}/src/test/Test.java\n" +
+                "+++ {0}/src/test/Test.java\n" +
+                "@@ -1 +1 @@\n" +
+                "-package test; public class Test {private void test() {Character.toLowerCase('a');}}\n" +
+                "+package test; public class Test {private void test() {Character.toUpperCase('a');}}\n";
+
+        doRunCompiler(golden, "src/test/Test.java",
+                              "package test; public class Test {private void test() {Character.toLowerCase('a');}}\n",
+                              "src/META-INF/upgrade/joFile.hint",
+                              "'test':\njava.lang.Character.toLowerCase($1) :: $1 instanceof char => java.lang.Character.toUpperCase($1) ;;",
+                              null,
+                              "-A" + HintsAnnotationProcessing.CLASSPATH_HINTS_ENABLE + "=true",
+                              "-A" + HintsAnnotationProcessing.CLASSPATH_HINTS_FIXES_ENABLE + "=true");
+    }
+
+    public void testRunCompilerMulti() throws Exception {
+        String golden =
+                "--- {0}/src/test/Test.java\n" +
+                "+++ {0}/src/test/Test.java\n" +
+                "@@ -1 +1 @@\n" +
+                "-package test; public class Test {private void test() {Character.toLowerCase('a'); Dep.test();}}\n" +
+                "+package test; public class Test {private void test() {Character.toUpperCase('a'); Dep.test();}}\n" +
+                "--- {0}/src/test/Dep.java\n" +
+                "+++ {0}/src/test/Dep.java\n" +
+                "@@ -1 +1 @@\n" +
+                "-package test; public class Dep {static void test() {Character.toLowerCase('a');}}\n" +
+                "+package test; public class Dep {static void test() {Character.toUpperCase('a');}}\n";
+
+        doRunCompiler(golden, "src/test/Test.java",
+                              "package test; public class Test {private void test() {Character.toLowerCase('a'); Dep.test();}}\n",
+                              "src/test/Dep.java",
+                              "package test; public class Dep {static void test() {Character.toLowerCase('a');}}\n",
+                              "src/META-INF/upgrade/joFile.hint",
+                              "'test':\njava.lang.Character.toLowerCase($1) :: $1 instanceof char => java.lang.Character.toUpperCase($1) ;;",
+                              null,
+                              "-A" + HintsAnnotationProcessing.CLASSPATH_HINTS_ENABLE + "=true",
+                              "-A" + HintsAnnotationProcessing.CLASSPATH_HINTS_FIXES_ENABLE + "=true");
+    }
+
+//    public void testNPEFromAttribute() throws Exception {//TODO: does not reproduce the problem - likely caused by null Env<AttrContext> for annonymous innerclasses
+//        String golden = null;
+//
+//        doRunCompiler(golden, "src/test/Test.java",
+//                              "package test; public class Test {private void test() {new Runnable() {public void run() {int i = 0; System.err.println(i);}};}}\n",
+//                              "src/META-INF/upgrade/joFile.hint",
+//                              "'test':\njava.lang.Character.toLowerCase($1) :: $1 instanceof char => java.lang.Character.toUpperCase($1) ;;");
+//    }
+
+    public void testTreesCleaning1() throws Exception {
+        String golden = null;
+
+        doRunCompiler(golden, "src/test/Test.java",
+                              "package test; public class Test {private void test() {java.util.Collections.<String>emptyList();}}\n",
+                              "src/META-INF/upgrade/joFile.hint",
+                              "'test':\njava.lang.Character.toLowerCase($1) :: $1 instanceof char => java.lang.Character.toUpperCase($1) ;;");
+    }
+
+    public void testTreesCleaning2() throws Exception {
+        String golden = null;
+
+        doRunCompiler(golden, "src/test/Test.java",
+                              "package test; public class Test {enum A { B; A() {}} }\n",
+                              "src/META-INF/upgrade/joFile.hint",
+                              "'test':\njava.lang.Character.toLowerCase($1) :: $1 instanceof char => java.lang.Character.toUpperCase($1) ;;");
+    }
+
+    public void testTreesCleaningEnumTooMuch() throws Exception {
+        String golden = null;
+
+        doRunCompiler(golden, "src/test/Test.java",
+                              "package test; public class Test {enum A { B; private final int i; A() {this(1);} A(int i) {this.i = i;}} }\n",
+                              "src/META-INF/upgrade/joFile.hint",
+                              "'test':\njava.lang.Character.toLowerCase($1) :: $1 instanceof char => java.lang.Character.toUpperCase($1) ;;");
+    }
+
+    public void testTreesCleaningEnum3() throws Exception {
+        String golden = null;
+
+        doRunCompiler(golden, "src/test/Test.java",
+                              "package test; public class Test {enum A { B(\"a\"){public String toString() {return null;} }; A(String str) {}} }\n",
+                              "src/META-INF/upgrade/joFile.hint",
+                              "'test':\njava.lang.Character.toLowerCase($1) :: $1 instanceof char => java.lang.Character.toUpperCase($1) ;;");
+    }
+
+    public void testCRTable() throws Exception {
+        String golden = null;
+
+        doRunCompiler(golden, "src/test/Test.java",
+                              "package test; public class Test {private void test() {Integer i = 0; i++;}}\n",
+                              "src/META-INF/upgrade/joFile.hint",
+                              "'test':\njava.lang.Character.toLowerCase($1) :: $1 instanceof char => java.lang.Character.toUpperCase($1) ;;");
+    }
+
+    public void testCodeAPI() throws Exception {
+        String golden = "--- {0}/src/test/Test.java\n"+
+                        "+++ {0}/src/test/Test.java\n"+
+                        "@@ -1,2 +1,2 @@\n"+
+                        "-package test; public class Test {private void test() {Integer i = 0; if (i == null && null == i) System.err.println(i);\n"+
+                        "+package test; public class Test {private void test() {Integer i = 0; if (i == null) System.err.println(i);\n"+
+                        " }}\n";
+        doRunCompiler(golden, "src/test/Test.java",
+                              "package test; public class Test {private void test() {Integer i = 0; if (i == null && null == i) System.err.println(i);\n}}\n",
+                              null,
+                              "-A" + HintsAnnotationProcessing.HARDCODED_HINTS_ENABLE + "=test-hint");
+    }
+
+    public void testExtraHints() throws Exception {
+        String golden =
+                "--- {0}/src/test/Test.java\n" +
+                "+++ {0}/src/test/Test.java\n" +
+                "@@ -1 +1 @@\n" +
+                "-package test; public class Test {private void test() {Character.toLowerCase('a');}}\n" +
+                "+package test; public class Test {private void test() {Character.toUpperCase('a');}}\n";
+
+        doRunCompiler(golden, "src/test/Test.java",
+                              "package test; public class Test {private void test() {Character.toLowerCase('a');}}\n",
+                              "extra.hint",
+                              "'test':\njava.lang.Character.toLowerCase($1) :: $1 instanceof char => java.lang.Character.toUpperCase($1) ;;",
+                              null,
+                              "-A" + HintsAnnotationProcessing.EXTRA_HINTS + "=extra.hint");
+
+    }
+    public void testHintsOnClassPath() throws Exception {
+        String golden =
+                "--- {0}/src/test/Test.java\n" +
+                "+++ {0}/src/test/Test.java\n" +
+                "@@ -1 +1 @@\n" +
+                "-package test; public class Test {private void test() {Character.toLowerCase('a');}}\n" +
+                "+package test; public class Test {private void test() {Character.toUpperCase('a');}}\n";
+
+        doRunCompiler(golden, "src/test/Test.java",
+                              "package test; public class Test {private void test() {Character.toLowerCase('a');}}\n",
+                              "comp/META-INF/upgrade/joFile.hint",
+                              "'test':\njava.lang.Character.toLowerCase($1) :: $1 instanceof char => java.lang.Character.toUpperCase($1) ;;",
+                              null,
+                              "-classpath",
+                              "comp",
+                              "-A" + HintsAnnotationProcessing.CLASSPATH_HINTS_ENABLE + "=true",
+                              "-A" + HintsAnnotationProcessing.CLASSPATH_HINTS_FIXES_ENABLE + "=true");
+    }
+
+    public void testNoDebugInfo() throws Exception {
+        String golden =
+                "--- {0}/src/test/Test.java\n" +
+                "+++ {0}/src/test/Test.java\n" +
+                "@@ -1 +1 @@\n" +
+                "-package test; public class Test {private void test(java.io.File f) {f.isDirectory();}}\n" +
+                "+package test; public class Test {private void test(java.io.File f) {!f.isFile();}}\n";
+
+        doRunCompiler(golden, "src/test/Test.java",
+                              "package test; public class Test {private void test(java.io.File f) {f.isDirectory();}}\n",
+                              "src/META-INF/upgrade/joFile.hint",
+                              "'test':\n$1.isDirectory() :: $1 instanceof java.io.File => !$1.isFile();;",
+                              null,
+                              "-g:none",
+                              "-A" + HintsAnnotationProcessing.CLASSPATH_HINTS_ENABLE + "=true",
+                              "-A" + HintsAnnotationProcessing.CLASSPATH_HINTS_FIXES_ENABLE + "=true");
+    }
+
+    private void doRunCompiler(String goldenDiff, String... fileContentAndExtraOptions) throws Exception {
+        runCompiler(fileContentAndExtraOptions);
+
+        File diff = new File(sourceOutput, "META-INF/upgrade/upgrade.diff");
+        String diffText = readFully(diff);
+
+        goldenDiff = goldenDiff != null ? goldenDiff.replace("{0}", workDir.getAbsolutePath()) : null;
+        assertEquals(goldenDiff, diffText);
+    }
+
+    @Hint(displayName="test", description="test", category="general", id="test-hint")
+    @TriggerPattern("$1 == null && null == $1")
+    public static ErrorDescription codeHint(HintContext ctx) {
+        return ErrorDescriptionFactory.forName(ctx, ctx.getPath(), "test", JavaFixUtilities.rewriteFix(ctx, "test", ctx.getPath(), "$1 == null"));
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/cmdline/compiler/test/unit/src/org/netbeans/modules/jackpot30/compiler/HintsAnnotationProcessingTestBase.java
----------------------------------------------------------------------
diff --git a/cmdline/compiler/test/unit/src/org/netbeans/modules/jackpot30/compiler/HintsAnnotationProcessingTestBase.java b/cmdline/compiler/test/unit/src/org/netbeans/modules/jackpot30/compiler/HintsAnnotationProcessingTestBase.java
new file mode 100644
index 0000000..a1d385c
--- /dev/null
+++ b/cmdline/compiler/test/unit/src/org/netbeans/modules/jackpot30/compiler/HintsAnnotationProcessingTestBase.java
@@ -0,0 +1,224 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2009-2010 Sun Microsystems, Inc. All rights reserved.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common
+ * Development and Distribution License("CDDL") (collectively, the
+ * "License"). You may not use this file except in compliance with the
+ * License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html
+ * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+ * specific language governing permissions and limitations under the
+ * License.  When distributing the software, include this License Header
+ * Notice in each file and include the License file at
+ * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the
+ * License Header, with the fields enclosed by brackets [] replaced by
+ * your own identifying information:
+ * "Portions Copyrighted [year] [name of copyright owner]"
+ *
+ * If you wish your version of this file to be governed by only the CDDL
+ * or only the GPL Version 2, indicate your decision by adding
+ * "[Contributor] elects to include this software in this distribution
+ * under the [CDDL or GPL Version 2] license." If you do not indicate a
+ * single choice of license, a recipient has the option to distribute
+ * your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above.
+ * However, if you add GPL Version 2 code and therefore, elected the GPL
+ * Version 2 license, then the option applies only if the new code is
+ * made subject to such option by the copyright holder.
+ *
+ * Contributor(s):
+ *
+ * Portions Copyrighted 2009-2010 Sun Microsystems, Inc.
+ */
+package org.netbeans.modules.jackpot30.compiler;
+
+import com.sun.tools.javac.Main;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.Reader;
+import java.io.Writer;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+import org.netbeans.junit.NbTestCase;
+import org.openide.filesystems.FileUtil;
+import org.openide.util.Exceptions;
+
+/**
+ *
+ * @author lahvac
+ */
+public class HintsAnnotationProcessingTestBase extends NbTestCase {
+
+    public HintsAnnotationProcessingTestBase(String name) {
+        super(name);
+    }
+
+    protected File workDir;
+    protected File src;
+    protected File sourceOutput;
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        clearWorkDir();
+
+        workDir = getWorkDir();
+        sourceOutput = new File(workDir, "src-out");
+        sourceOutput.mkdirs();
+        src = new File(workDir, "src");
+        src.mkdirs();
+    }
+
+    protected void runCompiler(String... fileContentAndExtraOptions) throws Exception {
+        List<String> fileAndContent = new LinkedList<String>();
+        List<String> extraOptions = new LinkedList<String>();
+        List<String> fileContentAndExtraOptionsList = Arrays.asList(fileContentAndExtraOptions);
+        int nullPos = fileContentAndExtraOptionsList.indexOf(null);
+
+        if (nullPos == (-1)) {
+            fileAndContent = fileContentAndExtraOptionsList;
+            extraOptions = Collections.emptyList();
+        } else {
+            fileAndContent = fileContentAndExtraOptionsList.subList(0, nullPos);
+            extraOptions = fileContentAndExtraOptionsList.subList(nullPos + 1, fileContentAndExtraOptionsList.size());
+        }
+
+        assertTrue(fileAndContent.size() % 2 == 0);
+
+        List<String> options = new LinkedList<String>();
+
+        for (int cntr = 0; cntr < fileAndContent.size(); cntr += 2) {
+            String file = createAndFill(fileAndContent.get(cntr), fileAndContent.get(cntr + 1)).getAbsolutePath();
+
+            if (file.endsWith(".java")) {
+                options.add(file);
+            }
+        }
+
+        if (!extraOptions.contains("-sourcepath")) {
+            options.add("-sourcepath");
+            options.add(src.getAbsolutePath());
+        }
+        
+        options.add("-s");
+        options.add(sourceOutput.getAbsolutePath());
+        options.add("-source");
+        options.add("1.7");
+        options.add("-Xjcov");
+
+        for (String eo : extraOptions) {
+            options.add(eo.replace("${workdir}", workDir.getAbsolutePath()));
+        }
+
+        reallyRunCompiler(workDir, options.toArray(new String[0]));
+    }
+
+    protected void reallyRunCompiler(File workDir, String... params) throws Exception {
+        String javacJar = System.getProperty("test.javacJar");
+
+        if (javacJar == null) {
+            String oldUserDir = System.getProperty("user.dir");
+
+            System.setProperty("user.dir", workDir.getAbsolutePath());
+
+            try {
+                assertEquals(0, Main.compile(params));
+            } finally {
+                System.setProperty("user.dir", oldUserDir);
+            }
+        } else {
+            File compiler = new File(javacJar);
+
+            assertTrue(compiler.exists());
+
+            List<String> ll = new LinkedList<String>();
+
+            ll.add("java");
+//            ll.add("-Xdebug");
+//            ll.add("-Xrunjdwp:transport=dt_socket,suspend=y,server=y,address=8889");
+            ll.add("-Xbootclasspath/p:" + compiler.getAbsolutePath());
+            ll.add("com.sun.tools.javac.Main");
+            ll.addAll(Arrays.asList(params));
+
+            try {
+                Process p = Runtime.getRuntime().exec(ll.toArray(new String[0]), null, workDir);
+
+                new CopyStream(p.getInputStream(), System.out).start();
+                new CopyStream(p.getErrorStream(), System.err).start();
+
+                assertEquals(0, p.waitFor());
+            } catch (Throwable t) {
+                throw new IOException(t);
+            }
+        }
+    }
+
+    private static final class CopyStream extends Thread {
+        private final InputStream ins;
+        private final OutputStream out;
+
+        public CopyStream(InputStream ins, OutputStream out) {
+            this.ins = ins;
+            this.out = out;
+        }
+
+        @Override
+        public void run() {
+            try {
+                FileUtil.copy(ins, out);
+            } catch (IOException ex) {
+                Exceptions.printStackTrace(ex);
+            } finally {
+                try {
+                    ins.close();
+                } catch (IOException ex) {
+                    Exceptions.printStackTrace(ex);
+                }
+            }
+        }
+
+    }
+
+    private File createAndFill(String path, String content) throws IOException {
+        File source = new File(workDir, path);
+
+        source.getParentFile().mkdirs();
+        
+        Writer out = new OutputStreamWriter(new FileOutputStream(source));
+
+        out.write(content);
+
+        out.close();
+
+        return source;
+    }
+
+    protected static String readFully(File file) throws IOException {
+        if (!file.canRead()) return null;
+        StringBuilder res = new StringBuilder();
+        Reader in = new InputStreamReader(new FileInputStream(file));
+        int read;
+        
+        while ((read = in.read()) != (-1)) {
+            res.append((char) read);
+        }
+
+        return res.toString();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/cmdline/compiler/test/unit/src/org/netbeans/modules/jackpot30/compiler/IndexingAnnotationProcessorTest.java
----------------------------------------------------------------------
diff --git a/cmdline/compiler/test/unit/src/org/netbeans/modules/jackpot30/compiler/IndexingAnnotationProcessorTest.java b/cmdline/compiler/test/unit/src/org/netbeans/modules/jackpot30/compiler/IndexingAnnotationProcessorTest.java
new file mode 100644
index 0000000..9902a4b
--- /dev/null
+++ b/cmdline/compiler/test/unit/src/org/netbeans/modules/jackpot30/compiler/IndexingAnnotationProcessorTest.java
@@ -0,0 +1,122 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2011 Sun Microsystems, Inc. All rights reserved.
+ *
+ * The contents of this file are subject to the terms of either the GNU
+ * General Public License Version 2 only ("GPL") or the Common
+ * Development and Distribution License("CDDL") (collectively, the
+ * "License"). You may not use this file except in compliance with the
+ * License. You can obtain a copy of the License at
+ * http://www.netbeans.org/cddl-gplv2.html
+ * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+ * specific language governing permissions and limitations under the
+ * License.  When distributing the software, include this License Header
+ * Notice in each file and include the License file at
+ * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the GPL Version 2 section of the License file that
+ * accompanied this code. If applicable, add the following below the
+ * License Header, with the fields enclosed by brackets [] replaced by
+ * your own identifying information:
+ * "Portions Copyrighted [year] [name of copyright owner]"
+ *
+ * If you wish your version of this file to be governed by only the CDDL
+ * or only the GPL Version 2, indicate your decision by adding
+ * "[Contributor] elects to include this software in this distribution
+ * under the [CDDL or GPL Version 2] license." If you do not indicate a
+ * single choice of license, a recipient has the option to distribute
+ * your version of this file under either the CDDL, the GPL Version 2 or
+ * to extend the choice of license to its licensees as provided above.
+ * However, if you add GPL Version 2 code and therefore, elected the GPL
+ * Version 2 license, then the option applies only if the new code is
+ * made subject to such option by the copyright holder.
+ *
+ * Contributor(s):
+ *
+ * Portions Copyrighted 2011 Sun Microsystems, Inc.
+ */
+package org.netbeans.modules.jackpot30.compiler;
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicBoolean;
+import org.netbeans.api.java.source.ClasspathInfo;
+import org.netbeans.api.java.source.CompilationController;
+import org.netbeans.api.java.source.JavaSource;
+import org.netbeans.api.java.source.Task;
+import org.netbeans.modules.jackpot30.indexing.index.IndexQuery;
+import org.netbeans.modules.java.hints.declarative.Hacks;
+import org.netbeans.modules.java.hints.spiimpl.pm.BulkSearch;
+import org.netbeans.modules.parsing.impl.indexing.CacheFolder;
+import org.openide.filesystems.FileUtil;
+
+/**
+ *
+ * @author lahvac
+ */
+public class IndexingAnnotationProcessorTest extends HintsAnnotationProcessingTestBase {
+    public IndexingAnnotationProcessorTest(String name) {
+        super(name);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+        cache = new File(workDir, "cache");
+        CacheFolder.setCacheFolder(FileUtil.createFolder(cache));
+    }
+
+    private File cache;
+
+    public void testSimpleIndexing() throws Exception {
+        runCompiler("src/test/Test1.java",
+                    "package test; public class Test1 { private void test() { java.io.File f = null; f.isDirectory(); } }",
+                    "src/test/Test2.java",
+                    "package test; public class Test2 { private void test() { new javax.swing.ImageIcon((byte[]) null); } }",
+                    null,
+                    "-A" + IndexingAnnotationProcessor.CACHE_ROOT + "=" + cache.getAbsolutePath());
+
+        String[] patterns = new String[]{
+            "$1.isDirectory()",
+            "new ImageIcon($1)"
+        };
+
+        verifyIndex(patterns, "test/Test1.java", "test/Test2.java");
+    }
+
+    public void testNoSourcePath() throws Exception {
+        runCompiler("src/test/Test1.java",
+                    "package test; public class Test1 { private void test() { java.io.File f = null; f.isDirectory(); } }",
+                    "src/test/Test2.java",
+                    "package test; public class Test2 { private void test() { new javax.swing.ImageIcon((byte[]) null); } }",
+                    null,
+                    "-A" + IndexingAnnotationProcessor.CACHE_ROOT + "=" + cache.getAbsolutePath(),
+                    "-sourcepath",
+                    "");
+
+        String[] patterns = new String[]{
+            "$1.isDirectory()",
+            "new ImageIcon($1)"
+        };
+
+        verifyIndex(patterns, "test/Test1.java", "test/Test2.java");
+    }
+
+    private void verifyIndex(final String[] patterns, String... containedIn) throws Exception {
+        ClasspathInfo cpInfo = Hacks.createUniversalCPInfo();
+        final Set<String> real = new HashSet<String>();
+
+        JavaSource.create(cpInfo).runUserActionTask(new Task<CompilationController>() {
+            public void run(CompilationController parameter) throws Exception {
+                real.addAll(IndexQuery.open(src.toURI().toURL()).findCandidates(BulkSearch.getDefault().create(parameter, new AtomicBoolean(), patterns)));
+            }
+        }, true);
+
+        Set<String> golden = new HashSet<String>(Arrays.asList(containedIn));
+
+        assertEquals(golden, real);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/cmdline/lib/build.xml
----------------------------------------------------------------------
diff --git a/cmdline/lib/build.xml b/cmdline/lib/build.xml
new file mode 100644
index 0000000..e7fafdd
--- /dev/null
+++ b/cmdline/lib/build.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
+
+Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+Other names may be trademarks of their respective owners.
+
+The contents of this file are subject to the terms of either the GNU
+General Public License Version 2 only ("GPL") or the Common
+Development and Distribution License("CDDL") (collectively, the
+"License"). You may not use this file except in compliance with the
+License. You can obtain a copy of the License at
+http://www.netbeans.org/cddl-gplv2.html
+or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+specific language governing permissions and limitations under the
+License.  When distributing the software, include this License Header
+Notice in each file and include the License file at
+nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
+particular file as subject to the "Classpath" exception as provided
+by Oracle in the GPL Version 2 section of the License file that
+accompanied this code. If applicable, add the following below the
+License Header, with the fields enclosed by brackets [] replaced by
+your own identifying information:
+"Portions Copyrighted [year] [name of copyright owner]"
+
+Contributor(s):
+
+The Original Software is NetBeans. The Initial Developer of the Original
+Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
+Microsystems, Inc. All Rights Reserved.
+
+If you wish your version of this file to be governed by only the CDDL
+or only the GPL Version 2, indicate your decision by adding
+"[Contributor] elects to include this software in this distribution
+under the [CDDL or GPL Version 2] license." If you do not indicate a
+single choice of license, a recipient has the option to distribute
+your version of this file under either the CDDL, the GPL Version 2 or
+to extend the choice of license to its licensees as provided above.
+However, if you add GPL Version 2 code and therefore, elected the GPL
+Version 2 license, then the option applies only if the new code is
+made subject to such option by the copyright holder.
+-->
+<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
+<!-- for some information on what you could do (e.g. targets to override). -->
+<!-- If you delete this file and reopen the project it will be recreated. -->
+<project name="org.netbeans.modules.jackpot30.compiler" default="netbeans" basedir=".">
+    <description>Builds, tests, and runs the project org.netbeans.modules.jackpot30.compiler.</description>
+    <import file="nbproject/build-impl.xml"/>
+    <import file="${suite.dir}/../findbugs-import.xml"/>
+
+    <target name="create-cmdline-lib" depends="init">
+        <mkdir dir="${build.classes.dir}/../lib" />
+        <ant target="test" inheritall="false" inheritrefs="false">
+            <property name="test.config.standalone.includes" value="org/netbeans/modules/jackpot30/cmdline/lib/CreateStandaloneLibJar*.class"/>
+            <property name="test.config" value="standalone"/>
+            <property name="test-unit-sys-prop.outputDir" location="${build.classes.dir}/../lib" />
+        </ant>
+    </target>
+
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/cmdline/lib/manifest.mf
----------------------------------------------------------------------
diff --git a/cmdline/lib/manifest.mf b/cmdline/lib/manifest.mf
new file mode 100644
index 0000000..64198a9
--- /dev/null
+++ b/cmdline/lib/manifest.mf
@@ -0,0 +1,5 @@
+Manifest-Version: 1.0
+OpenIDE-Module: org.netbeans.modules.jackpot30.cmdline.lib
+OpenIDE-Module-Implementation-Version: 1
+OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/jackpot30/cmdline/lib/Bundle.properties
+

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/cmdline/lib/nbproject/build-impl.xml
----------------------------------------------------------------------
diff --git a/cmdline/lib/nbproject/build-impl.xml b/cmdline/lib/nbproject/build-impl.xml
new file mode 100644
index 0000000..473fd4b
--- /dev/null
+++ b/cmdline/lib/nbproject/build-impl.xml
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
+
+Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+Other names may be trademarks of their respective owners.
+
+The contents of this file are subject to the terms of either the GNU
+General Public License Version 2 only ("GPL") or the Common
+Development and Distribution License("CDDL") (collectively, the
+"License"). You may not use this file except in compliance with the
+License. You can obtain a copy of the License at
+http://www.netbeans.org/cddl-gplv2.html
+or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+specific language governing permissions and limitations under the
+License.  When distributing the software, include this License Header
+Notice in each file and include the License file at
+nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
+particular file as subject to the "Classpath" exception as provided
+by Oracle in the GPL Version 2 section of the License file that
+accompanied this code. If applicable, add the following below the
+License Header, with the fields enclosed by brackets [] replaced by
+your own identifying information:
+"Portions Copyrighted [year] [name of copyright owner]"
+
+Contributor(s):
+
+The Original Software is NetBeans. The Initial Developer of the Original
+Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
+Microsystems, Inc. All Rights Reserved.
+
+If you wish your version of this file to be governed by only the CDDL
+or only the GPL Version 2, indicate your decision by adding
+"[Contributor] elects to include this software in this distribution
+under the [CDDL or GPL Version 2] license." If you do not indicate a
+single choice of license, a recipient has the option to distribute
+your version of this file under either the CDDL, the GPL Version 2 or
+to extend the choice of license to its licensees as provided above.
+However, if you add GPL Version 2 code and therefore, elected the GPL
+Version 2 license, then the option applies only if the new code is
+made subject to such option by the copyright holder.
+-->
+<!--
+*** GENERATED FROM project.xml - DO NOT EDIT  ***
+***         EDIT ../build.xml INSTEAD         ***
+-->
+<project name="org.netbeans.modules.jackpot30.cmdline.lib-impl" basedir="..">
+    <fail message="Please build using Ant 1.7.1 or higher.">
+        <condition>
+            <not>
+                <antversion atleast="1.7.1"/>
+            </not>
+        </condition>
+    </fail>
+    <property file="nbproject/private/suite-private.properties"/>
+    <property file="nbproject/suite.properties"/>
+    <fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
+    <property file="${suite.dir}/nbproject/private/platform-private.properties"/>
+    <property file="${suite.dir}/nbproject/platform.properties"/>
+    <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
+        <attribute name="name"/>
+        <attribute name="value"/>
+        <sequential>
+            <property name="@{name}" value="${@{value}}"/>
+        </sequential>
+    </macrodef>
+    <macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2">
+        <attribute name="property"/>
+        <attribute name="value"/>
+        <sequential>
+            <property name="@{property}" value="@{value}"/>
+        </sequential>
+    </macrodef>
+    <property file="${user.properties.file}"/>
+    <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
+    <nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
+    <nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
+    <fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
+        <condition>
+            <not>
+                <contains string="${cluster.path.evaluated}" substring="platform"/>
+            </not>
+        </condition>
+    </fail>
+    <import file="${harness.dir}/build.xml"/>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/cmdline/lib/nbproject/genfiles.properties
----------------------------------------------------------------------
diff --git a/cmdline/lib/nbproject/genfiles.properties b/cmdline/lib/nbproject/genfiles.properties
new file mode 100644
index 0000000..6d2a259
--- /dev/null
+++ b/cmdline/lib/nbproject/genfiles.properties
@@ -0,0 +1,49 @@
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
+#
+# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+# Other names may be trademarks of their respective owners.
+#
+# The contents of this file are subject to the terms of either the GNU
+# General Public License Version 2 only ("GPL") or the Common
+# Development and Distribution License("CDDL") (collectively, the
+# "License"). You may not use this file except in compliance with the
+# License. You can obtain a copy of the License at
+# http://www.netbeans.org/cddl-gplv2.html
+# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+# specific language governing permissions and limitations under the
+# License.  When distributing the software, include this License Header
+# Notice in each file and include the License file at
+# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the GPL Version 2 section of the License file that
+# accompanied this code. If applicable, add the following below the
+# License Header, with the fields enclosed by brackets [] replaced by
+# your own identifying information:
+# "Portions Copyrighted [year] [name of copyright owner]"
+#
+# Contributor(s):
+#
+# The Original Software is NetBeans. The Initial Developer of the Original
+# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
+# Microsystems, Inc. All Rights Reserved.
+#
+# If you wish your version of this file to be governed by only the CDDL
+# or only the GPL Version 2, indicate your decision by adding
+# "[Contributor] elects to include this software in this distribution
+# under the [CDDL or GPL Version 2] license." If you do not indicate a
+# single choice of license, a recipient has the option to distribute
+# your version of this file under either the CDDL, the GPL Version 2 or
+# to extend the choice of license to its licensees as provided above.
+# However, if you add GPL Version 2 code and therefore, elected the GPL
+# Version 2 license, then the option applies only if the new code is
+# made subject to such option by the copyright holder.
+build.xml.data.CRC32=bbccd04c
+build.xml.script.CRC32=3d84c86a
+build.xml.stylesheet.CRC32=79c3b980@1.33
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=bab83d1d
+nbproject/build-impl.xml.script.CRC32=64f6fe95
+nbproject/build-impl.xml.stylesheet.CRC32=238281d1@1.44

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/cmdline/lib/nbproject/project.properties
----------------------------------------------------------------------
diff --git a/cmdline/lib/nbproject/project.properties b/cmdline/lib/nbproject/project.properties
new file mode 100644
index 0000000..32bfc50
--- /dev/null
+++ b/cmdline/lib/nbproject/project.properties
@@ -0,0 +1,46 @@
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+#
+# Copyright 2009-2017 Oracle and/or its affiliates. All rights reserved.
+#
+# Oracle and Java are registered trademarks of Oracle and/or its affiliates.
+# Other names may be trademarks of their respective owners.
+#
+# The contents of this file are subject to the terms of either the GNU
+# General Public License Version 2 only ("GPL") or the Common
+# Development and Distribution License("CDDL") (collectively, the
+# "License"). You may not use this file except in compliance with the
+# License. You can obtain a copy of the License at
+# http://www.netbeans.org/cddl-gplv2.html
+# or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
+# specific language governing permissions and limitations under the
+# License.  When distributing the software, include this License Header
+# Notice in each file and include the License file at
+# nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the GPL Version 2 section of the License file that
+# accompanied this code. If applicable, add the following below the
+# License Header, with the fields enclosed by brackets [] replaced by
+# your own identifying information:
+# "Portions Copyrighted [year] [name of copyright owner]"
+#
+# Contributor(s):
+#
+# The Original Software is NetBeans. The Initial Developer of the Original
+# Software is Sun Microsystems, Inc. Portions Copyright 2009-2010 Sun
+# Microsystems, Inc. All Rights Reserved.
+#
+# If you wish your version of this file to be governed by only the CDDL
+# or only the GPL Version 2, indicate your decision by adding
+# "[Contributor] elects to include this software in this distribution
+# under the [CDDL or GPL Version 2] license." If you do not indicate a
+# single choice of license, a recipient has the option to distribute
+# your version of this file under either the CDDL, the GPL Version 2 or
+# to extend the choice of license to its licensees as provided above.
+# However, if you add GPL Version 2 code and therefore, elected the GPL
+# Version 2 license, then the option applies only if the new code is
+# made subject to such option by the copyright holder.
+is.autoload=true
+javac.source=1.7
+javac.compilerargs=-Xlint -Xlint:-serial
+requires.nb.javac=true
+spec.version.base=1.16.0