You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by jt...@apache.org on 2017/09/08 21:06:09 UTC
[01/28] incubator-netbeans-html4j git commit: [maven-release-plugin]
prepare release release-1.4
Repository: incubator-netbeans-html4j
Updated Branches:
refs/heads/master 0f2bc8fb3 -> 9e4efe7c7
Updated Tags: refs/tags/mirror-1.4 [created] cc5ac08f0
[maven-release-plugin] prepare release release-1.4
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/cc5ac08f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/cc5ac08f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/cc5ac08f
Branch: refs/heads/master
Commit: cc5ac08f0abe3d7d02a61eac45faa545ffe20f5e
Parents: 0132882
Author: Jaroslav Tulach <jt...@netbeans.org>
Authored: Tue Mar 28 14:06:37 2017 +0200
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
boot-agent-test/pom.xml | 2 +-
boot-fx/pom.xml | 4 ++--
boot-script/pom.xml | 4 ++--
boot/pom.xml | 4 ++--
context/pom.xml | 4 ++--
equinox-agentclass-hook/pom.xml | 2 +-
geo/pom.xml | 4 ++--
html4j-maven-plugin/pom.xml | 4 ++--
json-tck/pom.xml | 6 +++---
json/pom.xml | 4 ++--
ko-felix-test/pom.xml | 2 +-
ko-osgi-test/pom.xml | 2 +-
ko-ws-tyrus/pom.xml | 4 ++--
ko4j/pom.xml | 4 ++--
pom.xml | 4 ++--
sound/pom.xml | 6 +++---
xhr4j/pom.xml | 4 ++--
17 files changed, 32 insertions(+), 32 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/cc5ac08f/boot-agent-test/pom.xml
----------------------------------------------------------------------
diff --git a/boot-agent-test/pom.xml b/boot-agent-test/pom.xml
index 8159679..a5fe6f4 100644
--- a/boot-agent-test/pom.xml
+++ b/boot-agent-test/pom.xml
@@ -48,7 +48,7 @@
<parent>
<groupId>org.netbeans.html</groupId>
<artifactId>pom</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
</parent>
<artifactId>boot-agent-test</artifactId>
<packaging>jar</packaging>
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/cc5ac08f/boot-fx/pom.xml
----------------------------------------------------------------------
diff --git a/boot-fx/pom.xml b/boot-fx/pom.xml
index 26dd2ce..680447e 100644
--- a/boot-fx/pom.xml
+++ b/boot-fx/pom.xml
@@ -48,11 +48,11 @@
<parent>
<groupId>org.netbeans.html</groupId>
<artifactId>pom</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
</parent>
<groupId>org.netbeans.html</groupId>
<artifactId>net.java.html.boot.fx</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
<name>FX WebView Bootstrap</name>
<packaging>bundle</packaging>
<url>http://maven.apache.org</url>
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/cc5ac08f/boot-script/pom.xml
----------------------------------------------------------------------
diff --git a/boot-script/pom.xml b/boot-script/pom.xml
index 55073fd..c243ec0 100644
--- a/boot-script/pom.xml
+++ b/boot-script/pom.xml
@@ -48,11 +48,11 @@
<parent>
<groupId>org.netbeans.html</groupId>
<artifactId>pom</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
</parent>
<name>Presenter via javax.script</name>
<artifactId>net.java.html.boot.script</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
<packaging>bundle</packaging>
<properties>
<netbeans.compile.on.save>NONE</netbeans.compile.on.save>
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/cc5ac08f/boot/pom.xml
----------------------------------------------------------------------
diff --git a/boot/pom.xml b/boot/pom.xml
index e1ec2ff..d902470 100644
--- a/boot/pom.xml
+++ b/boot/pom.xml
@@ -48,11 +48,11 @@
<parent>
<groupId>org.netbeans.html</groupId>
<artifactId>pom</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
</parent>
<groupId>org.netbeans.html</groupId>
<artifactId>net.java.html.boot</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
<packaging>bundle</packaging>
<name>Browser Bootstrap</name>
<url>http://maven.apache.org</url>
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/cc5ac08f/context/pom.xml
----------------------------------------------------------------------
diff --git a/context/pom.xml b/context/pom.xml
index c127c48..511c75a 100644
--- a/context/pom.xml
+++ b/context/pom.xml
@@ -48,11 +48,11 @@
<parent>
<groupId>org.netbeans.html</groupId>
<artifactId>pom</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
</parent>
<groupId>org.netbeans.html</groupId>
<artifactId>net.java.html</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
<packaging>bundle</packaging>
<name>HTML Context</name>
<url>http://maven.apache.org</url>
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/cc5ac08f/equinox-agentclass-hook/pom.xml
----------------------------------------------------------------------
diff --git a/equinox-agentclass-hook/pom.xml b/equinox-agentclass-hook/pom.xml
index 436c7d5..2d43cc7 100644
--- a/equinox-agentclass-hook/pom.xml
+++ b/equinox-agentclass-hook/pom.xml
@@ -48,7 +48,7 @@
<parent>
<groupId>org.netbeans.html</groupId>
<artifactId>pom</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
</parent>
<name>AgentClass Hook for Equinox</name>
<artifactId>equinox-agentclass-hook</artifactId>
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/cc5ac08f/geo/pom.xml
----------------------------------------------------------------------
diff --git a/geo/pom.xml b/geo/pom.xml
index 741c6d3..2836398 100644
--- a/geo/pom.xml
+++ b/geo/pom.xml
@@ -48,11 +48,11 @@
<parent>
<groupId>org.netbeans.html</groupId>
<artifactId>pom</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
</parent>
<groupId>org.netbeans.html</groupId>
<artifactId>net.java.html.geo</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
<packaging>bundle</packaging>
<name>Geolocation API</name>
<url>http://maven.apache.org</url>
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/cc5ac08f/html4j-maven-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/html4j-maven-plugin/pom.xml b/html4j-maven-plugin/pom.xml
index 56cf9b6..41bb214 100644
--- a/html4j-maven-plugin/pom.xml
+++ b/html4j-maven-plugin/pom.xml
@@ -48,12 +48,12 @@
<parent>
<groupId>org.netbeans.html</groupId>
<artifactId>pom</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
</parent>
<packaging>maven-plugin</packaging>
<groupId>org.netbeans.html</groupId>
<artifactId>html4j-maven-plugin</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
<name>Html for Java Maven Plugin</name>
<url>http://maven.apache.org</url>
<description>Maven plugin to post process the classes with @JavaScriptBody annotations</description>
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/cc5ac08f/json-tck/pom.xml
----------------------------------------------------------------------
diff --git a/json-tck/pom.xml b/json-tck/pom.xml
index 161b19d..696dc26 100644
--- a/json-tck/pom.xml
+++ b/json-tck/pom.xml
@@ -48,11 +48,11 @@
<parent>
<groupId>org.netbeans.html</groupId>
<artifactId>pom</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
</parent>
<groupId>org.netbeans.html</groupId>
<artifactId>net.java.html.json.tck</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
<packaging>bundle</packaging>
<name>HTML for Java TCK</name>
<url>http://maven.apache.org</url>
@@ -85,7 +85,7 @@
<dependency>
<groupId>org.netbeans.html</groupId>
<artifactId>net.java.html.json</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
<type>jar</type>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/cc5ac08f/json/pom.xml
----------------------------------------------------------------------
diff --git a/json/pom.xml b/json/pom.xml
index 77c95f4..acc6ddf 100644
--- a/json/pom.xml
+++ b/json/pom.xml
@@ -48,11 +48,11 @@
<parent>
<groupId>org.netbeans.html</groupId>
<artifactId>pom</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
</parent>
<groupId>org.netbeans.html</groupId>
<artifactId>net.java.html.json</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
<packaging>bundle</packaging>
<name>JSON Model in Java</name>
<url>http://maven.apache.org</url>
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/cc5ac08f/ko-felix-test/pom.xml
----------------------------------------------------------------------
diff --git a/ko-felix-test/pom.xml b/ko-felix-test/pom.xml
index 591127e..44ab6a8 100644
--- a/ko-felix-test/pom.xml
+++ b/ko-felix-test/pom.xml
@@ -48,7 +48,7 @@
<parent>
<groupId>org.netbeans.html</groupId>
<artifactId>pom</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
</parent>
<name>KO Tests in Felix OSGi Container</name>
<artifactId>ko-felix-test</artifactId>
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/cc5ac08f/ko-osgi-test/pom.xml
----------------------------------------------------------------------
diff --git a/ko-osgi-test/pom.xml b/ko-osgi-test/pom.xml
index 2af6772..2ef0fef 100644
--- a/ko-osgi-test/pom.xml
+++ b/ko-osgi-test/pom.xml
@@ -48,7 +48,7 @@
<parent>
<groupId>org.netbeans.html</groupId>
<artifactId>pom</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
</parent>
<name>KO Tests in Equinox OSGi Container</name>
<artifactId>ko-osgi-test</artifactId>
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/cc5ac08f/ko-ws-tyrus/pom.xml
----------------------------------------------------------------------
diff --git a/ko-ws-tyrus/pom.xml b/ko-ws-tyrus/pom.xml
index 9415d83..b3c19a3 100644
--- a/ko-ws-tyrus/pom.xml
+++ b/ko-ws-tyrus/pom.xml
@@ -48,11 +48,11 @@
<parent>
<groupId>org.netbeans.html</groupId>
<artifactId>pom</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
</parent>
<groupId>org.netbeans.html</groupId>
<artifactId>ko-ws-tyrus</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
<packaging>bundle</packaging>
<name>Tyrus Based WebSockets</name>
<url>http://maven.apache.org</url>
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/cc5ac08f/ko4j/pom.xml
----------------------------------------------------------------------
diff --git a/ko4j/pom.xml b/ko4j/pom.xml
index 61fb68d..4bf89a3 100644
--- a/ko4j/pom.xml
+++ b/ko4j/pom.xml
@@ -48,11 +48,11 @@
<parent>
<groupId>org.netbeans.html</groupId>
<artifactId>pom</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
</parent>
<groupId>org.netbeans.html</groupId>
<artifactId>ko4j</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
<packaging>bundle</packaging>
<name>Knockout.js for Java</name>
<url>http://maven.apache.org</url>
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/cc5ac08f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 15a292a..18aba6d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -47,7 +47,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.netbeans.html</groupId>
<artifactId>pom</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
<packaging>pom</packaging>
<name>HTML APIs via Java</name>
<parent>
@@ -100,7 +100,7 @@
<connection>scm:git:https://github.com/jtulach/html-java-api.git</connection>
<developerConnection>scm:git:https://github.com/jtulach/html-java-api.git</developerConnection>
<url>https://github.com/jtulach/html-java-api</url>
- <tag>master</tag>
+ <tag>release-1.4</tag>
</scm>
<repositories>
<repository>
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/cc5ac08f/sound/pom.xml
----------------------------------------------------------------------
diff --git a/sound/pom.xml b/sound/pom.xml
index 62fce4b..0d59856 100644
--- a/sound/pom.xml
+++ b/sound/pom.xml
@@ -48,11 +48,11 @@
<parent>
<groupId>org.netbeans.html</groupId>
<artifactId>pom</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
</parent>
<groupId>org.netbeans.html</groupId>
<artifactId>net.java.html.sound</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
<packaging>bundle</packaging>
<name>Sound API via HTML</name>
<url>http://maven.apache.org</url>
@@ -81,7 +81,7 @@
<dependency>
<groupId>org.netbeans.html</groupId>
<artifactId>net.java.html.boot</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
<type>jar</type>
</dependency>
<dependency>
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/cc5ac08f/xhr4j/pom.xml
----------------------------------------------------------------------
diff --git a/xhr4j/pom.xml b/xhr4j/pom.xml
index 947ef26..6f9d158 100644
--- a/xhr4j/pom.xml
+++ b/xhr4j/pom.xml
@@ -48,11 +48,11 @@
<parent>
<groupId>org.netbeans.html</groupId>
<artifactId>pom</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
</parent>
<groupId>org.netbeans.html</groupId>
<artifactId>xhr4j</artifactId>
- <version>2.0-SNAPSHOT</version>
+ <version>1.4</version>
<packaging>bundle</packaging>
<name>XHR via Java</name>
<url>http://maven.apache.org</url>
[05/28] incubator-netbeans-html4j git commit: Skip the test if we
cannot download the env for nashorn emulation
Posted by jt...@apache.org.
Skip the test if we cannot download the env for nashorn emulation
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/8ed64b1c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/8ed64b1c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/8ed64b1c
Branch: refs/heads/master
Commit: 8ed64b1ccefe83851dcb477fe2b4ee00d1f69d03
Parents: 408363d
Author: Jaroslav Tulach <jt...@netbeans.org>
Authored: Sat Dec 24 14:02:47 2016 +0100
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
.../java/html/boot/script/ko4j/KnockoutEnvJSTest.java | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/8ed64b1c/boot-script/src/test/java/net/java/html/boot/script/ko4j/KnockoutEnvJSTest.java
----------------------------------------------------------------------
diff --git a/boot-script/src/test/java/net/java/html/boot/script/ko4j/KnockoutEnvJSTest.java b/boot-script/src/test/java/net/java/html/boot/script/ko4j/KnockoutEnvJSTest.java
index 8ed88c5..0ffccb2 100644
--- a/boot-script/src/test/java/net/java/html/boot/script/ko4j/KnockoutEnvJSTest.java
+++ b/boot-script/src/test/java/net/java/html/boot/script/ko4j/KnockoutEnvJSTest.java
@@ -48,6 +48,7 @@ import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
+import java.net.ConnectException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
@@ -108,10 +109,15 @@ public final class KnockoutEnvJSTest extends KnockoutTCK {
baseUri = DynamicHTTP.initServer();
final Fn.Presenter p = Scripts.createPresenter(KOCase.JS);
- URL envNashorn = new URL("https://bugs.openjdk.java.net/secure/attachment/11894/env.nashorn.1.2-debug.js");
- InputStream is = envNashorn.openStream();
- p.loadScript(new InputStreamReader(is));
- is.close();
+ try {
+ URL envNashorn = new URL("https://bugs.openjdk.java.net/secure/attachment/11894/env.nashorn.1.2-debug.js");
+ InputStream is = envNashorn.openStream();
+ p.loadScript(new InputStreamReader(is));
+ is.close();
+ } catch (ConnectException ex) {
+ ex.printStackTrace();
+ return new Object[0];
+ }
final BrowserBuilder bb = BrowserBuilder.newBrowser(p).
loadClass(KnockoutEnvJSTest.class).
[14/28] incubator-netbeans-html4j git commit: Print the used java
version
Posted by jt...@apache.org.
Print the used java version
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/76a37ad1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/76a37ad1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/76a37ad1
Branch: refs/heads/master
Commit: 76a37ad1cf7b6e20dbf31f7015ec4b592620a35e
Parents: 1fb5994
Author: Jaroslav Tulach <jt...@netbeans.org>
Authored: Sun Jan 15 06:47:06 2017 +0100
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
.travis.yml | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/76a37ad1/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index d4f6037..679156a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,6 +5,7 @@ before_script:
- sleep 3
script:
- jdk_switcher use oraclejdk8 || java -version
+ - java -version
- mvn install -DskipTests
- mvn verify
os:
[26/28] incubator-netbeans-html4j git commit: Ignore URI fragment if
present before converting to NIO path
Posted by jt...@apache.org.
Ignore URI fragment if present before converting to NIO path
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/e9c2a51f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/e9c2a51f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/e9c2a51f
Branch: refs/heads/master
Commit: e9c2a51faa30709666e719bbcddff78840d2ef1a
Parents: 346937f
Author: Jaroslav Tulach <jt...@netbeans.org>
Authored: Thu Mar 9 06:11:49 2017 +0100
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
boot-fx/src/main/java/org/netbeans/html/boot/fx/WatchDir.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/e9c2a51f/boot-fx/src/main/java/org/netbeans/html/boot/fx/WatchDir.java
----------------------------------------------------------------------
diff --git a/boot-fx/src/main/java/org/netbeans/html/boot/fx/WatchDir.java b/boot-fx/src/main/java/org/netbeans/html/boot/fx/WatchDir.java
index 25cc5f2..597b882 100644
--- a/boot-fx/src/main/java/org/netbeans/html/boot/fx/WatchDir.java
+++ b/boot-fx/src/main/java/org/netbeans/html/boot/fx/WatchDir.java
@@ -68,7 +68,11 @@ final class WatchDir implements Runnable {
private final WebEngine engine;
WatchDir(WebEngine eng) throws URISyntaxException, IOException {
- dir = Paths.get(new URI(eng.getLocation())).getParent();
+ URI loc = new URI(eng.getLocation());
+ if (loc.getFragment() != null) {
+ loc = new URI(loc.getScheme(), loc.getHost(), loc.getPath(), null);
+ }
+ dir = Paths.get(loc).getParent();
engine = eng;
ws = dir.getFileSystem().newWatchService();
key = dir.register(ws,
[19/28] incubator-netbeans-html4j git commit: #269456: window.open in
JavaFX presenter shows new popup window
Posted by jt...@apache.org.
#269456: window.open in JavaFX presenter shows new popup window
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/9c338617
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/9c338617
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/9c338617
Branch: refs/heads/master
Commit: 9c3386172b4dd058207c7d77ade1b29bf886d24a
Parents: 327e6bd
Author: Jaroslav Tulach <jt...@netbeans.org>
Authored: Fri Feb 3 18:30:30 2017 +0100
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
.../java/org/netbeans/html/boot/fx/FXBrwsr.java | 60 ++++++---
.../org/netbeans/html/boot/fx/PopupTest.java | 127 +++++++++++++++++++
.../org/netbeans/html/boot/fx/second.html | 55 ++++++++
src/main/javadoc/overview.html | 3 +
4 files changed, 226 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9c338617/boot-fx/src/main/java/org/netbeans/html/boot/fx/FXBrwsr.java
----------------------------------------------------------------------
diff --git a/boot-fx/src/main/java/org/netbeans/html/boot/fx/FXBrwsr.java b/boot-fx/src/main/java/org/netbeans/html/boot/fx/FXBrwsr.java
index 71c8547..e1a8df5 100644
--- a/boot-fx/src/main/java/org/netbeans/html/boot/fx/FXBrwsr.java
+++ b/boot-fx/src/main/java/org/netbeans/html/boot/fx/FXBrwsr.java
@@ -66,12 +66,15 @@ import javafx.scene.layout.BorderPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;
+import javafx.scene.web.PopupFeatures;
import javafx.scene.web.PromptData;
+import javafx.scene.web.WebEngine;
import javafx.scene.web.WebEvent;
import javafx.scene.web.WebView;
import javafx.stage.Modality;
import javafx.stage.Screen;
import javafx.stage.Stage;
+import javafx.stage.StageStyle;
import javafx.stage.Window;
import javafx.stage.WindowEvent;
import javafx.util.Callback;
@@ -278,25 +281,7 @@ public class FXBrwsr extends Application {
}
});
- class Title implements ChangeListener<String> {
-
- private String title;
-
- public Title() {
- super();
- }
-
- @Override
- public void changed(ObservableValue<? extends String> ov, String t, String t1) {
- title = view.getEngine().getTitle();
- if (title != null) {
- stage.setTitle(title);
- }
- }
- }
- final Title x = new Title();
- view.getEngine().titleProperty().addListener(x);
- x.changed(null, null, null);
+ Title.observeView(view, stage);
return view;
}
@@ -393,6 +378,18 @@ public class FXBrwsr extends Application {
return res[0] ? line.getText() : null;
}
});
+ view.getEngine().setCreatePopupHandler(new Callback<PopupFeatures, WebEngine>() {
+ @Override
+ public WebEngine call(PopupFeatures param) {
+ final Stage stage = new Stage(StageStyle.UTILITY);
+ stage.initOwner(owner);
+ final WebView popUpView = new WebView();
+ stage.setScene(new Scene(popUpView));
+ Title.observeView(popUpView, stage);
+ stage.show();
+ return popUpView.getEngine();
+ }
+ });
}
static void waitFinished() {
@@ -423,5 +420,30 @@ public class FXBrwsr extends Application {
}
}
}
+ private static class Title implements ChangeListener<String> {
+ private String title;
+ private final WebView view;
+ private final Stage stage;
+
+ private Title(WebView view, Stage stage) {
+ super();
+ this.view = view;
+ this.stage = stage;
+ }
+
+ public static void observeView(WebView view, Stage stage) {
+ Title t = new Title(view, stage);
+ view.getEngine().titleProperty().addListener(t);
+ t.changed(null, null, null);
+ }
+
+ @Override
+ public void changed(ObservableValue<? extends String> ov, String t, String t1) {
+ title = view.getEngine().getTitle();
+ if (title != null) {
+ stage.setTitle(title);
+ }
+ }
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9c338617/boot-fx/src/test/java/org/netbeans/html/boot/fx/PopupTest.java
----------------------------------------------------------------------
diff --git a/boot-fx/src/test/java/org/netbeans/html/boot/fx/PopupTest.java b/boot-fx/src/test/java/org/netbeans/html/boot/fx/PopupTest.java
new file mode 100644
index 0000000..a2963bb
--- /dev/null
+++ b/boot-fx/src/test/java/org/netbeans/html/boot/fx/PopupTest.java
@@ -0,0 +1,127 @@
+/**
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2013-2014 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 Oracle. Portions Copyright 2013-2016 Oracle. 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.
+ */
+package org.netbeans.html.boot.fx;
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
+import javafx.stage.Stage;
+import net.java.html.BrwsrCtx;
+import net.java.html.boot.BrowserBuilder;
+import net.java.html.js.JavaScriptBody;
+import org.netbeans.html.boot.spi.Fn;
+import static org.testng.Assert.*;
+import org.testng.annotations.Test;
+
+/**
+ *
+ * @author Jaroslav Tulach
+ */
+public class PopupTest {
+ public PopupTest() {
+ }
+
+ @JavaScriptBody(args = { "page" }, body =
+ "return window.open(page, 'secondary', 'width=300,height=150');"
+ )
+ private static native Object openSecondaryWindow(String page);
+
+ @Test public void checkReload() throws Throwable {
+ final Throwable[] arr = { null };
+
+ class WhenInitialized implements Runnable {
+ CountDownLatch cdl = new CountDownLatch(1);
+ AbstractFXPresenter p;
+ BrwsrCtx ctx;
+
+ @Override
+ public void run() {
+ try {
+ p = (AbstractFXPresenter) Fn.activePresenter();
+ assertNotNull(p, "Presenter is defined");
+ ctx = BrwsrCtx.findDefault(WhenInitialized.class);
+ } catch (Throwable ex) {
+ arr[0] = ex;
+ } finally {
+ cdl.countDown();
+ }
+ }
+ }
+ WhenInitialized when = new WhenInitialized();
+
+ final BrowserBuilder bb = BrowserBuilder.newBrowser().loadClass(PopupTest.class).
+ loadPage("empty.html").
+ loadFinished(when);
+
+ class ShowBrowser implements Runnable {
+ @Override
+ public void run() {
+ bb.showAndWait();
+ }
+ }
+
+ Executors.newSingleThreadExecutor().submit(new ShowBrowser());
+ when.cdl.await();
+ if (arr[0] != null) throw arr[0];
+
+ Stage s = FXBrwsr.findStage();
+ assertEquals(s.getTitle(), "FX Presenter Harness");
+
+ final Object[] window = new Object[1];
+ final CountDownLatch openWindow = new CountDownLatch(1);
+ when.ctx.execute(new Runnable() {
+ @Override
+ public void run() {
+ TitleTest.changeTitle("First window");
+ window[0] = openSecondaryWindow("second.html");
+ openWindow.countDown();
+ }
+ });
+
+ openWindow.await(5, TimeUnit.SECONDS);
+
+ assertNotNull(window[0], "Second window opened");
+
+ assertEquals(s.getTitle(), "First window", "The title is kept");
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9c338617/boot-fx/src/test/resources/org/netbeans/html/boot/fx/second.html
----------------------------------------------------------------------
diff --git a/boot-fx/src/test/resources/org/netbeans/html/boot/fx/second.html b/boot-fx/src/test/resources/org/netbeans/html/boot/fx/second.html
new file mode 100644
index 0000000..a450f29
--- /dev/null
+++ b/boot-fx/src/test/resources/org/netbeans/html/boot/fx/second.html
@@ -0,0 +1,55 @@
+<!--
+
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+ Copyright 2013-2014 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 Oracle. Portions Copyright 2013-2016 Oracle. 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.
+
+-->
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Second Window</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta name="viewport" content="width=device-width">
+ </head>
+ <body>
+ <div>Second Window</div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9c338617/src/main/javadoc/overview.html
----------------------------------------------------------------------
diff --git a/src/main/javadoc/overview.html b/src/main/javadoc/overview.html
index b144db3..cd0cfde 100644
--- a/src/main/javadoc/overview.html
+++ b/src/main/javadoc/overview.html
@@ -85,6 +85,9 @@
<a target="_blank" href="https://netbeans.org/bugzilla/show_bug.cgi?id=269549"/>
Workaround</a> for garbage collector behavior of modern JavaFX WebView
implementations (JDK8 u112 and newer).
+ JavaFX Presenter can
+ <a target="_blank" href="https://netbeans.org/bugzilla/show_bug.cgi?id=269456"/>
+ show popup</a> window.
Development has switched to
<a target="_blank" href="https://github.com/jtulach/html-java-api/"/>
Git repository</a> thanks to
[06/28] incubator-netbeans-html4j git commit: Enabling travis build
Posted by jt...@apache.org.
Enabling travis build
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/b091bf9d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/b091bf9d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/b091bf9d
Branch: refs/heads/master
Commit: b091bf9d0b4b4431220100ad06408f5be2463485
Parents: 8ed64b1
Author: Jaroslav Tulach <jt...@netbeans.org>
Authored: Fri Jan 13 19:22:51 2017 +0100
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
.travis.yml | 12 ++++++++++++
1 file changed, 12 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/b091bf9d/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..d4f6037
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,12 @@
+language: java
+before_script:
+ - export DISPLAY=:99.0
+ - sh -e /etc/init.d/xvfb start || echo No X11
+ - sleep 3
+script:
+ - jdk_switcher use oraclejdk8 || java -version
+ - mvn install -DskipTests
+ - mvn verify
+os:
+ - linux
+ - osx
[22/28] incubator-netbeans-html4j git commit: CodeSnippet doclet 0.20
highlights comments in italics
Posted by jt...@apache.org.
CodeSnippet doclet 0.20 highlights comments in italics
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/464b176a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/464b176a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/464b176a
Branch: refs/heads/master
Commit: 464b176a0ac68b0839fa9dc461737c4b850bddaf
Parents: 23ddadf
Author: Jaroslav Tulach <ja...@oracle.com>
Authored: Thu Feb 16 11:48:13 2017 +0100
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
boot-fx/src/test/java/org/netbeans/html/boot/fx/Periodicaly.java | 2 +-
pom.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/464b176a/boot-fx/src/test/java/org/netbeans/html/boot/fx/Periodicaly.java
----------------------------------------------------------------------
diff --git a/boot-fx/src/test/java/org/netbeans/html/boot/fx/Periodicaly.java b/boot-fx/src/test/java/org/netbeans/html/boot/fx/Periodicaly.java
index 8174192..8c663e5 100644
--- a/boot-fx/src/test/java/org/netbeans/html/boot/fx/Periodicaly.java
+++ b/boot-fx/src/test/java/org/netbeans/html/boot/fx/Periodicaly.java
@@ -75,7 +75,7 @@ public final class Periodicaly extends TimerTask {
BrwsrCtx initialCtx = BrwsrCtx.findDefault(Periodicaly.class);
// the task that is associated with context
Periodicaly task = new Periodicaly(initialCtx);
- // creates a timer
+ // creates a new timer
Timer t = new Timer("Move the box");
// run the task every 100ms
t.scheduleAtFixedRate(task, 0, 100);
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/464b176a/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index d881df6..6afecd0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -203,7 +203,7 @@ org.netbeans.html.boot.impl:org.netbeans.html.boot.fx:org.netbeans.html.context.
<docletArtifact>
<groupId>org.apidesign.javadoc</groupId>
<artifactId>codesnippet-doclet</artifactId>
- <version>0.11</version>
+ <version>0.20</version>
</docletArtifact>
<additionalparam>-snippetpath "${basedir}"</additionalparam>
</configuration>
[07/28] incubator-netbeans-html4j git commit: Provide previous
version of ko4j to put knockout.js file on compilation classpath
Posted by jt...@apache.org.
Provide previous version of ko4j to put knockout.js file on compilation classpath
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/c3034c16
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/c3034c16
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/c3034c16
Branch: refs/heads/master
Commit: c3034c1699216967e3812e42712e8e56e27c298f
Parents: b091bf9
Author: Jaroslav Tulach <jt...@netbeans.org>
Authored: Fri Jan 13 19:24:44 2017 +0100
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
ko4j/pom.xml | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/c3034c16/ko4j/pom.xml
----------------------------------------------------------------------
diff --git a/ko4j/pom.xml b/ko4j/pom.xml
index 5ba42a3..61fb68d 100644
--- a/ko4j/pom.xml
+++ b/ko4j/pom.xml
@@ -140,6 +140,12 @@
</dependency>
<dependency>
<groupId>org.netbeans.html</groupId>
+ <artifactId>ko4j</artifactId>
+ <scope>provided</scope>
+ <version>1.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.netbeans.html</groupId>
<artifactId>net.java.html.boot</artifactId>
<version>${project.version}</version>
<type>jar</type>
[28/28] incubator-netbeans-html4j git commit: Bringing in state as of
release-1.4 and merging with Apache licensing changes. Release 1.4 is
equivalent to commit cc5ac08f0a and the commit is tagged mirror-1.4.
Posted by jt...@apache.org.
Bringing in state as of release-1.4 and merging with Apache licensing changes.
Release 1.4 is equivalent to commit cc5ac08f0a and the commit is tagged mirror-1.4.
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/9e4efe7c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/9e4efe7c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/9e4efe7c
Branch: refs/heads/master
Commit: 9e4efe7c7493f175233d29b4aecf9855b1ca360e
Parents: cc5ac08 0f2bc8f
Author: Jaroslav Tulach <ja...@oracle.com>
Authored: Fri Sep 8 22:44:50 2017 +0200
Committer: Jaroslav Tulach <ja...@oracle.com>
Committed: Fri Sep 8 22:44:50 2017 +0200
----------------------------------------------------------------------
.gitignore | 2 +-
.travis.yml | 18 ++
COPYING | 52 ++---
LICENSE | 204 +++++++++++++++++++
NOTICE | 8 +
boot-agent-test/pom.xml | 52 ++---
.../html/bootagent/DynamicClassLoaderTest.java | 52 ++---
.../html/bootagent/JavaScriptBodyTst.java | 52 ++---
.../java/org/netbeans/html/bootagent/KOFx.java | 52 ++---
.../org/netbeans/html/bootagent/empty.html | 56 ++---
boot-fx/pom.xml | 52 ++---
.../java/net/java/html/boot/fx/FXBrowsers.java | 52 ++---
.../java/net/java/html/boot/fx/package.html | 56 ++---
.../html/boot/fx/AbstractFXPresenter.java | 52 ++---
.../java/org/netbeans/html/boot/fx/Dbgr.java | 52 ++---
.../java/org/netbeans/html/boot/fx/FXBrwsr.java | 52 ++---
.../org/netbeans/html/boot/fx/FXConsole.java | 52 ++---
.../org/netbeans/html/boot/fx/FXInspect.java | 52 ++---
.../org/netbeans/html/boot/fx/FXPresenter.java | 52 ++---
.../org/netbeans/html/boot/fx/FXToolbar.java | 52 ++---
.../org/netbeans/html/boot/fx/WatchDir.java | 52 ++---
.../org/netbeans/html/boot/fx/Bundle.properties | 56 ++---
.../html/boot/fx/FXBrowsersOnResourceTest.java | 52 ++---
.../net/java/html/boot/fx/FXBrowsersTest.java | 52 ++---
.../org/netbeans/html/boot/fx/FXBrwsrTest.java | 52 ++---
.../netbeans/html/boot/fx/FXJavaScriptTest.java | 52 ++---
.../netbeans/html/boot/fx/FXPresenterTst.java | 52 ++---
.../netbeans/html/boot/fx/FxJavaScriptTst.java | 52 ++---
.../java/org/netbeans/html/boot/fx/KOFx.java | 52 ++---
.../org/netbeans/html/boot/fx/Periodicaly.java | 52 ++---
.../netbeans/html/boot/fx/PeriodicalyTest.java | 52 ++---
.../org/netbeans/html/boot/fx/PopupTest.java | 52 ++---
.../org/netbeans/html/boot/fx/ReloadTest.java | 52 ++---
.../netbeans/html/boot/fx/TestingProvider.java | 52 ++---
.../org/netbeans/html/boot/fx/TitleTest.java | 52 ++---
.../test/java/org/sample/app/pkg/SampleApp.java | 52 ++---
.../test/resources/net/java/html/boot/fx/wnd.js | 52 ++---
.../org/netbeans/html/boot/fx/empty.html | 56 ++---
.../org/netbeans/html/boot/fx/second.html | 56 ++---
boot-script/pom.xml | 52 ++---
.../java/html/boot/script/ScriptPresenter.java | 52 ++---
.../java/net/java/html/boot/script/Scripts.java | 52 ++---
.../java/net/java/html/boot/script/package.html | 56 ++---
.../html/boot/script/Jsr223JavaScriptTest.java | 52 ++---
.../html/boot/script/Jsr223JavaScriptTst.java | 52 ++---
.../net/java/html/boot/script/SingleCase.java | 52 ++---
.../java/html/boot/script/ko4j/DynamicHTTP.java | 52 ++---
.../net/java/html/boot/script/ko4j/KOCase.java | 52 ++---
.../boot/script/ko4j/KnockoutEnvJSTest.java | 52 ++---
.../net/java/html/boot/script/ko4j/test.html | 56 ++---
boot-truffle/pom.xml | 52 ++---
.../net/java/html/boot/truffle/IsArrayNode.java | 52 ++---
.../net/java/html/boot/truffle/IsNullNode.java | 52 ++---
.../net/java/html/boot/truffle/JavaArray.java | 52 ++---
.../net/java/html/boot/truffle/JavaObject.java | 52 ++---
.../net/java/html/boot/truffle/JavaValue.java | 52 ++---
.../html/boot/truffle/TrufflePresenter.java | 52 ++---
.../html/boot/truffle/TrufflePresenters.java | 52 ++---
.../net/java/html/boot/truffle/package.html | 56 ++---
.../html/boot/truffle/JsArrayTruffleTest.java | 52 ++---
.../net/java/html/boot/truffle/SingleCase.java | 52 ++---
.../boot/truffle/TruffleJavaScriptTest.java | 52 ++---
boot/pom.xml | 52 ++---
.../java/net/java/html/boot/BrowserBuilder.java | 52 ++---
.../main/java/net/java/html/boot/package.html | 56 ++---
.../java/net/java/html/js/JavaScriptBody.java | 52 ++---
.../net/java/html/js/JavaScriptResource.java | 52 ++---
.../src/main/java/net/java/html/js/package.html | 52 ++---
.../netbeans/html/boot/impl/FindResources.java | 52 ++---
.../org/netbeans/html/boot/impl/FnContext.java | 52 ++---
.../org/netbeans/html/boot/impl/FnUtils.java | 52 ++---
.../html/boot/impl/JavaScriptProcesor.java | 52 ++---
.../org/netbeans/html/boot/impl/JsAgent.java | 52 ++---
.../org/netbeans/html/boot/impl/JsCallback.java | 52 ++---
.../netbeans/html/boot/impl/JsClassLoader.java | 52 ++---
.../org/netbeans/html/boot/impl/JsPkgCache.java | 52 ++---
.../java/org/netbeans/html/boot/spi/Fn.java | 52 ++---
.../org/netbeans/html/boot/spi/package.html | 56 ++---
.../resources/net/java/html/boot/html4j.txt | 52 ++---
.../net/java/html/boot/BrowserBuilderTest.java | 52 ++---
.../org/netbeans/html/boot/impl/Arithm.java | 52 ++---
.../org/netbeans/html/boot/impl/Compile.java | 52 ++---
.../html/boot/impl/CountFnCreationTest.java | 52 ++---
.../org/netbeans/html/boot/impl/FnTest.java | 52 ++---
.../html/boot/impl/JavaScriptProcesorTest.java | 52 ++---
.../netbeans/html/boot/impl/JsCallbackTest.java | 52 ++---
.../html/boot/impl/JsClassLoaderBase.java | 52 ++---
.../html/boot/impl/JsClassLoaderTest.java | 52 ++---
.../org/netbeans/html/boot/impl/JsMethods.java | 52 ++---
.../netbeans/html/boot/impl/KeepAliveTest.java | 52 ++---
.../org/netbeans/html/boot/impl/Object.java | 52 ++---
.../org/netbeans/html/boot/impl/empty.js | 52 ++---
.../org/netbeans/html/boot/impl/jsmethods.js | 52 ++---
context/pom.xml | 52 ++---
.../src/main/java/net/java/html/BrwsrCtx.java | 52 ++---
.../src/main/java/net/java/html/package.html | 56 ++---
.../netbeans/html/context/impl/CtxAccssr.java | 52 ++---
.../org/netbeans/html/context/impl/CtxImpl.java | 52 ++---
.../org/netbeans/html/context/spi/Contexts.java | 52 ++---
.../org/netbeans/html/context/spi/package.html | 56 ++---
.../test/java/net/java/html/BrwsrCtxTest.java | 52 ++---
.../netbeans/html/context/spi/ContextsTest.java | 52 ++---
equinox-agentclass-hook/pom.xml | 56 ++---
.../html/equinox/agentclass/AgentHook.java | 52 ++---
.../equinox/agentclass/NbInstrumentation.java | 52 ++---
.../main/resources/hookconfigurators.properties | 56 ++---
geo/pom.xml | 52 ++---
.../main/java/net/java/html/geo/OnLocation.java | 52 ++---
.../main/java/net/java/html/geo/Position.java | 52 ++---
.../main/java/net/java/html/geo/package.html | 56 ++---
.../org/netbeans/html/geo/impl/Accessor.java | 52 ++---
.../netbeans/html/geo/impl/GeoProcessor.java | 52 ++---
.../netbeans/html/geo/impl/JsGLProvider.java | 52 ++---
.../org/netbeans/html/geo/spi/CoordImpl.java | 52 ++---
.../org/netbeans/html/geo/spi/GLProvider.java | 52 ++---
.../java/org/netbeans/html/geo/spi/package.html | 56 ++---
.../java/net/java/html/geo/OnLocationTest.java | 52 ++---
.../org/netbeans/html/geo/impl/Compile.java | 52 ++---
.../html/geo/impl/GeoProcessorTest.java | 52 ++---
.../html/geo/impl/JsGLProviderTest.java | 52 ++---
.../netbeans/html/geo/spi/CoordImplTest.java | 52 ++---
html4j-maven-plugin/pom.xml | 52 ++---
.../html/mojo/ProcessJsAnnotationsMojo.java | 52 ++---
json-tck/pom.xml | 52 ++---
.../java/net/java/html/js/tests/Bodies.java | 52 ++---
.../java/net/java/html/js/tests/Factorial.java | 52 ++---
.../java/net/java/html/js/tests/GCBodyTest.java | 52 ++---
.../net/java/html/js/tests/Global2String.java | 52 ++---
.../net/java/html/js/tests/GlobalString.java | 52 ++---
.../java/html/js/tests/JavaScriptBodyTest.java | 52 ++---
.../main/java/net/java/html/js/tests/Later.java | 52 ++---
.../java/net/java/html/js/tests/Receiver.java | 52 ++---
.../main/java/net/java/html/js/tests/Sum.java | 52 ++---
.../java/html/json/tests/ConvertTypesTest.java | 52 ++---
.../java/html/json/tests/GCKnockoutTest.java | 52 ++---
.../java/net/java/html/json/tests/JSONTest.java | 52 ++---
.../net/java/html/json/tests/KnockoutTest.java | 52 ++---
.../net/java/html/json/tests/MinesTest.java | 52 ++---
.../java/html/json/tests/OperationsTest.java | 52 ++---
.../net/java/html/json/tests/PairModel.java | 52 ++---
.../net/java/html/json/tests/PersonImpl.java | 52 ++---
.../main/java/net/java/html/json/tests/Sex.java | 52 ++---
.../java/net/java/html/json/tests/Utils.java | 52 ++---
.../net/java/html/json/tests/WebSocketTest.java | 52 ++---
.../netbeans/html/json/tck/JavaScriptTCK.java | 52 ++---
.../java/org/netbeans/html/json/tck/KOTest.java | 52 ++---
.../org/netbeans/html/json/tck/KnockoutTCK.java | 52 ++---
.../org/netbeans/html/json/tck/package.html | 56 ++---
.../resources/net/java/html/js/tests/global.js | 52 ++---
.../resources/net/java/html/js/tests/global2.js | 52 ++---
.../java/net/java/html/js/tests/BodiesTest.java | 52 ++---
json/pom.xml | 52 ++---
.../net/java/html/json/ComputedProperty.java | 52 ++---
.../main/java/net/java/html/json/FakeModel.java | 52 ++---
.../main/java/net/java/html/json/Function.java | 52 ++---
.../src/main/java/net/java/html/json/Model.java | 52 ++---
.../java/net/java/html/json/ModelOperation.java | 52 ++---
.../main/java/net/java/html/json/Models.java | 52 ++---
.../net/java/html/json/OnPropertyChange.java | 52 ++---
.../main/java/net/java/html/json/OnReceive.java | 52 ++---
.../main/java/net/java/html/json/Property.java | 52 ++---
.../java/html/json/doc-files/websockets.html | 52 ++---
.../main/java/net/java/html/json/package.html | 52 ++---
.../org/netbeans/html/json/impl/Bindings.java | 52 ++---
.../java/org/netbeans/html/json/impl/JSON.java | 52 ++---
.../org/netbeans/html/json/impl/JSONList.java | 52 ++---
.../netbeans/html/json/impl/ModelProcessor.java | 52 ++---
.../html/json/impl/PropertyBindingAccessor.java | 52 ++---
.../org/netbeans/html/json/impl/RcvrJSON.java | 52 ++---
.../org/netbeans/html/json/impl/Transitive.java | 52 ++---
.../netbeans/html/json/spi/FunctionBinding.java | 52 ++---
.../org/netbeans/html/json/spi/JSONCall.java | 52 ++---
.../org/netbeans/html/json/spi/Observers.java | 52 ++---
.../netbeans/html/json/spi/PropertyBinding.java | 52 ++---
.../java/org/netbeans/html/json/spi/Proto.java | 52 ++---
.../org/netbeans/html/json/spi/Technology.java | 52 ++---
.../org/netbeans/html/json/spi/Transfer.java | 52 ++---
.../org/netbeans/html/json/spi/WSTransfer.java | 52 ++---
.../org/netbeans/html/json/spi/package.html | 56 ++---
.../netbeans/html/json/impl/Bundle.properties | 52 ++---
.../java/net/java/html/json/AdressTest.java | 52 ++---
.../test/java/net/java/html/json/BoardTest.java | 52 ++---
.../net/java/html/json/BooleanArrayTest.java | 52 ++---
.../test/java/net/java/html/json/Compile.java | 52 ++---
.../java/net/java/html/json/KeywordsTest.java | 52 ++---
.../java/html/json/MapModelNotMutableTest.java | 52 ++---
.../java/net/java/html/json/MapModelTest.java | 52 ++---
.../net/java/html/json/ModelProcessorTest.java | 52 ++---
.../test/java/net/java/html/json/ModelTest.java | 52 ++---
.../java/net/java/html/json/ModelsTest.java | 52 ++---
.../java/net/java/html/json/OperationTest.java | 52 ++---
.../java/net/java/html/json/PersonImpl.java | 52 ++---
.../net/java/html/json/PrimitiveArrayTest.java | 52 ++---
json/src/test/java/net/java/html/json/Sex.java | 52 ++---
.../test/java/net/java/html/json/TypesTest.java | 52 ++---
.../java/net/java/html/json/UnderscoreTest.java | 52 ++---
.../net/java/html/json/WebSocketCallTest.java | 52 ++---
.../net/java/html/json/sub/StreetCntrl.java | 52 ++---
.../netbeans/html/json/impl/BuilderTest.java | 52 ++---
.../html/json/impl/ConstructorTest.java | 52 ++---
.../netbeans/html/json/impl/DeepChangeTest.java | 52 ++---
.../netbeans/html/json/impl/EmployeeImpl.java | 52 ++---
.../netbeans/html/json/impl/EmployerTest.java | 52 ++---
.../netbeans/html/json/impl/InfinityTest.java | 52 ++---
.../netbeans/html/json/impl/JSONListTest.java | 52 ++---
.../org/netbeans/html/json/impl/JSONTest.java | 52 ++---
.../html/json/impl/NoPropertiesTest.java | 52 ++---
.../netbeans/html/json/impl/OnReceiveTest.java | 52 ++---
.../html/json/impl/ParallelChangeTest.java | 52 ++---
.../org/netbeans/html/json/impl/ToDoTest.java | 52 ++---
ko-felix-test/pom.xml | 52 ++---
.../ko/felix/test/KnockoutFelixTCKImpl.java | 52 ++---
.../html/ko/felix/test/DynamicHTTP.java | 52 ++---
.../org/netbeans/html/ko/felix/test/KOFx.java | 52 ++---
.../ko/felix/test/KnockoutFelixAriesIT.java | 52 ++---
.../html/ko/felix/test/KnockoutFelixIT.java | 52 ++---
.../org/netbeans/html/ko/felix/test/test.html | 56 ++---
ko-osgi-test/pom.xml | 52 ++---
.../ko/osgi/test/KnockoutEquinoxTCKImpl.java | 52 ++---
.../netbeans/html/ko/osgi/test/DynamicHTTP.java | 52 ++---
.../org/netbeans/html/ko/osgi/test/KOFx.java | 52 ++---
.../html/ko/osgi/test/KnockoutEquinoxIT.java | 52 ++---
.../org/netbeans/html/ko/osgi/test/test.html | 56 ++---
ko-ws-tyrus/pom.xml | 52 ++---
.../org/netbeans/html/wstyrus/LoadJSON.java | 52 ++---
.../org/netbeans/html/wstyrus/TyrusContext.java | 52 ++---
.../netbeans/html/wstyrus/TyrusDynamicHTTP.java | 52 ++---
.../java/org/netbeans/html/wstyrus/TyrusFX.java | 52 ++---
.../html/wstyrus/TyrusKnockoutTest.java | 52 ++---
.../org/netbeans/html/wstyrus/test.html | 56 ++---
ko4j/pom.xml | 52 ++---
.../main/java/org/netbeans/html/ko4j/KO4J.java | 52 ++---
.../java/org/netbeans/html/ko4j/KOSockets.java | 52 ++---
.../java/org/netbeans/html/ko4j/KOTech.java | 52 ++---
.../java/org/netbeans/html/ko4j/KOTransfer.java | 52 ++---
.../java/org/netbeans/html/ko4j/Knockout.java | 52 ++---
.../java/org/netbeans/html/ko4j/LoadJSON.java | 52 ++---
.../java/org/netbeans/html/ko4j/LoadWS.java | 52 ++---
.../org/netbeans/html/ko4j/DynamicHTTP.java | 52 ++---
.../html/ko4j/InitializeKnockoutTest.java | 52 ++---
.../test/java/org/netbeans/html/ko4j/KOFx.java | 52 ++---
.../org/netbeans/html/ko4j/KnockoutFXTest.java | 52 ++---
.../netbeans/html/ko4j/LessCallbacksCheck.java | 52 ++---
.../html/ko4j/OffThreadInitializationTest.java | 52 ++---
.../html/ko4j/ReferenceKnockoutTest.java | 52 ++---
.../resources/org/netbeans/html/ko4j/test.html | 56 ++---
pom.xml | 82 ++++----
sound/pom.xml | 52 ++---
.../java/net/java/html/sound/AudioClip.java | 52 ++---
.../main/java/net/java/html/sound/package.html | 56 ++---
.../html/sound/impl/BrowserAudioEnv.java | 52 ++---
.../html/sound/spi/AudioEnvironment.java | 52 ++---
.../org/netbeans/html/sound/spi/package.html | 56 ++---
src/main/javadoc/overview.html | 56 ++---
xhr4j/pom.xml | 52 ++---
.../java/org/netbeans/html/xhr4j/LoadJSON.java | 52 ++---
.../html/xhr4j/XmlHttpResourceContext.java | 52 ++---
.../netbeans/html/xhr4j/JsonDynamicHTTP.java | 52 ++---
.../java/org/netbeans/html/xhr4j/JsonFX.java | 52 ++---
.../netbeans/html/xhr4j/JsonKnockoutTest.java | 52 ++---
.../resources/org/netbeans/html/xhr4j/test.html | 56 ++---
261 files changed, 3910 insertions(+), 9820 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/.gitignore
----------------------------------------------------------------------
diff --cc .gitignore
index c23ef8d,427c21d..4352b77
--- a/.gitignore
+++ b/.gitignore
@@@ -1,2 -1,2 +1,2 @@@
*/target/
- /target/
-target/
++/target/
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/.travis.yml
----------------------------------------------------------------------
diff --cc .travis.yml
index ba7c1a9,0000000..2e63b0f
mode 100644,000000..100644
--- a/.travis.yml
+++ b/.travis.yml
@@@ -1,13 -1,0 +1,31 @@@
++#
++# 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.
++#
+language: java
+before_script:
+ - export DISPLAY=:99.0
+ - sh -e /etc/init.d/xvfb start || echo No X11
+ - sleep 3
+script:
+ - jdk_switcher use oraclejdk8 || java -version
+ - java -version
+ - mvn install -DskipTests
+ - mvn verify
+os:
+ - linux
+
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot-agent-test/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot-fx/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot-fx/src/main/java/org/netbeans/html/boot/fx/AbstractFXPresenter.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot-fx/src/main/java/org/netbeans/html/boot/fx/FXBrwsr.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot-fx/src/main/java/org/netbeans/html/boot/fx/WatchDir.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot-fx/src/test/java/org/netbeans/html/boot/fx/Periodicaly.java
----------------------------------------------------------------------
diff --cc boot-fx/src/test/java/org/netbeans/html/boot/fx/Periodicaly.java
index 8c663e5,0000000..f0e6e66
mode 100644,000000..100644
--- a/boot-fx/src/test/java/org/netbeans/html/boot/fx/Periodicaly.java
+++ b/boot-fx/src/test/java/org/netbeans/html/boot/fx/Periodicaly.java
@@@ -1,103 -1,0 +1,79 @@@
+/**
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
++ * 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
+ *
- * Copyright 2013-2014 Oracle and/or its affiliates. All rights reserved.
++ * http://www.apache.org/licenses/LICENSE-2.0
+ *
- * 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 Oracle. Portions Copyright 2013-2016 Oracle. 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.
++ * 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.
+ */
+package org.netbeans.html.boot.fx;
+
+import java.util.Timer;
+import java.util.TimerTask;
+import net.java.html.BrwsrCtx;
+import net.java.html.js.JavaScriptBody;
+
+// BEGIN: org.netbeans.html.boot.fx.Periodicaly
+public final class Periodicaly extends TimerTask {
+ private final BrwsrCtx ctx;
+ private int counter;
+
+ private Periodicaly(BrwsrCtx ctx) {
+ // remember the browser context and use it later
+ this.ctx = ctx;
+ this.counter = 0;
+ }
+
+ @Override
+ public void run() {
+ // arrives on wrong thread, needs to be re-scheduled
+ ctx.execute(new Runnable() {
+ @Override
+ public void run() {
+ codeThatNeedsToBeRunInABrowserEnvironment();
+ }
+ });
+ }
+
+ // called when your page is ready
+ public static void onPageLoad(String... args) throws Exception {
+ // the context at the time of page initialization
+ BrwsrCtx initialCtx = BrwsrCtx.findDefault(Periodicaly.class);
+ // the task that is associated with context
+ Periodicaly task = new Periodicaly(initialCtx);
+ // creates a new timer
+ Timer t = new Timer("Move the box");
+ // run the task every 100ms
+ t.scheduleAtFixedRate(task, 0, 100);
+ }
+
+ @JavaScriptBody(args = { "a", "b" }, body = "return a + b")
+ private static native int plus(int a, int b);
+
+ void codeThatNeedsToBeRunInABrowserEnvironment() {
+ // invokes JavaScript function in the browser environment
+ counter = plus(counter, 1);
+// FINISH: org.netbeans.html.boot.fx.Periodicaly
+
+ synchronized (Periodicaly.class) {
+ globalCounter = counter;
+ Periodicaly.class.notifyAll();
+ }
+ }
+ static int globalCounter;
+ static synchronized void assertTen() throws InterruptedException {
+ while (globalCounter < 10) {
+ Periodicaly.class.wait();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot-fx/src/test/java/org/netbeans/html/boot/fx/PeriodicalyTest.java
----------------------------------------------------------------------
diff --cc boot-fx/src/test/java/org/netbeans/html/boot/fx/PeriodicalyTest.java
index f3a3d21,0000000..327ba85
mode 100644,000000..100644
--- a/boot-fx/src/test/java/org/netbeans/html/boot/fx/PeriodicalyTest.java
+++ b/boot-fx/src/test/java/org/netbeans/html/boot/fx/PeriodicalyTest.java
@@@ -1,64 -1,0 +1,40 @@@
+/**
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
++ * 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
+ *
- * Copyright 2013-2014 Oracle and/or its affiliates. All rights reserved.
++ * http://www.apache.org/licenses/LICENSE-2.0
+ *
- * 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 Oracle. Portions Copyright 2013-2016 Oracle. 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.
++ * 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.
+ */
+package org.netbeans.html.boot.fx;
+
+import java.util.concurrent.Executors;
+import net.java.html.boot.BrowserBuilder;
+import org.testng.annotations.Test;
+
+public final class PeriodicalyTest {
+ @Test
+ public void runPeriodically() throws Exception {
+ final BrowserBuilder bb = BrowserBuilder.newBrowser(new FXPresenter())
+ .loadPage("empty.html")
+ .loadClass(Periodicaly.class)
+ .invoke("onPageLoad");
+ Executors.newSingleThreadExecutor().execute(new Runnable() {
+ @Override
+ public void run() {
+ bb.showAndWait();
+ }
+ });
+ Periodicaly.assertTen();
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot-fx/src/test/java/org/netbeans/html/boot/fx/PopupTest.java
----------------------------------------------------------------------
diff --cc boot-fx/src/test/java/org/netbeans/html/boot/fx/PopupTest.java
index a2963bb,0000000..c7676b8
mode 100644,000000..100644
--- a/boot-fx/src/test/java/org/netbeans/html/boot/fx/PopupTest.java
+++ b/boot-fx/src/test/java/org/netbeans/html/boot/fx/PopupTest.java
@@@ -1,127 -1,0 +1,103 @@@
+/**
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
++ * 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
+ *
- * Copyright 2013-2014 Oracle and/or its affiliates. All rights reserved.
++ * http://www.apache.org/licenses/LICENSE-2.0
+ *
- * 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 Oracle. Portions Copyright 2013-2016 Oracle. 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.
++ * 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.
+ */
+package org.netbeans.html.boot.fx;
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
+import javafx.stage.Stage;
+import net.java.html.BrwsrCtx;
+import net.java.html.boot.BrowserBuilder;
+import net.java.html.js.JavaScriptBody;
+import org.netbeans.html.boot.spi.Fn;
+import static org.testng.Assert.*;
+import org.testng.annotations.Test;
+
+/**
+ *
+ * @author Jaroslav Tulach
+ */
+public class PopupTest {
+ public PopupTest() {
+ }
+
+ @JavaScriptBody(args = { "page" }, body =
+ "return window.open(page, 'secondary', 'width=300,height=150');"
+ )
+ private static native Object openSecondaryWindow(String page);
+
+ @Test public void checkReload() throws Throwable {
+ final Throwable[] arr = { null };
+
+ class WhenInitialized implements Runnable {
+ CountDownLatch cdl = new CountDownLatch(1);
+ AbstractFXPresenter p;
+ BrwsrCtx ctx;
+
+ @Override
+ public void run() {
+ try {
+ p = (AbstractFXPresenter) Fn.activePresenter();
+ assertNotNull(p, "Presenter is defined");
+ ctx = BrwsrCtx.findDefault(WhenInitialized.class);
+ } catch (Throwable ex) {
+ arr[0] = ex;
+ } finally {
+ cdl.countDown();
+ }
+ }
+ }
+ WhenInitialized when = new WhenInitialized();
+
+ final BrowserBuilder bb = BrowserBuilder.newBrowser().loadClass(PopupTest.class).
+ loadPage("empty.html").
+ loadFinished(when);
+
+ class ShowBrowser implements Runnable {
+ @Override
+ public void run() {
+ bb.showAndWait();
+ }
+ }
+
+ Executors.newSingleThreadExecutor().submit(new ShowBrowser());
+ when.cdl.await();
+ if (arr[0] != null) throw arr[0];
+
+ Stage s = FXBrwsr.findStage();
+ assertEquals(s.getTitle(), "FX Presenter Harness");
+
+ final Object[] window = new Object[1];
+ final CountDownLatch openWindow = new CountDownLatch(1);
+ when.ctx.execute(new Runnable() {
+ @Override
+ public void run() {
+ TitleTest.changeTitle("First window");
+ window[0] = openSecondaryWindow("second.html");
+ openWindow.countDown();
+ }
+ });
+
+ openWindow.await(5, TimeUnit.SECONDS);
+
+ assertNotNull(window[0], "Second window opened");
+
+ assertEquals(s.getTitle(), "First window", "The title is kept");
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot-fx/src/test/resources/org/netbeans/html/boot/fx/second.html
----------------------------------------------------------------------
diff --cc boot-fx/src/test/resources/org/netbeans/html/boot/fx/second.html
index a450f29,0000000..12a706d
mode 100644,000000..100644
--- a/boot-fx/src/test/resources/org/netbeans/html/boot/fx/second.html
+++ b/boot-fx/src/test/resources/org/netbeans/html/boot/fx/second.html
@@@ -1,55 -1,0 +1,31 @@@
+<!--
+
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
-
- Copyright 2013-2014 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 Oracle. Portions Copyright 2013-2016 Oracle. 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.
++ 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.
+
+-->
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Second Window</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta name="viewport" content="width=device-width">
+ </head>
+ <body>
+ <div>Second Window</div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot-script/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot-script/src/test/java/net/java/html/boot/script/ko4j/KnockoutEnvJSTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot-truffle/src/main/java/net/java/html/boot/truffle/JavaObject.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot-truffle/src/test/java/net/java/html/boot/truffle/TruffleJavaScriptTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/context/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/context/src/main/java/net/java/html/BrwsrCtx.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/equinox-agentclass-hook/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/geo/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/html4j-maven-plugin/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/json-tck/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/json-tck/src/main/java/net/java/html/js/tests/Bodies.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/json-tck/src/main/java/net/java/html/js/tests/GCBodyTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/json-tck/src/main/java/net/java/html/js/tests/JavaScriptBodyTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/json-tck/src/main/java/org/netbeans/html/json/tck/package.html
----------------------------------------------------------------------
diff --cc json-tck/src/main/java/org/netbeans/html/json/tck/package.html
index 4e1eb4a,0000000..ed0f0ba
mode 100644,000000..100644
--- a/json-tck/src/main/java/org/netbeans/html/json/tck/package.html
+++ b/json-tck/src/main/java/org/netbeans/html/json/tck/package.html
@@@ -1,56 -1,0 +1,32 @@@
+<!--
+
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
-
- Copyright 2013-2014 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 Oracle. Portions Copyright 2013-2016 Oracle. 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.
++ 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.
+
+-->
+<!DOCTYPE html>
+<html>
+ <head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ </head>
+ <body>
+ <div>Entry point to the
+ <a href="KnockoutTCK.html">test compatibility kit</a>.
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/json/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/json/src/main/java/org/netbeans/html/json/impl/ModelProcessor.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/ko-felix-test/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/ko-osgi-test/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/ko-ws-tyrus/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/ko4j/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/ko4j/src/main/java/org/netbeans/html/ko4j/Knockout.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/sound/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/src/main/javadoc/overview.html
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/xhr4j/pom.xml
----------------------------------------------------------------------
[10/28] incubator-netbeans-html4j git commit: Using .gitignore rather
than .hgignore
Posted by jt...@apache.org.
Using .gitignore rather than .hgignore
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/eca44738
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/eca44738
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/eca44738
Branch: refs/heads/master
Commit: eca447380c1c08b1d0687089c0cd6564f319ca76
Parents: e95bb20
Author: Jaroslav Tulach <jt...@netbeans.org>
Authored: Sat Jan 14 05:18:20 2017 +0100
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
.gitignore | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/eca44738/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..c23ef8d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+*/target/
+/target/
\ No newline at end of file
[16/28] incubator-netbeans-html4j git commit: Ignore also JDK8u31
Posted by jt...@apache.org.
Ignore also JDK8u31
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/a360ea45
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/a360ea45
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/a360ea45
Branch: refs/heads/master
Commit: a360ea458659990ded755bb0e36551a4cc6d0567
Parents: 411a122
Author: Jaroslav Tulach <jt...@netbeans.org>
Authored: Tue Jan 17 07:29:41 2017 +0100
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
.../test/java/net/java/html/boot/script/ko4j/KnockoutEnvJSTest.java | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/a360ea45/boot-script/src/test/java/net/java/html/boot/script/ko4j/KnockoutEnvJSTest.java
----------------------------------------------------------------------
diff --git a/boot-script/src/test/java/net/java/html/boot/script/ko4j/KnockoutEnvJSTest.java b/boot-script/src/test/java/net/java/html/boot/script/ko4j/KnockoutEnvJSTest.java
index 0ffccb2..3e23b32 100644
--- a/boot-script/src/test/java/net/java/html/boot/script/ko4j/KnockoutEnvJSTest.java
+++ b/boot-script/src/test/java/net/java/html/boot/script/ko4j/KnockoutEnvJSTest.java
@@ -155,6 +155,7 @@ public final class KnockoutEnvJSTest extends KnockoutTCK {
final String ver = System.getProperty("java.runtime.version"); // NOI18N
if (
ver.startsWith("1.8.0_25") ||
+ ver.startsWith("1.8.0_31") ||
ver.startsWith("1.8.0_40")
) {
return "Broken due to JDK-8047764";
[09/28] incubator-netbeans-html4j git commit: Manage the Java objects
on the VM side, without passing them to JavaFX WebView
Posted by jt...@apache.org.
Manage the Java objects on the VM side, without passing them to JavaFX WebView
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/e95bb204
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/e95bb204
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/e95bb204
Branch: refs/heads/master
Commit: e95bb2042e28c609269f33182200072932eb4370
Parents: 323e9ba
Author: Jaroslav Tulach <jt...@netbeans.org>
Authored: Sat Jan 14 05:16:33 2017 +0100
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
.../html/boot/fx/AbstractFXPresenter.java | 331 +++++++++++++++----
.../java/net/java/html/js/tests/GCBodyTest.java | 1 -
2 files changed, 268 insertions(+), 64 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/e95bb204/boot-fx/src/main/java/org/netbeans/html/boot/fx/AbstractFXPresenter.java
----------------------------------------------------------------------
diff --git a/boot-fx/src/main/java/org/netbeans/html/boot/fx/AbstractFXPresenter.java b/boot-fx/src/main/java/org/netbeans/html/boot/fx/AbstractFXPresenter.java
index 9164140..063f5af 100644
--- a/boot-fx/src/main/java/org/netbeans/html/boot/fx/AbstractFXPresenter.java
+++ b/boot-fx/src/main/java/org/netbeans/html/boot/fx/AbstractFXPresenter.java
@@ -47,10 +47,16 @@ import java.io.Closeable;
import java.io.IOException;
import java.io.Reader;
import java.lang.ref.WeakReference;
+import java.lang.reflect.Array;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
+import java.util.Map;
+import java.util.NavigableSet;
+import java.util.TreeSet;
import java.util.concurrent.Executor;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -59,6 +65,7 @@ import javafx.scene.Parent;
import javafx.scene.layout.BorderPane;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
+import netscape.javascript.JSException;
import netscape.javascript.JSObject;
import org.netbeans.html.boot.spi.Fn;
@@ -76,7 +83,9 @@ Fn.KeepAlive, Fn.ToJavaScript, Fn.FromJavaScript, Executor, Cloneable {
// transient - e.g. not cloneable
private JSObject arraySize;
private JSObject wrapArrImpl;
+ private JSObject newPOJOImpl;
private Object undefined;
+ private JavaValues values;
@Override
protected AbstractFXPresenter clone() {
@@ -85,6 +94,8 @@ Fn.KeepAlive, Fn.ToJavaScript, Fn.FromJavaScript, Executor, Cloneable {
p.arraySize = null;
p.wrapArrImpl = null;
p.undefined = null;
+ p.newPOJOImpl = null;
+ p.values = null;
return p;
} catch (CloneNotSupportedException ex) {
throw new IllegalStateException(ex);
@@ -209,6 +220,13 @@ Fn.KeepAlive, Fn.ToJavaScript, Fn.FromJavaScript, Executor, Cloneable {
return wrapArr;
}
+ private final JavaValues values() {
+ if (values == null) {
+ values = new JavaValues();
+ }
+ return values;
+ }
+
private final JSObject wrapArrFn() {
if (wrapArrImpl == null) {
try {
@@ -225,6 +243,25 @@ Fn.KeepAlive, Fn.ToJavaScript, Fn.FromJavaScript, Executor, Cloneable {
return wrapArrImpl;
}
+ JSObject createPOJOWrapper(int hash, int id) {
+ if (newPOJOImpl == null) {
+ try {
+ newPOJOImpl = (JSObject) defineJSFn(
+ "var k = {};\n" +
+ "k.fxBrwsrId = function(hash, id) {\n" +
+ " return {\n" +
+ " 'fxBrwsrId' : function(callback) { callback.hashAndId(hash, id); }\n" +
+ " }\n" +
+ "};\n" +
+ "return k;\n", new String[] { "callback" }, null
+ ).invokeImpl(null, false);
+ } catch (Exception ex) {
+ throw new IllegalStateException(ex);
+ }
+ }
+ return (JSObject) newPOJOImpl.call("fxBrwsrId", hash, id);
+ }
+
final Object undefined() {
if (undefined == null) {
undefined = engine.executeScript("undefined");
@@ -232,29 +269,21 @@ Fn.KeepAlive, Fn.ToJavaScript, Fn.FromJavaScript, Executor, Cloneable {
return undefined;
}
- final Object checkArray(Object val) {
- if (!(val instanceof JSObject)) {
- return val;
- }
+ private int getArrayLength(Object val) throws JSException {
int length = ((Number) arraySizeFn().call("array", val, null)).intValue();
- if (length == -1) {
- return val;
- }
+ return length;
+ }
+
+ private Object[] toArray(int length, Object val) throws JSException {
Object[] arr = new Object[length];
arraySizeFn().call("array", val, arr);
- clearUndefinedArray(arr);
+ checkArray(arr);
return arr;
}
- private void clearUndefinedArray(Object[] arr) {
+ private void checkArray(Object[] arr) {
for (int i = 0; i < arr.length; i++) {
- if (arr[i] == undefined) {
- arr[i] = null;
- continue;
- }
- if (arr[i] instanceof Object[]) {
- clearUndefinedArray((Object[])arr[i]);
- }
+ arr[i] = toJava(arr[i]);
}
}
@@ -283,27 +312,63 @@ Fn.KeepAlive, Fn.ToJavaScript, Fn.FromJavaScript, Executor, Cloneable {
@Override
public Object toJava(Object toJS) {
- if (toJS instanceof Weak) {
- toJS = ((Weak)toJS).get();
- }
if (toJS == undefined()) {
return null;
}
- return checkArray(toJS);
+ if (!(toJS instanceof JSObject)) {
+ return toJS;
+ }
+ JSObject js = (JSObject) toJS;
+ int length = getArrayLength(toJS);
+ if (length != -1) {
+ Object[] arr = toArray(length, toJS);
+ System.err.println("converter to Java array:");
+ dumpArray(arr, "");
+ return arr;
+ }
+ return values().realValue(js);
}
@Override
- public Object toJavaScript(Object toReturn) {
- if (toReturn instanceof Object[]) {
- return convertArrays((Object[])toReturn);
- } else {
- if (toReturn instanceof Character) {
- return (int)(Character)toReturn;
+ public Object toJavaScript(Object value) {
+ return toJavaScript(value, true);
+ }
+
+ final Object toJavaScript(Object value, boolean keep) {
+ if (value == null) {
+ return null;
+ }
+ if (value instanceof String) {
+ return value;
+ }
+ if (value instanceof Number) {
+ return value;
+ }
+ if (value instanceof JSObject) {
+ return value;
+ }
+ if (value instanceof Boolean) {
+ return value;
+ }
+ if (value instanceof Character) {
+ return (int) (char) (Character) value;
+ }
+ int len = isArray(value);
+ if (len >= 0) {
+ Object[] copy = new Object[len];
+ for (int i = 0; i < len; i++) {
+ copy[i] = toJavaScript(Array.get(value, i));
}
- return toReturn;
+ final JSObject wrapArr = (JSObject)wrapArrFn().call("array", copy); // NOI18N
+ return wrapArr;
}
+ if (value.getClass().getName().endsWith("$JsCallbacks$")) {
+ return value;
+ }
+ return values().wrap(value, keep);
}
+
@Override public void execute(final Runnable r) {
if (Platform.isFxApplicationThread()) {
Closeable c = Fn.activate(this);
@@ -336,6 +401,15 @@ Fn.KeepAlive, Fn.ToJavaScript, Fn.FromJavaScript, Executor, Cloneable {
}
}
+ private void dumpArray(Object[] arr, String spaces) {
+ for (int i = 0; i < arr.length; i++) {
+ System.err.println(spaces + "[" + i + "] = " + arr[i]);
+ if (arr[i] instanceof Object[]) {
+ dumpArray((Object[]) arr[i], spaces + " ");
+ }
+ }
+ }
+
private static final class JSFn extends Fn {
private final JSObject fn;
@@ -364,37 +438,23 @@ Fn.KeepAlive, Fn.ToJavaScript, Fn.FromJavaScript, Executor, Cloneable {
LOG.log(Level.FINER, " params: {0}", Arrays.asList(args));
}
List<Object> all = new ArrayList<Object>(args.length + 1);
- all.add(thiz == null ? fn : thiz);
+ all.add(thiz == null ? presenter.undefined() : thiz);
for (int i = 0; i < args.length; i++) {
Object conv = args[i];
if (arrayChecks) {
- if (args[i] instanceof Object[]) {
- Object[] arr = (Object[]) args[i];
- conv = presenter.convertArrays(arr);
- }
- if (conv != null && keepAlive != null &&
- !keepAlive[i] && !isJSReady(conv) &&
- !conv.getClass().getSimpleName().equals("$JsCallbacks$") // NOI18N
- ) {
- conv = new Weak(conv);
- }
- if (conv instanceof Character) {
- conv = (int)(Character)conv;
- }
+ boolean alive = keepAlive == null || keepAlive[i];
+ conv = presenter.toJavaScript(conv, alive);
}
all.add(conv);
}
Object ret = fn.call("call", all.toArray()); // NOI18N
- if (ret instanceof Weak) {
- ret = ((Weak)ret).get();
- }
- if (ret == fn || ret == presenter.undefined()) {
+ if (ret == presenter.undefined()) {
return null;
}
if (!arrayChecks) {
return ret;
}
- return presenter.checkArray(ret);
+ return presenter.toJava(ret);
} catch (Error t) {
t.printStackTrace();
throw t;
@@ -405,29 +465,174 @@ Fn.KeepAlive, Fn.ToJavaScript, Fn.FromJavaScript, Executor, Cloneable {
}
}
- private static boolean isJSReady(Object obj) {
- if (obj == null) {
- return true;
+ protected int isArray(Object value) {
+ try {
+ return Array.getLength(value);
+ } catch (IllegalArgumentException ex) {
+ return -1;
+ }
+ }
+
+ private interface Ref extends Comparable<Ref> {
+ Object value();
+ int id();
+ JSObject jsObj();
+ }
+
+ private final class WeakRef extends WeakReference<Object> implements Ref {
+ private final int id;
+ private final JSObject js;
+
+ WeakRef(Object value, int id, JSObject js) {
+ super(value);
+ this.id = id;
+ this.js = js;
+ }
+
+ @Override
+ public Object value() {
+ return get();
+ }
+
+ @Override
+ public int id() {
+ return id;
+ }
+
+ @Override
+ public JSObject jsObj() {
+ return js;
+ }
+
+ @Override
+ public int compareTo(Ref o) {
+ return this.id() - o.id();
+ }
+ }
+
+ private final class StrongRef implements Ref {
+ private final Object value;
+ private final int id;
+ private final JSObject js;
+
+ StrongRef(Object value, int id, JSObject js) {
+ this.value = value;
+ this.id = id;
+ this.js = js;
}
- if (obj instanceof String) {
- return true;
+
+ @Override
+ public Object value() {
+ return value;
}
- if (obj instanceof Number) {
- return true;
+
+ @Override
+ public int id() {
+ return id;
}
- if (obj instanceof JSObject) {
- return true;
+
+ @Override
+ public JSObject jsObj() {
+ return js;
}
- if (obj instanceof Character) {
- return true;
+
+ @Override
+ public int compareTo(Ref o) {
+ return this.id() - o.id();
}
- return false;
}
- private static final class Weak extends WeakReference<Object> {
- public Weak(Object referent) {
- super(referent);
- assert !(referent instanceof Weak);
+ public final class JavaValues {
+ private final Map<Integer,NavigableSet<Ref>> values;
+ private int hash;
+ private int id;
+
+ JavaValues() {
+ this.values = new HashMap<Integer,NavigableSet<Ref>>();
}
- } // end of Weak
+
+ synchronized final JSObject wrap(Object pojo, boolean keep) {
+ int hash = System.identityHashCode(pojo);
+ NavigableSet<Ref> refs = values.get(hash);
+ if (refs != null) {
+ for (Ref ref : refs) {
+ if (ref.value() == pojo) {
+ return ref.jsObj();
+ }
+ }
+ } else {
+ refs = new TreeSet<Ref>();
+ values.put(hash, refs);
+ }
+ int id = findId(refs);
+ JSObject js = createPOJOWrapper(hash, id);
+ Ref newRef = keep ? new StrongRef(pojo, id, js) : new WeakRef(pojo, id, js);
+ refs.add(newRef);
+ return newRef.jsObj();
+ }
+
+ private int findId(NavigableSet<Ref> refs) {
+ if (refs.isEmpty()) {
+ return 0;
+ }
+ final Ref first = refs.first();
+ int previous = first.id();
+ if (previous > 0) {
+ return 0;
+ }
+ for (Ref ref : refs.tailSet(first, false)) {
+ int next = ref.id();
+ if (previous + 1 < next) {
+ return previous + 1;
+ }
+ previous = next;
+ }
+ return previous + 1;
+ }
+
+ public void hashAndId(int hash, int id) {
+ assert this.hash == -1;
+ assert this.id == -1;
+ this.hash = hash;
+ this.id = id;
+ }
+
+ Object realValue(JSObject obj) {
+ Object java = obj.getMember("fxBrwsrId");
+ if (java instanceof JSObject) {
+ for (;;) {
+ int resultHash;
+ int resultId;
+ synchronized (this) {
+ this.hash = -1;
+ this.id = -1;
+ obj.call("fxBrwsrId", this);
+ assert this.hash != -1;
+ assert this.id != -1;
+ resultHash = this.hash;
+ resultId = this.id;
+ }
+
+ final NavigableSet<Ref> refs = values.get(resultHash);
+ Iterator<Ref> it = refs.iterator();
+ while (it.hasNext()) {
+ Ref next = it.next();
+ Object pojo = next.value();
+ if (next.id() == resultId) {
+ return pojo;
+ }
+ if (pojo == null) {
+ it.remove();
+ }
+ }
+ if (refs.isEmpty()) {
+ values.remove(resultHash);
+ }
+ }
+ }
+ return obj;
+ }
+ }
+
+
}
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/e95bb204/json-tck/src/main/java/net/java/html/js/tests/GCBodyTest.java
----------------------------------------------------------------------
diff --git a/json-tck/src/main/java/net/java/html/js/tests/GCBodyTest.java b/json-tck/src/main/java/net/java/html/js/tests/GCBodyTest.java
index 5baa865..cbb4984 100644
--- a/json-tck/src/main/java/net/java/html/js/tests/GCBodyTest.java
+++ b/json-tck/src/main/java/net/java/html/js/tests/GCBodyTest.java
@@ -82,7 +82,6 @@ public class GCBodyTest {
int res = Bodies.sumNow(jsSum, 22, 20);
assertEquals(res, 42, "Expecting 42");
- assertGC(ref, "Can disappear!");
if (gcError != null) {
throw gcError;
}
[23/28] incubator-netbeans-html4j git commit: #270013: Prevent
obfuscation of util and unwrapObservable calls
Posted by jt...@apache.org.
#270013: Prevent obfuscation of util and unwrapObservable calls
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/346937fb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/346937fb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/346937fb
Branch: refs/heads/master
Commit: 346937fbc73927af2a0c4def462c73ca70b44c38
Parents: 464b176
Author: Jaroslav Tulach <jt...@netbeans.org>
Authored: Wed Mar 8 09:17:54 2017 +0100
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
ko4j/src/main/java/org/netbeans/html/ko4j/Knockout.java | 2 +-
src/main/javadoc/overview.html | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/346937fb/ko4j/src/main/java/org/netbeans/html/ko4j/Knockout.java
----------------------------------------------------------------------
diff --git a/ko4j/src/main/java/org/netbeans/html/ko4j/Knockout.java b/ko4j/src/main/java/org/netbeans/html/ko4j/Knockout.java
index 3479068..8bd3705 100644
--- a/ko4j/src/main/java/org/netbeans/html/ko4j/Knockout.java
+++ b/ko4j/src/main/java/org/netbeans/html/ko4j/Knockout.java
@@ -72,7 +72,7 @@ final class Knockout extends WeakReference<Object> {
"if (property === null) ret = object;\n" +
"else if (object === null) ret = null;\n" +
"else ret = object[property];\n" +
- "return ret ? ko.utils.unwrapObservable(ret) : null;"
+ "return ret ? ko['utils']['unwrapObservable'](ret) : null;"
)
static Object getProperty(Object object, String property) {
return null;
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/346937fb/src/main/javadoc/overview.html
----------------------------------------------------------------------
diff --git a/src/main/javadoc/overview.html b/src/main/javadoc/overview.html
index cd0cfde..81e9ec4 100644
--- a/src/main/javadoc/overview.html
+++ b/src/main/javadoc/overview.html
@@ -93,6 +93,9 @@
Git repository</a> thanks to
<a target="_blank" href="http://wiki.apidesign.org/wiki/Apache"/>
conversion by Emilian Bold</a>.
+ Better support for obfuscation of knockout module
+ (bug <a target="_blank" href="https://netbeans.org/bugzilla/show_bug.cgi?id=270013"/>
+ 270013</a>).
<h3>Improvements in version 1.3</h3>
[03/28] incubator-netbeans-html4j git commit: Generate @link for each
@OnReceive method for easier navigation to final receive handler
Posted by jt...@apache.org.
Generate @link for each @OnReceive method for easier navigation to final receive handler
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/200266b7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/200266b7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/200266b7
Branch: refs/heads/master
Commit: 200266b7627850633fea20023dd72f87e20eff97
Parents: e9c2a51
Author: Jaroslav Tulach <jt...@netbeans.org>
Authored: Sun Mar 12 16:10:41 2017 +0100
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
.../java/org/netbeans/html/json/impl/ModelProcessor.java | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/200266b7/json/src/main/java/org/netbeans/html/json/impl/ModelProcessor.java
----------------------------------------------------------------------
diff --git a/json/src/main/java/org/netbeans/html/json/impl/ModelProcessor.java b/json/src/main/java/org/netbeans/html/json/impl/ModelProcessor.java
index b719a20..1c2389f 100644
--- a/json/src/main/java/org/netbeans/html/json/impl/ModelProcessor.java
+++ b/json/src/main/java/org/netbeans/html/json/impl/ModelProcessor.java
@@ -1315,14 +1315,21 @@ public final class ModelProcessor extends AbstractProcessor {
}
}
String n = e.getSimpleName().toString();
+ String c = inPckName(clazz, false);
if (isWebSocket) {
- body.append(" /** Performs WebSocket communication. Call with <code>null</code> data parameter\n");
+ body.append(" /** Performs WebSocket communication and then calls {@link ");
+ body.append(c).append("#").append(n).append("}.\n");
+ body.append(" * Call with <code>null</code> data parameter\n");
body.append(" * to open the connection (even if not required). Call with non-null data to\n");
body.append(" * send messages to server. Call again with <code>null</code> data to close the socket.\n");
body.append(" */\n");
if (onR.headers().length > 0) {
error("WebSocket spec does not support headers", e);
}
+ } else {
+ body.append(" /** Performs network communication and then calls {@link ");
+ body.append(c).append("#").append(n).append("}.\n");
+ body.append(" */\n");
}
body.append(" public void ").append(n).append("(");
StringBuilder urlBefore = new StringBuilder();
[21/28] incubator-netbeans-html4j git commit: Using codesnippet
Javadoc doclet to take the Periodicaly example from real source code
Posted by jt...@apache.org.
Using codesnippet Javadoc doclet to take the Periodicaly example from real source code
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/23ddadf3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/23ddadf3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/23ddadf3
Branch: refs/heads/master
Commit: 23ddadf364791550ca6319d4b9104556aaaebb8f
Parents: 9c33861
Author: Jaroslav Tulach <jt...@netbeans.org>
Authored: Fri Feb 3 21:13:06 2017 +0100
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
.../org/netbeans/html/boot/fx/Periodicaly.java | 103 +++++++++++++++++++
.../netbeans/html/boot/fx/PeriodicalyTest.java | 64 ++++++++++++
.../src/main/java/net/java/html/BrwsrCtx.java | 32 +-----
pom.xml | 7 ++
4 files changed, 175 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/23ddadf3/boot-fx/src/test/java/org/netbeans/html/boot/fx/Periodicaly.java
----------------------------------------------------------------------
diff --git a/boot-fx/src/test/java/org/netbeans/html/boot/fx/Periodicaly.java b/boot-fx/src/test/java/org/netbeans/html/boot/fx/Periodicaly.java
new file mode 100644
index 0000000..8174192
--- /dev/null
+++ b/boot-fx/src/test/java/org/netbeans/html/boot/fx/Periodicaly.java
@@ -0,0 +1,103 @@
+/**
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2013-2014 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 Oracle. Portions Copyright 2013-2016 Oracle. 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.
+ */
+package org.netbeans.html.boot.fx;
+
+import java.util.Timer;
+import java.util.TimerTask;
+import net.java.html.BrwsrCtx;
+import net.java.html.js.JavaScriptBody;
+
+// BEGIN: org.netbeans.html.boot.fx.Periodicaly
+public final class Periodicaly extends TimerTask {
+ private final BrwsrCtx ctx;
+ private int counter;
+
+ private Periodicaly(BrwsrCtx ctx) {
+ // remember the browser context and use it later
+ this.ctx = ctx;
+ this.counter = 0;
+ }
+
+ @Override
+ public void run() {
+ // arrives on wrong thread, needs to be re-scheduled
+ ctx.execute(new Runnable() {
+ @Override
+ public void run() {
+ codeThatNeedsToBeRunInABrowserEnvironment();
+ }
+ });
+ }
+
+ // called when your page is ready
+ public static void onPageLoad(String... args) throws Exception {
+ // the context at the time of page initialization
+ BrwsrCtx initialCtx = BrwsrCtx.findDefault(Periodicaly.class);
+ // the task that is associated with context
+ Periodicaly task = new Periodicaly(initialCtx);
+ // creates a timer
+ Timer t = new Timer("Move the box");
+ // run the task every 100ms
+ t.scheduleAtFixedRate(task, 0, 100);
+ }
+
+ @JavaScriptBody(args = { "a", "b" }, body = "return a + b")
+ private static native int plus(int a, int b);
+
+ void codeThatNeedsToBeRunInABrowserEnvironment() {
+ // invokes JavaScript function in the browser environment
+ counter = plus(counter, 1);
+// FINISH: org.netbeans.html.boot.fx.Periodicaly
+
+ synchronized (Periodicaly.class) {
+ globalCounter = counter;
+ Periodicaly.class.notifyAll();
+ }
+ }
+ static int globalCounter;
+ static synchronized void assertTen() throws InterruptedException {
+ while (globalCounter < 10) {
+ Periodicaly.class.wait();
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/23ddadf3/boot-fx/src/test/java/org/netbeans/html/boot/fx/PeriodicalyTest.java
----------------------------------------------------------------------
diff --git a/boot-fx/src/test/java/org/netbeans/html/boot/fx/PeriodicalyTest.java b/boot-fx/src/test/java/org/netbeans/html/boot/fx/PeriodicalyTest.java
new file mode 100644
index 0000000..f3a3d21
--- /dev/null
+++ b/boot-fx/src/test/java/org/netbeans/html/boot/fx/PeriodicalyTest.java
@@ -0,0 +1,64 @@
+/**
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2013-2014 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 Oracle. Portions Copyright 2013-2016 Oracle. 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.
+ */
+package org.netbeans.html.boot.fx;
+
+import java.util.concurrent.Executors;
+import net.java.html.boot.BrowserBuilder;
+import org.testng.annotations.Test;
+
+public final class PeriodicalyTest {
+ @Test
+ public void runPeriodically() throws Exception {
+ final BrowserBuilder bb = BrowserBuilder.newBrowser(new FXPresenter())
+ .loadPage("empty.html")
+ .loadClass(Periodicaly.class)
+ .invoke("onPageLoad");
+ Executors.newSingleThreadExecutor().execute(new Runnable() {
+ @Override
+ public void run() {
+ bb.showAndWait();
+ }
+ });
+ Periodicaly.assertTen();
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/23ddadf3/context/src/main/java/net/java/html/BrwsrCtx.java
----------------------------------------------------------------------
diff --git a/context/src/main/java/net/java/html/BrwsrCtx.java b/context/src/main/java/net/java/html/BrwsrCtx.java
index 59a4a21..72ac800 100644
--- a/context/src/main/java/net/java/html/BrwsrCtx.java
+++ b/context/src/main/java/net/java/html/BrwsrCtx.java
@@ -132,37 +132,7 @@ public final class BrwsrCtx implements Executor {
* <p>
* <b>Example Using a Timer</b>
* </p>
-<pre>
-<b>public final class</b> Periodicaly <b>extends</b> {@link java.util.TimerTask} {
- <b>private final</b> {@link BrwsrCtx} ctx;
-
- <b>private</b> Periodicaly(BrwsrCtx ctx) {
- // remember the browser context and use it later
- this.ctx = ctx;
- }
-
- <b>public void</b> run() {
- // arrives on wrong thread, needs to be re-scheduled
- ctx.{@link #execute(java.lang.Runnable) execute}(new Runnable() {
- <b>public void</b> run() {
- // code that needs to run in a browser environment
- }
- });
- }
-
- // called when your page is ready
- <b>public static void</b> onPageLoad(String... args) <b>throws</b> Exception {
- // the context at the time of page initialization
- BrwsrCtx initialCtx = BrwsrCtx.findDefault(Periodicaly.<b>class</b>);
- // the task that is associated with context
- Periodicaly task = new Periodicaly(initialCtx);
- // creates a timer
- {@link java.util.Timer} t = new {@link java.util.Timer}("Move the box");
- // run the task every 100ms
- t.{@link java.util.Timer#scheduleAtFixedRate(java.util.TimerTask, long, long) scheduleAtFixedRate}(task, 0, 100);
- }
-}
-</pre>
+ * {@codesnippet org.netbeans.html.boot.fx.Periodicaly}
*
* @param exec the code to execute
* @since 0.7.6
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/23ddadf3/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a19bfcb..d881df6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -199,6 +199,13 @@ org.netbeans.html.boot.impl:org.netbeans.html.boot.fx:org.netbeans.html.context.
<link>http://bits.netbeans.org/8.0/javadoc/org-openide-util-lookup/</link>
<link>http://docs.oracle.com/javase/8/javafx/api/</link>
</links>
+ <doclet>org.apidesign.javadoc.codesnippet.Doclet</doclet>
+ <docletArtifact>
+ <groupId>org.apidesign.javadoc</groupId>
+ <artifactId>codesnippet-doclet</artifactId>
+ <version>0.11</version>
+ </docletArtifact>
+ <additionalparam>-snippetpath "${basedir}"</additionalparam>
</configuration>
</plugin>
<plugin>
[13/28] incubator-netbeans-html4j git commit: Removing debug messages
introduced while fixing #269549
Posted by jt...@apache.org.
Removing debug messages introduced while fixing #269549
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/1fb59945
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/1fb59945
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/1fb59945
Branch: refs/heads/master
Commit: 1fb599452788830c76f1874639b90b7ecb125172
Parents: d97720e
Author: Jaroslav Tulach <jt...@netbeans.org>
Authored: Sun Jan 15 06:33:54 2017 +0100
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
.../org/netbeans/html/boot/fx/AbstractFXPresenter.java | 11 -----------
1 file changed, 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/1fb59945/boot-fx/src/main/java/org/netbeans/html/boot/fx/AbstractFXPresenter.java
----------------------------------------------------------------------
diff --git a/boot-fx/src/main/java/org/netbeans/html/boot/fx/AbstractFXPresenter.java b/boot-fx/src/main/java/org/netbeans/html/boot/fx/AbstractFXPresenter.java
index 063f5af..84e5398 100644
--- a/boot-fx/src/main/java/org/netbeans/html/boot/fx/AbstractFXPresenter.java
+++ b/boot-fx/src/main/java/org/netbeans/html/boot/fx/AbstractFXPresenter.java
@@ -322,8 +322,6 @@ Fn.KeepAlive, Fn.ToJavaScript, Fn.FromJavaScript, Executor, Cloneable {
int length = getArrayLength(toJS);
if (length != -1) {
Object[] arr = toArray(length, toJS);
- System.err.println("converter to Java array:");
- dumpArray(arr, "");
return arr;
}
return values().realValue(js);
@@ -401,15 +399,6 @@ Fn.KeepAlive, Fn.ToJavaScript, Fn.FromJavaScript, Executor, Cloneable {
}
}
- private void dumpArray(Object[] arr, String spaces) {
- for (int i = 0; i < arr.length; i++) {
- System.err.println(spaces + "[" + i + "] = " + arr[i]);
- if (arr[i] instanceof Object[]) {
- dumpArray((Object[]) arr[i], spaces + " ");
- }
- }
- }
-
private static final class JSFn extends Fn {
private final JSObject fn;
[25/28] incubator-netbeans-html4j git commit: Alas Truffle is still
too experimental to be part of 1.4 stable release
Posted by jt...@apache.org.
Alas Truffle is still too experimental to be part of 1.4 stable release
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/01d91b25
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/01d91b25
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/01d91b25
Branch: refs/heads/master
Commit: 01d91b2564c935cdc7dc4198386c3e4f651785b9
Parents: a2a28de
Author: Jaroslav Tulach <jt...@netbeans.org>
Authored: Tue Mar 28 12:44:40 2017 +0200
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
pom.xml | 2 ++
src/main/javadoc/overview.html | 2 ++
2 files changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/01d91b25/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 6afecd0..1e6f724 100644
--- a/pom.xml
+++ b/pom.xml
@@ -79,7 +79,9 @@
<module>ko-osgi-test</module>
<module>equinox-agentclass-hook</module>
<module>boot-script</module>
+ <!--
<module>boot-truffle</module>
+ -->
<module>boot-agent-test</module>
<module>xhr4j</module>
</modules>
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/01d91b25/src/main/javadoc/overview.html
----------------------------------------------------------------------
diff --git a/src/main/javadoc/overview.html b/src/main/javadoc/overview.html
index f57b2a0..09f2410 100644
--- a/src/main/javadoc/overview.html
+++ b/src/main/javadoc/overview.html
@@ -81,8 +81,10 @@
<a href="net/java/html/js/package-summary.html#undefined">treated as null</a>.
Better behavior under <a target="_blank" href="https://netbeans.org/bugzilla/show_bug.cgi?id=259132">
multi-threaded load</a>.
+ <!--
Integration with <a href="net/java/html/boot/truffle/package-summary.html">Truffle</a>.
<a target="_blank" href="https://netbeans.org/bugzilla/show_bug.cgi?id=269549"/>
+ -->
Workaround</a> for garbage collector behavior of modern JavaFX WebView
implementations (JDK8 u112 and newer).
JavaFX Presenter can
[12/28] incubator-netbeans-html4j git commit: Considering anything
older than 1.3 a historic version
Posted by jt...@apache.org.
Considering anything older than 1.3 a historic version
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/d97720eb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/d97720eb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/d97720eb
Branch: refs/heads/master
Commit: d97720ebf1d6bc821ad3ab3e75adafcf0b6e556d
Parents: 641578f
Author: Jaroslav Tulach <jt...@netbeans.org>
Authored: Sat Jan 14 05:35:54 2017 +0100
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
src/main/javadoc/overview.html | 49 ++++++++++++++++++++-----------------
1 file changed, 27 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/d97720eb/src/main/javadoc/overview.html
----------------------------------------------------------------------
diff --git a/src/main/javadoc/overview.html b/src/main/javadoc/overview.html
index 0774fc0..b144db3 100644
--- a/src/main/javadoc/overview.html
+++ b/src/main/javadoc/overview.html
@@ -133,8 +133,33 @@
of CORS</a> by handling the {@link net.java.html.json.OnReceive}
connections in Java.
+ <h3>What's new in older versions?</h3>
+
+ <p>
+ Click the
+ <a href="#" onclick="return showHistoric(true)">link</a>
+ to view even more
+ <a href="#" onclick="return showHistoric(true)">historic changes</a>...
+ </p>
+
+ <a name="historic.changes"></a>
+ <div id="historic.changes">
+ <script>
+ function showHistoric(show) {
+ var e = document.getElementById("historic.changes");
+ if (show) {
+ e.style.display="block";
+ } else {
+ e.style.display="none";
+ }
+ return false;
+ }
+ showHistoric(false);
+ </script>
+
<h3>What's Been Improved in Version 1.2.3?</h3>
+ <p>
One can control {@link net.java.html.json.OnReceive#headers() HTTP request headers}
when connecting to server using the {@link net.java.html.json.OnReceive}
annotation. It is possible to have
@@ -146,6 +171,7 @@
demonstrates.
Bugfix of issues <a target="_blank" href='https://netbeans.org/bugzilla/show_bug.cgi?id=250503'>250503</a>,
<a target="_blank" href='https://netbeans.org/bugzilla/show_bug.cgi?id=252987'>252987</a>.
+ </p>
<h3>What's New in Version 1.1?</h3>
@@ -220,27 +246,6 @@
prevent endless debugging when one forgets to do so.
</p>
- <p>
- What's new in older versions? Click the
- <a href="#" onclick="return showHistoric(true)">link</a>
- to view even more
- <a href="#" onclick="return showHistoric(true)">historic changes</a> below:
- </p>
-
- <a name="historic.changes"></a>
- <div id="historic.changes">
- <script>
- function showHistoric(show) {
- var e = document.getElementById("historic.changes");
- if (show) {
- e.style.display="block";
- } else {
- e.style.display="none";
- }
- return false;
- }
- showHistoric(false);
- </script>
<h3>What's New in Version 0.9?</h3>
@@ -358,7 +363,7 @@
$ mvn archetype:generate \
-DarchetypeGroupId=com.dukescript.archetype \
-DarchetypeArtifactId=knockout4j-archetype \
- -DarchetypeVersion=0.11 <em># or newer version, if available</em>
+ -DarchetypeVersion=0.16 <em># or newer version, if available</em>
</pre>
Answer few questions (for example choose <em>myfirstbrwsrpage</em> as artifactId)
and then you can:
[08/28] incubator-netbeans-html4j git commit: Test to verify that
keepAlive=true objects are really kept in memory
Posted by jt...@apache.org.
Test to verify that keepAlive=true objects are really kept in memory
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/323e9ba0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/323e9ba0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/323e9ba0
Branch: refs/heads/master
Commit: 323e9ba0782e85637a7e962531d7d49ca4010803
Parents: c3034c1
Author: Jaroslav Tulach <jt...@netbeans.org>
Authored: Fri Jan 13 19:38:45 2017 +0100
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
.../java/net/java/html/js/tests/Bodies.java | 12 ++++++++++++
.../java/net/java/html/js/tests/GCBodyTest.java | 20 ++++++++++++++++++++
2 files changed, 32 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/323e9ba0/json-tck/src/main/java/net/java/html/js/tests/Bodies.java
----------------------------------------------------------------------
diff --git a/json-tck/src/main/java/net/java/html/js/tests/Bodies.java b/json-tck/src/main/java/net/java/html/js/tests/Bodies.java
index 029a3a2..122f9f7 100644
--- a/json-tck/src/main/java/net/java/html/js/tests/Bodies.java
+++ b/json-tck/src/main/java/net/java/html/js/tests/Bodies.java
@@ -92,6 +92,18 @@ final class Bodies {
"return c.@net.java.html.js.tests.Sum::sum(II)(a, b);"
)
public static native int sumIndirect(Sum c, int a, int b);
+
+ @JavaScriptBody(args = { "c" }, javacall = true, body =
+ "return {\n" +
+ " 'sum' : function(a,b) {\n" +
+ " return c.@net.java.html.js.tests.Sum::sum(II)(a, b);\n" +
+ " }\n" +
+ "};\n"
+ )
+ public static native Object sumDelayed(Sum c);
+
+ @JavaScriptBody(args = { "sum", "a", "b" }, body = "return sum.sum(a, b);")
+ public static native int sumNow(Object sum, int a, int b);
@JavaScriptBody(args = { "arr", "index" }, body = "return arr[index];")
public static native Object select(Object[] arr, int index);
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/323e9ba0/json-tck/src/main/java/net/java/html/js/tests/GCBodyTest.java
----------------------------------------------------------------------
diff --git a/json-tck/src/main/java/net/java/html/js/tests/GCBodyTest.java b/json-tck/src/main/java/net/java/html/js/tests/GCBodyTest.java
index 46d0775..5baa865 100644
--- a/json-tck/src/main/java/net/java/html/js/tests/GCBodyTest.java
+++ b/json-tck/src/main/java/net/java/html/js/tests/GCBodyTest.java
@@ -67,6 +67,26 @@ public class GCBodyTest {
s = null;
assertGC(ref, "Can disappear!");
}
+
+ @KOTest public void callbackInterfaceShallNotDisappear() throws InterruptedException {
+ Sum sum = new Sum();
+ Object jsSum = Bodies.sumDelayed(sum);
+ Reference<?> ref = new WeakReference<Object>(sum);
+ sum = null;
+ IllegalStateException gcError = null;
+ try {
+ assertNotGC(ref, false, "object s should still stay");
+ } catch (IllegalStateException ex) {
+ gcError = ex;
+ }
+
+ int res = Bodies.sumNow(jsSum, 22, 20);
+ assertEquals(res, 42, "Expecting 42");
+ assertGC(ref, "Can disappear!");
+ if (gcError != null) {
+ throw gcError;
+ }
+ }
private Object assignInst() {
Object obj = Bodies.instance(0);
[27/28] incubator-netbeans-html4j git commit: Link to version 1.3
Posted by jt...@apache.org.
Link to version 1.3
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/a2a28de9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/a2a28de9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/a2a28de9
Branch: refs/heads/master
Commit: a2a28de9edbaf0f4a4224be2fe7c00075b9b9c94
Parents: 02c1c60
Author: Jaroslav Tulach <jt...@netbeans.org>
Authored: Tue Mar 28 12:42:09 2017 +0200
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
src/main/javadoc/overview.html | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/a2a28de9/src/main/javadoc/overview.html
----------------------------------------------------------------------
diff --git a/src/main/javadoc/overview.html b/src/main/javadoc/overview.html
index 81e9ec4..f57b2a0 100644
--- a/src/main/javadoc/overview.html
+++ b/src/main/javadoc/overview.html
@@ -628,6 +628,7 @@ $ ls client/src/main/webapp/pages/index.html
online:
<ul>
<li>Current <a target="_blank" href="http://bits.netbeans.org/html+java/dev/">development</a> version
+ <li>Version <a target="_blank" href="http://bits.netbeans.org/html+java/1.3">1.3</a>
<li>Version <a target="_blank" href="http://bits.netbeans.org/html+java/1.2.3">1.2.3</a>
<li>Version <a target="_blank" href="http://bits.netbeans.org/html+java/1.1">1.1</a>
<li>Version <a target="_blank" href="http://bits.netbeans.org/html+java/1.0">1.0</a>
[11/28] incubator-netbeans-html4j git commit: Documenting the #269549
fix in the what's new section
Posted by jt...@apache.org.
Documenting the #269549 fix in the what's new section
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/641578f3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/641578f3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/641578f3
Branch: refs/heads/master
Commit: 641578f398ad7410480719b8c879a7858423ec7c
Parents: eca4473
Author: Jaroslav Tulach <jt...@netbeans.org>
Authored: Sat Jan 14 05:28:56 2017 +0100
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
src/main/javadoc/overview.html | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/641578f3/src/main/javadoc/overview.html
----------------------------------------------------------------------
diff --git a/src/main/javadoc/overview.html b/src/main/javadoc/overview.html
index 850c0d7..0774fc0 100644
--- a/src/main/javadoc/overview.html
+++ b/src/main/javadoc/overview.html
@@ -82,10 +82,19 @@
Better behavior under <a target="_blank" href="https://netbeans.org/bugzilla/show_bug.cgi?id=259132">
multi-threaded load</a>.
Integration with <a href="net/java/html/boot/truffle/package-summary.html">Truffle</a>.
+ <a target="_blank" href="https://netbeans.org/bugzilla/show_bug.cgi?id=269549"/>
+ Workaround</a> for garbage collector behavior of modern JavaFX WebView
+ implementations (JDK8 u112 and newer).
+ Development has switched to
+ <a target="_blank" href="https://github.com/jtulach/html-java-api/"/>
+ Git repository</a> thanks to
+ <a target="_blank" href="http://wiki.apidesign.org/wiki/Apache"/>
+ conversion by Emilian Bold</a>.
+
<h3>Improvements in version 1.3</h3>
- {@link net.java.html.json.Model Model classes} can have
+ {@link net.java.html.json.Model Model classes} can have
{@link net.java.html.json.Model#instance() per-instance private data}.
{@link net.java.html.json.Model Model classes} can generate
builder-like construction methods if builder
[24/28] incubator-netbeans-html4j git commit: Test only on linux for
now
Posted by jt...@apache.org.
Test only on linux for now
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/0bbd3254
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/0bbd3254
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/0bbd3254
Branch: refs/heads/master
Commit: 0bbd32542167bf8ea732d8bb01eafd5ea5649d4b
Parents: a360ea4
Author: Jaroslav Tulach <jt...@netbeans.org>
Authored: Tue Jan 17 08:06:12 2017 +0100
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
.travis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/0bbd3254/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 679156a..ba7c1a9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,4 +10,4 @@ script:
- mvn verify
os:
- linux
- - osx
+
[20/28] incubator-netbeans-html4j git commit: Handle toString() calls
by delegating to java.lang.Object's toString()
Posted by jt...@apache.org.
Handle toString() calls by delegating to java.lang.Object's toString()
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/327e6bdd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/327e6bdd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/327e6bdd
Branch: refs/heads/master
Commit: 327e6bddc967e46f904b4bec1c689e24af788dbd
Parents: edff3d3
Author: Jaroslav Tulach <jt...@netbeans.org>
Authored: Fri Feb 3 07:05:46 2017 +0100
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
.../java/net/java/html/boot/truffle/JavaObject.java | 12 ++++++++++++
1 file changed, 12 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/327e6bdd/boot-truffle/src/main/java/net/java/html/boot/truffle/JavaObject.java
----------------------------------------------------------------------
diff --git a/boot-truffle/src/main/java/net/java/html/boot/truffle/JavaObject.java b/boot-truffle/src/main/java/net/java/html/boot/truffle/JavaObject.java
index 234f396..1618089 100644
--- a/boot-truffle/src/main/java/net/java/html/boot/truffle/JavaObject.java
+++ b/boot-truffle/src/main/java/net/java/html/boot/truffle/JavaObject.java
@@ -46,6 +46,7 @@ import com.oracle.truffle.api.interop.ForeignAccess;
import com.oracle.truffle.api.interop.MessageResolution;
import com.oracle.truffle.api.interop.Resolve;
import com.oracle.truffle.api.interop.TruffleObject;
+import com.oracle.truffle.api.interop.UnknownIdentifierException;
import com.oracle.truffle.api.nodes.Node;
@MessageResolution(receiverType = JavaObject.class, language = TrufflePresenter.JavaLang.class)
@@ -79,4 +80,15 @@ final class JavaObject extends JavaValue implements TruffleObject {
}
}
+ @Resolve(message = "INVOKE")
+ static abstract class Methods extends Node {
+
+ protected Object access(JavaObject javaObject, String methodName, Object[] args) {
+ if (methodName.equals("toString")) {
+ return javaObject.obj.toString();
+ }
+ throw UnknownIdentifierException.raise(methodName);
+ }
+ }
+
}
[18/28] incubator-netbeans-html4j git commit: package.html files
belong next to sources, not to resources
Posted by jt...@apache.org.
package.html files belong next to sources, not to resources
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/02c1c60e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/02c1c60e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/02c1c60e
Branch: refs/heads/master
Commit: 02c1c60e4cf72ed5e0f54ccd051821f9e1da6901
Parents: 200266b
Author: Jaroslav Tulach <jt...@netbeans.org>
Authored: Fri Mar 24 03:49:32 2017 +0100
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
.../org/netbeans/html/json/tck/package.html | 56 +++++++++++++++++++
.../org/netbeans/html/json/tck/package.html | 56 -------------------
.../org/netbeans/html/json/spi/package.html | 59 --------------------
3 files changed, 56 insertions(+), 115 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/02c1c60e/json-tck/src/main/java/org/netbeans/html/json/tck/package.html
----------------------------------------------------------------------
diff --git a/json-tck/src/main/java/org/netbeans/html/json/tck/package.html b/json-tck/src/main/java/org/netbeans/html/json/tck/package.html
new file mode 100644
index 0000000..4e1eb4a
--- /dev/null
+++ b/json-tck/src/main/java/org/netbeans/html/json/tck/package.html
@@ -0,0 +1,56 @@
+<!--
+
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+ Copyright 2013-2014 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 Oracle. Portions Copyright 2013-2016 Oracle. 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.
+
+-->
+<!DOCTYPE html>
+<html>
+ <head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ </head>
+ <body>
+ <div>Entry point to the
+ <a href="KnockoutTCK.html">test compatibility kit</a>.
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/02c1c60e/json-tck/src/main/resources/org/netbeans/html/json/tck/package.html
----------------------------------------------------------------------
diff --git a/json-tck/src/main/resources/org/netbeans/html/json/tck/package.html b/json-tck/src/main/resources/org/netbeans/html/json/tck/package.html
deleted file mode 100644
index 4e1eb4a..0000000
--- a/json-tck/src/main/resources/org/netbeans/html/json/tck/package.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<!--
-
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
-
- Copyright 2013-2014 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 Oracle. Portions Copyright 2013-2016 Oracle. 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.
-
--->
-<!DOCTYPE html>
-<html>
- <head>
- <title></title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- </head>
- <body>
- <div>Entry point to the
- <a href="KnockoutTCK.html">test compatibility kit</a>.
- </div>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/02c1c60e/json/src/main/resources/org/netbeans/html/json/spi/package.html
----------------------------------------------------------------------
diff --git a/json/src/main/resources/org/netbeans/html/json/spi/package.html b/json/src/main/resources/org/netbeans/html/json/spi/package.html
deleted file mode 100644
index 80517a4..0000000
--- a/json/src/main/resources/org/netbeans/html/json/spi/package.html
+++ /dev/null
@@ -1,59 +0,0 @@
-<!--
-
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
-
- Copyright 2013-2014 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 Oracle. Portions Copyright 2013-2016 Oracle. 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.
-
--->
-<!DOCTYPE html>
-<html>
- <head>
- <title></title>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- </head>
- <body>
- <div>Implement
- <a href="Technology.html">Technology</a> and
- <a href="Transfer.html">Transfer</a> and use
- <a href="ContextBuilder.html">ContextBuilder</a> to create an instance
- of <code>Context</code> representing your technology.
- </div>
- </body>
-</html>
[02/28] incubator-netbeans-html4j git commit: Adjusting location of
current main repository
Posted by jt...@apache.org.
Adjusting location of current main repository
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/01328824
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/01328824
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/01328824
Branch: refs/heads/master
Commit: 013288248b1bb40a1d3569993912ceaed63ffd19
Parents: 01d91b2
Author: Jaroslav Tulach <jt...@netbeans.org>
Authored: Tue Mar 28 14:00:44 2017 +0200
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/01328824/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 1e6f724..15a292a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -97,10 +97,10 @@
<url>http://netbeans.org</url>
</organization>
<scm>
- <connection>scm:hg:https://hg.netbeans.org/html4j</connection>
- <developerConnection>scm:hg:https://hg.netbeans.org/html4j</developerConnection>
- <url>https://hg.netbeans.org/html4j</url>
- <tag>default</tag>
+ <connection>scm:git:https://github.com/jtulach/html-java-api.git</connection>
+ <developerConnection>scm:git:https://github.com/jtulach/html-java-api.git</developerConnection>
+ <url>https://github.com/jtulach/html-java-api</url>
+ <tag>master</tag>
</scm>
<repositories>
<repository>
[15/28] incubator-netbeans-html4j git commit: Send the Enum values to
the JavaScript WebView directly to preserve their toString behavior
Posted by jt...@apache.org.
Send the Enum values to the JavaScript WebView directly to preserve their toString behavior
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/411a122b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/411a122b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/411a122b
Branch: refs/heads/master
Commit: 411a122b20f6c3aed575ea8bde7627385166d48e
Parents: 76a37ad
Author: Jaroslav Tulach <jt...@netbeans.org>
Authored: Mon Jan 16 18:49:03 2017 +0100
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
.../java/org/netbeans/html/boot/fx/AbstractFXPresenter.java | 3 +++
json-tck/src/main/java/net/java/html/js/tests/Bodies.java | 3 +++
.../java/net/java/html/js/tests/JavaScriptBodyTest.java | 9 +++++++++
3 files changed, 15 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/411a122b/boot-fx/src/main/java/org/netbeans/html/boot/fx/AbstractFXPresenter.java
----------------------------------------------------------------------
diff --git a/boot-fx/src/main/java/org/netbeans/html/boot/fx/AbstractFXPresenter.java b/boot-fx/src/main/java/org/netbeans/html/boot/fx/AbstractFXPresenter.java
index 84e5398..5454047 100644
--- a/boot-fx/src/main/java/org/netbeans/html/boot/fx/AbstractFXPresenter.java
+++ b/boot-fx/src/main/java/org/netbeans/html/boot/fx/AbstractFXPresenter.java
@@ -351,6 +351,9 @@ Fn.KeepAlive, Fn.ToJavaScript, Fn.FromJavaScript, Executor, Cloneable {
if (value instanceof Character) {
return (int) (char) (Character) value;
}
+ if (value instanceof Enum) {
+ return value;
+ }
int len = isArray(value);
if (len >= 0) {
Object[] copy = new Object[len];
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/411a122b/json-tck/src/main/java/net/java/html/js/tests/Bodies.java
----------------------------------------------------------------------
diff --git a/json-tck/src/main/java/net/java/html/js/tests/Bodies.java b/json-tck/src/main/java/net/java/html/js/tests/Bodies.java
index 122f9f7..641b31f 100644
--- a/json-tck/src/main/java/net/java/html/js/tests/Bodies.java
+++ b/json-tck/src/main/java/net/java/html/js/tests/Bodies.java
@@ -117,6 +117,9 @@ final class Bodies {
@JavaScriptBody(args = { "b" }, body = "return typeof b;")
public static native String typeof(boolean b);
+ @JavaScriptBody(args = { "o" }, body = "return o.toString();")
+ public static native String toString(Object o);
+
@JavaScriptBody(args = { "o" }, body = "return Array.isArray(o);")
public static native boolean isArray(Object o);
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/411a122b/json-tck/src/main/java/net/java/html/js/tests/JavaScriptBodyTest.java
----------------------------------------------------------------------
diff --git a/json-tck/src/main/java/net/java/html/js/tests/JavaScriptBodyTest.java b/json-tck/src/main/java/net/java/html/js/tests/JavaScriptBodyTest.java
index 1663fa8..6a63640 100644
--- a/json-tck/src/main/java/net/java/html/js/tests/JavaScriptBodyTest.java
+++ b/json-tck/src/main/java/net/java/html/js/tests/JavaScriptBodyTest.java
@@ -154,6 +154,15 @@ public class JavaScriptBodyTest {
assertEquals("number", doubleType, "Expecting number type: " + doubleType);
}
+ enum Two {
+ ONE, TWO;
+ }
+
+ @KOTest public void toStringOfAnEnum() {
+ String enumStr = Bodies.toString(Two.ONE);
+ assertEquals(Two.ONE.toString(), enumStr, "Enum toString() used: " + enumStr);
+ }
+
@KOTest public void computeInARunnable() {
final int[] sum = new int[2];
class First implements Runnable {
[17/28] incubator-netbeans-html4j git commit: Avoid using deprecated
source API
Posted by jt...@apache.org.
Avoid using deprecated source API
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/edff3d39
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/edff3d39
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/edff3d39
Branch: refs/heads/master
Commit: edff3d39258677c95f9af655a852b4db64db6ea0
Parents: 36ffe2a
Author: Jaroslav Tulach <jt...@netbeans.org>
Authored: Fri Feb 3 07:05:18 2017 +0100
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
.../java/net/java/html/boot/truffle/TruffleJavaScriptTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/edff3d39/boot-truffle/src/test/java/net/java/html/boot/truffle/TruffleJavaScriptTest.java
----------------------------------------------------------------------
diff --git a/boot-truffle/src/test/java/net/java/html/boot/truffle/TruffleJavaScriptTest.java b/boot-truffle/src/test/java/net/java/html/boot/truffle/TruffleJavaScriptTest.java
index ac4c4f5..0ee3cbe 100644
--- a/boot-truffle/src/test/java/net/java/html/boot/truffle/TruffleJavaScriptTest.java
+++ b/boot-truffle/src/test/java/net/java/html/boot/truffle/TruffleJavaScriptTest.java
@@ -74,7 +74,7 @@ public class TruffleJavaScriptTest {
PolyglotEngine engine = PolyglotEngine.newBuilder().build();
PolyglotEngine.Value result = null;
try {
- result = engine.eval(Source.fromText("6 * 7", "test.js").withMimeType("text/javascript"));
+ result = engine.eval(Source.newBuilder("6 * 7").name("test.js").mimeType("text/javascript").build());
} catch (Exception notSupported) {
if (notSupported.getMessage().contains("text/javascript")) {
return new Object[] { new Skip(true, notSupported.getMessage()) };
[04/28] incubator-netbeans-html4j git commit: Also skip the test when
the download host isn't known
Posted by jt...@apache.org.
Also skip the test when the download host isn't known
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/36ffe2aa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/36ffe2aa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/36ffe2aa
Branch: refs/heads/master
Commit: 36ffe2aa5b7bbf88340f3b3bc777b9c2209bf34e
Parents: 0bbd325
Author: Jaroslav Tulach <jt...@netbeans.org>
Authored: Fri Feb 3 06:16:59 2017 +0100
Committer: Jaroslav Tulach <ja...@apidesign.org>
Committed: Fri Sep 8 17:13:55 2017 +0200
----------------------------------------------------------------------
.../java/net/java/html/boot/script/ko4j/KnockoutEnvJSTest.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/36ffe2aa/boot-script/src/test/java/net/java/html/boot/script/ko4j/KnockoutEnvJSTest.java
----------------------------------------------------------------------
diff --git a/boot-script/src/test/java/net/java/html/boot/script/ko4j/KnockoutEnvJSTest.java b/boot-script/src/test/java/net/java/html/boot/script/ko4j/KnockoutEnvJSTest.java
index 3e23b32..d6487ec 100644
--- a/boot-script/src/test/java/net/java/html/boot/script/ko4j/KnockoutEnvJSTest.java
+++ b/boot-script/src/test/java/net/java/html/boot/script/ko4j/KnockoutEnvJSTest.java
@@ -53,6 +53,7 @@ import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLConnection;
+import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -114,7 +115,7 @@ public final class KnockoutEnvJSTest extends KnockoutTCK {
InputStream is = envNashorn.openStream();
p.loadScript(new InputStreamReader(is));
is.close();
- } catch (ConnectException ex) {
+ } catch (UnknownHostException | ConnectException ex) {
ex.printStackTrace();
return new Object[0];
}