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

[27/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/common/test/src/org/netbeans/modules/jackpot30/common/test/IndexTestBase.java
----------------------------------------------------------------------
diff --git a/remoting/common/test/src/org/netbeans/modules/jackpot30/common/test/IndexTestBase.java b/remoting/common/test/src/org/netbeans/modules/jackpot30/common/test/IndexTestBase.java
new file mode 100644
index 0000000..df2b169
--- /dev/null
+++ b/remoting/common/test/src/org/netbeans/modules/jackpot30/common/test/IndexTestBase.java
@@ -0,0 +1,187 @@
+/*
+ * 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.common.test;
+
+import java.net.URL;
+import java.util.Collections;
+import org.netbeans.api.editor.mimelookup.MimePath;
+import org.netbeans.api.java.classpath.ClassPath;
+import org.netbeans.api.java.classpath.GlobalPathRegistry;
+import org.netbeans.api.java.source.SourceUtils;
+import org.netbeans.api.java.source.SourceUtilsTestUtil;
+import org.netbeans.api.java.source.TestUtilities;
+import org.netbeans.core.startup.Main;
+import org.netbeans.junit.NbTestCase;
+import org.netbeans.modules.java.hints.spiimpl.options.HintsSettings.GlobalSettingsProvider;
+import org.netbeans.modules.java.source.indexing.JavaCustomIndexer;
+import org.netbeans.modules.parsing.impl.indexing.MimeTypes;
+import org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater;
+import org.netbeans.spi.editor.mimelookup.MimeDataProvider;
+import org.netbeans.spi.java.classpath.ClassPathProvider;
+import org.netbeans.spi.java.classpath.support.ClassPathSupport;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.FileUtil;
+import org.openide.util.Lookup;
+import org.openide.util.lookup.Lookups;
+import org.openide.util.lookup.ServiceProvider;
+
+/**
+ *
+ * @author lahvac
+ */
+public abstract class IndexTestBase extends NbTestCase {
+
+    public IndexTestBase(String name) {
+        super(name);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        SourceUtilsTestUtil.prepareTest(new String[0], new Object[] {new TestClassPathProvider()});
+        Main.initializeURLFactory();
+        org.netbeans.api.project.ui.OpenProjects.getDefault().getOpenProjects();
+        prepareTest();
+        MimeTypes.setAllMimeTypes(Collections.singleton("text/x-java"));
+        GlobalPathRegistry.getDefault().register(ClassPath.SOURCE, new ClassPath[] {sourceCP});
+        RepositoryUpdater.getDefault().start(true);
+        super.setUp();
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        super.tearDown();
+        GlobalPathRegistry.getDefault().unregister(ClassPath.SOURCE, new ClassPath[] {sourceCP});
+    }
+
+    protected FileObject sources;
+    protected FileObject src;
+    protected FileObject src2;
+    protected FileObject build;
+    protected FileObject cache;
+
+    private ClassPath sourceCP;
+
+    private void prepareTest() throws Exception {
+        FileObject workdir = SourceUtilsTestUtil.makeScratchDir(this);
+
+        sources = FileUtil.createFolder(workdir, "sources");
+        src = FileUtil.createFolder(sources, "src");
+        src2 = FileUtil.createFolder(sources, "src2");
+        build = FileUtil.createFolder(workdir, "build");
+        cache = FileUtil.createFolder(workdir, "cache");
+
+        sourceCP = ClassPathSupport.createClassPath(src, src2);
+        
+        SourceUtilsTestUtil.prepareTest(src, build, cache);
+    }
+
+    public static void writeFiles(FileObject sourceRoot, File... files) throws Exception {
+        for (FileObject c : sourceRoot.getChildren()) {
+            c.delete();
+        }
+
+        for (File f : files) {
+            FileObject fo = FileUtil.createData(sourceRoot, f.filename);
+            TestUtilities.copyStringToFile(fo, f.content);
+        }
+    }
+
+    public static void writeFilesAndWaitForScan(FileObject sourceRoot, File... files) throws Exception {
+        writeFiles(sourceRoot, files);
+        SourceUtils.waitScanFinished();
+    }
+
+    public static final class File {
+        public final String filename;
+        public final String content;
+
+        public File(String filename, String content) {
+            this.filename = filename;
+            this.content = content;
+        }
+    }
+
+    @ServiceProvider(service=MimeDataProvider.class)
+    public static final class MimeDataProviderImpl implements MimeDataProvider {
+
+        private static final Lookup L = Lookups.fixed(new JavaCustomIndexer.Factory(), new GlobalSettingsProvider());
+        
+        @Override
+        public Lookup getLookup(MimePath mp) {
+            if ("text/x-java".equals(mp.getPath())) {
+                return L;
+            }
+            return Lookup.EMPTY;
+        }
+        
+    }
+
+    private class TestClassPathProvider implements ClassPathProvider {
+        
+        public TestClassPathProvider() {
+        }
+        
+        public ClassPath findClassPath(FileObject file, String type) {
+            try {
+            if (ClassPath.BOOT == type) {
+                return ClassPathSupport.createClassPath(SourceUtilsTestUtil.getBootClassPath().toArray(new URL[0]));
+            }
+            
+            if (ClassPath.SOURCE == type) {
+                return sourceCP;
+            }
+            
+            if (ClassPath.COMPILE == type) {
+                return ClassPathSupport.createClassPath(new URL[0]);
+            }
+            
+            if (ClassPath.EXECUTE == type) {
+                return ClassPathSupport.createClassPath(new FileObject[] {
+                    build
+                });
+            }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            return null;
+        }
+        
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/ide/api/build.xml
----------------------------------------------------------------------
diff --git a/remoting/ide/api/build.xml b/remoting/ide/api/build.xml
new file mode 100644
index 0000000..bacd8ef
--- /dev/null
+++ b/remoting/ide/api/build.xml
@@ -0,0 +1,73 @@
+<?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.remoting.api" default="netbeans" basedir=".">
+    <description>Builds, tests, and runs the project org.netbeans.modules.jackpot30.remoting.api.</description>
+    <import file="nbproject/build-impl.xml"/>
+    <import file="${suite.dir}/../../findbugs-import.xml"/>
+    
+    <target name="-check-jerig-downloaded">
+        <available file="external/jerig-6142f6ca1038.zip" property="jerig.downloaded"/>
+    </target>
+    <target name="-download-jerig" depends="-check-jerig-downloaded" unless="jerig.downloaded">
+        <mkdir dir="external" />
+        <get src="http://kenai.com/downloads/jackpot30/external/jerig-6142f6ca1038.zip" dest="external/jerig-6142f6ca1038.zip" usetimestamp="true"/>
+    </target>
+    
+    <target name="files-init" depends="projectized-common.files-init,-download-jerig">
+        <unzip src="external/jerig-6142f6ca1038.zip" dest="external" overwrite="false" />
+        <mkdir dir="${cluster}/modules/ext" />
+        <copy  todir="${cluster}/modules/ext">
+            <fileset dir="external" includes="*pojson*.jar" />
+            <fileset dir="external" includes="*common*.jar" />
+        </copy>
+    </target>
+
+    <target name="test" />
+    <target name="test-coverage" />
+    <target name="coverage-report" />
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/ide/api/manifest.mf
----------------------------------------------------------------------
diff --git a/remoting/ide/api/manifest.mf b/remoting/ide/api/manifest.mf
new file mode 100644
index 0000000..e4bef37
--- /dev/null
+++ b/remoting/ide/api/manifest.mf
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+AutoUpdate-Show-In-Client: false
+OpenIDE-Module: org.netbeans.modules.jackpot30.remoting.api
+OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/jackpot30/remotingapi/Bundle.properties
+OpenIDE-Module-Specification-Version: 1.12
+

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/ide/api/nbproject/build-impl.xml
----------------------------------------------------------------------
diff --git a/remoting/ide/api/nbproject/build-impl.xml b/remoting/ide/api/nbproject/build-impl.xml
new file mode 100644
index 0000000..fec765a
--- /dev/null
+++ b/remoting/ide/api/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.remoting.api-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/remoting/ide/api/nbproject/genfiles.properties
----------------------------------------------------------------------
diff --git a/remoting/ide/api/nbproject/genfiles.properties b/remoting/ide/api/nbproject/genfiles.properties
new file mode 100644
index 0000000..2f81f6c
--- /dev/null
+++ b/remoting/ide/api/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=83c779aa
+build.xml.script.CRC32=4e65cd58
+build.xml.stylesheet.CRC32=a56c6a5b@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=40c9b5ac
+nbproject/build-impl.xml.script.CRC32=33cac223
+nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.70

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/ide/api/nbproject/project.properties
----------------------------------------------------------------------
diff --git a/remoting/ide/api/nbproject/project.properties b/remoting/ide/api/nbproject/project.properties
new file mode 100644
index 0000000..9bb3b15
--- /dev/null
+++ b/remoting/ide/api/nbproject/project.properties
@@ -0,0 +1,44 @@
+# 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.
+javac.source=1.6
+javac.compilerargs=-Xlint -Xlint:-serial
+extra.module.files=modules/ext/util-commons.jar,modules/ext/util-pojson.jar

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/ide/api/nbproject/project.xml
----------------------------------------------------------------------
diff --git a/remoting/ide/api/nbproject/project.xml b/remoting/ide/api/nbproject/project.xml
new file mode 100644
index 0000000..c42ff5b
--- /dev/null
+++ b/remoting/ide/api/nbproject/project.xml
@@ -0,0 +1,232 @@
+<?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.remoting.api</code-name-base>
+            <suite-component/>
+            <module-dependencies>
+                <dependency>
+                    <code-name-base>org.netbeans.api.annotations.common</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <specification-version>1.10</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.27</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.libs.javacapi</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>8.8.0.3</specification-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.7</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.editor</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>3</release-version>
+                        <specification-version>1.77.0.5.22.43</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.source</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>0.130.0.26.2.25.8</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.java.source.base</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>2.4.1.2.25.8.1</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.netbeans.modules.options.api</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>1</release-version>
+                        <specification-version>1.23</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.awt</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>7.35</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.dialogs</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>7.21</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.execution</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>1.25</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.explorer</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>6.38</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.filesystems</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>7.51</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.io</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>1.30</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.loaders</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>7.29</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.modules</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>7.32</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.nodes</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>7.23</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>org.openide.util</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>8.16</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.9</specification-version>
+                    </run-dependency>
+                </dependency>
+            </module-dependencies>
+            <public-packages>
+                <package>org.codeviation.pojson</package>
+                <package>org.netbeans.modules.jackpot30.remoting.api</package>
+            </public-packages>
+            <class-path-extension>
+                <runtime-relative-path>ext/util-pojson.jar</runtime-relative-path>
+                <binary-origin>external/util-pojson.jar</binary-origin>
+            </class-path-extension>
+            <class-path-extension>
+                <runtime-relative-path>ext/util-commons.jar</runtime-relative-path>
+                <binary-origin>external/util-commons.jar</binary-origin>
+            </class-path-extension>
+        </data>
+    </configuration>
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/ide/api/nbproject/suite.properties
----------------------------------------------------------------------
diff --git a/remoting/ide/api/nbproject/suite.properties b/remoting/ide/api/nbproject/suite.properties
new file mode 100644
index 0000000..942e12b
--- /dev/null
+++ b/remoting/ide/api/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/ide/api/src/org/netbeans/modules/jackpot30/remoting/api/FileSystemLister.java
----------------------------------------------------------------------
diff --git a/remoting/ide/api/src/org/netbeans/modules/jackpot30/remoting/api/FileSystemLister.java b/remoting/ide/api/src/org/netbeans/modules/jackpot30/remoting/api/FileSystemLister.java
new file mode 100644
index 0000000..7f6a7e0
--- /dev/null
+++ b/remoting/ide/api/src/org/netbeans/modules/jackpot30/remoting/api/FileSystemLister.java
@@ -0,0 +1,55 @@
+/*
+ * 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.remoting.api;
+
+import java.util.Collection;
+import org.openide.filesystems.FileSystem;
+
+/**
+ *
+ * @author lahvac
+ */
+public interface FileSystemLister {
+
+    public Collection<? extends FileSystem> getKnownFileSystems();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/ide/api/src/org/netbeans/modules/jackpot30/remoting/api/LocalCache.java
----------------------------------------------------------------------
diff --git a/remoting/ide/api/src/org/netbeans/modules/jackpot30/remoting/api/LocalCache.java b/remoting/ide/api/src/org/netbeans/modules/jackpot30/remoting/api/LocalCache.java
new file mode 100644
index 0000000..f6b81fe
--- /dev/null
+++ b/remoting/ide/api/src/org/netbeans/modules/jackpot30/remoting/api/LocalCache.java
@@ -0,0 +1,173 @@
+/*
+ * 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.remoting.api;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.AbstractMap.SimpleEntry;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import org.apache.lucene.index.IndexReader;
+import org.apache.lucene.index.IndexWriter;
+import org.apache.lucene.index.IndexWriter.MaxFieldLength;
+import org.apache.lucene.store.FSDirectory;
+import org.codeviation.pojson.Pojson;
+import org.netbeans.api.annotations.common.CheckForNull;
+import org.netbeans.modules.jackpot30.common.api.IndexAccess.NoAnalyzer;
+import org.netbeans.modules.jackpot30.remotingapi.CacheFolder;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.FileUtil;
+
+/**
+ *
+ * @author lahvac
+ */
+public class LocalCache {
+
+    private static final Map<URI, IndexReader> readerCache = new HashMap<URI, IndexReader>();
+
+    private static File findLocalCacheDir(RemoteIndex ri) throws IOException {
+        return new File(FileUtil.toFile(FileUtil.createFolder(CacheFolder.getDataFolder(ri.remote), "remote-duplicates")), ri.remoteSegment);
+    }
+
+    private static final long VERSION_CHECK_PERIOD = 60 * 60 * 1000;
+    private static final Map<Entry<URI, String>, Long> lastVersionCheck = new HashMap<Entry<URI, String>, Long>();
+
+    @CheckForNull public static synchronized <R> R runOverLocalCache(RemoteIndex ri, Task<IndexReader, R> task, R empty, AtomicBoolean cancel) throws IOException, URISyntaxException {
+        URI uri = ri.remote.toURI();
+        SimpleEntry<URI, String> versionCheckKey = new SimpleEntry<URI, String>(uri, ri.remoteSegment);
+        Long lastCheck = lastVersionCheck.get(versionCheckKey);
+
+        if (lastCheck == null || (System.currentTimeMillis() - lastCheck) > VERSION_CHECK_PERIOD) {
+            File dir = findLocalCacheDir(ri);
+            File remoteVersion = new File(dir, "remoteVersion");
+            FileObject remoteVersionFO = FileUtil.toFileObject(remoteVersion);
+            String previousVersion = remoteVersionFO != null ? remoteVersionFO.asText("UTF-8") : null;
+            URI infoURI = new URI(ri.remote.toExternalForm() + "/info?path=" + WebUtilities.escapeForQuery(ri.remoteSegment));
+            String infoContent = WebUtilities.requestStringResponse(infoURI, cancel);
+
+            if (cancel.get()) return empty;
+
+            if (infoContent != null && !infoContent.trim().isEmpty()) {
+                Object buildId = Pojson.load(LinkedHashMap.class, infoContent).get("BUILD_ID");
+
+                if (buildId != null && !(buildId = buildId.toString()).equals(previousVersion)) {
+                    remoteVersion.getParentFile().mkdirs();
+                    OutputStream out = new FileOutputStream(remoteVersion);
+                    try {
+                        out.write(buildId.toString().getBytes("UTF-8"));
+                    } finally {
+                        out.close();
+                    }
+
+                    LOG.log(Level.FINE, "Deleting local cache");
+                    delete(new File(dir, "index"));
+
+                    IndexReader reader = readerCache.remove(uri);
+                    if (reader != null)
+                        reader.close();
+
+                }
+            }
+
+            lastVersionCheck.put(versionCheckKey, System.currentTimeMillis());
+        }
+
+        IndexReader reader = readerCache.get(uri);
+
+        if (reader == null && !cancel.get()) {
+            File dir = new File(findLocalCacheDir(ri), "index");
+
+            if (dir.listFiles() != null && dir.listFiles().length > 0) {
+                readerCache.put(uri, reader = IndexReader.open(FSDirectory.open(dir), true));
+            }
+        }
+
+        if (reader == null || cancel.get()) {
+            return empty;
+        }
+
+        return task.run(reader, cancel);
+    }
+
+    public static synchronized void saveToLocalCache(RemoteIndex ri, Task<IndexWriter, Void> save) throws IOException, URISyntaxException {
+        IndexReader r = readerCache.remove(ri.remote.toURI());
+
+        if (r != null) {
+            r.close();
+        }
+
+        IndexWriter w = new IndexWriter(FSDirectory.open(new File(findLocalCacheDir(ri), "index")), new NoAnalyzer(), MaxFieldLength.UNLIMITED);
+
+        save.run(w, new AtomicBoolean());
+
+        w.optimize();
+        w.close();
+    }
+
+    private static final Logger LOG = Logger.getLogger(LocalCache.class.getName());
+
+    private static void delete(File file) {
+        File[] c = file.listFiles();
+
+        if (c != null) {
+            for (File cc : c) {
+                delete(cc);
+            }
+        }
+
+        file.delete();
+    }
+
+    public interface Task<P, R> {
+        public R run(P p, AtomicBoolean cancel) throws IOException;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/ide/api/src/org/netbeans/modules/jackpot30/remoting/api/LocalServer.java
----------------------------------------------------------------------
diff --git a/remoting/ide/api/src/org/netbeans/modules/jackpot30/remoting/api/LocalServer.java b/remoting/ide/api/src/org/netbeans/modules/jackpot30/remoting/api/LocalServer.java
new file mode 100644
index 0000000..4857509
--- /dev/null
+++ b/remoting/ide/api/src/org/netbeans/modules/jackpot30/remoting/api/LocalServer.java
@@ -0,0 +1,56 @@
+/*
+ * 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.remoting.api;
+
+import java.io.IOException;
+import org.netbeans.api.progress.aggregate.ProgressContributor;
+
+/**
+ *
+ * @author lahvac
+ */
+public interface LocalServer {
+
+    public int startLocalServer();
+    public boolean downloadIndex(RemoteIndex idx, ProgressContributor progress) throws IOException;
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/ide/api/src/org/netbeans/modules/jackpot30/remoting/api/RemoteIndex.java
----------------------------------------------------------------------
diff --git a/remoting/ide/api/src/org/netbeans/modules/jackpot30/remoting/api/RemoteIndex.java b/remoting/ide/api/src/org/netbeans/modules/jackpot30/remoting/api/RemoteIndex.java
new file mode 100644
index 0000000..9d70631
--- /dev/null
+++ b/remoting/ide/api/src/org/netbeans/modules/jackpot30/remoting/api/RemoteIndex.java
@@ -0,0 +1,208 @@
+/*
+ * 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.remoting.api;
+
+import java.io.IOException;
+import java.lang.ref.Reference;
+import java.lang.ref.SoftReference;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.prefs.BackingStoreException;
+import java.util.prefs.Preferences;
+import org.codeviation.pojson.Pojson;
+import org.netbeans.api.annotations.common.CheckForNull;
+import org.netbeans.api.annotations.common.NullAllowed;
+import org.netbeans.modules.jackpot30.remotingapi.options.Utils;
+import org.openide.filesystems.FileObject;
+import org.openide.filesystems.FileSystem;
+import org.openide.filesystems.FileUtil;
+import org.openide.filesystems.URLMapper;
+import org.openide.util.Exceptions;
+import org.openide.util.Lookup;
+import org.openide.util.NbPreferences;
+
+/**
+ *
+ * @author lahvac
+ */
+public class RemoteIndex {
+
+    public final boolean enabled;
+    private final String folder;
+    public final UseLocalCache useLocalCache;
+    public final URL    remote;
+    public final String remoteSegment;
+
+    public static RemoteIndex create(@NullAllowed URL localFolder, URL remote, String remoteSegment) {
+        return create(true, UseLocalCache.NEVER, localFolder, remote, remoteSegment);
+    }
+
+    public static RemoteIndex create(boolean enabled, UseLocalCache useLocalCache, @NullAllowed URL localFolder, URL remote, String remoteSegment) {
+        return new RemoteIndex(enabled, useLocalCache, localFolder != null ? localFolder.toExternalForm() : null, remote, remoteSegment);
+    }
+
+    private RemoteIndex() {//used by Pojson
+        this.enabled = true;
+        this.useLocalCache = UseLocalCache.NEVER;
+        this.folder = null;
+        this.remote = null;
+        this.remoteSegment = null;
+    }
+
+    private RemoteIndex(boolean enabled, UseLocalCache useLocalCache, String folder, URL remote, String remoteSegment) {
+        this.enabled = enabled;
+        this.useLocalCache = useLocalCache;
+        this.folder = folder;
+        this.remote = remote;
+        this.remoteSegment = remoteSegment;
+    }
+
+    public @CheckForNull URL getLocalFolder() {
+        return folder != null ? Utils.fromDisplayName(folder) : null;
+    }
+
+    private Reference<FileSystem> data;
+
+    public FileObject getFile(String relativePath) {
+        if (folder == null) {
+            FileSystem fs;
+
+            synchronized (this) {
+                fs = data != null ? data.get() : null;
+
+                if (fs == null) data = new SoftReference<FileSystem>(fs = FileUtil.createMemoryFileSystem());
+            }
+
+            String remoteRelativePath = relativePath.replace(".java", ".rjava");
+
+            FileObject result = fs.getRoot().getFileObject(remoteRelativePath);
+
+            if (result == null) {
+                try {
+                    result = FileUtil.createData(fs.getRoot(), remoteRelativePath);
+                    result.setAttribute("remoteIndex", this);
+                    result.setAttribute("relative", relativePath);
+                } catch (IOException ex) {
+                    Exceptions.printStackTrace(ex);
+                }
+            }
+
+            return result;
+        }
+        FileObject originFolder = URLMapper.findFileObject(getLocalFolder());
+
+        return originFolder != null ? originFolder.getFileObject(relativePath) : null;
+    }
+
+    private static final String KEY_REMOTE_INDICES = RemoteIndex.class.getSimpleName();
+    private static int localServerPort = -2;
+
+    public static Iterable<? extends RemoteIndex> loadIndices() {
+        return loadIndices(false);
+    }
+
+    public static Iterable<? extends RemoteIndex> loadIndices(boolean includeAll) {
+        List<RemoteIndex> result = new LinkedList<RemoteIndex>();
+        Preferences prefs = NbPreferences.forModule(RemoteIndex.class).node(KEY_REMOTE_INDICES);
+
+        if (prefs != null) {
+            try {
+                for (String key : prefs.keys()) {
+                    if (key.startsWith("index")) {
+                        RemoteIndex idx = Pojson.load(RemoteIndex.class, prefs.get(key, null));
+
+                        if (idx.enabled && idx.useLocalCache == UseLocalCache.ALWAYS) {
+                            if (localServerPort == (-2)) {
+                                localServerPort = Lookup.getDefault().lookup(LocalServer.class).startLocalServer();
+                            }
+
+                            if (localServerPort != (-1)) {
+                                try {
+                                    idx = new RemoteIndex(true, UseLocalCache.ALWAYS, idx.folder, new URL("http://localhost:" + localServerPort + "/index"), idx.remoteSegment);
+                                } catch (MalformedURLException ex) {
+                                    Exceptions.printStackTrace(ex);
+                                }
+                            }
+                        }
+
+                        if (includeAll || idx.enabled)
+                            result.add(idx);
+                    }
+                }
+            } catch (BackingStoreException ex) {
+                Exceptions.printStackTrace(ex);
+            }
+        }
+
+        return result;
+    }
+    
+    public static void saveIndices(Iterable<? extends RemoteIndex> indices) {
+        Preferences prefs = NbPreferences.forModule(RemoteIndex.class).node(KEY_REMOTE_INDICES);
+
+        try {
+            prefs.clear();
+        } catch (BackingStoreException ex) {
+            Exceptions.printStackTrace(ex);
+        }
+
+        int i = 0;
+
+        for (RemoteIndex idx : indices) {
+            prefs.put("index" + i++, Pojson.save(idx));
+        }
+        
+        try {
+            prefs.flush();
+        } catch (BackingStoreException ex) {
+            Exceptions.printStackTrace(ex);
+        }
+    }
+
+    public enum UseLocalCache {
+        ALWAYS,
+        NEVER;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/ide/api/src/org/netbeans/modules/jackpot30/remoting/api/Utilities.java
----------------------------------------------------------------------
diff --git a/remoting/ide/api/src/org/netbeans/modules/jackpot30/remoting/api/Utilities.java b/remoting/ide/api/src/org/netbeans/modules/jackpot30/remoting/api/Utilities.java
new file mode 100644
index 0000000..99e40a1
--- /dev/null
+++ b/remoting/ide/api/src/org/netbeans/modules/jackpot30/remoting/api/Utilities.java
@@ -0,0 +1,266 @@
+/*
+ * 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.remoting.api;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import javax.lang.model.element.ElementKind;
+import javax.swing.text.Document;
+import org.netbeans.api.java.source.ElementHandle;
+import org.netbeans.modules.editor.NbEditorUtilities;
+import org.openide.filesystems.FileObject;
+
+/**
+ *
+ * @author lahvac
+ */
+public class Utilities {
+    private static final Logger LOG = Logger.getLogger(Utilities.class.getName());
+
+    private Utilities() {}
+
+    public static final class RemoteSourceDescription {
+        public final RemoteIndex idx;
+        public final String relative;
+        public RemoteSourceDescription(RemoteIndex idx, String relative) {
+            this.idx = idx;
+            this.relative = relative;
+        }
+    }
+
+    public static RemoteSourceDescription remoteSource(Document doc) {
+        FileObject file = NbEditorUtilities.getFileObject(doc);
+
+        if (file == null) return null;
+
+        return remoteSource(file);
+    }
+
+    public static RemoteSourceDescription remoteSource(FileObject file) {
+        Object remoteIndexObj = file.getAttribute("remoteIndex");
+        RemoteIndex idx = remoteIndexObj instanceof RemoteIndex ? (RemoteIndex) remoteIndexObj : null;
+        Object relativeObj = file.getAttribute("relative");
+        String relative = relativeObj instanceof String ? (String) relativeObj : null;
+        if (idx != null && relative != null) {
+            return new RemoteSourceDescription(idx, relative);
+        } else {
+            return null;
+        }
+    }
+
+    public static String decodeMethodParameterTypes(String signature) {
+        StringBuilder name = new StringBuilder();
+
+        methodParameterTypes(signature, new int[] {0}, name);
+        return name.toString();
+    }
+
+    private static char getChar (final String buffer, final int pos) {
+        if (pos>=buffer.length()) {
+            throw new IllegalStateException ();
+        }
+        return buffer.charAt(pos);
+    }
+
+    private static String typeArgument (final String jvmTypeId, final int[] pos) {
+        char c = getChar (jvmTypeId, pos[0]);
+        switch (c) {
+            case '*':
+                pos[0]++;
+                return ""; //XXX?
+            case '+':
+                pos[0]++;
+                return "? extends " + typeSignatureType(jvmTypeId, pos);
+            case '-':
+                pos[0]++;
+                return "? super " + typeSignatureType(jvmTypeId, pos);
+            default:
+                return typeSignatureType (jvmTypeId, pos);
+        }
+    }
+
+
+    private static void typeArgumentsList (final String jvmTypeId, final int[] pos, StringBuilder result) {
+        char c = getChar (jvmTypeId, pos[0]++);
+        if (c != '<') {
+            throw new IllegalStateException (jvmTypeId);
+        }
+        c = getChar (jvmTypeId, pos[0]);
+        boolean first = true;
+        while (c !='>') {
+            if (!first) result.append(", ");
+            first = false;
+            result.append(typeArgument (jvmTypeId, pos));
+            c = getChar (jvmTypeId, pos[0]);
+        }
+        pos[0]++;
+    }
+
+    static boolean generateSimpleNames = true;
+
+    private static String typeSignatureType (final String jvmTypeId, final int[] pos) {
+        char c = getChar(jvmTypeId, pos[0]++);
+        switch (c) {
+            case 'B': return "byte";
+            case 'C': return "char";
+            case 'D': return "double";
+            case 'F': return "float";
+            case 'I': return "int";
+            case 'J': return "long";
+            case 'S': return "short";
+            case 'V': return "void";
+            case 'Z': return "boolean";
+            case 'L': {
+                StringBuilder builder = new StringBuilder ();
+                c = getChar(jvmTypeId, pos[0]++);
+                while (c != ';') {
+                    if (c == '/' || c == '$') {
+                        if (generateSimpleNames) builder.delete(0, builder.length());
+                        else builder.append('.');
+                    } else {
+                        builder.append(c);
+                    }
+
+                    if (c=='<') {
+                        pos[0]--;
+                        typeArgumentsList (jvmTypeId, pos, builder);
+                        builder.append(">");
+                    }
+                    c = getChar(jvmTypeId, pos[0]++);
+                }
+                return builder.toString();
+            }
+            case 'T': {
+                StringBuilder builder = new StringBuilder ();
+                c = getChar(jvmTypeId, pos[0]++);
+                while (c != ';') {
+                    builder.append(c);
+                    c = getChar(jvmTypeId, pos[0]++);
+                }
+                return builder.toString();
+            }
+            case '[':
+                return typeSignatureType (jvmTypeId, pos) + "[]";
+            default:
+                return "<unknown-type>";
+        }
+    }
+
+    private static void methodParameterTypes(final String jvmTypeId, final int[] pos, StringBuilder result) {
+        char c = getChar (jvmTypeId, pos[0]);
+        if (c == '<') {
+            do {
+                c = getChar (jvmTypeId, pos[0]++);
+            } while (c != '>');
+            c = getChar (jvmTypeId, pos[0]);
+        }
+        if (c!='(') {
+            throw new IllegalStateException (jvmTypeId);
+        }
+        pos[0]++;
+        c = getChar (jvmTypeId, pos[0]);
+        result.append("(");
+        boolean first = true;
+        while (c != ')') {
+            if (!first) result.append(", ");
+            first = false;
+            result.append(typeSignatureType (jvmTypeId, pos));
+            c = getChar (jvmTypeId, pos[0]);
+        }
+        result.append(")");
+    }
+
+    public static ElementHandle<?> createElementHandle(ElementKind kind, String clazz, String simpleName, String signature) {
+        LOG.setLevel(Level.ALL);
+        try {
+            Class<?> elementHandleAccessor = Class.forName("org.netbeans.modules.java.source.ElementHandleAccessor", false, ElementHandle.class.getClassLoader());
+            Field instance = elementHandleAccessor.getDeclaredField("INSTANCE");
+            instance.setAccessible(true);
+            Method m = elementHandleAccessor.getDeclaredMethod("create", ElementKind.class, String[].class);
+            String[] signatures;
+            switch (kind) {
+                case PACKAGE:
+                case CLASS:
+                case INTERFACE:
+                case ENUM:
+                case ANNOTATION_TYPE:
+                case OTHER:
+                    signatures = new String[] {clazz};
+                    break;
+                case METHOD:
+                case CONSTRUCTOR:
+                case FIELD:
+                case ENUM_CONSTANT:
+                    signatures = new String[] {clazz, simpleName, signature};
+                    break;
+                case INSTANCE_INIT:
+                case STATIC_INIT:
+                    signatures = new String[] {clazz, simpleName};
+                    break;
+                default:
+                    kind = ElementKind.OTHER;
+                    signatures = new String[] {clazz};
+                    break;
+            }
+            return (ElementHandle<?>) m.invoke(instance.get(null), kind, signatures);
+        } catch (IllegalAccessException ex) {
+            LOG.log(Level.INFO, null, ex);
+        } catch (IllegalArgumentException ex) {
+            LOG.log(Level.INFO, null, ex);
+        } catch (InvocationTargetException ex) {
+            LOG.log(Level.INFO, null, ex);
+        } catch (NoSuchMethodException ex) {
+            LOG.log(Level.INFO, null, ex);
+        } catch (NoSuchFieldException ex) {
+            LOG.log(Level.INFO, null, ex);
+        } catch (SecurityException ex) {
+            LOG.log(Level.INFO, null, ex);
+        } catch (ClassNotFoundException ex) {
+            LOG.log(Level.INFO, null, ex);
+        }
+
+        return ElementHandle.createTypeElementHandle(ElementKind.CLASS, clazz);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/ide/api/src/org/netbeans/modules/jackpot30/remoting/api/WebUtilities.java
----------------------------------------------------------------------
diff --git a/remoting/ide/api/src/org/netbeans/modules/jackpot30/remoting/api/WebUtilities.java b/remoting/ide/api/src/org/netbeans/modules/jackpot30/remoting/api/WebUtilities.java
new file mode 100644
index 0000000..24f18c1
--- /dev/null
+++ b/remoting/ide/api/src/org/netbeans/modules/jackpot30/remoting/api/WebUtilities.java
@@ -0,0 +1,156 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2009 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.remoting.api;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import org.netbeans.api.annotations.common.CheckForNull;
+import org.openide.util.RequestProcessor;
+import org.openide.util.RequestProcessor.Task;
+
+/**
+ *
+ */
+public class WebUtilities {
+
+    private WebUtilities() {
+    }
+
+    private static final RequestProcessor LOADER = new RequestProcessor(WebUtilities.class.getName(), 100, true, false);
+
+    public static @CheckForNull String requestStringResponse (final URI uri) {
+        return requestStringResponse(uri, new AtomicBoolean());
+    }
+
+    public static @CheckForNull String requestStringResponse (final URI uri, AtomicBoolean cancel) {
+        final String[] result = new String[1];
+        final RuntimeException[] re = new RuntimeException[1];
+        final Error[] err = new Error[1];
+        Task task = LOADER.create(new Runnable() {
+            @Override
+            public void run() {
+        final StringBuffer sb = new StringBuffer ();
+        final URL url;
+        try {
+            url = uri.toURL();
+            final URLConnection urlConnection = url.openConnection ();
+            urlConnection.connect ();
+            final Object content = urlConnection.getContent ();
+            final InputStream inputStream = (InputStream) content;
+            final BufferedReader reader = new BufferedReader (new InputStreamReader (inputStream, "ASCII"));
+            try {
+                for (;;) {
+                    String line = reader.readLine ();
+                    if (line == null)
+                        break;
+                    sb.append (line).append ('\n');
+                }
+            } finally {
+                reader.close ();
+            }
+            result[0] = sb.toString();
+        } catch (IOException e) {
+            Logger.getLogger(WebUtilities.class.getName()).log(Level.INFO, uri.toASCIIString(), e);
+        } catch (RuntimeException ex) {
+            re[0] = ex;
+        } catch (Error ex) {
+            err[0] = ex;
+        }
+            }
+        });
+
+        task.schedule(0);
+        
+        while (!cancel.get()) {
+            try {
+                if (task.waitFinished(1000)) {
+                    if (re[0] != null) throw re[0];
+                    else if (err[0] != null) throw err[0];
+                    else return result[0];
+                }
+            } catch (InterruptedException ex) {
+                Logger.getLogger(WebUtilities.class.getName()).log(Level.FINE, null, ex);
+            }
+        }
+        return null;
+    }
+
+    public static Collection<? extends String> requestStringArrayResponse (URI uri) {
+        return requestStringArrayResponse(uri, new AtomicBoolean());
+    }
+
+    public static Collection<? extends String> requestStringArrayResponse (URI uri, AtomicBoolean cancel) {
+        String content = requestStringResponse(uri, cancel);
+        
+        if (content == null) return null;
+        
+        return Arrays.asList(content.split("\n"));
+    }
+
+    private static String[] c = new String[] {"&", "<", ">", "\n", "\""}; // NOI18N
+    private static String[] tags = new String[] {"&amp;", "&lt;", "&gt;", "<br>", "&quot;"}; // NOI18N
+
+    public static String escapeForHTMLElement(String input) {
+        for (int cntr = 0; cntr < c.length; cntr++) {
+            input = input.replaceAll(c[cntr], tags[cntr]);
+        }
+
+        return input;
+    }
+
+    public static String escapeForQuery(String pattern) throws URISyntaxException {
+        if (pattern == null) return null;
+        return new URI(null, null, null, -1, null, pattern, null).getRawQuery().replaceAll(Pattern.quote("&"), Matcher.quoteReplacement("%26"));
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-netbeans-jackpot30/blob/9ed0a377/remoting/ide/api/src/org/netbeans/modules/jackpot30/remotingapi/Bundle.properties
----------------------------------------------------------------------
diff --git a/remoting/ide/api/src/org/netbeans/modules/jackpot30/remotingapi/Bundle.properties b/remoting/ide/api/src/org/netbeans/modules/jackpot30/remotingapi/Bundle.properties
new file mode 100644
index 0000000..c0ed615
--- /dev/null
+++ b/remoting/ide/api/src/org/netbeans/modules/jackpot30/remotingapi/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=Remoting API