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:11 UTC

[18/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/remoting/server/indexer/impl/nbproject/project.xml
----------------------------------------------------------------------
diff --git a/remoting/server/indexer/impl/nbproject/project.xml b/remoting/server/indexer/impl/nbproject/project.xml
new file mode 100644
index 0000000..32f5fd6
--- /dev/null
+++ b/remoting/server/indexer/impl/nbproject/project.xml
@@ -0,0 +1,317 @@
+<?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.
+-->
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.apisupport.project</type>
+    <configuration>
+        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
+            <code-name-base>org.netbeans.modules.jackpot30.backend.impl</code-name-base>
+            <suite-component/>
+            <module-dependencies>
+                <dependency>
+                    <code-name-base>org.netbeans.api.java.classpath</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <specification-version>1.27</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.api.progress</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <specification-version>1.22</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.libs.freemarker</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <implementation-version/>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.libs.javacapi</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>7.2.0.2</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.libs.javacimpl</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <implementation-version/>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.libs.lucene</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>3</release-version>
+                        <specification-version>3.0</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.jackpot30.common</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>1.1</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.java.hints</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <implementation-version/>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.java.source</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <implementation-version/>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.java.source.base</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <implementation-version/>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.jumpto</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <implementation-version/>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.parsing.api</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <implementation-version/>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.parsing.indexing</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <implementation-version/>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.project.ant</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <specification-version>1.39</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.projectapi</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <specification-version>1.34</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.projectuiapi</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <specification-version>1.49.0.8</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.projectuiapi.base</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <specification-version>1.79.0.9</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.queries</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <specification-version>1.34</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.sendopts</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>2</release-version>
+                        <specification-version>2.11</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.servletjspapi</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <specification-version>1.10.0.25</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.websvc.restlib</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>2</release-version>
+                        <specification-version>2.0</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.spi.editor.hints</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>0</release-version>
+                        <specification-version>1.16.0.7.6</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.filesystems</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>7.45</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.modules</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>7.21</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.text</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>6.35</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.util</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>8.12</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.util.lookup</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>8.5</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.util.ui</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>9.3</specification-version>
+                    </run-dependency>
+                </dependency>
+            </module-dependencies>
+            <test-dependencies>
+                <test-type>
+                    <name>unit</name>
+                    <test-dependency>
+                        <code-name-base>org.netbeans.libs.junit4</code-name-base>
+                        <compile-dependency/>
+                    </test-dependency>
+                    <test-dependency>
+                        <code-name-base>org.netbeans.modules.junitlib</code-name-base>
+                        <compile-dependency/>
+                    </test-dependency>
+                    <test-dependency>
+                        <code-name-base>org.netbeans.modules.nbjunit</code-name-base>
+                        <recursive/>
+                        <compile-dependency/>
+                    </test-dependency>
+                </test-type>
+            </test-dependencies>
+            <public-packages>
+                <package>org.netbeans.modules.jackpot30.backend.impl.spi</package>
+            </public-packages>
+        </data>
+    </configuration>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/indexer/impl/nbproject/suite.properties
----------------------------------------------------------------------
diff --git a/remoting/server/indexer/impl/nbproject/suite.properties b/remoting/server/indexer/impl/nbproject/suite.properties
new file mode 100644
index 0000000..942e12b
--- /dev/null
+++ b/remoting/server/indexer/impl/nbproject/suite.properties
@@ -0,0 +1,42 @@
+# 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.
+suite.dir=${basedir}/..

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/indexer/impl/release/patterns/ignore-standard
----------------------------------------------------------------------
diff --git a/remoting/server/indexer/impl/release/patterns/ignore-standard b/remoting/server/indexer/impl/release/patterns/ignore-standard
new file mode 100644
index 0000000..d3a9144
--- /dev/null
+++ b/remoting/server/indexer/impl/release/patterns/ignore-standard
@@ -0,0 +1 @@
+CVS|\\.hg|\\.svn

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/indexer/impl/release/patterns/project-marker-ant-based
----------------------------------------------------------------------
diff --git a/remoting/server/indexer/impl/release/patterns/project-marker-ant-based b/remoting/server/indexer/impl/release/patterns/project-marker-ant-based
new file mode 100644
index 0000000..51cd721
--- /dev/null
+++ b/remoting/server/indexer/impl/release/patterns/project-marker-ant-based
@@ -0,0 +1 @@
+(.*)/nbproject/project.xml
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/indexer/impl/release/patterns/project-marker-maven
----------------------------------------------------------------------
diff --git a/remoting/server/indexer/impl/release/patterns/project-marker-maven b/remoting/server/indexer/impl/release/patterns/project-marker-maven
new file mode 100644
index 0000000..2787a43
--- /dev/null
+++ b/remoting/server/indexer/impl/release/patterns/project-marker-maven
@@ -0,0 +1 @@
+(.*)/pom.xml
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/BackendIndexAccess.java
----------------------------------------------------------------------
diff --git a/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/BackendIndexAccess.java b/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/BackendIndexAccess.java
new file mode 100644
index 0000000..91d91ef
--- /dev/null
+++ b/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/BackendIndexAccess.java
@@ -0,0 +1,73 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2012 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]"
+ *
+ * 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 2012 Sun Microsystems, Inc.
+ */
+package org.netbeans.modules.jackpot30.backend.impl;
+
+import java.net.URL;
+import org.apache.lucene.index.IndexWriter;
+import org.netbeans.modules.jackpot30.backend.impl.spi.IndexAccessor;
+import org.netbeans.modules.jackpot30.common.api.IndexAccess;
+import org.netbeans.modules.parsing.spi.indexing.Indexable;
+import org.openide.filesystems.FileObject;
+import org.openide.util.lookup.ServiceProvider;
+
+/**
+ *
+ * @author lahvac
+ */
+@ServiceProvider(service=IndexAccess.class, supersedes="org.netbeans.modules.jackpot30.common.api.IndexAccess")
+public class BackendIndexAccess extends IndexAccess {
+
+    @Override
+    public IndexWriter getIndexWriter(URL root, FileObject cacheRoot, String subindexName) {
+        return IndexAccessor.getCurrent().getIndexWriter();
+    }
+
+    @Override
+    public String getRelativePath(Indexable i) {
+        return IndexAccessor.getCurrent().getPath(i.getURL());
+    }
+
+    @Override
+    public void finish() {
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/Bundle.properties
----------------------------------------------------------------------
diff --git a/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/Bundle.properties b/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/Bundle.properties
new file mode 100644
index 0000000..dd1bd1f
--- /dev/null
+++ b/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/Bundle.properties
@@ -0,0 +1,42 @@
+# 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.
+OpenIDE-Module-Name=Jackpot 3.0 Backend Impl

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/OptionProcessorImpl.java
----------------------------------------------------------------------
diff --git a/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/OptionProcessorImpl.java b/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/OptionProcessorImpl.java
new file mode 100644
index 0000000..66d1537
--- /dev/null
+++ b/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/OptionProcessorImpl.java
@@ -0,0 +1,508 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2011 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]"
+ *
+ * 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.backend.impl;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.Set;
+import java.util.jar.JarOutputStream;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import java.util.zip.ZipEntry;
+import org.apache.lucene.analysis.KeywordAnalyzer;
+import org.apache.lucene.index.CorruptIndexException;
+import org.apache.lucene.index.IndexReader;
+import org.apache.lucene.index.IndexWriter;
+import org.apache.lucene.store.FSDirectory;
+import org.netbeans.api.java.classpath.ClassPath;
+import org.netbeans.api.java.classpath.GlobalPathRegistry;
+import org.netbeans.api.java.queries.SourceForBinaryQuery;
+import org.netbeans.api.java.queries.SourceForBinaryQuery.Result2;
+import org.netbeans.api.java.source.SourceUtils;
+import org.netbeans.api.project.Project;
+import org.netbeans.api.project.ProjectManager;
+import org.netbeans.api.project.ProjectUtils;
+import org.netbeans.api.project.SourceGroup;
+import org.netbeans.api.project.ui.OpenProjects;
+import org.netbeans.api.sendopts.CommandException;
+import org.netbeans.modules.jackpot30.backend.impl.spi.IndexAccessor;
+import org.netbeans.modules.jackpot30.backend.impl.spi.StatisticsGenerator;
+import org.netbeans.modules.java.source.indexing.JavaIndex;
+import org.netbeans.modules.parsing.impl.indexing.CacheFolder;
+import org.netbeans.spi.java.classpath.support.ClassPathSupport;
+import org.netbeans.spi.project.support.ant.PropertyUtils;
+import org.netbeans.spi.sendopts.Env;
+import org.netbeans.spi.sendopts.Option;
+import org.netbeans.spi.sendopts.OptionProcessor;
+import org.openide.LifecycleManager;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.FileUtil;
+import org.openide.util.Exceptions;
+import org.openide.util.lookup.ServiceProvider;
+
+/**
+ *
+ * @author lahvac
+ */
+@ServiceProvider(service=OptionProcessor.class)
+public class OptionProcessorImpl extends OptionProcessor {
+
+    private static final Logger LOG = Logger.getLogger(OptionProcessorImpl.class.getName());
+    private final Option CATEGORY_ID = Option.requiredArgument(Option.NO_SHORT_NAME, "category-id");
+    private final Option CATEGORY_NAME = Option.requiredArgument(Option.NO_SHORT_NAME, "category-name");
+    private final Option CATEGORY_PROJECTS = Option.additionalArguments(Option.NO_SHORT_NAME, "category-projects");
+    private final Option CATEGORY_ROOT_DIR = Option.requiredArgument(Option.NO_SHORT_NAME, "category-root-dir");
+    private final Option CACHE_TARGET = Option.requiredArgument(Option.NO_SHORT_NAME, "cache-target");
+    private final Option INFO = Option.requiredArgument(Option.NO_SHORT_NAME, "info");
+    private final Set<Option> OPTIONS = new HashSet<Option>(Arrays.asList(CATEGORY_ID, CATEGORY_NAME, CATEGORY_PROJECTS, CATEGORY_ROOT_DIR, CACHE_TARGET, INFO));
+    private final boolean STORE_CLASSPATH = true;
+    
+    @Override
+    protected Set<Option> getOptions() {
+        return OPTIONS;
+    }
+
+    @Override
+    protected void process(Env env, Map<Option, String[]> optionValues) throws CommandException {
+        String categoryId = null;
+        String categoryName = null;
+
+        if (optionValues.containsKey(CATEGORY_ID)) {
+            categoryId = optionValues.get(CATEGORY_ID)[0];
+        }
+
+        if (optionValues.containsKey(CATEGORY_NAME)) {
+            categoryName = optionValues.get(CATEGORY_NAME)[0];
+        }
+
+        if (optionValues.containsKey(CATEGORY_PROJECTS)) {
+            if (categoryId == null) {
+                env.getErrorStream().println("Error: no category-id specified!");
+                return;
+            }
+
+            if (categoryName == null) {
+                env.getErrorStream().println("Warning: no category-name specified.");
+                return;
+            }
+        }
+
+        String cacheTarget = optionValues.get(CACHE_TARGET)[0];
+        File cache = FileUtil.normalizeFile(new File(cacheTarget));
+
+        cache.getParentFile().mkdirs();
+
+        if (categoryId == null) {
+            env.getErrorStream().println("Error: no category-id specified!");
+            return;
+        }
+
+        File baseDirFile = new File(optionValues.get(CATEGORY_ROOT_DIR)[0]);
+        FileObject baseDir = FileUtil.toFileObject(baseDirFile);
+        IndexWriter w = null;
+
+        FileObject cacheFolder = CacheFolder.getCacheFolder();
+        FileObject cacheTemp = cacheFolder.getFileObject("index");
+        Map<String, String> classpath;
+        Map<FileObject, String> extraJars = new HashMap<FileObject, String>();
+
+        try {
+            if (cacheTemp != null) cacheTemp.delete();
+
+            cacheTemp = cacheFolder.createFolder("index");
+            w = new IndexWriter(FSDirectory.open(FileUtil.toFile(cacheTemp)), new KeywordAnalyzer(), IndexWriter.MaxFieldLength.UNLIMITED);
+
+            IndexAccessor.current = new IndexAccessor(w, baseDir);
+            Set<FileObject> roots = getRoots(optionValues.get(CATEGORY_PROJECTS), env);
+
+            classpath = indexProjects(roots, extraJars, env);
+        } catch (InterruptedException ex) {
+            LOG.log(Level.FINE, null, ex);
+            throw (CommandException) new CommandException(0).initCause(ex);
+        } catch (IOException ex) {
+            LOG.log(Level.FINE, null, ex);
+            throw (CommandException) new CommandException(0).initCause(ex);
+        } finally {
+            if (w != null) {
+                try {
+                    w.optimize(true);
+                    w.close(true);
+                } catch (CorruptIndexException ex) {
+                    Exceptions.printStackTrace(ex);
+                } catch (IOException ex) {
+                    Exceptions.printStackTrace(ex);
+                }
+            }
+        }
+
+        Map<String, Long> statistics = Collections.emptyMap();
+        IndexReader r = null;
+
+        try {
+            r = IndexReader.open(FSDirectory.open(FileUtil.toFile(cacheTemp)), true);
+
+            statistics = StatisticsGenerator.generateStatistics(r);
+        } catch (CorruptIndexException ex) {
+            Exceptions.printStackTrace(ex);
+        } catch (IOException ex) {
+            Exceptions.printStackTrace(ex);
+        } finally {
+            if (r != null) {
+                try {
+                    r.close();
+                } catch (IOException ex) {
+                    Exceptions.printStackTrace(ex);
+                }
+            }
+        }
+
+        cacheTemp.refresh();
+
+        JarOutputStream out = null;
+        InputStream segments = null;
+
+        try {
+            out = new JarOutputStream(new FileOutputStream(cache));
+            pack(out, cacheTemp, null, "index", new StringBuilder(categoryId));
+
+            segments = cacheFolder.getFileObject("segments").getInputStream();
+            Properties in = new Properties();
+
+            in.load(segments);
+
+            segments.close();//XXX: should be in finally!
+
+            String baseDirPath = baseDirFile.toURI().toString();
+
+            Properties outSegments = new Properties();
+
+            for (String segment : in.stringPropertyNames()) {
+                String url = in.getProperty(segment);
+                String rel;
+                
+                if (url.startsWith(baseDirPath)) rel = "rel:/" + url.substring(baseDirPath.length());
+                else if (url.startsWith("jar:" + baseDirPath)) rel = "jar:rel:/" + url.substring(4 + baseDirPath.length());
+                else rel = url;
+
+                outSegments.setProperty(segment, rel);
+            }
+
+            out.putNextEntry(new ZipEntry(categoryId + "/segments"));
+
+            outSegments.store(out, "");
+
+            out.putNextEntry(new ZipEntry(categoryId + "/info"));
+
+            out.write("{\n".getBytes("UTF-8"));
+            out.write(("\"displayName\": \"" + categoryName + "\"").getBytes("UTF-8"));
+            if (optionValues.containsKey(INFO)) {
+                for (String infoValue : optionValues.get(INFO)[0].split(";")) {
+                    int eqSign = infoValue.indexOf('=');
+                    if (eqSign == (-1)) {
+                        LOG.log(Level.INFO, "No ''='' sign in: {0}", infoValue);
+                        continue;
+                    }
+                    out.write((",\n\"" + infoValue.substring(0, eqSign) + "\": \"" + infoValue.substring(eqSign + 1) + "\"").getBytes("UTF-8"));
+                }
+            }
+            out.write(",\n \"statistics\" : {\n".getBytes("UTF-8"));
+            boolean wasEntry = false;
+            for (Entry<String, Long> e : statistics.entrySet()) {
+                if (wasEntry) out.write(", \n".getBytes("UTF-8"));
+                out.write(("\"" + e.getKey() + "\" : " + e.getValue()).getBytes("UTF-8"));
+                wasEntry = true;
+            }
+            out.write("\n}\n".getBytes("UTF-8"));
+            out.write("\n}\n".getBytes("UTF-8"));
+
+            if (STORE_CLASSPATH) {
+                out.putNextEntry(new ZipEntry(categoryId + "/classpath"));
+
+                for (Entry<String, String> e : classpath.entrySet()) {
+                    out.write((e.getKey() + "=" + e.getValue() + "\n").getBytes("UTF-8"));
+                }
+
+                for (Entry<FileObject, String> ej : extraJars.entrySet()) {
+                    out.putNextEntry(new ZipEntry(categoryId + "/" + ej.getValue()));
+
+                    InputStream jarIn = ej.getKey().getInputStream();
+
+                    try {
+                        FileUtil.copy(jarIn, out);
+                    } finally {
+                        jarIn.close();
+                    }
+                }
+            }
+
+            for (FileObject s : cacheFolder.getChildren()) {
+                if (!s.isFolder() || !s.getNameExt().startsWith("s") || s.getChildren().length == 0) continue;
+
+                JarOutputStream local = null;
+                try {
+                    out.putNextEntry(new ZipEntry(categoryId + "/" + s.getNameExt()));
+
+                    local = new JarOutputStream(out);
+
+                    pack(local, s, baseDir.toURI().toString(), "", new StringBuilder(""));
+                } finally {
+                    if (local != null) {
+                        local.finish();
+                    }
+                }
+            }
+        } catch (IOException ex) {
+            LOG.log(Level.FINE, null, ex);
+            throw (CommandException) new CommandException(0).initCause(ex);
+        } finally {
+            if (out != null) {
+                try {
+                    out.close();
+                } catch (IOException ex) {
+                    throw (CommandException) new CommandException(0).initCause(ex);
+                }
+            }
+
+            if (segments != null) {
+                try {
+                    segments.close();
+                } catch (IOException ex) {
+                    throw (CommandException) new CommandException(0).initCause(ex);
+                }
+            }
+        }
+        
+        LifecycleManager.getDefault().exit();
+    }
+
+    private Set<FileObject> getRoots(String[] projects, Env env) {
+        Set<FileObject> sourceRoots = new HashSet<FileObject>(projects.length * 4 / 3 + 1);
+
+        for (String p : projects) {
+            try {
+                LOG.log(Level.FINE, "Processing project specified as: {0}", p);
+                File f = PropertyUtils.resolveFile(env.getCurrentDirectory(), p);
+                File normalized = FileUtil.normalizeFile(f);
+                FileObject prjFO = FileUtil.toFileObject(normalized);
+
+                if (prjFO == null) {
+                    env.getErrorStream().println("Project location cannot be found: " + p);
+                    continue;
+                }
+
+                if (!prjFO.isFolder()) {
+                    env.getErrorStream().println("Project specified as: " + p + " does not point to a directory (" + FileUtil.getFileDisplayName(prjFO));
+                    continue;
+                }
+
+                Project prj = ProjectManager.getDefault().findProject(prjFO);
+
+                if (prj == null) {
+                    env.getErrorStream().println("Project specified as: " + p + " does not resolve to a project (" + FileUtil.getFileDisplayName(prjFO));
+                    continue;
+                }
+
+                LOG.log(Level.FINE, "project resolved: {0} ({1})", new Object[] {ProjectUtils.getInformation(prj), prj.getClass()});
+                SourceGroup[] javaSG = ProjectUtils.getSources(prj).getSourceGroups("java");
+
+                if (javaSG.length == 0) {
+                    env.getErrorStream().println("Project specified as: " + p + " does not define a java source groups (" + FileUtil.getFileDisplayName(prjFO));
+                    continue;
+                }
+
+                for (SourceGroup sg : javaSG) {
+                    LOG.log(Level.FINE, "Found source group: {0}", FileUtil.getFileDisplayName(sg.getRootFolder()));
+                    sourceRoots.add(sg.getRootFolder());
+                }
+            } catch (ThreadDeath td) {
+                throw td;
+            } catch (Throwable ex) {
+                LOG.log(Level.FINE, null, ex);
+                Exceptions.printStackTrace(ex);
+                env.getErrorStream().println("Cannot work with project specified as: " + p + " (" + ex.getLocalizedMessage() + ")");
+            }
+        }
+
+        return sourceRoots;
+    }
+
+    private Map<String, String> indexProjects(Set<FileObject> sourceRoots, Map<FileObject, String> extraJars, Env env) throws IOException, InterruptedException {
+        if (sourceRoots.isEmpty()) {
+            env.getErrorStream().println("Error: There is nothing to index!");
+            return Collections.emptyMap();
+        } else {
+            //XXX: to start up the project systems and RepositoryUpdater:
+            ((Runnable) OpenProjects.getDefault().openProjects()).run();
+            org.netbeans.api.project.ui.OpenProjects.getDefault().getOpenProjects();
+            ClassPath source = ClassPathSupport.createClassPath(sourceRoots.toArray(new FileObject[0]));
+
+            LOG.log(Level.FINE, "Registering as source path: {0}", source.toString());
+            GlobalPathRegistry.getDefault().register(ClassPath.SOURCE, new ClassPath[] {source});
+            SourceUtils.waitScanFinished();
+            Map<String, String> classpath = new HashMap<String, String>();
+
+            if (STORE_CLASSPATH) {
+                long extraJarCounter = 0;
+
+                for (FileObject sourceRoot : sourceRoots) {
+                    StringBuilder cp = new StringBuilder();
+                    ClassPath sourceCP = ClassPath.getClassPath(sourceRoot, ClassPath.SOURCE);
+
+                    if (sourceCP != null) {
+                        for (ClassPath.Entry e : sourceCP.entries()) {
+                            cp.append(CacheFolder.getDataFolder(e.getURL()).getNameExt());
+                            cp.append(":");
+                        }
+                    }
+
+                    ClassPath compileCP = ClassPath.getClassPath(sourceRoot, ClassPath.COMPILE);
+
+                    if (compileCP != null) {
+                        for (ClassPath.Entry e : compileCP.entries()) {
+                            Result2 sourceMapping = SourceForBinaryQuery.findSourceRoots2(e.getURL());
+
+                            if (sourceMapping.preferSources() && /*XXX:*/ sourceMapping.getRoots().length > 0) {
+                                for (FileObject sr : sourceMapping.getRoots()) {
+                                    cp.append(CacheFolder.getDataFolder(sr.toURL()).getNameExt());
+                                    cp.append(":");
+                                }
+                            } else {
+                                FileObject root = e.getRoot();
+                                FileObject jar = root != null ? FileUtil.getArchiveFile(root) : null;
+
+                                if (jar != null) root = jar;
+
+                                if (root != null && root.isData()) { //XXX: class folders
+                                    String rootId = extraJars.get(root);
+
+                                    if (rootId == null) {
+                                        extraJars.put(root, rootId = "ej" + extraJarCounter++ + ".jar");
+                                    }
+
+                                    cp.append(rootId);
+                                    cp.append(":");
+                                }
+                            }
+                        }
+                    }
+
+                    if (cp.length() > 0)
+                        cp.deleteCharAt(cp.length() - 1);
+
+                    classpath.put(CacheFolder.getDataFolder(sourceRoot.toURL()).getNameExt(), cp.toString());
+                }
+            }
+
+            GlobalPathRegistry.getDefault().unregister(ClassPath.SOURCE, new ClassPath[] {source});
+
+            return classpath;
+        }
+    }
+
+    private void pack(JarOutputStream target, FileObject index, String baseURL, String name, StringBuilder relPath) throws IOException {
+        int len = relPath.length();
+        boolean first = relPath.length() == 0;
+
+        if (!first) relPath.append("/");
+        relPath.append(name);
+
+        boolean data = index.isData();
+
+        if (relPath.length() > 0) {
+            target.putNextEntry(new ZipEntry(relPath.toString() + (data ? "" : "/")));
+        }
+
+        if (data) {
+            InputStream in = index.getInputStream();
+
+            try {
+                if (baseURL != null && (("java/" + JavaIndex.VERSION + "/checksums.properties").contentEquals(relPath) || ("java/" + JavaIndex.VERSION + "/fqn2files.properties").contentEquals(relPath))) {
+                    fixAbsolutePath(in, target, baseURL, "rel:/");
+                } else {
+                    FileUtil.copy(in, target);
+                }
+            } finally {
+                in.close();
+            }
+        }
+
+        for (FileObject c : index.getChildren()) {
+            if (first && c.getNameExt().equals("segments")) continue;
+            pack(target, c, baseURL, c.getNameExt(), relPath);
+        }
+
+        relPath.delete(len, relPath.length());
+    }
+
+    private void fixAbsolutePath(InputStream original, OutputStream target, String origPrefix, String targetPrefix) throws IOException {
+        Properties inProps = new Properties();
+
+        inProps.load(original);
+
+        Properties outProps = new Properties();
+
+        for (String k : (Collection<String>) (Collection) inProps.keySet()) {
+            String orig = inProps.getProperty(k);
+
+            //XXX: should only change key or value as appropriate:
+            if (k.startsWith(origPrefix)) k = targetPrefix + k.substring(origPrefix.length());
+            if (orig.startsWith(origPrefix)) orig = targetPrefix + orig.substring(origPrefix.length());
+
+            outProps.setProperty(k, orig);
+        }
+
+
+        outProps.store(target, "");
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/spi/IndexAccessor.java
----------------------------------------------------------------------
diff --git a/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/spi/IndexAccessor.java b/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/spi/IndexAccessor.java
new file mode 100644
index 0000000..024e904
--- /dev/null
+++ b/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/spi/IndexAccessor.java
@@ -0,0 +1,86 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2011-2012 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]"
+ *
+ * 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-2012 Sun Microsystems, Inc.
+ */
+package org.netbeans.modules.jackpot30.backend.impl.spi;
+
+import java.net.URISyntaxException;
+import java.net.URL;
+import org.apache.lucene.index.IndexWriter;
+import org.openide.filesystems.FileObject;
+import org.openide.util.Exceptions;
+
+/**
+ *
+ * @author lahvac
+ */
+public class IndexAccessor {
+
+    private final FileObject root;
+    private final IndexWriter w;
+
+    public IndexAccessor(IndexWriter w, FileObject root) {
+        this.w = w;
+        this.root = root;
+    }
+
+    public IndexWriter getIndexWriter() {
+        return w;
+    }
+
+    public String getPath(URL file) {
+        try {
+            return root.toURI().relativize(file.toURI()).toString();
+        } catch (URISyntaxException ex) {
+            Exceptions.printStackTrace(ex);
+        }
+
+        return file.toExternalForm();
+    }
+
+    public boolean isAcceptable(URL file) {
+        return file.toString().startsWith(root.toURL().toString());
+    }
+
+    public static IndexAccessor current;
+    public static IndexAccessor getCurrent() {
+        return current;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/spi/StatisticsGenerator.java
----------------------------------------------------------------------
diff --git a/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/spi/StatisticsGenerator.java b/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/spi/StatisticsGenerator.java
new file mode 100644
index 0000000..d50e4ff
--- /dev/null
+++ b/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/spi/StatisticsGenerator.java
@@ -0,0 +1,102 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2012 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]"
+ *
+ * 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 2012 Sun Microsystems, Inc.
+ */
+package org.netbeans.modules.jackpot30.backend.impl.spi;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.lucene.document.Document;
+import org.apache.lucene.document.FieldSelector;
+import org.apache.lucene.document.FieldSelectorResult;
+import org.apache.lucene.index.IndexReader;
+import org.openide.util.Lookup;
+
+/**
+ *
+ * @author lahvac
+ */
+public abstract class StatisticsGenerator {
+
+    protected abstract void amendStatistics(IndexReader r, Document doc) throws IOException;
+
+    public static Map<String, Long> generateStatistics(IndexReader r) throws IOException {
+        statistics = new HashMap<String, Long>();
+
+        Collection<? extends StatisticsGenerator> generators = Lookup.getDefault().lookupAll(StatisticsGenerator.class);
+
+        int maxDocs = r.maxDoc();
+
+        for (int d = 0; d < maxDocs; d++) {
+            Document doc = r.document(d, new FieldSelector() {
+                @Override public FieldSelectorResult accept(String string) {
+                    return FieldSelectorResult.LAZY_LOAD;
+                }
+            });
+
+            for (StatisticsGenerator sg : generators) {
+                sg.amendStatistics(r, doc);
+            }
+        }
+        
+        Map<String, Long> result = statistics;
+
+        statistics = null;
+
+        return result;
+    }
+
+    private static Map<String, Long> statistics;
+
+    protected final void increment(String key) {
+        add(key, 1);
+    }
+
+    protected void add(String key, long count) {
+        Long val = statistics.get(key);
+
+        if (val == null) val = 0L;
+
+        statistics.put(key, val + count);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/spi/Utilities.java
----------------------------------------------------------------------
diff --git a/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/spi/Utilities.java b/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/spi/Utilities.java
new file mode 100644
index 0000000..d3cf58f
--- /dev/null
+++ b/remoting/server/indexer/impl/src/org/netbeans/modules/jackpot30/backend/impl/spi/Utilities.java
@@ -0,0 +1,88 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2013 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]"
+ *
+ * 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 2013 Sun Microsystems, Inc.
+ */
+package org.netbeans.modules.jackpot30.backend.impl.spi;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.nio.charset.Charset;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.netbeans.api.queries.FileEncodingQuery;
+import org.openide.filesystems.FileObject;
+
+/**
+ *
+ * @author lahvac
+ */
+public class Utilities {
+
+    private Utilities() { }
+
+    public static String readFully(FileObject source) throws IOException {
+        Reader in = null;
+        StringBuilder result = new StringBuilder();
+
+        try {
+            Charset charset = FileEncodingQuery.getEncoding(source);
+            in = new BufferedReader(new InputStreamReader(source.getInputStream(), charset));
+
+            int read;
+
+            while ((read = in.read()) != (-1)) {
+                result.append((char) read);
+            }
+        } finally {
+            if (in != null) {
+                try {
+                    in.close();
+                } catch (IOException ex) {
+                    Logger.getLogger(Utilities.class.getName()).log(Level.SEVERE, null, ex);
+                }
+            }
+        }
+
+        return result.toString();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/indexer/nbproject/build-impl.xml
----------------------------------------------------------------------
diff --git a/remoting/server/indexer/nbproject/build-impl.xml b/remoting/server/indexer/nbproject/build-impl.xml
new file mode 100644
index 0000000..68e64ab
--- /dev/null
+++ b/remoting/server/indexer/nbproject/build-impl.xml
@@ -0,0 +1,93 @@
+<?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="indexing-impl" basedir=".." xmlns:sproject="http://www.netbeans.org/ns/nb-module-suite-project/1">
+    <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/platform-private.properties"/>
+    <property file="nbproject/platform.properties"/>
+    <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-suite-project/1">
+        <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-suite-project/1">
+        <attribute name="property"/>
+        <attribute name="value"/>
+        <sequential>
+            <property name="@{property}" value="@{value}"/>
+        </sequential>
+    </macrodef>
+    <property file="${user.properties.file}"/>
+    <sproject:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir"/>
+    <sproject:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir"/>
+    <sproject:evalprops property="cluster.path.evaluated" value="${cluster.path}"/>
+    <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>
+    <ant antfile="nbproject/platform.xml"/>
+    <fail message="Cannot find NetBeans build harness. ${line.separator}Check that nbplatform.${nbplatform.active}.netbeans.dest.dir and nbplatform.${nbplatform.active}.harness.dir are defined. ${line.separator}On a developer machine these are normally defined in ${user.properties.file}=${netbeans.user}/build.properties ${line.separator}but for automated builds you should pass these properties to Ant explicitly. ${line.separator}You may instead download the harness and platform: -Dbootstrap.url=.../tasks.jar -Dautoupdate.catalog.url=.../updates.xml">
+        <condition>
+            <not>
+                <available file="${harness.dir}/suite.xml"/>
+            </not>
+        </condition>
+    </fail>
+    <import file="${harness.dir}/suite.xml"/>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/indexer/nbproject/genfiles.properties
----------------------------------------------------------------------
diff --git a/remoting/server/indexer/nbproject/genfiles.properties b/remoting/server/indexer/nbproject/genfiles.properties
new file mode 100644
index 0000000..afce450
--- /dev/null
+++ b/remoting/server/indexer/nbproject/genfiles.properties
@@ -0,0 +1,52 @@
+# 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=7bd55f34
+build.xml.script.CRC32=f378700b
+build.xml.stylesheet.CRC32=eaf9f76a@1.47
+# 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=7bd55f34
+nbproject/build-impl.xml.script.CRC32=5e004a39
+nbproject/build-impl.xml.stylesheet.CRC32=0f381476@2.46
+nbproject/platform.xml.data.CRC32=7bd55f34
+nbproject/platform.xml.script.CRC32=6dcbd131
+nbproject/platform.xml.stylesheet.CRC32=4e1f53d4@2.70

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/indexer/nbproject/platform.properties
----------------------------------------------------------------------
diff --git a/remoting/server/indexer/nbproject/platform.properties b/remoting/server/indexer/nbproject/platform.properties
new file mode 100644
index 0000000..2e371c0
--- /dev/null
+++ b/remoting/server/indexer/nbproject/platform.properties
@@ -0,0 +1,58 @@
+# 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.
+cluster.path=\
+    ${nbplatform.active.dir}/apisupport:\
+    ${nbplatform.active.dir}/cnd:\
+    ${nbplatform.active.dir}/dlight:\
+    ${nbplatform.active.dir}/enterprise:\
+    ${nbplatform.active.dir}/harness:\
+    ${nbplatform.active.dir}/ide:\
+    ${nbplatform.active.dir}/extide:\
+    ${nbplatform.active.dir}/java:\
+    ${nbplatform.active.dir}/nb:\
+    ${nbplatform.active.dir}/platform:\
+    ${nbplatform.active.dir}/profiler:\
+    ${nbplatform.active.dir}/websvccommon:\
+    ../../common/build/cluster
+extcluster.../../common/build/cluster.javadoc=
+extcluster.../../common/build/cluster.sources=
+nbplatform.active=default

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/indexer/nbproject/platform.xml
----------------------------------------------------------------------
diff --git a/remoting/server/indexer/nbproject/platform.xml b/remoting/server/indexer/nbproject/platform.xml
new file mode 100644
index 0000000..1917e28
--- /dev/null
+++ b/remoting/server/indexer/nbproject/platform.xml
@@ -0,0 +1,77 @@
+<?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.
+-->
+<project name="platform" default="download" basedir="..">
+    <condition property="download.required">
+        <and>
+            <not>
+                <available file="${harness.dir}/suite.xml"/>
+            </not>
+            <isset property="bootstrap.url"/>
+            <isset property="autoupdate.catalog.url"/>
+        </and>
+    </condition>
+    <target name="download" if="download.required">
+        <mkdir dir="${harness.dir}"/>
+        <pathconvert pathsep="|" property="download.clusters">
+            <mapper type="flatten"/>
+            <path path="${cluster.path}"/>
+        </pathconvert>
+        <property name="disabled.modules" value=""/>
+        <pathconvert property="module.includes" pathsep="">
+            <mapper type="glob" from="${basedir}${file.separator}*" to="(?!^\Q*\E$)"/>
+            <path>
+                <filelist files="${disabled.modules}" dir="."/>
+            </path>
+        </pathconvert>
+        <echo message="Downloading clusters ${download.clusters}"/>
+        <property name="tasks.jar" location="${java.io.tmpdir}/tasks.jar"/>
+        <get src="${bootstrap.url}" dest="${tasks.jar}" usetimestamp="true" verbose="true"/>
+        <taskdef name="autoupdate" classname="org.netbeans.nbbuild.AutoUpdate" classpath="${tasks.jar}"/>
+        <autoupdate installdir="${nbplatform.active.dir}" updatecenter="${autoupdate.catalog.url}">
+            <modules includes="${module.includes}.*" clusters="${download.clusters}"/>
+            <modules includes="org[.]netbeans[.]modules[.]apisupport[.]harness" clusters="harness"/>
+        </autoupdate>
+    </target>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/indexer/nbproject/project.properties
----------------------------------------------------------------------
diff --git a/remoting/server/indexer/nbproject/project.properties b/remoting/server/indexer/nbproject/project.properties
new file mode 100644
index 0000000..33fd239
--- /dev/null
+++ b/remoting/server/indexer/nbproject/project.properties
@@ -0,0 +1,51 @@
+# 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.
+app.conf=etc/app.conf
+app.name=indexer
+branding.token=${app.name}
+modules=\
+    ${project.org.netbeans.modules.jackpot30.backend.impl}:\
+    ${project.org.netbeans.modules.jackpot30.indexer.source}:\
+    ${project.org.netbeans.modules.jackpot30.indexer.usages}
+project.org.netbeans.modules.jackpot30.backend.impl=impl
+project.org.netbeans.modules.jackpot30.indexer.source=source
+project.org.netbeans.modules.jackpot30.indexer.usages=usages

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/indexer/nbproject/project.xml
----------------------------------------------------------------------
diff --git a/remoting/server/indexer/nbproject/project.xml b/remoting/server/indexer/nbproject/project.xml
new file mode 100644
index 0000000..3d49cd3
--- /dev/null
+++ b/remoting/server/indexer/nbproject/project.xml
@@ -0,0 +1,52 @@
+<?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.
+-->
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.apisupport.project.suite</type>
+    <configuration>
+        <data xmlns="http://www.netbeans.org/ns/nb-module-suite-project/1">
+            <name>indexing</name>
+        </data>
+    </configuration>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/indexer/source/build.xml
----------------------------------------------------------------------
diff --git a/remoting/server/indexer/source/build.xml b/remoting/server/indexer/source/build.xml
new file mode 100644
index 0000000..f4bb9e8
--- /dev/null
+++ b/remoting/server/indexer/source/build.xml
@@ -0,0 +1,52 @@
+<?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.indexer.source" default="netbeans" basedir=".">
+    <description>Builds, tests, and runs the project org.netbeans.modules.jackpot30.indexer.source.</description>
+    <import file="nbproject/build-impl.xml"/>
+    <import file="${suite.dir}/../../../findbugs-import.xml"/>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/server/indexer/source/manifest.mf
----------------------------------------------------------------------
diff --git a/remoting/server/indexer/source/manifest.mf b/remoting/server/indexer/source/manifest.mf
new file mode 100644
index 0000000..3dc1b79
--- /dev/null
+++ b/remoting/server/indexer/source/manifest.mf
@@ -0,0 +1,5 @@
+Manifest-Version: 1.0
+OpenIDE-Module: org.netbeans.modules.jackpot30.indexer.source
+OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/jackpot30/indexer/source/Bundle.properties
+OpenIDE-Module-Specification-Version: 1.0
+