[incubator-netbeans-html4j] branch master updated: Only execute the KO test on Nashorn as it requires env.nashorn.1.2-debug.js, which only works on Nashorn
This is an automated email from the ASF dual-hosted git repository. jtulach pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-netbeans-html4j.git The following commit(s) were added to refs/heads/master by this push: new 57ccebb Only execute the KO test on Nashorn as it requires env.nashorn.1.2-debug.js, which only works on Nashorn 57ccebb is described below commit 57ccebb6e8e5343e73b711987882518e459cb197 Author: Jaroslav Tulach AuthorDate: Mon Feb 5 16:39:05 2018 +0100 Only execute the KO test on Nashorn as it requires env.nashorn.1.2-debug.js, which only works on Nashorn --- .../java/net/java/html/boot/script/ScriptPresenter.java | 13 ++--- .../java/html/boot/script/{ko4j => }/DynamicHTTP.java | 2 +- .../net/java/html/boot/script/{ko4j => }/KOCase.java| 4 +--- .../html/boot/script/{ko4j => }/KnockoutEnvJSTest.java | 17 - .../net/java/html/boot/script/{ko4j => }/test.html | 0 5 files changed, 20 insertions(+), 16 deletions(-) diff --git a/boot-script/src/main/java/net/java/html/boot/script/ScriptPresenter.java b/boot-script/src/main/java/net/java/html/boot/script/ScriptPresenter.java index addb1b8..7fffdb9 100644 --- a/boot-script/src/main/java/net/java/html/boot/script/ScriptPresenter.java +++ b/boot-script/src/main/java/net/java/html/boot/script/ScriptPresenter.java @@ -66,10 +66,14 @@ Presenter, Fn.FromJavaScript, Fn.ToJavaScript, Executor { private final Executor exc; private final Object undefined; -public ScriptPresenter(Executor exc) { +ScriptPresenter(Executor exc) { +this(new ScriptEngineManager().getEngineByName("javascript"), exc); +} + +ScriptPresenter(ScriptEngine eng, Executor exc) { +this.eng = eng; this.exc = exc; try { -eng = new ScriptEngineManager().getEngineByName("javascript"); eng.eval("function alert(msg) { Packages.java.lang.System.out.println(msg); };"); eng.eval("function confirm(msg) { Packages.java.lang.System.out.println(msg); return true; };"); eng.eval("function prompt(msg, txt) { Packages.java.lang.System.out.println(msg + ':' + txt); return txt; };"); @@ -161,6 +165,9 @@ Presenter, Fn.FromJavaScript, Fn.ToJavaScript, Executor { } final Object checkArray(Object val) throws Exception { +if (val instanceof Boolean || val instanceof Number || val instanceof String) { +return val; +} final FnImpl fn = arraySizeFn(); final Object fnRes = fn.invokeImpl(null, false, val, null); int length = ((Number) fnRes).intValue(); @@ -177,7 +184,7 @@ Presenter, Fn.FromJavaScript, Fn.ToJavaScript, Executor { if (arraySize == null) { try { arraySize = defineImpl("\n" -+ "if (to === null) {\n" ++ "if (to == null) {\n" + " if (Object.prototype.toString.call(arr) === '[object Array]') return arr.length;\n" + " else return -1;\n" + "} else {\n" diff --git a/boot-script/src/test/java/net/java/html/boot/script/ko4j/DynamicHTTP.java b/boot-script/src/test/java/net/java/html/boot/script/DynamicHTTP.java similarity index 99% rename from boot-script/src/test/java/net/java/html/boot/script/ko4j/DynamicHTTP.java rename to boot-script/src/test/java/net/java/html/boot/script/DynamicHTTP.java index 9d8853d..eb0f401 100644 --- a/boot-script/src/test/java/net/java/html/boot/script/ko4j/DynamicHTTP.java +++ b/boot-script/src/test/java/net/java/html/boot/script/DynamicHTTP.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package net.java.html.boot.script.ko4j; +package net.java.html.boot.script; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; diff --git a/boot-script/src/test/java/net/java/html/boot/script/ko4j/KOCase.java b/boot-script/src/test/java/net/java/html/boot/script/KOCase.java similarity index 96% rename from boot-script/src/test/java/net/java/html/boot/script/ko4j/KOCase.java rename to boot-script/src/test/java/net/java/html/boot/script/KOCase.java index 480b3a3..c565de9 100644 --- a/boot-script/src/test/java/net/java/html/boot/script/ko4j/KOCase.java +++ b/boot-script/src/test/java/net/java/html/boot/script/KOCase.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package net.java.html.boot.script.ko4j; +package net.java.html.boot.script; import java.io.Closeable; import java.io.IOException; @@ -24,8 +24,6 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.concurrent.Executor; import java.util.concurrent.Executors; -import java.util.logging.Level; -import java.util.logging.Logger; import org.netbeans.html.boot.spi.Fn; import org.testng.ITest; import or
[incubator-netbeans-html4j] branch master updated: Truffle objects are also JavaScript-ready
This is an automated email from the ASF dual-hosted git repository. jtulach pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-netbeans-html4j.git The following commit(s) were added to refs/heads/master by this push: new 0022803 Truffle objects are also JavaScript-ready 0022803 is described below commit 0022803a93f90de1f7da00f5ec4909a705dd0955 Author: Jaroslav Tulach AuthorDate: Mon Feb 5 17:40:06 2018 +0100 Truffle objects are also JavaScript-ready --- .../src/main/java/net/java/html/boot/script/ScriptPresenter.java | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/boot-script/src/main/java/net/java/html/boot/script/ScriptPresenter.java b/boot-script/src/main/java/net/java/html/boot/script/ScriptPresenter.java index 7fffdb9..e004f46 100644 --- a/boot-script/src/main/java/net/java/html/boot/script/ScriptPresenter.java +++ b/boot-script/src/main/java/net/java/html/boot/script/ScriptPresenter.java @@ -322,9 +322,11 @@ Presenter, Fn.FromJavaScript, Fn.ToJavaScript, Executor { return true; } final String cn = obj.getClass().getName(); -if (cn.startsWith("jdk.nashorn") || ( // NOI18N -cn.contains(".mozilla.") && cn.contains(".Native") // NOI18N -)) { +if ( +cn.startsWith("com.oracle.truffle") || // NOI18N +cn.startsWith("jdk.nashorn") || // NOI18N +(cn.contains(".mozilla.") && cn.contains(".Native")) // NOI18N +) { return true; } if (obj instanceof Character) { -- To stop receiving notification emails like this one, please contact jtul...@apache.org. - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Created] (NETBEANS-354) InnerToOutterTest test248745() fails, but issue 248745 is not reproducible
Daniel Trebbien created NETBEANS-354: Summary: InnerToOutterTest test248745() fails, but issue 248745 is not reproducible Key: NETBEANS-354 URL: https://issues.apache.org/jira/browse/NETBEANS-354 Project: NetBeans Issue Type: Bug Components: java - Refactoring Reporter: Daniel Trebbien Steps to reproduce: # Open the refactoring.java project. # Expand Unit Test Packages > org.netbeans.modules.refactoring.java.test in the Projects window. # Right click on InnerToOutterTest.java and select "Test File". test248745 will fail: {code:none} Testcase: test248745(org.netbeans.modules.refactoring.java.test.InnerToOutterTest): FAILED test248745 expected: but was: junit.framework.ComparisonFailure: test248745 expected: but was: at org.netbeans.modules.refactoring.java.test.RefactoringTestBase.verifyContent(RefactoringTestBase.java:125) at org.netbeans.modules.refactoring.java.test.InnerToOutterTest.test248745(InnerToOutterTest.java:149) {code} # Try the steps to reproduce for [issue 248745|https://netbeans.org/bugzilla/show_bug.cgi?id=248745]. The bug is not reproducible. # Set a breakpoint on the first line of test248745() (currently, line 145). Right click on InnerToOutterTest.java and select "Debug Test File". When the breakpoint is hit, simply continue execution. Now, all tests pass. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Updated] (NETBEANS-354) InnerToOutterTest test248745 fails, but issue 248745 is not reproducible
[ https://issues.apache.org/jira/browse/NETBEANS-354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Trebbien updated NETBEANS-354: - Summary: InnerToOutterTest test248745 fails, but issue 248745 is not reproducible (was: InnerToOutterTest test248745() fails, but issue 248745 is not reproducible) > InnerToOutterTest test248745 fails, but issue 248745 is not reproducible > > > Key: NETBEANS-354 > URL: https://issues.apache.org/jira/browse/NETBEANS-354 > Project: NetBeans > Issue Type: Bug > Components: java - Refactoring >Reporter: Daniel Trebbien >Priority: Major > > Steps to reproduce: > # Open the refactoring.java project. > # Expand Unit Test Packages > org.netbeans.modules.refactoring.java.test in > the Projects window. > # Right click on InnerToOutterTest.java and select "Test File". test248745 > will fail: > {code:none} > Testcase: > test248745(org.netbeans.modules.refactoring.java.test.InnerToOutterTest): > FAILED > test248745 expected: but was: t; [import static t.A.B; ]public class C { pub...> > junit.framework.ComparisonFailure: test248745 expected: class C { pub...> but was: pub...> > at > org.netbeans.modules.refactoring.java.test.RefactoringTestBase.verifyContent(RefactoringTestBase.java:125) > at > org.netbeans.modules.refactoring.java.test.InnerToOutterTest.test248745(InnerToOutterTest.java:149) > {code} > # Try the steps to reproduce for [issue > 248745|https://netbeans.org/bugzilla/show_bug.cgi?id=248745]. The bug is not > reproducible. > # Set a breakpoint on the first line of test248745() (currently, line 145). > Right click on InnerToOutterTest.java and select "Debug Test File". When the > breakpoint is hit, simply continue execution. Now, all tests pass. -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[incubator-netbeans] branch master updated (41da26b -> ff7b9eb)
This is an automated email from the ASF dual-hosted git repository. jlahoda pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/incubator-netbeans.git. from 41da26b [NETBEANS-253] Fixing watches with lambdas. (#358) add 6fc0c54 Re-correcting positions used in java.completion tests to reflect current positions used in the tests. new ff7b9eb Merge pull request #405 from jlahoda/fix-completion-test-positions The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../JavaCompletionTask15FeaturesTest.java | 108 ++-- .../JavaCompletionTask17FeaturesTest.java | 42 +- .../JavaCompletionTask18FeaturesTest.java | 150 ++--- .../JavaCompletionTask19FeaturesTest.java | 24 +- .../completion/JavaCompletionTaskAdvancedTest.java | 450 +++ .../completion/JavaCompletionTaskBasicTest.java| 626 ++--- .../JavaCompletionTaskElementCreatingTest.java | 46 +- 7 files changed, 723 insertions(+), 723 deletions(-) -- To stop receiving notification emails like this one, please contact jlah...@apache.org. - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[incubator-netbeans] 01/01: Merge pull request #405 from jlahoda/fix-completion-test-positions
This is an automated email from the ASF dual-hosted git repository. jlahoda pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-netbeans.git commit ff7b9eb36c51bf6a1bd33160dd44592fa922ab93 Merge: 41da26b 6fc0c54 Author: Jan Lahoda AuthorDate: Mon Feb 5 20:42:32 2018 +0100 Merge pull request #405 from jlahoda/fix-completion-test-positions Re-correcting positions used in java.completion tests to reflect curr… .../JavaCompletionTask15FeaturesTest.java | 108 ++-- .../JavaCompletionTask17FeaturesTest.java | 42 +- .../JavaCompletionTask18FeaturesTest.java | 150 ++--- .../JavaCompletionTask19FeaturesTest.java | 24 +- .../completion/JavaCompletionTaskAdvancedTest.java | 450 +++ .../completion/JavaCompletionTaskBasicTest.java| 626 ++--- .../JavaCompletionTaskElementCreatingTest.java | 46 +- 7 files changed, 723 insertions(+), 723 deletions(-) -- To stop receiving notification emails like this one, please contact jlah...@apache.org. - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Updated] (NETBEANS-341) Provide Snap Packages for NetBeans
[ https://issues.apache.org/jira/browse/NETBEANS-341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Laszlo Kishalmi updated NETBEANS-341: - Description: The aim of this wish is to make NetBeans IDE available using Snap packaging system making it available on almost all Linux distributions. While the invention of Snap package management is a bit controversial among Linux users, it is definitely gaining momentum as some major brands started to deliver their products as Snap packages. Like Spotify and IntelliJ as well. Snap store can provide different distribution channels for different state of the products, like alpha, beta and stable (additional channels can be requested as well). Snapcraft.io service provides an automatic build and release functionality for free. Also the snap client can update the installed software daily. Having this functionality can enable some users to live on the edge if they want. I've started some experiments which can help make it happen. # This snap code needs to be integrated into the main NetBeans repository. Check tle linked PR#404 # Snapcraft.io could be bind into github to enable automatic build. As far as I see now we shall request a permission to build a the package with classic confinement (no-security restrictions) My experimental package is available and can be tested with: {code:java} wget https://s3-us-west-2.amazonaws.com/lkishalmi-us-west-2-public/snaps/netbeans_9.0-beta-rc2_amd64.snap snap install netbeans_9.0-beta-rc2_amd64.snap --dangerous --classic{code} If we could make this happen NetBeans install on Linux could be as simple as: {code:java} snap install netbeans --classic{code} was: The aim of this wish is to make NetBeans IDE available using Snap packaging system making it available on almost all Linux distributions. While the invention of Snap package management is a bit controversial among Linux users, it is definitely gaining momentum as some major brands started to deliver their products as Snap packages. Like Spotify and IntelliJ as well. Snap store can provide different distribution channels for different state of the products, like alpha, beta and stable (additional channels can be requested as well). Snapcraft.io service provides an automatic build and release functionality for free. Also the snap client can update the installed software daily. Having this functionality can enable some users to live on the edge if they want. I've started some experiments which can help make it happen. # Initial experiment creating a snap package from NetBeans 9.0-beta-rc2: [https://github.com/lkishalmi/netbeans-snap] # This snap code needs to be integrated into the main NetBeans repository. Some modifications are required of course. (I'm going to create a branch for that) # Snapcraft.io could be bind into github to enable automatic build. As far as I see now we shall request a permission to build a the package with classic confinement (no-security restrictions) My experimental package is available and can be tested with: {code:java} wget https://s3-us-west-2.amazonaws.com/lkishalmi-us-west-2-public/snaps/netbeans_9.0-beta-rc2_amd64.snap snap install netbeans_9.0-beta-rc2_amd64.snap --dangerous --classic{code} If we could make this happen NetBeans install on Linux could be as simple as: {code:java} snap install netbeans --classic{code} > Provide Snap Packages for NetBeans > -- > > Key: NETBEANS-341 > URL: https://issues.apache.org/jira/browse/NETBEANS-341 > Project: NetBeans > Issue Type: Wish > Components: platform - Launchers&CLI >Affects Versions: 9.0 >Reporter: Laszlo Kishalmi >Priority: Major > Labels: CI, build, pull-request-available > Time Spent: 50m > Remaining Estimate: 0h > > The aim of this wish is to make NetBeans IDE available using Snap packaging > system making it available on almost all Linux distributions. > While the invention of Snap package management is a bit controversial among > Linux users, it is definitely gaining momentum as some major brands started > to deliver their products as Snap packages. Like Spotify and IntelliJ as well. > Snap store can provide different distribution channels for different state of > the products, like alpha, beta and stable (additional channels can be > requested as well). Snapcraft.io service provides an automatic build and > release functionality for free. Also the snap client can update the installed > software daily. Having this functionality can enable some users to live on > the edge if they want. > I've started some experiments which can help make it happen. > # This snap code needs to be integrated into the main NetBeans repository. > Check tle linked PR#404 > # Snapcraft.io could be bind into github to enable automatic build. > As far as I