entry : c.entrySet()) {
+ if (entry.getValue() instanceof Closeable) {
+ try {
+ ((Closeable) entry.getValue()).close();
+ } catch (IOException ex) {
+ LOG.log(Level.WARNING, "Error when closing" + entry.getValue(), ex);
+ }
+ cache.remove(entry.getKey());
+ }
+ }
+ }
+ ic.set(instances, null);
+ }
+
+ @JavaScriptBody(args = {"onChange"}, javacall = true, body = "" +
+ " if (typeof ko === 'undefined') return;\n" +
+ " var data = ko.dataFor(window.document.body);\n" +
+ " if (typeof data === 'undefined') return;\n" +
+ " if (typeof data.context === 'undefined') return;\n" +
+ " function update(value) {\n" +
+ " onChange.@org.netbeans.modules.htmlui.PagesLookup::onChange([Ljava/lang/Object;)(value);\n" +
+ " }\n" +
+ " data.context.subscribe(update);\n" +
+ " update(data.context());\n"
+ )
+ private static native void listenOnContext(PagesLookup onChange);
+}
diff --git a/platform/api.htmlui/src/org/netbeans/modules/htmlui/fallback.png b/platform/api.htmlui/src/org/netbeans/modules/htmlui/fallback.png
new file mode 100644
index 000000000000..3a9cc501c140
Binary files /dev/null and b/platform/api.htmlui/src/org/netbeans/modules/htmlui/fallback.png differ
diff --git a/platform/api.htmlui/src/org/netbeans/spi/htmlui/HTMLViewerSpi.java b/platform/api.htmlui/src/org/netbeans/spi/htmlui/HTMLViewerSpi.java
new file mode 100644
index 000000000000..f1916020808d
--- /dev/null
+++ b/platform/api.htmlui/src/org/netbeans/spi/htmlui/HTMLViewerSpi.java
@@ -0,0 +1,288 @@
+/*
+ * 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.
+ */
+package org.netbeans.spi.htmlui;
+
+import java.net.URL;
+import java.util.concurrent.Callable;
+import java.util.function.Consumer;
+import javax.swing.JComponent;
+import org.netbeans.api.htmlui.HTMLComponent;
+import org.netbeans.api.htmlui.HTMLDialog;
+import org.netbeans.api.htmlui.HTMLDialog.OnSubmit;
+import org.netbeans.api.htmlui.OpenHTMLRegistration;
+import org.netbeans.html.boot.spi.Fn;
+import org.netbeans.modules.htmlui.ContextAccessor;
+import org.openide.util.Lookup;
+import org.openide.util.lookup.ServiceProvider;
+
+/** Service provider interface for handing display of HTML based user interface.
+ * Code using {@link OpenHTMLRegistration}, {@link HTMLDialog} and
+ * {@link HTMLComponent} assumes the system to display the HTML page and connect
+ * it with the underlaying code - that's a task for this SPI.
+ *
+ * Implement this interface and register it using {@link ServiceProvider}.
+ * When requested (via {@link #newView(org.netbeans.spi.htmlui.HTMLViewerSpi.Context)} method
+ * show the {@link Context#getPage() HTML page} and run the
+ * {@link Context#onPageLoad() initialization code in the page}. There are
+ * three possible ways to display an HTML user interface:
+ * {@link Context#isWindow() long lasting window},
+ * {@link Context#isDialog() dialog with extra buttons},
+ * a separate {@link #component(java.lang.Object, java.lang.Class)} to
+ * embed into existing Swing or JavaFX interface.
+ *
+ * @param type representing the view as used by this viewer
+ * @param type representing buttons as used by this viewer
+ *
+ * @since 1.23
+ */
+public interface HTMLViewerSpi {
+ /** Context for interacting with the system infrastructure.
+ * When a {@link #newView(org.netbeans.spi.htmlui.HTMLViewerSpi.Context) new HTML view}
+ * is requested, it gets instance of this object which it shall use
+ * to obtain information and make callbacks into the infrastructure.
+ *
+ * @since 1.23
+ */
+ public static final class Context {
+ static {
+ new ContextAccessor() {
+ @Override
+ public Context newContext(
+ ClassLoader loader, URL url, String[] techIds,
+ OnSubmit onSubmit, Consumer lifeCycleCallback, Callable onPageLoad,
+ Class> component
+ ) {
+ return new Context(loader, url, techIds, onSubmit, lifeCycleCallback, onPageLoad, component);
+ }
+ };
+ }
+ private final ClassLoader loader;
+ private final URL url;
+ private final String[] techIds;
+ private final OnSubmit onSubmit;
+ private final Consumer lifeCycleCallback;
+ private final Callable onPageLoad;
+ private final Class> component;
+
+ private Context(
+ ClassLoader loader, URL url, String[] techIds,
+ OnSubmit onSubmit, Consumer lifeCycleCallback,
+ Callable onPageLoad, Class> component
+ ) {
+ this.loader = loader;
+ this.url = url;
+ this.techIds = techIds;
+ this.onSubmit = onSubmit;
+ this.lifeCycleCallback = lifeCycleCallback;
+ this.onPageLoad = onPageLoad;
+ this.component = component;
+ }
+
+ /** {@code true} if a long lasting window shall be displayed.
+ *
+ * @return {@code true} to display the UI as a window
+ * @since 1.23
+ */
+ public boolean isWindow() {
+ return component == null && lifeCycleCallback == null;
+ }
+
+ /** {@code true} if the UI should be presented as a dialog.
+ *
+ * @return {@code true} to display the UI as a dialog
+ * @since 1.23
+ */
+ public boolean isDialog() {
+ return component == null && lifeCycleCallback != null;
+ }
+
+ /** {@code true} if the {@link #isDialog()} is supposed to be blocking.
+ * Blocking dialogs in Swing and JavaFX need special care where one
+ * has to start a nested event queue. Use this method to find out
+ * if such special care is needed.
+ *
+ * @return {@code true} if the dialog is supposed to block the current thread
+ * @since 1.23
+ */
+ public boolean isBlocking() {
+ return isDialog() && onSubmit == null;
+ }
+
+ /** Notify a button has been clicked. As soon as a button is clicked,
+ * use this method to notify the code showing a dialog about such event
+ * and allow the code to handle/dismiss the click.
+ *
+ * @param id the ID of the button or {@code null} representing unconditional
+ * escape or close of the dialog
+ * @return {@code false} if the click should be ignored, {@code true}
+ * if the closing sequence shall continue
+ * @since 1.23
+ */
+ public boolean onSubmit(String id) {
+ if (onSubmit != null && id != null) {
+ if (!onSubmit.onSubmit(id)) {
+ return false;
+ }
+ }
+ if (lifeCycleCallback != null) {
+ lifeCycleCallback.accept(id);
+ }
+ return true;
+ }
+
+ /** Initialize the page inside of a webview. Call this method
+ * once the webview is ready and registered as current
+ * {@link Fn#activePresenter()}. Let the application code
+ * handle its initializations and possibly return a {@link Lookup}
+ * representing the content of the view.
+ *
+ * Dialogs usually return {@code null}, but long living windows
+ * created via {@link OpenHTMLRegistration} usually provide a lookup -
+ * see {@link OpenHTMLRegistration specification} on how to fill its
+ * content.
+ *
+ * @return lookup or {@code null}
+ * @since 1.23
+ */
+ public Lookup onPageLoad() {
+ if (onPageLoad != null) {
+ try {
+ return onPageLoad.call();
+ } catch (Exception ex) {
+ throw raise(RuntimeException.class, ex);
+ }
+ }
+ return null;
+ }
+
+ /** The page to display.
+ *
+ * @return the URL of a page to display
+ * @since 1.23
+ */
+ public URL getPage() {
+ return url;
+ }
+
+ /** The class loader to use. When loading classes or resources
+ * dynamically use this classloader.
+ *
+ * @return the classloader to use
+ * @since 1.23
+ */
+ public ClassLoader getClassLoader() {
+ return loader;
+ }
+
+ /** Set of technologies to prefer.
+ *
+ * @return IDs of technologies to prefer in the HTML user interface
+ * @since 1.23
+ */
+ public String[] getTechIds() {
+ return techIds.clone();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static T raise(Class aClass, Exception ex) throws T {
+ throw (T)ex;
+ }
+ }
+
+ /** Create new HTML view. Based on values of provided context show either:
+ *
+ * window - when {@link Context#isWindow()} handles {@link OpenHTMLRegistration} usages
+ * dialog - when {@link Context#isDialog()} handles {@link HTMLDialog} usages
+ * embedable component - when none of above - handles {@link HTMLComponent} usages
+ *
+ *
+ * @param context information to display and callbacks to the infrastructure
+ * @return any element representing the view or {@code null} if this viewer cannot handle the request
+ * @since 1.23
+ */
+ public HtmlView newView(Context context);
+
+ /** Converts the view to a component of the requested type. This method
+ * is only called if neither {@link Context#isWindow()} and {@link Context#isDialog()}
+ * return {@code true}. Default implementation supports two values of {@code type}:
+ * {@link JComponent} or {@link javafx.scene.Node} class - alternative
+ * implementations of this interface may not support all these types
+ * and may also support other types.
+ *
+ * Requesting {@link Void}{@code .class} means to realize
+ * the component - e.g. make it visible.
+ *
+ * @param the type of requested component
+ * @param view element representing the view
+ * @param type class of the requested component
+ * @return instance of the component
+ * @throws ClassCastException if the {@code type} isn't supported
+ * @since 1.23
+ */
+ public C component(HtmlView view, Class type);
+
+ /** Create a button. Buttons are parsed from the HTML page
+ * as {@link HTMLDialog} specification describes. This method allows
+ * one to create for example Swing buttons outside of the HTML page
+ * to keep consistent user experience.
+ *
+ * @param view the view
+ * @param id identification of the button
+ * @return any element representing the button
+ * @since 1.23
+ */
+ public HtmlButton createButton(HtmlView view, String id);
+
+ /** Extracts ID of a button created by {@link #createButton(java.lang.Object, java.lang.String) }.
+ *
+ * @param view the view
+ * @param b the button
+ * @return the ID associated with the button
+ * @since 1.23
+ */
+ public String getId(HtmlView view, HtmlButton b);
+
+ /** Sets text for a button created by {@link #createButton(java.lang.Object, java.lang.String) }.
+ *
+ * @param view the view
+ * @param b the button
+ * @param text new text to assign to the button
+ *
+ * @since 1.23
+ */
+ public void setText(HtmlView view, HtmlButton b, String text);
+
+ /** Sets enablement state for a button created by {@link #createButton(java.lang.Object, java.lang.String) }.
+ *
+ * @param view the view
+ * @param b the button
+ * @param enabled the desired enablement state
+ *
+ * @since 1.23
+ */
+ public void setEnabled(HtmlView view, HtmlButton b, boolean enabled);
+
+ /** Runs a batch operation over the buttons in given view.
+ *
+ * @param view the view
+ * @param r the batch operation
+ * @since 1.23
+ */
+ public void runLater(HtmlView view, Runnable r);
+}
diff --git a/platform/api.htmlui/src/org/netbeans/spi/htmlui/package.html b/platform/api.htmlui/src/org/netbeans/spi/htmlui/package.html
new file mode 100644
index 000000000000..b617772767ca
--- /dev/null
+++ b/platform/api.htmlui/src/org/netbeans/spi/htmlui/package.html
@@ -0,0 +1,31 @@
+
+
+
+
+ HTML UI for Java & NetBeans
+
+
+ Service provider interface {@link org.netbeans.spi.htmlui.HTMLViewerSpi} to
+ provide own "chrome" for displaying HTML user interface.
+
+
+
diff --git a/platform/api.htmlui/test/unit/src/org/netbeans/api/htmlui/AskQuestion.java b/platform/api.htmlui/test/unit/src/org/netbeans/api/htmlui/AskQuestion.java
new file mode 100644
index 000000000000..6fc0e21ab4cf
--- /dev/null
+++ b/platform/api.htmlui/test/unit/src/org/netbeans/api/htmlui/AskQuestion.java
@@ -0,0 +1,49 @@
+/*
+ * 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.
+ */
+package org.netbeans.api.htmlui;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import net.java.html.json.Model;
+import net.java.html.json.Property;
+
+// BEGIN: org.netbeans.api.htmlui.AskQuestion
+@Model(className = "AskCtrl", targetId = "", properties = {
+ @Property(name = "ok", type = boolean.class)
+})
+public final class AskQuestion implements ActionListener {
+ @HTMLDialog(url = "dialog.html", className = "AskPages")
+ static HTMLDialog.OnSubmit showHelloWorld(boolean checked) {
+ AskCtrl model = new AskCtrl(checked).applyBindings();
+ return (buttonId) -> {
+ // called when user presses a button
+ System.out.println("User selected: " + buttonId);
+ // return false to prevent dialog from closing
+ return true;
+ };
+ }
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ // shows dialog with a question, checkbox is checked by default
+ // AskPages is automatically generated class
+ AskPages.showHelloWorld(true);
+ }
+}
+// END: org.netbeans.api.htmlui.AskQuestion
diff --git a/platform/api.htmlui/test/unit/src/org/netbeans/api/htmlui/Compile.java b/platform/api.htmlui/test/unit/src/org/netbeans/api/htmlui/Compile.java
index 5f383ba9722a..6b7f5faba6f3 100644
--- a/platform/api.htmlui/test/unit/src/org/netbeans/api/htmlui/Compile.java
+++ b/platform/api.htmlui/test/unit/src/org/netbeans/api/htmlui/Compile.java
@@ -208,7 +208,7 @@ public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOExcept
}
};
- ToolProvider.getSystemJavaCompiler().getTask(null, jfm, this, /*XXX:*/Arrays.asList("-source", sourceLevel, "-target", "1.7"), null, Arrays.asList(file)).call();
+ ToolProvider.getSystemJavaCompiler().getTask(null, jfm, this, Arrays.asList("-source", sourceLevel, "-target", "1.7"), null, Arrays.asList(file)).call();
Map result = new HashMap();
diff --git a/platform/api.htmlui/test/unit/src/org/netbeans/api/htmlui/UICntrl.java b/platform/api.htmlui/test/unit/src/org/netbeans/api/htmlui/UICntrl.java
new file mode 100644
index 000000000000..c011a15a6700
--- /dev/null
+++ b/platform/api.htmlui/test/unit/src/org/netbeans/api/htmlui/UICntrl.java
@@ -0,0 +1,59 @@
+/*
+ * 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.
+ */
+package org.netbeans.api.htmlui;
+
+import net.java.html.json.Function;
+import net.java.html.json.Model;
+import net.java.html.json.Property;
+import org.openide.awt.ActionID;
+import org.openide.awt.ActionReference;
+import org.openide.awt.ActionReferences;
+import org.openide.util.NbBundle;
+
+// BEGIN: org.netbeans.api.htmlui.UICntrl
+@Model(className = "UI", targetId = "", properties = {
+ @Property(name = "text", type = String.class)
+})
+public final class UICntrl {
+ // callback when Submit button is pressed
+ @Function
+ static void submit(UI model) {
+ System.err.println("You are feeling " + model.getText());
+ }
+
+ //
+ // register the action to the UI
+ //
+ @ActionID(
+ category = "Tools",
+ id = "my.sample.HtmlHelloWorld"
+ )
+ @ActionReferences({
+ @ActionReference(path = "Menu/Tools"),
+ @ActionReference(path = "Toolbars/File"),})
+ @NbBundle.Messages("CTL_OpenHtmlHelloWorld=Open HTML Hello World!")
+ @OpenHTMLRegistration(
+ url = "ui.html",
+ displayName = "#CTL_OpenHtmlHelloWorld"
+ )
+ public static UI onPageLoad() {
+ return new UI("Hello World!").applyBindings();
+ }
+}
+// END: org.netbeans.api.htmlui.UICntrl
diff --git a/platform/api.htmlui/test/unit/src/org/netbeans/api/htmlui/dialog.html b/platform/api.htmlui/test/unit/src/org/netbeans/api/htmlui/dialog.html
new file mode 100644
index 000000000000..85fc4e69274a
--- /dev/null
+++ b/platform/api.htmlui/test/unit/src/org/netbeans/api/htmlui/dialog.html
@@ -0,0 +1,37 @@
+
+
+
+
+
+ Base question
+
+
+
+ Hello World! How are you?
+
+ OK?
+
+ Good
+ Bad
+
+
+
diff --git a/platform/api.htmlui/test/unit/src/org/netbeans/api/htmlui/ui.html b/platform/api.htmlui/test/unit/src/org/netbeans/api/htmlui/ui.html
new file mode 100644
index 000000000000..a3c347e222bf
--- /dev/null
+++ b/platform/api.htmlui/test/unit/src/org/netbeans/api/htmlui/ui.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+ Base UI
+
+
+
+ Hello World! Type in how are you?
+
+ Submit
+
+
+
diff --git a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/ATech.java b/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/ATech.java
index afc296693480..958ac776c529 100644
--- a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/ATech.java
+++ b/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/ATech.java
@@ -28,7 +28,7 @@ public static final class First implements ATech {
@Contexts.Id("second")
public static final class Second implements ATech {
}
-
+
@ServiceProvider(service = Contexts.Provider.class)
public final static class Register implements Contexts.Provider {
@Override
diff --git a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/DialogOnSubmitTest.java b/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/DialogOnSubmitTest.java
new file mode 100644
index 000000000000..7a501746f63f
--- /dev/null
+++ b/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/DialogOnSubmitTest.java
@@ -0,0 +1,69 @@
+/*
+ * 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.
+ */
+package org.netbeans.modules.htmlui;
+
+import java.net.URL;
+import java.net.URLStreamHandlerFactory;
+import java.util.concurrent.CountDownLatch;
+import org.netbeans.api.htmlui.HTMLDialog;
+import org.netbeans.api.htmlui.HTMLDialog.OnSubmit;
+import org.netbeans.html.boot.spi.Fn;
+import org.netbeans.junit.MockServices;
+import org.openide.util.Lookup;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNotNull;
+import org.testng.annotations.Test;
+
+public class DialogOnSubmitTest {
+ static {
+ URLStreamHandlerFactory f = Lookup.getDefault().lookup(URLStreamHandlerFactory.class);
+ assertNotNull(f, "Factory found");
+ URL.setURLStreamHandlerFactory(f);
+ }
+
+ @HTMLDialog(url = "simple.html", className = "DialogOnSubmitTestPages")
+ static OnSubmit askQuestion(
+ boolean yes, Fn.Presenter[] presenter, String[] usedButton,
+ CountDownLatch loaded, CountDownLatch clicked
+ ) {
+ presenter[0] = Fn.activePresenter();
+ loaded.countDown();
+ return (id) -> {
+ usedButton[0] = id;
+ clicked.countDown();
+ return true;
+ };
+ }
+
+ @Test
+ public void callbackDialog() throws Exception {
+ MockServices.setServices(MockHtmlViewer.class);
+
+ String[] usedButton = { null };
+ Fn.Presenter[] presenter = { null };
+ CountDownLatch loaded = new CountDownLatch(1);
+ CountDownLatch clicked = new CountDownLatch(1);
+ DialogOnSubmitTestPages.askQuestion(true, presenter, usedButton, loaded, clicked);
+ loaded.await();
+ assertNotNull(presenter[0], "Presenter found");
+ MockHtmlViewer.selectButton(presenter[0], "MockOK");
+ clicked.await();
+ assertEquals(usedButton[0], "MockOK");
+ }
+}
diff --git a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/MockHtmlViewer.java b/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/MockHtmlViewer.java
new file mode 100644
index 000000000000..9a0ecf91d080
--- /dev/null
+++ b/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/MockHtmlViewer.java
@@ -0,0 +1,120 @@
+/*
+ * 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.
+ */
+package org.netbeans.modules.htmlui;
+
+import java.io.Closeable;
+import java.io.Reader;
+import java.net.URL;
+import org.netbeans.html.boot.spi.Fn;
+import org.netbeans.spi.htmlui.HTMLViewerSpi;
+
+public final class MockHtmlViewer implements HTMLViewerSpi {
+ @Override
+ public MockUI newView(Context ctx) {
+ return new MockUI(ctx);
+ }
+
+ @Override
+ public Object createButton(MockUI view, String id) {
+ return new MockButton();
+ }
+
+ static void selectButton(Fn.Presenter p, String id) {
+ MockUI ui = (MockUI) p;
+ ui.ctx.onSubmit(id);
+ }
+
+ @Override
+ public String getId(MockUI view, Object b) {
+ return null;
+ }
+
+ @Override
+ public void setText(MockUI view, Object b, String text) {
+ }
+
+ @Override
+ public void setEnabled(MockUI view, Object b, boolean enabled) {
+ }
+
+ @Override
+ public void runLater(MockUI view, Runnable r) {
+ try (Closeable c = Fn.activate(view)) {
+ r.run();
+ } catch (Exception ex) {
+ throw new AssertionError(ex);
+ }
+ }
+
+ @Override
+ public C component(MockUI view, Class type) {
+ if (type == Void.class) {
+ try (Closeable c = Fn.activate(view)) {
+ view.ctx.onPageLoad();
+ } catch (Exception ex) {
+ throw new AssertionError(ex);
+ }
+ return null;
+ }
+ throw new ClassCastException("" + type + " view: " + view);
+ }
+
+ public static final class MockButton {
+ }
+
+ static final class MockUI implements Fn.Presenter {
+ private final HTMLViewerSpi.Context ctx;
+
+ MockUI(Context ctx) {
+ this.ctx = ctx;
+ }
+
+ @Override
+ public Fn defineFn(String fn, String... strings) {
+ return new MockFn(fn);
+ }
+
+ @Override
+ public void displayPage(URL url, Runnable r) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void loadScript(Reader reader) throws Exception {
+ throw new UnsupportedOperationException();
+ }
+
+ }
+
+ private static class MockFn extends Fn {
+ private final String fn;
+
+ MockFn(String fn) {
+ this.fn = fn;
+ }
+
+ @Override
+ public Object invoke(Object o, Object... os) throws Exception {
+ if (fn.contains("getElementsByTagName('button')")) {
+ return new Object[0];
+ }
+ return null;
+ }
+ }
+}
diff --git a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/OpenHTMLRegistrationTest.java b/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/OpenHTMLRegistrationTest.java
index aca0397e745a..65610f8c3683 100644
--- a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/OpenHTMLRegistrationTest.java
+++ b/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/OpenHTMLRegistrationTest.java
@@ -66,7 +66,7 @@ public Object get(Object key) {
}
}
- Pages.R r = new Pages.R(new FOMap());
+ Pages.OpenHtmlAction r = new Pages.OpenHtmlAction(new FOMap());
Object[] arr = r.getTechIds();
assertEquals(arr.length, 3, "Three different ids");
assertEquals(arr[0], "uno");
diff --git a/platform/htmlui/build.xml b/platform/htmlui/build.xml
new file mode 100644
index 000000000000..b8fa9f9216f5
--- /dev/null
+++ b/platform/htmlui/build.xml
@@ -0,0 +1,25 @@
+
+
+
+ Builds, tests, and runs the project org.netbeans.modules.htmlui
+
+
diff --git a/platform/htmlui/manifest.mf b/platform/htmlui/manifest.mf
new file mode 100644
index 000000000000..39adf08aa6c4
--- /dev/null
+++ b/platform/htmlui/manifest.mf
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+AutoUpdate-Show-In-Client: true
+OpenIDE-Module: org.netbeans.modules.htmlui
+OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/htmlui/impl/Bundle.properties
+OpenIDE-Module-Specification-Version: 1.0
+
diff --git a/platform/htmlui/nbproject/project.properties b/platform/htmlui/nbproject/project.properties
new file mode 100644
index 000000000000..3b054ca8045d
--- /dev/null
+++ b/platform/htmlui/nbproject/project.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+is.eager=true
+javac.source=1.8
+javac.compilerargs=-Xlint -Xlint:-serial
diff --git a/platform/htmlui/nbproject/project.xml b/platform/htmlui/nbproject/project.xml
new file mode 100644
index 000000000000..e79333633a7e
--- /dev/null
+++ b/platform/htmlui/nbproject/project.xml
@@ -0,0 +1,122 @@
+
+
+
+ org.netbeans.modules.apisupport.project
+
+
+ org.netbeans.modules.htmlui
+
+
+ net.java.html.boot
+
+
+
+
+
+ net.java.html.boot.fx
+
+
+
+
+
+ org.netbeans.api.htmlui
+
+
+
+ 1.23
+
+
+
+ org.netbeans.libs.javafx
+
+
+
+ 2.20
+
+
+
+ org.openide.dialogs
+
+
+
+ 7.55
+
+
+
+ org.openide.util
+
+
+
+ 9.21
+
+
+
+ org.openide.util.lookup
+
+
+
+ 8.47
+
+
+
+ org.openide.util.ui
+
+
+
+ 9.21
+
+
+
+ org.openide.windows
+
+
+
+ 6.92
+
+
+
+
+
+ unit
+
+ org.netbeans.core.startup
+
+
+
+
+ org.netbeans.html.ko4j
+
+
+
+ org.netbeans.libs.testng
+
+
+
+ org.netbeans.modules.nbjunit
+
+
+
+
+
+
+
+
diff --git a/platform/htmlui/src/org/netbeans/modules/htmlui/impl/Bundle.properties b/platform/htmlui/src/org/netbeans/modules/htmlui/impl/Bundle.properties
new file mode 100644
index 000000000000..186e6e2e284b
--- /dev/null
+++ b/platform/htmlui/src/org/netbeans/modules/htmlui/impl/Bundle.properties
@@ -0,0 +1,21 @@
+# 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.
+OpenIDE-Module-Display-Category=Infrastructure
+OpenIDE-Module-Long-Description=\
+ Provides necessary infrastructure (based on JavaFX WebView) to mix HTML based user interfaces together with classical Swing chrome of the NetBeans applications.
+OpenIDE-Module-Name=HTML UI Implementation
+OpenIDE-Module-Short-Description=Support for displaying HTML based UI
diff --git a/platform/htmlui/src/org/netbeans/modules/htmlui/impl/DefaultHtmlToolkit.java b/platform/htmlui/src/org/netbeans/modules/htmlui/impl/DefaultHtmlToolkit.java
new file mode 100644
index 000000000000..45be59602b0c
--- /dev/null
+++ b/platform/htmlui/src/org/netbeans/modules/htmlui/impl/DefaultHtmlToolkit.java
@@ -0,0 +1,85 @@
+/*
+ * 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.
+ */
+package org.netbeans.modules.htmlui.impl;
+
+import java.awt.BorderLayout;
+import java.awt.EventQueue;
+import java.net.URL;
+import java.util.List;
+import java.util.function.Consumer;
+import javax.swing.JComponent;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import org.openide.DialogDescriptor;
+
+public class DefaultHtmlToolkit extends HtmlToolkit {
+ public static final HtmlToolkit DEFAULT = new DefaultHtmlToolkit();
+
+ private DefaultHtmlToolkit() {
+ }
+
+ @Override
+ public boolean isApplicationThread() {
+ return EventQueue.isDispatchThread();
+ }
+
+ @Override
+ public JComponent newPanel() {
+ JPanel p = new JPanel();
+ p.setLayout(new BorderLayout());
+ p.add(new JLabel("No JavaFX installed!"), BorderLayout.CENTER);
+ return p;
+ }
+
+ @Override
+ public void load(Object webView, URL pageUrl, Runnable runnable, ClassLoader loader, Object[] ctx) {
+ }
+
+ @Override
+ public Object initHtmlComponent(JComponent p, Consumer titleDisplayer) {
+ return null;
+ }
+
+ @Override
+ public Object initHtmlDialog(URL page, DialogDescriptor dd, JComponent p, Runnable onPageLoad, String[] techIds) {
+ return null;
+ }
+
+ @Override
+ public C convertToComponent(Class type, URL pageUrl, ClassLoader loader, Runnable onPageLoad, List techIds) {
+ return null;
+ }
+
+ @Override
+ public void enterNestedLoop(Object aThis) {
+ }
+
+ @Override
+ public void exitNestedLoop(Object aThis) {
+ }
+
+ @Override
+ public void execute(Runnable command) {
+ if (EventQueue.isDispatchThread()) {
+ command.run();
+ } else {
+ EventQueue.invokeLater(command);
+ }
+ }
+}
diff --git a/platform/htmlui/src/org/netbeans/modules/htmlui/impl/HtmlComponent.java b/platform/htmlui/src/org/netbeans/modules/htmlui/impl/HtmlComponent.java
new file mode 100644
index 000000000000..fbb8543a794d
--- /dev/null
+++ b/platform/htmlui/src/org/netbeans/modules/htmlui/impl/HtmlComponent.java
@@ -0,0 +1,75 @@
+/*
+ * 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.
+ */
+package org.netbeans.modules.htmlui.impl;
+
+import java.awt.BorderLayout;
+import java.io.Closeable;
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.Callable;
+import java.util.logging.Level;
+import javax.swing.JComponent;
+import net.java.html.js.JavaScriptBody;
+import org.openide.util.lookup.AbstractLookup;
+import org.openide.util.lookup.InstanceContent;
+import org.openide.windows.TopComponent;
+
+import static org.netbeans.modules.htmlui.impl.HtmlToolkit.LOG;
+import org.openide.util.Lookup;
+import org.openide.util.lookup.ProxyLookup;
+
+/**
+ *
+ * @author Jaroslav Tulach
+ */
+@TopComponent.Description(
+ persistenceType = TopComponent.PERSISTENCE_NEVER,
+ preferredID = "browser"
+)
+public final class HtmlComponent extends TopComponent {
+ private final JComponent panel = HtmlToolkit.getDefault().newPanel();
+ private ProxyLookup.Controller controller;
+
+ HtmlComponent() {
+ setLayout(new BorderLayout());
+ this.controller = new ProxyLookup.Controller();
+ associateLookup(new ProxyLookup(controller));
+ add(panel, BorderLayout.CENTER);
+ }
+
+ final void loadFX(ClassLoader loader, URL pageUrl, Callable init, String... ctx) {
+ Object webView = HtmlToolkit.getDefault().initHtmlComponent(panel, this::setDisplayName);
+ HtmlToolkit.getDefault().load(webView, pageUrl, () -> {
+ try {
+ Lookup lkp = init.call();
+ if (lkp != null) {
+ controller.setLookups(lkp);
+ }
+ } catch (Exception ex) {
+ LOG.log(Level.WARNING, "Can't load " + pageUrl, ex);
+ }
+ }, loader, ctx);
+ }
+}
diff --git a/platform/api.htmlui/src/org/netbeans/modules/htmlui/HtmlToolkit.java b/platform/htmlui/src/org/netbeans/modules/htmlui/impl/HtmlToolkit.java
similarity index 62%
rename from platform/api.htmlui/src/org/netbeans/modules/htmlui/HtmlToolkit.java
rename to platform/htmlui/src/org/netbeans/modules/htmlui/impl/HtmlToolkit.java
index f33174346ea2..610320ccf200 100644
--- a/platform/api.htmlui/src/org/netbeans/modules/htmlui/HtmlToolkit.java
+++ b/platform/htmlui/src/org/netbeans/modules/htmlui/impl/HtmlToolkit.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.netbeans.modules.htmlui;
+package org.netbeans.modules.htmlui.impl;
import java.net.URL;
import java.util.List;
@@ -27,20 +27,24 @@
import org.openide.DialogDescriptor;
import org.openide.util.Lookup;
+/**
+ *
+ * @since 1.21
+ */
public abstract class HtmlToolkit implements Executor {
public static final Logger LOG = Logger.getLogger(HtmlToolkit.class.getName());
public static HtmlToolkit getDefault() {
HtmlToolkit toolkit = Lookup.getDefault().lookup(HtmlToolkit.class);
- return toolkit;
+ return toolkit == null ? DefaultHtmlToolkit.DEFAULT : toolkit;
}
- protected abstract boolean isApplicationThread();
- protected abstract JComponent newPanel();
- protected abstract void load(Object webView, URL pageUrl, Runnable runnable, ClassLoader loader, Object... ctx);
- protected abstract Object initHtmlComponent(JComponent p, Consumer titleDisplayer);
- protected abstract Object initHtmlDialog(String page, DialogDescriptor dd, JComponent p, Runnable onPageLoad, List techIds);
- protected abstract C convertToComponent(Class type, URL pageUrl, ClassLoader loader, Runnable onPageLoad, List techIds);
- protected abstract void enterNestedLoop(Object aThis);
- protected abstract void exitNestedLoop(Object aThis);
+ public abstract boolean isApplicationThread();
+ public abstract JComponent newPanel();
+ public abstract void load(Object webView, URL pageUrl, Runnable runnable, ClassLoader loader, Object[] ctx);
+ public abstract Object initHtmlComponent(JComponent p, Consumer titleDisplayer);
+ public abstract Object initHtmlDialog(URL page, DialogDescriptor dd, JComponent p, Runnable onPageLoad, String[] techIds);
+ public abstract C convertToComponent(Class type, URL pageUrl, ClassLoader loader, Runnable onPageLoad, List techIds);
+ public abstract void enterNestedLoop(Object aThis);
+ public abstract void exitNestedLoop(Object aThis);
}
diff --git a/platform/htmlui/src/org/netbeans/modules/htmlui/impl/SwingFXViewer.java b/platform/htmlui/src/org/netbeans/modules/htmlui/impl/SwingFXViewer.java
new file mode 100644
index 000000000000..919f1101e3f2
--- /dev/null
+++ b/platform/htmlui/src/org/netbeans/modules/htmlui/impl/SwingFXViewer.java
@@ -0,0 +1,223 @@
+/*
+ * 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.
+ */
+package org.netbeans.modules.htmlui.impl;
+
+import java.awt.Dialog;
+import java.awt.Dimension;
+import java.awt.EventQueue;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import javax.swing.JButton;
+import javax.swing.JComponent;
+import org.openide.DialogDescriptor;
+import org.openide.DialogDisplayer;
+import org.openide.util.lookup.ServiceProvider;
+import org.netbeans.modules.htmlui.impl.SwingFXViewer.SFXView;
+import org.openide.util.Lookup;
+import org.netbeans.spi.htmlui.HTMLViewerSpi;
+
+@ServiceProvider(service = HTMLViewerSpi.class)
+public class SwingFXViewer implements HTMLViewerSpi {
+ @Override
+ public SFXView newView(Context ctx) {
+ return new SFXView(ctx);
+ }
+
+ @Override
+ public JButton createButton(SFXView view, String id) {
+ JButton b = new JButton();;
+ b.setName(id);
+ if (view == null || view.buttons == null) {
+ throw new NullPointerException("Am I: " + this + " view: " + view);
+ }
+ view.buttons.add(b);
+ return b;
+ }
+
+ @Override
+ public String getId(SFXView view, JButton b) {
+ return b.getName();
+ }
+
+ @Override
+ public void setText(SFXView view, JButton b, String text) {
+ b.setText(text);
+ }
+
+ @Override
+ public void setEnabled(SFXView view, JButton b, boolean enabled) {
+ b.setEnabled(enabled);
+ }
+
+ @Override
+ public void runLater(SFXView view, Runnable r) {
+ EventQueue.invokeLater(r);
+ }
+
+ @Override
+ public C component(SFXView view, Class type) {
+ if (type == Void.class) {
+ view.makeVisible();
+ return null;
+ }
+
+ ClassLoader loader = Lookup.getDefault().lookup(ClassLoader.class);
+ if (loader == null) {
+ loader = SwingFXViewer.class.getClassLoader();
+ }
+ return HtmlToolkit.getDefault().convertToComponent(
+ type, view.ctx.getPage(), loader,
+ view.ctx::onPageLoad, Arrays.asList(view.ctx.getTechIds())
+ );
+ }
+
+ public static final class SFXView {
+ final Context ctx;
+ final HtmlComponent component;
+ final ChromeWithButtons buttons;
+
+ SFXView(Context ctx) {
+ this.ctx = ctx;
+ if (ctx.isDialog()) {
+ this.component = null;
+ this.buttons = new ChromeWithButtons(ctx);
+ } else if (ctx.isWindow()) {
+ this.component = new HtmlComponent();
+ this.buttons = null;
+ } else {
+ this.component = null;
+ this.buttons = null;
+ }
+ }
+
+ void makeVisible() {
+ if (ctx.isWindow()) {
+ component.open();
+ component.requestActive();
+ HtmlToolkit.getDefault().execute(() -> {
+ component.loadFX(ctx.getClassLoader(), ctx.getPage(), ctx::onPageLoad, ctx.getTechIds());
+ });
+ } else if (ctx.isDialog()) {
+ if (ctx.isBlocking()) {
+ buttons.showAndWait();
+ } else {
+ buttons.showLater();
+ }
+ }
+
+ }
+
+ private static final class ChromeWithButtons {
+ private final Context ctx;
+ private final JComponent p;
+ private final DialogDescriptor dd;
+ private final List buttons = new ArrayList<>();
+
+ public ChromeWithButtons(Context ctx) {
+ this.ctx = ctx;
+ this.p = HtmlToolkit.getDefault().newPanel();
+ this.dd = new DialogDescriptor(p, "");
+ this.dd.setOptions(new Object[0]);
+ }
+
+ void add(JButton b) {
+ this.buttons.add(b);
+ }
+
+ String getValueName() {
+ Object val = dd.getValue();
+ return val instanceof JButton ? ((JButton)val).getName() : null;
+ }
+
+ String showAndWait() {
+ if (EventQueue.isDispatchThread()) {
+ initializationSequence(null).run();
+ showDialog();
+ } else {
+ Runnable initSeq = initializationNestedLoop();
+ if (HtmlToolkit.getDefault().isApplicationThread()) {
+ EventQueue.invokeLater(initSeq);
+ HtmlToolkit.getDefault().enterNestedLoop(this);
+ } else {
+ try {
+ EventQueue.invokeAndWait(initSeq);
+ } catch (InterruptedException | InvocationTargetException ex) {
+ throw new IllegalStateException(ex);
+ }
+ }
+ }
+ Object val = dd.getValue();
+ return val instanceof JButton ? ((JButton) val).getName() : null;
+
+ }
+
+ void showLater() {
+ initializationSequence(this::showDialog).run();
+ }
+
+ void showDialog() {
+ p.setPreferredSize(new Dimension(600, 400));
+ Dialog modalDialog = DialogDisplayer.getDefault().createDialog(dd);
+ dd.setButtonListener((ev) -> {
+ String id = null;
+ if (ev.getSource() instanceof JButton) {
+ id = ((JButton) ev.getSource()).getName();
+ }
+ if (!ctx.onSubmit(id)) {
+ return;
+ }
+ modalDialog.setVisible(false);
+ });
+ modalDialog.setVisible(true);
+ }
+
+ void initButtons() {
+ dd.setOptions(this.buttons.toArray(new JButton[0]));
+ dd.setClosingOptions(new Object[0]);
+ }
+
+ final Runnable initializationSequence(Runnable afterInitPage) {
+ return () -> {
+ HtmlToolkit.getDefault().execute(() -> {
+ HtmlToolkit.getDefault().initHtmlDialog(ctx.getPage(), dd, p, () -> {
+ ctx.onPageLoad();
+ initButtons();
+ if (afterInitPage != null) {
+ EventQueue.invokeLater(afterInitPage);
+ }
+ }, ctx.getTechIds());
+ });
+ };
+ }
+
+ final Runnable initializationNestedLoop() {
+ return initializationSequence(() -> {
+ showDialog();
+ ctx.onSubmit(null);
+ HtmlToolkit.getDefault().execute(() -> {
+ HtmlToolkit.getDefault().exitNestedLoop(this);
+ });
+ });
+ }
+ }
+ }
+}
+
diff --git a/platform/api.htmlui/src/org/netbeans/modules/htmlui/jfx/JavaFxHtmlToolkit.java b/platform/htmlui/src/org/netbeans/modules/htmlui/jfx/JavaFxHtmlToolkit.java
similarity index 92%
rename from platform/api.htmlui/src/org/netbeans/modules/htmlui/jfx/JavaFxHtmlToolkit.java
rename to platform/htmlui/src/org/netbeans/modules/htmlui/jfx/JavaFxHtmlToolkit.java
index e20d015a9d8d..84a1f08c9c88 100644
--- a/platform/api.htmlui/src/org/netbeans/modules/htmlui/jfx/JavaFxHtmlToolkit.java
+++ b/platform/htmlui/src/org/netbeans/modules/htmlui/jfx/JavaFxHtmlToolkit.java
@@ -18,11 +18,10 @@
*/
package org.netbeans.modules.htmlui.jfx;
-import org.netbeans.modules.htmlui.HtmlToolkit;
+import org.netbeans.modules.htmlui.impl.HtmlToolkit;
import java.awt.EventQueue;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;
import java.util.function.Consumer;
@@ -38,9 +37,8 @@
import javafx.scene.web.WebView;
import javafx.stage.Stage;
import javax.swing.JComponent;
-import org.netbeans.modules.htmlui.HTMLDialogImpl;
import org.openide.DialogDescriptor;
-import org.openide.util.Lookup;
+import org.openide.util.*;
import org.openide.util.lookup.ServiceProvider;
@ServiceProvider(service = HtmlToolkit.class)
@@ -85,7 +83,7 @@ public void run() {
}
@Override
- public Object initHtmlDialog(String url, DialogDescriptor dd, JComponent ourPanel, Runnable onPageLoad, List techIds) {
+ public Object initHtmlDialog(URL url, DialogDescriptor dd, JComponent ourPanel, Runnable onPageLoad, String[] techIds) {
JFXPanel p = (JFXPanel) ourPanel;
Platform.setImplicitExit(false);
WebView webView = new WebView();
@@ -121,15 +119,9 @@ public void run() {
ClassLoader loader = Lookup.getDefault().lookup(ClassLoader.class);
if (loader == null) {
- loader = HTMLDialogImpl.class.getClassLoader();
+ loader = JavaFxHtmlToolkit.class.getClassLoader();
}
- URL pageUrl;
- try {
- pageUrl = new URL(url);
- } catch (MalformedURLException ex) {
- throw new IllegalStateException(ex);
- }
- load(webView, pageUrl, onPageLoad, loader, techIds.toArray());
+ load(webView, url, onPageLoad, loader, techIds);
return webView;
}
diff --git a/platform/api.htmlui/src/org/netbeans/modules/htmlui/jfx/NbBrowsers.java b/platform/htmlui/src/org/netbeans/modules/htmlui/jfx/NbBrowsers.java
similarity index 100%
rename from platform/api.htmlui/src/org/netbeans/modules/htmlui/jfx/NbBrowsers.java
rename to platform/htmlui/src/org/netbeans/modules/htmlui/jfx/NbBrowsers.java
diff --git a/platform/api.htmlui/src/org/netbeans/modules/htmlui/jfx/NbFxPanel.java b/platform/htmlui/src/org/netbeans/modules/htmlui/jfx/NbFxPanel.java
similarity index 100%
rename from platform/api.htmlui/src/org/netbeans/modules/htmlui/jfx/NbFxPanel.java
rename to platform/htmlui/src/org/netbeans/modules/htmlui/jfx/NbFxPanel.java
diff --git a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/DialogsTest.java b/platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/DialogsTest.java
similarity index 75%
rename from platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/DialogsTest.java
rename to platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/DialogsTest.java
index 562558385b29..b2dcc82c8fcc 100644
--- a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/DialogsTest.java
+++ b/platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/DialogsTest.java
@@ -30,6 +30,9 @@
import net.java.html.BrwsrCtx;
import net.java.html.js.JavaScriptBody;
import org.netbeans.api.htmlui.HTMLDialog;
+import org.netbeans.modules.htmlui.impl.EnsureJavaFXPresent;
+import org.netbeans.modules.htmlui.impl.HtmlToolkit;
+import org.netbeans.modules.htmlui.impl.SwingFXViewer;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import static org.testng.Assert.*;
@@ -51,7 +54,8 @@ public static void initializeContext() throws Exception {
return;
}
final JFXPanel p = new JFXPanel();
- final URL u = DialogsTest.class.getResource("/org/netbeans/api/htmlui/empty.html");
+ final URL u = DialogsTest.class.getResource("/org/netbeans/modules/htmlui/impl/empty.html");
+ assertNotNull(u, "empty.html found");
Platform.runLater(new Runnable() {
@Override
public void run() {
@@ -64,7 +68,7 @@ public void run() {
ctx = BrwsrCtx.findDefault(DialogsTest.class);
down.countDown();
}
- }, null);
+ }, DialogsTest.class.getClassLoader(), new Object[0]);
}
});
down.await();
@@ -89,22 +93,24 @@ public void run() {
" Agree " +
" Disagree ";
setBody(body);
-
- JButton[] arr = Buttons.buttons();
+
+
+
+ JButton[] arr = new MockButtons().array();
assertEquals(arr.length, 2, "Two buttons");
- assertEquals(arr[0].getName(), "OK", "id of 1st button parsed");
- assertEquals(arr[1].getName(), "Cancel", "id of 2nd button parsed");
+ assertButtonName(arr[0], "OK", "id of 1st button parsed");
+ assertButtonName(arr[1], "Cancel", "id of 2nd button parsed");
assertEquals(arr[0].getText(), "Agree", "text of 1st button parsed");
assertEquals(arr[1].getText(), "Disagree", "text of 2nd button parsed");
-
+
assertFalse(arr[0].isEnabled(), "OK is disabled");
assertTrue(arr[1].isEnabled(), "Cancel is enabled");
-
+
setDisabled("OK", false);
-
+
String prev = setText("OK", "Fine");
assertEquals(prev, "Agree");
-
+
buttons[0] = arr[0];
buttons[1] = arr[1];
} catch (Throwable t) {
@@ -126,7 +132,7 @@ public void run() {
}
});
}
-
+
@Test(timeOut = 9000)
public void noDefinedButtonsMeanOKCancel() throws Throwable {
EnsureJavaFXPresent.checkAndThrow();
@@ -138,17 +144,17 @@ public void run() {
try {
String body =
" Normal button in a text " +
-// no dialog buttons defined:
+// no dialog buttons defined:
// " Agree " +
// " Disagree " +
"";
setBody(body);
-
- JButton[] arr = Buttons.buttons();
+
+ JButton[] arr = new MockButtons().array();
assertEquals(arr.length, 2, "Two buttons");
- assertEquals(arr[0].getName(), "OK", "id of 1st default button");
- assertEquals(arr[1].getName(), null, "id of 2nd default button");
-
+ assertButtonName(arr[0], "OK", "id of 1st default button");
+ assertButtonName(arr[1], null, "id of 2nd default button");
+
assertTrue(arr[0].isEnabled(), "OK is enabled");
assertTrue(arr[1].isEnabled(), "Cancel is enabled");
} catch (Throwable t) {
@@ -163,29 +169,60 @@ public void run() {
throw ex[0];
}
}
-
+
@JavaScriptBody(args = "b", body = "window.document.getElementsByTagName('body')[0].innerHTML = b;")
private static native void setBody(String b);
-
+
@JavaScriptBody(args = { "id", "state" }, body = "window.document.getElementById(id).disabled = state;")
private static native void setDisabled(String id, boolean state);
-
+
@JavaScriptBody(args = { "id", "t" }, body = ""
+ "var prev = window.document.getElementById(id).innerHTML;\n"
+ "window.document.getElementById(id).innerHTML = t;\n"
+ "return prev;\n"
)
private static native String setText(String id, String t);
-
-
- @HTMLDialog(url = "simple.html", className = "TestPages")
+
+
+ @HTMLDialog(url = "impl/simple.html", className = "TestPages")
static void showDialog() {
String ret = TestPages.showDialog();
}
- @HTMLDialog(url = "http://www.netbeans.org", className = "TestPages")
- static void showDialog(int x, String[] y, DialogsTest t) {
- String ret = TestPages.showDialog(10, y, null);
+ @HTMLDialog(url = "http://www.netbeans.org", className = "TestPages")
+ static HTMLDialog.OnSubmit showDialog(int x, String[] y, DialogsTest t) {
+ return (id) -> {
+ TestPages.showDialog(10, y, null);
+ return true;
+ };
+ }
+
+ static void assertButtonName(JButton b, String exp, String msg) {
+ assertNotNull(b, msg);
+ String n = b.getName();
+ if (exp == null) {
+ assertNull(n, msg);
+ return;
+ }
+ assertTrue(n.startsWith("dialog-buttons-"), "Starts with prefix: " + n);
+ String r = n.substring(15);
+ assertEquals(r, exp, msg);
}
+ private static final class MockButtons extends Buttons {
+ MockButtons() {
+ super(new SwingFXViewer() {
+ @Override
+ public JButton createButton(SwingFXViewer.SFXView view, String id) {
+ JButton b = new JButton();
+ b.setName(id);
+ return b;
+ }
+ }, null, null);
+ }
+
+ final JButton[] array() {
+ return buttons().toArray(new JButton[0]);
+ }
+ }
}
diff --git a/platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/ATech.java b/platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/ATech.java
new file mode 100644
index 000000000000..58efe55e736f
--- /dev/null
+++ b/platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/ATech.java
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+package org.netbeans.modules.htmlui.impl;
+
+import org.netbeans.html.context.spi.Contexts;
+import org.openide.util.lookup.ServiceProvider;
+
+public interface ATech {
+ @Contexts.Id("first")
+ public static final class First implements ATech {
+ }
+ @Contexts.Id("second")
+ public static final class Second implements ATech {
+ }
+
+ @ServiceProvider(service = Contexts.Provider.class)
+ public final static class Register implements Contexts.Provider {
+ @Override
+ public void fillContext(Contexts.Builder bldr, Class> type) {
+ bldr.register(ATech.class, new First(), 30);
+ bldr.register(ATech.class, new Second(), 50);
+ }
+ }
+}
diff --git a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/ComponentsTest.java b/platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/ComponentsTest.java
similarity index 93%
rename from platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/ComponentsTest.java
rename to platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/ComponentsTest.java
index 9420f8f443bb..4ab0a9f20fbe 100644
--- a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/ComponentsTest.java
+++ b/platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/ComponentsTest.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.netbeans.modules.htmlui;
+package org.netbeans.modules.htmlui.impl;
import java.util.concurrent.CountDownLatch;
import javafx.application.Platform;
@@ -62,9 +62,7 @@ public void loadFX() throws Exception {
EnsureJavaFXPresent.checkAndThrow();
final CountDownLatch cdl = new CountDownLatch(1);
final CountDownLatch done = new CountDownLatch(1);
- System.err.println("p1: " + JFXPanel.class.getProtectionDomain().getCodeSource().getLocation());
final JFXPanel p = new JFXPanel();
- System.err.println("p2: " + p.getClass().getProtectionDomain().getCodeSource().getLocation());
Platform.runLater(new Runnable() {
@Override
public void run() {
@@ -86,7 +84,7 @@ public void run() {
url = "simple.html", className = "TestPages",
type = JComponent.class,
techIds = "second"
- )
+ )
static void getSwing(int param, CountDownLatch called) {
assertEquals(param, 10, "Correct value passed in");
called.countDown();
diff --git a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/EnsureJavaFXPresent.java b/platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/EnsureJavaFXPresent.java
similarity index 90%
rename from platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/EnsureJavaFXPresent.java
rename to platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/EnsureJavaFXPresent.java
index 48a439e24631..73378c6d1217 100644
--- a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/EnsureJavaFXPresent.java
+++ b/platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/EnsureJavaFXPresent.java
@@ -16,13 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.netbeans.modules.htmlui;
+package org.netbeans.modules.htmlui.impl;
import javafx.embed.swing.JFXPanel;
import static org.testng.AssertJUnit.assertNotNull;
import org.testng.SkipException;
-class EnsureJavaFXPresent {
+public final class EnsureJavaFXPresent {
private static final Throwable initError;
static {
Throwable t;
@@ -39,13 +39,13 @@ class EnsureJavaFXPresent {
private EnsureJavaFXPresent() {
}
- static void checkAndThrow() {
+ public static void checkAndThrow() {
if (initError != null) {
throw new SkipException("Cannot initialize JavaFX", initError);
}
}
- static boolean check() {
+ public static boolean check() {
return initError == null;
}
}
diff --git a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/HtmlComponentTest.java b/platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/HtmlComponentTest.java
similarity index 93%
rename from platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/HtmlComponentTest.java
rename to platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/HtmlComponentTest.java
index c15b2eb39a66..5205536281df 100644
--- a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/HtmlComponentTest.java
+++ b/platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/HtmlComponentTest.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.netbeans.modules.htmlui;
+package org.netbeans.modules.htmlui.impl;
import java.io.Closeable;
import java.io.IOException;
@@ -27,6 +27,7 @@
import net.java.html.json.Model;
import net.java.html.json.ModelOperation;
import net.java.html.json.Property;
+import org.netbeans.modules.htmlui.PagesLookup;
import org.openide.util.Lookup;
import static org.testng.Assert.*;
import org.testng.annotations.BeforeClass;
@@ -42,7 +43,7 @@ public class HtmlComponentTest {
private static final CountDownLatch down = new CountDownLatch(1);
private static Lookup lkp;
private static BrwsrCtx ctx;
-
+
public HtmlComponentTest() {
}
@@ -51,30 +52,31 @@ public static void initializeContext() throws Exception {
if (!EnsureJavaFXPresent.check()) {
return;
}
-
+
final HtmlComponent tc = new HtmlComponent();
- final URL u = HtmlComponent.class.getResource("/org/netbeans/api/htmlui/empty.html");
+ final URL u = HtmlComponent.class.getResource("/org/netbeans/modules/htmlui/impl/empty.html");
+ assertNotNull(u, "empty.html found");
Platform.runLater(new Runnable() {
@Override
public void run() {
- tc.loadFX(u, HtmlComponentTest.class, "onLoad");
+ tc.loadFX(HtmlComponentTest.class.getClassLoader(), u, HtmlComponentTest::onLoad);
}
});
lkp = tc.getLookup();
}
-
- public static Object onLoad() {
+
+ public static Lookup onLoad() {
ctx = BrwsrCtx.findDefault(HtmlComponentTest.class);
CheckContext cc = new CheckContext();
net.java.html.json.Models.applyBindings(cc);
- return cc;
+ return new PagesLookup(cc.getClass().getClassLoader(), cc);
}
-
+
@Test(timeOut = 9000)
public void updateContext() throws Exception {
EnsureJavaFXPresent.checkAndThrow();
CheckContext cc = assertContext();
-
+
assertNull(lkp.lookup(DefCnstr.class), "No instance yet");
cc.addContext(DefCnstr.class.getName());
waitFX();
@@ -88,7 +90,7 @@ public void updateContext() throws Exception {
public void closedWhenRemoved() throws Exception {
EnsureJavaFXPresent.checkAndThrow();
CheckContext cc = assertContext();
-
+
cc.addContext(ClsblCnstr.class.getName());
waitFX();
final ClsblCnstr inst = lkp.lookup(ClsblCnstr.class);
@@ -104,7 +106,7 @@ public void closedWhenRemoved() throws Exception {
public void updateContextWithNonDefaultCnstr() throws Exception {
EnsureJavaFXPresent.checkAndThrow();
CheckContext cc = assertContext();
-
+
assertNull(lkp.lookup(MdlCnstr.class), "No instance yet");
cc.addContext(MdlCnstr.class.getName());
waitFX();
@@ -128,15 +130,15 @@ private CheckContext assertContext() throws InterruptedException {
assertNotNull(cc, "Value returned from onLoad is in the lookup");
return cc;
}
-
+
@ModelOperation static void addContext(CheckContext cc, String name) {
cc.getContext().add(name);
}
-
+
@ModelOperation static void clearContext(CheckContext cc) {
cc.getContext().clear();
}
-
+
private static void waitFX() throws Exception {
final CountDownLatch down = new CountDownLatch(1);
Platform.runLater(new Runnable() {
@@ -147,7 +149,7 @@ public void run() {
});
down.await();
}
-
+
public static final class DefCnstr {
}
public static final class MdlCnstr {
@@ -159,7 +161,7 @@ public MdlCnstr(CheckContext cc) {
}
public static final class ClsblCnstr implements Closeable {
boolean closed;
-
+
@Override
public void close() throws IOException {
this.closed = true;
diff --git a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/NbResloc.java b/platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/NbResloc.java
similarity index 96%
rename from platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/NbResloc.java
rename to platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/NbResloc.java
index a8a84f16b76c..351411c11257 100644
--- a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/NbResloc.java
+++ b/platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/NbResloc.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.netbeans.modules.htmlui;
+package org.netbeans.modules.htmlui.impl;
import java.net.URL;
import java.net.URLStreamHandlerFactory;
diff --git a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/ShowDialogFromEDTTest.java b/platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/ShowDialogFromEDTTest.java
similarity index 97%
rename from platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/ShowDialogFromEDTTest.java
rename to platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/ShowDialogFromEDTTest.java
index 992119a9474a..0568ea093001 100644
--- a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/ShowDialogFromEDTTest.java
+++ b/platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/ShowDialogFromEDTTest.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.netbeans.modules.htmlui;
+package org.netbeans.modules.htmlui.impl;
import java.awt.EventQueue;
import java.util.concurrent.CountDownLatch;
diff --git a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/ShowDialogFromFXThreadTest.java b/platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/ShowDialogFromFXThreadTest.java
similarity index 98%
rename from platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/ShowDialogFromFXThreadTest.java
rename to platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/ShowDialogFromFXThreadTest.java
index 194a0af6d07d..26f13717fcf2 100644
--- a/platform/api.htmlui/test/unit/src/org/netbeans/modules/htmlui/ShowDialogFromFXThreadTest.java
+++ b/platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/ShowDialogFromFXThreadTest.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.netbeans.modules.htmlui;
+package org.netbeans.modules.htmlui.impl;
import java.awt.EventQueue;
import java.util.concurrent.CountDownLatch;
diff --git a/platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/empty.html b/platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/empty.html
new file mode 100644
index 000000000000..7f152d47c2d6
--- /dev/null
+++ b/platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/empty.html
@@ -0,0 +1,31 @@
+
+
+
+
+ TODO supply a title
+
+
+
+
+ TODO write content
+
+
diff --git a/platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/simple.html b/platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/simple.html
new file mode 100644
index 000000000000..29b32f334527
--- /dev/null
+++ b/platform/htmlui/test/unit/src/org/netbeans/modules/htmlui/impl/simple.html
@@ -0,0 +1,30 @@
+
+
+
+
+ Empty
+
+
+
+
+
+
diff --git a/platform/net.java.html.boot.fx/external/binaries-list b/platform/net.java.html.boot.fx/external/binaries-list
index 8be7c481cc51..75db770f1ea7 100644
--- a/platform/net.java.html.boot.fx/external/binaries-list
+++ b/platform/net.java.html.boot.fx/external/binaries-list
@@ -14,4 +14,4 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-F56B997D397F2984442342DD89069F0E086DE8A8 org.netbeans.html:net.java.html.boot.fx:1.7
+10F1724D618C0F0BA57D0CB849A0C6463A8C3F03 org.netbeans.html:net.java.html.boot.fx:1.7.3
diff --git a/platform/net.java.html.boot.fx/external/net.java.html.boot.fx-1.7-license.txt b/platform/net.java.html.boot.fx/external/net.java.html.boot.fx-1.7.3-license.txt
similarity index 99%
rename from platform/net.java.html.boot.fx/external/net.java.html.boot.fx-1.7-license.txt
rename to platform/net.java.html.boot.fx/external/net.java.html.boot.fx-1.7.3-license.txt
index 9266dfcdbed9..76cb5d13c449 100644
--- a/platform/net.java.html.boot.fx/external/net.java.html.boot.fx-1.7-license.txt
+++ b/platform/net.java.html.boot.fx/external/net.java.html.boot.fx-1.7.3-license.txt
@@ -1,5 +1,5 @@
Name: Html4J
-Version: 1.7
+Version: 1.7.3
Description: Html4j Boot FX
License: Apache-2.0
Origin: Apache Software Foundation
diff --git a/platform/net.java.html.boot.fx/nbproject/project.properties b/platform/net.java.html.boot.fx/nbproject/project.properties
index 5974dec2a743..4eaf3930d996 100644
--- a/platform/net.java.html.boot.fx/nbproject/project.properties
+++ b/platform/net.java.html.boot.fx/nbproject/project.properties
@@ -14,6 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-release.external/net.java.html.boot.fx-1.7.jar=modules/net-java-html-boot-fx.jar
+release.external/net.java.html.boot.fx-1.7.3.jar=modules/net-java-html-boot-fx.jar
is.autoload=true
nbm.module.author=Jaroslav Tulach
diff --git a/platform/net.java.html.boot.fx/nbproject/project.xml b/platform/net.java.html.boot.fx/nbproject/project.xml
index 2e73f4caaadc..efebe1f6c8af 100644
--- a/platform/net.java.html.boot.fx/nbproject/project.xml
+++ b/platform/net.java.html.boot.fx/nbproject/project.xml
@@ -28,7 +28,7 @@
net-java-html-boot-fx.jar
- external/net.java.html.boot.fx-1.7.jar
+ external/net.java.html.boot.fx-1.7.3.jar
diff --git a/platform/net.java.html.boot.script/external/binaries-list b/platform/net.java.html.boot.script/external/binaries-list
index 0f5595da50ca..1c9a9ff8c084 100644
--- a/platform/net.java.html.boot.script/external/binaries-list
+++ b/platform/net.java.html.boot.script/external/binaries-list
@@ -14,4 +14,4 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-0E0A5295FC07E685E30E60EDE5AB3D1C5D7DA574 org.netbeans.html:net.java.html.boot.script:1.7
+30B5376222E678298714053EDEA38AD13AEF1DB8 org.netbeans.html:net.java.html.boot.script:1.7.3
diff --git a/platform/net.java.html.boot.script/external/net.java.html.boot.script-1.7-license.txt b/platform/net.java.html.boot.script/external/net.java.html.boot.script-1.7.3-license.txt
similarity index 99%
rename from platform/net.java.html.boot.script/external/net.java.html.boot.script-1.7-license.txt
rename to platform/net.java.html.boot.script/external/net.java.html.boot.script-1.7.3-license.txt
index 3e772c092e2e..cb1a4f8d9828 100644
--- a/platform/net.java.html.boot.script/external/net.java.html.boot.script-1.7-license.txt
+++ b/platform/net.java.html.boot.script/external/net.java.html.boot.script-1.7.3-license.txt
@@ -1,5 +1,5 @@
Name: Html4J
-Version: 1.7
+Version: 1.7.3
Description: Html4j Boot Script
License: Apache-2.0
Origin: Apache Software Foundation
diff --git a/platform/net.java.html.boot.script/nbproject/project.properties b/platform/net.java.html.boot.script/nbproject/project.properties
index 9480b8d495ab..ed6576acc951 100644
--- a/platform/net.java.html.boot.script/nbproject/project.properties
+++ b/platform/net.java.html.boot.script/nbproject/project.properties
@@ -14,6 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-release.external/net.java.html.boot.script-1.7.jar=modules/net-java-html-boot-script.jar
+release.external/net.java.html.boot.script-1.7.3.jar=modules/net-java-html-boot-script.jar
is.autoload=true
nbm.module.author=Jaroslav Tulach
diff --git a/platform/net.java.html.boot.script/nbproject/project.xml b/platform/net.java.html.boot.script/nbproject/project.xml
index 6cbfcf5e9006..398605b5fcc2 100644
--- a/platform/net.java.html.boot.script/nbproject/project.xml
+++ b/platform/net.java.html.boot.script/nbproject/project.xml
@@ -28,7 +28,7 @@
net-java-html-boot-script.jar
- external/net.java.html.boot.script-1.7.jar
+ external/net.java.html.boot.script-1.7.3.jar
diff --git a/platform/net.java.html.boot/external/binaries-list b/platform/net.java.html.boot/external/binaries-list
index ab24e8a0d1d7..6864fdee2de1 100644
--- a/platform/net.java.html.boot/external/binaries-list
+++ b/platform/net.java.html.boot/external/binaries-list
@@ -14,4 +14,4 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-0D4DBFEA65DCC33F22C13B6469329A5001B1D80D org.netbeans.html:net.java.html.boot:1.7
+F4320C98E15B3DB8C6F7468FF23B1CA929087471 org.netbeans.html:net.java.html.boot:1.7.3
diff --git a/platform/net.java.html.boot/external/net.java.html.boot-1.7-license.txt b/platform/net.java.html.boot/external/net.java.html.boot-1.7.3-license.txt
similarity index 99%
rename from platform/net.java.html.boot/external/net.java.html.boot-1.7-license.txt
rename to platform/net.java.html.boot/external/net.java.html.boot-1.7.3-license.txt
index ef425f93191e..dbc1573f29fc 100644
--- a/platform/net.java.html.boot/external/net.java.html.boot-1.7-license.txt
+++ b/platform/net.java.html.boot/external/net.java.html.boot-1.7.3-license.txt
@@ -1,5 +1,5 @@
Name: Html4J
-Version: 1.7
+Version: 1.7.3
Description: Html4j Boot
License: Apache-2.0
Origin: Apache Software Foundation
diff --git a/platform/net.java.html.boot/nbproject/project.properties b/platform/net.java.html.boot/nbproject/project.properties
index 29948b11f481..0d7e770527e2 100644
--- a/platform/net.java.html.boot/nbproject/project.properties
+++ b/platform/net.java.html.boot/nbproject/project.properties
@@ -14,6 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-release.external/net.java.html.boot-1.7.jar=modules/net-java-html-boot.jar
+release.external/net.java.html.boot-1.7.3.jar=modules/net-java-html-boot.jar
is.autoload=true
nbm.module.author=Jaroslav Tulach
diff --git a/platform/net.java.html.boot/nbproject/project.xml b/platform/net.java.html.boot/nbproject/project.xml
index 6d52792f1af3..a8222f32fbdd 100644
--- a/platform/net.java.html.boot/nbproject/project.xml
+++ b/platform/net.java.html.boot/nbproject/project.xml
@@ -28,7 +28,7 @@
net-java-html-boot.jar
- external/net.java.html.boot-1.7.jar
+ external/net.java.html.boot-1.7.3.jar
diff --git a/platform/net.java.html.geo/external/binaries-list b/platform/net.java.html.geo/external/binaries-list
index 5f138b7810ec..d457c6728303 100644
--- a/platform/net.java.html.geo/external/binaries-list
+++ b/platform/net.java.html.geo/external/binaries-list
@@ -14,4 +14,4 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-79D84786D3C3001415C195AE17900A1B5273E6FC org.netbeans.html:net.java.html.geo:1.7
+7AE5571DACE8CAD67E894A1EAB92F0B295587992 org.netbeans.html:net.java.html.geo:1.7.3
diff --git a/platform/net.java.html.geo/external/net.java.html.geo-1.7-license.txt b/platform/net.java.html.geo/external/net.java.html.geo-1.7.3-license.txt
similarity index 99%
rename from platform/net.java.html.geo/external/net.java.html.geo-1.7-license.txt
rename to platform/net.java.html.geo/external/net.java.html.geo-1.7.3-license.txt
index 65c39b4434c6..549582c0d533 100644
--- a/platform/net.java.html.geo/external/net.java.html.geo-1.7-license.txt
+++ b/platform/net.java.html.geo/external/net.java.html.geo-1.7.3-license.txt
@@ -1,5 +1,5 @@
Name: Html4J Geolocation API
-Version: 1.7
+Version: 1.7.3
Description: Html4j Geolocation API
License: Apache-2.0
Origin: Apache Software Foundation
diff --git a/platform/net.java.html.geo/nbproject/project.properties b/platform/net.java.html.geo/nbproject/project.properties
index 480c76b7e549..1141f732e126 100644
--- a/platform/net.java.html.geo/nbproject/project.properties
+++ b/platform/net.java.html.geo/nbproject/project.properties
@@ -14,6 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-release.external/net.java.html.geo-1.7.jar=modules/net-java-html-geo.jar
+release.external/net.java.html.geo-1.7.3.jar=modules/net-java-html-geo.jar
is.autoload=true
nbm.module.author=Jaroslav Tulach
diff --git a/platform/net.java.html.geo/nbproject/project.xml b/platform/net.java.html.geo/nbproject/project.xml
index 108708839b03..412ad4896e47 100644
--- a/platform/net.java.html.geo/nbproject/project.xml
+++ b/platform/net.java.html.geo/nbproject/project.xml
@@ -28,7 +28,7 @@
net-java-html-geo.jar
- external/net.java.html.geo-1.7.jar
+ external/net.java.html.geo-1.7.3.jar
diff --git a/platform/net.java.html.json/external/binaries-list b/platform/net.java.html.json/external/binaries-list
index d57f026e414f..a385952a4a0f 100644
--- a/platform/net.java.html.json/external/binaries-list
+++ b/platform/net.java.html.json/external/binaries-list
@@ -14,4 +14,4 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-881CBEB3FC964CBFD2C7DA9200E1C85CE1560E10 org.netbeans.html:net.java.html.json:1.7
+F52F8CFEA7C7A74CB9DB31BB12B4FF4075A94811 org.netbeans.html:net.java.html.json:1.7.3
diff --git a/platform/net.java.html.json/external/net.java.html.json-1.7-license.txt b/platform/net.java.html.json/external/net.java.html.json-1.7.3-license.txt
similarity index 99%
rename from platform/net.java.html.json/external/net.java.html.json-1.7-license.txt
rename to platform/net.java.html.json/external/net.java.html.json-1.7.3-license.txt
index d242a7705ed8..9066601d2925 100644
--- a/platform/net.java.html.json/external/net.java.html.json-1.7-license.txt
+++ b/platform/net.java.html.json/external/net.java.html.json-1.7.3-license.txt
@@ -1,5 +1,5 @@
Name: Html4J JSON Model in Java
-Version: 1.7
+Version: 1.7.3
Description: Html4j JSON Model in Java
License: Apache-2.0
Origin: Apache Software Foundation
diff --git a/platform/net.java.html.json/nbproject/project.properties b/platform/net.java.html.json/nbproject/project.properties
index 117501fc6007..e313fd912090 100644
--- a/platform/net.java.html.json/nbproject/project.properties
+++ b/platform/net.java.html.json/nbproject/project.properties
@@ -14,6 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-release.external/net.java.html.json-1.7.jar=modules/net-java-html-json.jar
+release.external/net.java.html.json-1.7.3.jar=modules/net-java-html-json.jar
is.autoload=true
nbm.module.author=Jaroslav Tulach
diff --git a/platform/net.java.html.json/nbproject/project.xml b/platform/net.java.html.json/nbproject/project.xml
index 129a4bfaba62..83e912c8dc36 100644
--- a/platform/net.java.html.json/nbproject/project.xml
+++ b/platform/net.java.html.json/nbproject/project.xml
@@ -28,7 +28,7 @@
net-java-html-json.jar
- external/net.java.html.json-1.7.jar
+ external/net.java.html.json-1.7.3.jar
diff --git a/platform/net.java.html.sound/external/binaries-list b/platform/net.java.html.sound/external/binaries-list
index a8261d5fd055..c26f9dc7a313 100644
--- a/platform/net.java.html.sound/external/binaries-list
+++ b/platform/net.java.html.sound/external/binaries-list
@@ -14,4 +14,4 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-2AE13EC63325542A90A944D438B830343C954058 org.netbeans.html:net.java.html.sound:1.7
+AFBA69B9F15BC582FC0D888C1154C52D45557DFF org.netbeans.html:net.java.html.sound:1.7.3
diff --git a/platform/net.java.html.sound/external/net.java.html.sound-1.7-license.txt b/platform/net.java.html.sound/external/net.java.html.sound-1.7.3-license.txt
similarity index 99%
rename from platform/net.java.html.sound/external/net.java.html.sound-1.7-license.txt
rename to platform/net.java.html.sound/external/net.java.html.sound-1.7.3-license.txt
index 95fba485722c..45351b508b19 100644
--- a/platform/net.java.html.sound/external/net.java.html.sound-1.7-license.txt
+++ b/platform/net.java.html.sound/external/net.java.html.sound-1.7.3-license.txt
@@ -1,5 +1,5 @@
Name: Html4J Sound API via HTML
-Version: 1.7
+Version: 1.7.3
Description: Html4j Sound API via HTML
License: Apache-2.0
Origin: Apache Software Foundation
diff --git a/platform/net.java.html.sound/nbproject/project.properties b/platform/net.java.html.sound/nbproject/project.properties
index c6e1d2ba64ff..7063616ac500 100644
--- a/platform/net.java.html.sound/nbproject/project.properties
+++ b/platform/net.java.html.sound/nbproject/project.properties
@@ -14,6 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-release.external/net.java.html.sound-1.7.jar=modules/net-java-html-sound.jar
+release.external/net.java.html.sound-1.7.3.jar=modules/net-java-html-sound.jar
is.autoload=true
nbm.module.author=Jaroslav Tulach
diff --git a/platform/net.java.html.sound/nbproject/project.xml b/platform/net.java.html.sound/nbproject/project.xml
index a71ac233a450..4f614c6caaca 100644
--- a/platform/net.java.html.sound/nbproject/project.xml
+++ b/platform/net.java.html.sound/nbproject/project.xml
@@ -28,7 +28,7 @@
net-java-html-sound.jar
- external/net.java.html.sound-1.7.jar
+ external/net.java.html.sound-1.7.3.jar
diff --git a/platform/net.java.html/external/binaries-list b/platform/net.java.html/external/binaries-list
index 5e8232f754ee..5eecc12aaa01 100644
--- a/platform/net.java.html/external/binaries-list
+++ b/platform/net.java.html/external/binaries-list
@@ -14,4 +14,4 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-CCD6BDB95D674D5DB9189B146078CB0452CE1307 org.netbeans.html:net.java.html:1.7
+8D34C9BF1D1A898E5E6A618B220DB3FC00C2F936 org.netbeans.html:net.java.html:1.7.3
diff --git a/platform/net.java.html/external/net.java.html-1.7-license.txt b/platform/net.java.html/external/net.java.html-1.7.3-license.txt
similarity index 99%
rename from platform/net.java.html/external/net.java.html-1.7-license.txt
rename to platform/net.java.html/external/net.java.html-1.7.3-license.txt
index 31be8bea9e8c..20b4bd0a75c3 100644
--- a/platform/net.java.html/external/net.java.html-1.7-license.txt
+++ b/platform/net.java.html/external/net.java.html-1.7.3-license.txt
@@ -1,5 +1,5 @@
Name: Html4J
-Version: 1.7
+Version: 1.7.3
Description: Html4j
License: Apache-2.0
Origin: Apache Software Foundation
diff --git a/platform/net.java.html/nbproject/project.properties b/platform/net.java.html/nbproject/project.properties
index 58712d4c9f7f..ceffa53aa57e 100644
--- a/platform/net.java.html/nbproject/project.properties
+++ b/platform/net.java.html/nbproject/project.properties
@@ -14,6 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-release.external/net.java.html-1.7.jar=modules/net-java-html.jar
+release.external/net.java.html-1.7.3.jar=modules/net-java-html.jar
is.autoload=true
nbm.module.author=Jaroslav Tulach
diff --git a/platform/net.java.html/nbproject/project.xml b/platform/net.java.html/nbproject/project.xml
index 3d7fa960a361..b2490eb8b49f 100644
--- a/platform/net.java.html/nbproject/project.xml
+++ b/platform/net.java.html/nbproject/project.xml
@@ -28,7 +28,7 @@
net-java-html.jar
- external/net.java.html-1.7.jar
+ external/net.java.html-1.7.3.jar
diff --git a/platform/o.n.html.ko4j/external/binaries-list b/platform/o.n.html.ko4j/external/binaries-list
index 274685b3e47c..1950c13bf6ba 100644
--- a/platform/o.n.html.ko4j/external/binaries-list
+++ b/platform/o.n.html.ko4j/external/binaries-list
@@ -14,4 +14,4 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-BB182922EE11EFF2508BD0DB4144F468688EAA84 org.netbeans.html:ko4j:1.7
+F63214CFA9BDFCBD48E3A0BDEEEF379999AB4AD2 org.netbeans.html:ko4j:1.7.3
diff --git a/platform/o.n.html.ko4j/external/ko4j-1.7-license.txt b/platform/o.n.html.ko4j/external/ko4j-1.7.3-license.txt
similarity index 99%
rename from platform/o.n.html.ko4j/external/ko4j-1.7-license.txt
rename to platform/o.n.html.ko4j/external/ko4j-1.7.3-license.txt
index b8471e10c313..d136fb3d98cc 100644
--- a/platform/o.n.html.ko4j/external/ko4j-1.7-license.txt
+++ b/platform/o.n.html.ko4j/external/ko4j-1.7.3-license.txt
@@ -1,5 +1,5 @@
Name: Knockout4J
-Version: 1.7
+Version: 1.7.3
Description: Knockout4J
License: Apache-2.0
Origin: Apache Software Foundation
diff --git a/platform/o.n.html.ko4j/nbproject/project.properties b/platform/o.n.html.ko4j/nbproject/project.properties
index 896212e8d36e..951cccc68134 100644
--- a/platform/o.n.html.ko4j/nbproject/project.properties
+++ b/platform/o.n.html.ko4j/nbproject/project.properties
@@ -14,6 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-release.external/ko4j-1.7.jar=modules/org-netbeans-html-ko4j.jar
+release.external/ko4j-1.7.3.jar=modules/org-netbeans-html-ko4j.jar
nbm.module.author=Jaroslav Tulach
is.autoload=true
diff --git a/platform/o.n.html.ko4j/nbproject/project.xml b/platform/o.n.html.ko4j/nbproject/project.xml
index afd15cedeb0e..7138aa83c13e 100644
--- a/platform/o.n.html.ko4j/nbproject/project.xml
+++ b/platform/o.n.html.ko4j/nbproject/project.xml
@@ -28,7 +28,7 @@
org-netbeans-html-ko4j.jar
- external/ko4j-1.7.jar
+ external/ko4j-1.7.3.jar
diff --git a/platform/o.n.html.presenters.spi/build.xml b/platform/o.n.html.presenters.spi/build.xml
new file mode 100644
index 000000000000..04b9362828fc
--- /dev/null
+++ b/platform/o.n.html.presenters.spi/build.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
diff --git a/platform/o.n.html.presenters.spi/external/binaries-list b/platform/o.n.html.presenters.spi/external/binaries-list
new file mode 100644
index 000000000000..a2968acd383f
--- /dev/null
+++ b/platform/o.n.html.presenters.spi/external/binaries-list
@@ -0,0 +1,17 @@
+# 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.
+7621B0AFE4260212C6632FE74E6F5CCDBB61EEB8 org.netbeans.html:generic:1.7.3
diff --git a/platform/o.n.html.presenters.spi/external/generic-1.7.3-license.txt b/platform/o.n.html.presenters.spi/external/generic-1.7.3-license.txt
new file mode 100644
index 000000000000..d136fb3d98cc
--- /dev/null
+++ b/platform/o.n.html.presenters.spi/external/generic-1.7.3-license.txt
@@ -0,0 +1,208 @@
+Name: Knockout4J
+Version: 1.7.3
+Description: Knockout4J
+License: Apache-2.0
+Origin: Apache Software Foundation
+URL: http://incubator.apache.org/projects/netbeans.html
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
diff --git a/platform/o.n.html.presenters.spi/manifest.mf b/platform/o.n.html.presenters.spi/manifest.mf
new file mode 100644
index 000000000000..7af1adde1dc6
--- /dev/null
+++ b/platform/o.n.html.presenters.spi/manifest.mf
@@ -0,0 +1 @@
+OpenIDE-Module: org.netbeans.html.presenters.spi
diff --git a/platform/o.n.html.presenters.spi/nbproject/project.properties b/platform/o.n.html.presenters.spi/nbproject/project.properties
new file mode 100644
index 000000000000..6a152d3766c8
--- /dev/null
+++ b/platform/o.n.html.presenters.spi/nbproject/project.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+release.external/generic-1.7.3.jar=modules/org-netbeans-html-presenters-spi.jar
+nbm.module.author=Jaroslav Tulach
+is.autoload=true
diff --git a/platform/o.n.html.presenters.spi/nbproject/project.xml b/platform/o.n.html.presenters.spi/nbproject/project.xml
new file mode 100644
index 000000000000..c3d09afc33c1
--- /dev/null
+++ b/platform/o.n.html.presenters.spi/nbproject/project.xml
@@ -0,0 +1,35 @@
+
+
+
+ org.netbeans.modules.apisupport.project
+
+
+ org.netbeans.html.presenters.spi
+
+
+
+ org-netbeans-html-presenters-spi.jar
+ external/generic-1.7.3.jar
+
+
+
+
diff --git a/platform/o.n.html.xhr4j/external/binaries-list b/platform/o.n.html.xhr4j/external/binaries-list
index ba27f8a62d81..e62f628ff4ef 100644
--- a/platform/o.n.html.xhr4j/external/binaries-list
+++ b/platform/o.n.html.xhr4j/external/binaries-list
@@ -14,4 +14,4 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-736744D6DD34CAE10FE4EA1D4E33BBA595480A17 org.netbeans.html:xhr4j:1.7
+2756D001008576536B68C1B43D96053E82723D65 org.netbeans.html:xhr4j:1.7.3
diff --git a/platform/o.n.html.xhr4j/external/xhr4j-1.7-license.txt b/platform/o.n.html.xhr4j/external/xhr4j-1.7.3-license.txt
similarity index 99%
rename from platform/o.n.html.xhr4j/external/xhr4j-1.7-license.txt
rename to platform/o.n.html.xhr4j/external/xhr4j-1.7.3-license.txt
index 4a2691dc6a91..534c1e8d11ec 100644
--- a/platform/o.n.html.xhr4j/external/xhr4j-1.7-license.txt
+++ b/platform/o.n.html.xhr4j/external/xhr4j-1.7.3-license.txt
@@ -1,5 +1,5 @@
Name: XHR via Java
-Version: 1.7
+Version: 1.7.3
Description: XHR via Java
License: Apache-2.0
Origin: Apache Software Foundation
diff --git a/platform/o.n.html.xhr4j/nbproject/project.properties b/platform/o.n.html.xhr4j/nbproject/project.properties
index c7c94e0b06fc..2e125b716be4 100644
--- a/platform/o.n.html.xhr4j/nbproject/project.properties
+++ b/platform/o.n.html.xhr4j/nbproject/project.properties
@@ -14,6 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-release.external/xhr4j-1.7.jar=modules/org-netbeans-html-xhr4j.jar
+release.external/xhr4j-1.7.3.jar=modules/org-netbeans-html-xhr4j.jar
nbm.module.author=Jaroslav Tulach
is.autoload=true
diff --git a/platform/o.n.html.xhr4j/nbproject/project.xml b/platform/o.n.html.xhr4j/nbproject/project.xml
index 784280af8562..c1a875a04993 100644
--- a/platform/o.n.html.xhr4j/nbproject/project.xml
+++ b/platform/o.n.html.xhr4j/nbproject/project.xml
@@ -28,7 +28,7 @@
org-netbeans-html-xhr4j.jar
- external/xhr4j-1.7.jar
+ external/xhr4j-1.7.3.jar