You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by GitBox <gi...@apache.org> on 2017/12/02 11:10:26 UTC

[GitHub] geertjanw closed pull request #312: Javashell fixes

geertjanw closed pull request #312: Javashell fixes
URL: https://github.com/apache/incubator-netbeans/pull/312
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/jshell.support/test/unit/src/org/netbeans/modules/jshell/support/ContentParserTest.java b/jshell.support/test/unit/src/org/netbeans/modules/jshell/support/ContentParserTest.java
index 091d9006d..58dfc95dc 100644
--- a/jshell.support/test/unit/src/org/netbeans/modules/jshell/support/ContentParserTest.java
+++ b/jshell.support/test/unit/src/org/netbeans/modules/jshell/support/ContentParserTest.java
@@ -78,6 +78,9 @@ private void parseOutput() throws Exception {
             String s;
             
             while ((s = br.readLine()) != null) {
+                if (s.startsWith("#")) {
+                    continue;
+                }
                 sb.append(s).append("\n");
             }
         }
@@ -105,6 +108,9 @@ public void testParsedSections() throws Exception {
             org.netbeans.modules.jshell.model.ConsoleSection.Type lastType = null;
             
             while ((s = br.readLine()) != null) {
+                if (s.startsWith("#")) {
+                    continue;
+                }
                 pos = next;
                 next = pos + s.length() + 1;
                 if (s.trim().isEmpty()) {
@@ -161,6 +167,9 @@ public void testLineSnippets() throws Exception {
             int next = 0;
             org.netbeans.modules.jshell.model.ConsoleSection.Type lastType = null;
             while ((s = br.readLine()) != null) {
+                if (s.startsWith("#")) {
+                    continue;
+                }
                 pos = next;
                 int start = s.indexOf(':') + 1;
                 int len = s.length() - start + 1; // count the newline
diff --git a/jshell.support/test/unit/src/org/netbeans/modules/jshell/support/reploutput.txt b/jshell.support/test/unit/src/org/netbeans/modules/jshell/support/reploutput.txt
index 9dff6d73a..b08fa1722 100644
--- a/jshell.support/test/unit/src/org/netbeans/modules/jshell/support/reploutput.txt
+++ b/jshell.support/test/unit/src/org/netbeans/modules/jshell/support/reploutput.txt
@@ -1,3 +1,19 @@
+#    Licensed to the Apache Software Foundation (ASF) under one
+#    or more contributor license agreements.  See the NOTICE file
+#    distributed with this work for additional information
+#    regarding copyright ownership.  The ASF licenses this file
+#    to you under the Apache License, Version 2.0 (the
+#    "License"); you may not use this file except in compliance
+#    with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing,
+#    software distributed under the License is distributed on an
+#    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#    KIND, either express or implied.  See the License for the
+#    specific language governing permissions and limitations
+#    under the License.
 Cannot start REPL, see IDE log for more details.
 |  Welcome to the Java REPL NetBeans integration
 |  Type /help for help
diff --git a/jshell.support/test/unit/src/org/netbeans/modules/jshell/support/reploutput_golden.txt b/jshell.support/test/unit/src/org/netbeans/modules/jshell/support/reploutput_golden.txt
index 8facc3f62..6f23360c7 100644
--- a/jshell.support/test/unit/src/org/netbeans/modules/jshell/support/reploutput_golden.txt
+++ b/jshell.support/test/unit/src/org/netbeans/modules/jshell/support/reploutput_golden.txt
@@ -1,3 +1,19 @@
+#    Licensed to the Apache Software Foundation (ASF) under one
+#    or more contributor license agreements.  See the NOTICE file
+#    distributed with this work for additional information
+#    regarding copyright ownership.  The ASF licenses this file
+#    to you under the Apache License, Version 2.0 (the
+#    "License"); you may not use this file except in compliance
+#    with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing,
+#    software distributed under the License is distributed on an
+#    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#    KIND, either express or implied.  See the License for the
+#    specific language governing permissions and limitations
+#    under the License.
 O:Cannot start REPL, see IDE log for more details.
 x:|  Welcome to the Java REPL NetBeans integration
 x:|  Type /help for help
diff --git a/lib.jshell.agent/nbproject/project.properties b/lib.jshell.agent/nbproject/project.properties
index bd1010b01..a09622e29 100644
--- a/lib.jshell.agent/nbproject/project.properties
+++ b/lib.jshell.agent/nbproject/project.properties
@@ -22,4 +22,4 @@ extra.module.files=modules/ext/nb-custom-jshell-probe.jar,modules/ext/nb-mod-jsh
 jnlp.indirect.jars=modules/ext/nb-custom-jshell-probe.jar,modules/ext/nb-mod-jshell-probe.jar
 
 agentsrc.asm.cp=${core.startup.dir}/core/asm-all-5.0.1.jar
-agentsrc.jshell.cp=${nb_all}/libs.jshell.compile/external/jshell.jar
+agentsrc.jshell.cp=${nb_all}/libs.jshell.compile/external/jshell-9.jar
diff --git a/libs.jshell.compile/external/binaries-list b/libs.jshell.compile/external/binaries-list
index 28c8da25f..61196087b 100644
--- a/libs.jshell.compile/external/binaries-list
+++ b/libs.jshell.compile/external/binaries-list
@@ -14,4 +14,4 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-1CA9DE21C6E443E814CB56912BEE872EF7094C49 jshell.jar
+1CA9DE21C6E443E814CB56912BEE872EF7094C49 jshell-9.jar
diff --git a/libs.jshell.compile/external/nb-jshell-license.txt b/libs.jshell.compile/external/jshell-9-license.txt
similarity index 99%
rename from libs.jshell.compile/external/nb-jshell-license.txt
rename to libs.jshell.compile/external/jshell-9-license.txt
index a41f3091e..32245d1b9 100644
--- a/libs.jshell.compile/external/nb-jshell-license.txt
+++ b/libs.jshell.compile/external/jshell-9-license.txt
@@ -1,5 +1,6 @@
-Version: nb-7.2
-Name: Javac Compiler API
+Version: 9
+Type: compile-time
+Name: Javac Shell API
 License: GPL-2-CP
 Description: Javac Compiler API
 OSR: 6273
diff --git a/libs.jshell.compile/nbproject/project.xml b/libs.jshell.compile/nbproject/project.xml
index 5ecafda79..96862eb79 100644
--- a/libs.jshell.compile/nbproject/project.xml
+++ b/libs.jshell.compile/nbproject/project.xml
@@ -62,7 +62,7 @@
             </public-packages>
             <class-path-extension>
                 <runtime-relative-path></runtime-relative-path>
-                <binary-origin>external/jshell.jar</binary-origin>
+                <binary-origin>external/jshell-9.jar</binary-origin>
             </class-path-extension>
         </data>
     </configuration>
diff --git a/nbbuild/build.xml b/nbbuild/build.xml
index fdb46d5a8..8eb582589 100644
--- a/nbbuild/build.xml
+++ b/nbbuild/build.xml
@@ -2105,7 +2105,6 @@ It is possible to use -Ddebug.port=3234 -Ddebug.pause=y to start the system in d
             <exclude name="javafx2.project/src/org/netbeans/modules/javafx2/project/templates/**" /> <!--license would be visible when users edit the templates inside their IDE-->
             <exclude name="jellytools.platform/src/org/netbeans/jellytools/version_info" /> <!--does not natively support comments-->
             <exclude name="jshell.support/src/org/netbeans/modules/jshell/resources/consoleExample.jsh" /> <!-- file is used as sample for syntax highlighting in GUI -->
-            <exclude name="jshell.support/test/unit/src/org/netbeans/modules/jshell/support/*.txt" /> <!--test data-->
             <exclude name="junit.ui/src/org/netbeans/modules/junit/ui/resources/*.template" /> <!--license would be visible when users edit the templates inside their IDE-->
             <exclude name="languages.diff/src/org/netbeans/modules/languages/diff/DiffExample.diff" /> <!--license would be visible to users in the Fonts/Colors settings-->
             <exclude name="languages.yaml/src/org/netbeans/modules/languages/yaml/*.yaml" /> <!--Files used in GUI as sample/starting point-->


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services