Bringing in state as of release-1.4 and merging with Apache licensing changes. Release 1.4 is equivalent to commit cc5ac08f0a and the commit is tagged mirror-1.4.
Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/commit/9e4efe7c Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/tree/9e4efe7c Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/diff/9e4efe7c Branch: refs/heads/master Commit: 9e4efe7c7493f175233d29b4aecf9855b1ca360e Parents: cc5ac08 0f2bc8f Author: Jaroslav Tulach <[email protected]> Authored: Fri Sep 8 22:44:50 2017 +0200 Committer: Jaroslav Tulach <[email protected]> Committed: Fri Sep 8 22:44:50 2017 +0200 ---------------------------------------------------------------------- .gitignore | 2 +- .travis.yml | 18 ++ COPYING | 52 ++--- LICENSE | 204 +++++++++++++++++++ NOTICE | 8 + boot-agent-test/pom.xml | 52 ++--- .../html/bootagent/DynamicClassLoaderTest.java | 52 ++--- .../html/bootagent/JavaScriptBodyTst.java | 52 ++--- .../java/org/netbeans/html/bootagent/KOFx.java | 52 ++--- .../org/netbeans/html/bootagent/empty.html | 56 ++--- boot-fx/pom.xml | 52 ++--- .../java/net/java/html/boot/fx/FXBrowsers.java | 52 ++--- .../java/net/java/html/boot/fx/package.html | 56 ++--- .../html/boot/fx/AbstractFXPresenter.java | 52 ++--- .../java/org/netbeans/html/boot/fx/Dbgr.java | 52 ++--- .../java/org/netbeans/html/boot/fx/FXBrwsr.java | 52 ++--- .../org/netbeans/html/boot/fx/FXConsole.java | 52 ++--- .../org/netbeans/html/boot/fx/FXInspect.java | 52 ++--- .../org/netbeans/html/boot/fx/FXPresenter.java | 52 ++--- .../org/netbeans/html/boot/fx/FXToolbar.java | 52 ++--- .../org/netbeans/html/boot/fx/WatchDir.java | 52 ++--- .../org/netbeans/html/boot/fx/Bundle.properties | 56 ++--- .../html/boot/fx/FXBrowsersOnResourceTest.java | 52 ++--- .../net/java/html/boot/fx/FXBrowsersTest.java | 52 ++--- .../org/netbeans/html/boot/fx/FXBrwsrTest.java | 52 ++--- .../netbeans/html/boot/fx/FXJavaScriptTest.java | 52 ++--- .../netbeans/html/boot/fx/FXPresenterTst.java | 52 ++--- .../netbeans/html/boot/fx/FxJavaScriptTst.java | 52 ++--- .../java/org/netbeans/html/boot/fx/KOFx.java | 52 ++--- .../org/netbeans/html/boot/fx/Periodicaly.java | 52 ++--- .../netbeans/html/boot/fx/PeriodicalyTest.java | 52 ++--- .../org/netbeans/html/boot/fx/PopupTest.java | 52 ++--- .../org/netbeans/html/boot/fx/ReloadTest.java | 52 ++--- .../netbeans/html/boot/fx/TestingProvider.java | 52 ++--- .../org/netbeans/html/boot/fx/TitleTest.java | 52 ++--- .../test/java/org/sample/app/pkg/SampleApp.java | 52 ++--- .../test/resources/net/java/html/boot/fx/wnd.js | 52 ++--- .../org/netbeans/html/boot/fx/empty.html | 56 ++--- .../org/netbeans/html/boot/fx/second.html | 56 ++--- boot-script/pom.xml | 52 ++--- .../java/html/boot/script/ScriptPresenter.java | 52 ++--- .../java/net/java/html/boot/script/Scripts.java | 52 ++--- .../java/net/java/html/boot/script/package.html | 56 ++--- .../html/boot/script/Jsr223JavaScriptTest.java | 52 ++--- .../html/boot/script/Jsr223JavaScriptTst.java | 52 ++--- .../net/java/html/boot/script/SingleCase.java | 52 ++--- .../java/html/boot/script/ko4j/DynamicHTTP.java | 52 ++--- .../net/java/html/boot/script/ko4j/KOCase.java | 52 ++--- .../boot/script/ko4j/KnockoutEnvJSTest.java | 52 ++--- .../net/java/html/boot/script/ko4j/test.html | 56 ++--- boot-truffle/pom.xml | 52 ++--- .../net/java/html/boot/truffle/IsArrayNode.java | 52 ++--- .../net/java/html/boot/truffle/IsNullNode.java | 52 ++--- .../net/java/html/boot/truffle/JavaArray.java | 52 ++--- .../net/java/html/boot/truffle/JavaObject.java | 52 ++--- .../net/java/html/boot/truffle/JavaValue.java | 52 ++--- .../html/boot/truffle/TrufflePresenter.java | 52 ++--- .../html/boot/truffle/TrufflePresenters.java | 52 ++--- .../net/java/html/boot/truffle/package.html | 56 ++--- .../html/boot/truffle/JsArrayTruffleTest.java | 52 ++--- .../net/java/html/boot/truffle/SingleCase.java | 52 ++--- .../boot/truffle/TruffleJavaScriptTest.java | 52 ++--- boot/pom.xml | 52 ++--- .../java/net/java/html/boot/BrowserBuilder.java | 52 ++--- .../main/java/net/java/html/boot/package.html | 56 ++--- .../java/net/java/html/js/JavaScriptBody.java | 52 ++--- .../net/java/html/js/JavaScriptResource.java | 52 ++--- .../src/main/java/net/java/html/js/package.html | 52 ++--- .../netbeans/html/boot/impl/FindResources.java | 52 ++--- .../org/netbeans/html/boot/impl/FnContext.java | 52 ++--- .../org/netbeans/html/boot/impl/FnUtils.java | 52 ++--- .../html/boot/impl/JavaScriptProcesor.java | 52 ++--- .../org/netbeans/html/boot/impl/JsAgent.java | 52 ++--- .../org/netbeans/html/boot/impl/JsCallback.java | 52 ++--- .../netbeans/html/boot/impl/JsClassLoader.java | 52 ++--- .../org/netbeans/html/boot/impl/JsPkgCache.java | 52 ++--- .../java/org/netbeans/html/boot/spi/Fn.java | 52 ++--- .../org/netbeans/html/boot/spi/package.html | 56 ++--- .../resources/net/java/html/boot/html4j.txt | 52 ++--- .../net/java/html/boot/BrowserBuilderTest.java | 52 ++--- .../org/netbeans/html/boot/impl/Arithm.java | 52 ++--- .../org/netbeans/html/boot/impl/Compile.java | 52 ++--- .../html/boot/impl/CountFnCreationTest.java | 52 ++--- .../org/netbeans/html/boot/impl/FnTest.java | 52 ++--- .../html/boot/impl/JavaScriptProcesorTest.java | 52 ++--- .../netbeans/html/boot/impl/JsCallbackTest.java | 52 ++--- .../html/boot/impl/JsClassLoaderBase.java | 52 ++--- .../html/boot/impl/JsClassLoaderTest.java | 52 ++--- .../org/netbeans/html/boot/impl/JsMethods.java | 52 ++--- .../netbeans/html/boot/impl/KeepAliveTest.java | 52 ++--- .../org/netbeans/html/boot/impl/Object.java | 52 ++--- .../org/netbeans/html/boot/impl/empty.js | 52 ++--- .../org/netbeans/html/boot/impl/jsmethods.js | 52 ++--- context/pom.xml | 52 ++--- .../src/main/java/net/java/html/BrwsrCtx.java | 52 ++--- .../src/main/java/net/java/html/package.html | 56 ++--- .../netbeans/html/context/impl/CtxAccssr.java | 52 ++--- .../org/netbeans/html/context/impl/CtxImpl.java | 52 ++--- .../org/netbeans/html/context/spi/Contexts.java | 52 ++--- .../org/netbeans/html/context/spi/package.html | 56 ++--- .../test/java/net/java/html/BrwsrCtxTest.java | 52 ++--- .../netbeans/html/context/spi/ContextsTest.java | 52 ++--- equinox-agentclass-hook/pom.xml | 56 ++--- .../html/equinox/agentclass/AgentHook.java | 52 ++--- .../equinox/agentclass/NbInstrumentation.java | 52 ++--- .../main/resources/hookconfigurators.properties | 56 ++--- geo/pom.xml | 52 ++--- .../main/java/net/java/html/geo/OnLocation.java | 52 ++--- .../main/java/net/java/html/geo/Position.java | 52 ++--- .../main/java/net/java/html/geo/package.html | 56 ++--- .../org/netbeans/html/geo/impl/Accessor.java | 52 ++--- .../netbeans/html/geo/impl/GeoProcessor.java | 52 ++--- .../netbeans/html/geo/impl/JsGLProvider.java | 52 ++--- .../org/netbeans/html/geo/spi/CoordImpl.java | 52 ++--- .../org/netbeans/html/geo/spi/GLProvider.java | 52 ++--- .../java/org/netbeans/html/geo/spi/package.html | 56 ++--- .../java/net/java/html/geo/OnLocationTest.java | 52 ++--- .../org/netbeans/html/geo/impl/Compile.java | 52 ++--- .../html/geo/impl/GeoProcessorTest.java | 52 ++--- .../html/geo/impl/JsGLProviderTest.java | 52 ++--- .../netbeans/html/geo/spi/CoordImplTest.java | 52 ++--- html4j-maven-plugin/pom.xml | 52 ++--- .../html/mojo/ProcessJsAnnotationsMojo.java | 52 ++--- json-tck/pom.xml | 52 ++--- .../java/net/java/html/js/tests/Bodies.java | 52 ++--- .../java/net/java/html/js/tests/Factorial.java | 52 ++--- .../java/net/java/html/js/tests/GCBodyTest.java | 52 ++--- .../net/java/html/js/tests/Global2String.java | 52 ++--- .../net/java/html/js/tests/GlobalString.java | 52 ++--- .../java/html/js/tests/JavaScriptBodyTest.java | 52 ++--- .../main/java/net/java/html/js/tests/Later.java | 52 ++--- .../java/net/java/html/js/tests/Receiver.java | 52 ++--- .../main/java/net/java/html/js/tests/Sum.java | 52 ++--- .../java/html/json/tests/ConvertTypesTest.java | 52 ++--- .../java/html/json/tests/GCKnockoutTest.java | 52 ++--- .../java/net/java/html/json/tests/JSONTest.java | 52 ++--- .../net/java/html/json/tests/KnockoutTest.java | 52 ++--- .../net/java/html/json/tests/MinesTest.java | 52 ++--- .../java/html/json/tests/OperationsTest.java | 52 ++--- .../net/java/html/json/tests/PairModel.java | 52 ++--- .../net/java/html/json/tests/PersonImpl.java | 52 ++--- .../main/java/net/java/html/json/tests/Sex.java | 52 ++--- .../java/net/java/html/json/tests/Utils.java | 52 ++--- .../net/java/html/json/tests/WebSocketTest.java | 52 ++--- .../netbeans/html/json/tck/JavaScriptTCK.java | 52 ++--- .../java/org/netbeans/html/json/tck/KOTest.java | 52 ++--- .../org/netbeans/html/json/tck/KnockoutTCK.java | 52 ++--- .../org/netbeans/html/json/tck/package.html | 56 ++--- .../resources/net/java/html/js/tests/global.js | 52 ++--- .../resources/net/java/html/js/tests/global2.js | 52 ++--- .../java/net/java/html/js/tests/BodiesTest.java | 52 ++--- json/pom.xml | 52 ++--- .../net/java/html/json/ComputedProperty.java | 52 ++--- .../main/java/net/java/html/json/FakeModel.java | 52 ++--- .../main/java/net/java/html/json/Function.java | 52 ++--- .../src/main/java/net/java/html/json/Model.java | 52 ++--- .../java/net/java/html/json/ModelOperation.java | 52 ++--- .../main/java/net/java/html/json/Models.java | 52 ++--- .../net/java/html/json/OnPropertyChange.java | 52 ++--- .../main/java/net/java/html/json/OnReceive.java | 52 ++--- .../main/java/net/java/html/json/Property.java | 52 ++--- .../java/html/json/doc-files/websockets.html | 52 ++--- .../main/java/net/java/html/json/package.html | 52 ++--- .../org/netbeans/html/json/impl/Bindings.java | 52 ++--- .../java/org/netbeans/html/json/impl/JSON.java | 52 ++--- .../org/netbeans/html/json/impl/JSONList.java | 52 ++--- .../netbeans/html/json/impl/ModelProcessor.java | 52 ++--- .../html/json/impl/PropertyBindingAccessor.java | 52 ++--- .../org/netbeans/html/json/impl/RcvrJSON.java | 52 ++--- .../org/netbeans/html/json/impl/Transitive.java | 52 ++--- .../netbeans/html/json/spi/FunctionBinding.java | 52 ++--- .../org/netbeans/html/json/spi/JSONCall.java | 52 ++--- .../org/netbeans/html/json/spi/Observers.java | 52 ++--- .../netbeans/html/json/spi/PropertyBinding.java | 52 ++--- .../java/org/netbeans/html/json/spi/Proto.java | 52 ++--- .../org/netbeans/html/json/spi/Technology.java | 52 ++--- .../org/netbeans/html/json/spi/Transfer.java | 52 ++--- .../org/netbeans/html/json/spi/WSTransfer.java | 52 ++--- .../org/netbeans/html/json/spi/package.html | 56 ++--- .../netbeans/html/json/impl/Bundle.properties | 52 ++--- .../java/net/java/html/json/AdressTest.java | 52 ++--- .../test/java/net/java/html/json/BoardTest.java | 52 ++--- .../net/java/html/json/BooleanArrayTest.java | 52 ++--- .../test/java/net/java/html/json/Compile.java | 52 ++--- .../java/net/java/html/json/KeywordsTest.java | 52 ++--- .../java/html/json/MapModelNotMutableTest.java | 52 ++--- .../java/net/java/html/json/MapModelTest.java | 52 ++--- .../net/java/html/json/ModelProcessorTest.java | 52 ++--- .../test/java/net/java/html/json/ModelTest.java | 52 ++--- .../java/net/java/html/json/ModelsTest.java | 52 ++--- .../java/net/java/html/json/OperationTest.java | 52 ++--- .../java/net/java/html/json/PersonImpl.java | 52 ++--- .../net/java/html/json/PrimitiveArrayTest.java | 52 ++--- json/src/test/java/net/java/html/json/Sex.java | 52 ++--- .../test/java/net/java/html/json/TypesTest.java | 52 ++--- .../java/net/java/html/json/UnderscoreTest.java | 52 ++--- .../net/java/html/json/WebSocketCallTest.java | 52 ++--- .../net/java/html/json/sub/StreetCntrl.java | 52 ++--- .../netbeans/html/json/impl/BuilderTest.java | 52 ++--- .../html/json/impl/ConstructorTest.java | 52 ++--- .../netbeans/html/json/impl/DeepChangeTest.java | 52 ++--- .../netbeans/html/json/impl/EmployeeImpl.java | 52 ++--- .../netbeans/html/json/impl/EmployerTest.java | 52 ++--- .../netbeans/html/json/impl/InfinityTest.java | 52 ++--- .../netbeans/html/json/impl/JSONListTest.java | 52 ++--- .../org/netbeans/html/json/impl/JSONTest.java | 52 ++--- .../html/json/impl/NoPropertiesTest.java | 52 ++--- .../netbeans/html/json/impl/OnReceiveTest.java | 52 ++--- .../html/json/impl/ParallelChangeTest.java | 52 ++--- .../org/netbeans/html/json/impl/ToDoTest.java | 52 ++--- ko-felix-test/pom.xml | 52 ++--- .../ko/felix/test/KnockoutFelixTCKImpl.java | 52 ++--- .../html/ko/felix/test/DynamicHTTP.java | 52 ++--- .../org/netbeans/html/ko/felix/test/KOFx.java | 52 ++--- .../ko/felix/test/KnockoutFelixAriesIT.java | 52 ++--- .../html/ko/felix/test/KnockoutFelixIT.java | 52 ++--- .../org/netbeans/html/ko/felix/test/test.html | 56 ++--- ko-osgi-test/pom.xml | 52 ++--- .../ko/osgi/test/KnockoutEquinoxTCKImpl.java | 52 ++--- .../netbeans/html/ko/osgi/test/DynamicHTTP.java | 52 ++--- .../org/netbeans/html/ko/osgi/test/KOFx.java | 52 ++--- .../html/ko/osgi/test/KnockoutEquinoxIT.java | 52 ++--- .../org/netbeans/html/ko/osgi/test/test.html | 56 ++--- ko-ws-tyrus/pom.xml | 52 ++--- .../org/netbeans/html/wstyrus/LoadJSON.java | 52 ++--- .../org/netbeans/html/wstyrus/TyrusContext.java | 52 ++--- .../netbeans/html/wstyrus/TyrusDynamicHTTP.java | 52 ++--- .../java/org/netbeans/html/wstyrus/TyrusFX.java | 52 ++--- .../html/wstyrus/TyrusKnockoutTest.java | 52 ++--- .../org/netbeans/html/wstyrus/test.html | 56 ++--- ko4j/pom.xml | 52 ++--- .../main/java/org/netbeans/html/ko4j/KO4J.java | 52 ++--- .../java/org/netbeans/html/ko4j/KOSockets.java | 52 ++--- .../java/org/netbeans/html/ko4j/KOTech.java | 52 ++--- .../java/org/netbeans/html/ko4j/KOTransfer.java | 52 ++--- .../java/org/netbeans/html/ko4j/Knockout.java | 52 ++--- .../java/org/netbeans/html/ko4j/LoadJSON.java | 52 ++--- .../java/org/netbeans/html/ko4j/LoadWS.java | 52 ++--- .../org/netbeans/html/ko4j/DynamicHTTP.java | 52 ++--- .../html/ko4j/InitializeKnockoutTest.java | 52 ++--- .../test/java/org/netbeans/html/ko4j/KOFx.java | 52 ++--- .../org/netbeans/html/ko4j/KnockoutFXTest.java | 52 ++--- .../netbeans/html/ko4j/LessCallbacksCheck.java | 52 ++--- .../html/ko4j/OffThreadInitializationTest.java | 52 ++--- .../html/ko4j/ReferenceKnockoutTest.java | 52 ++--- .../resources/org/netbeans/html/ko4j/test.html | 56 ++--- pom.xml | 82 ++++---- sound/pom.xml | 52 ++--- .../java/net/java/html/sound/AudioClip.java | 52 ++--- .../main/java/net/java/html/sound/package.html | 56 ++--- .../html/sound/impl/BrowserAudioEnv.java | 52 ++--- .../html/sound/spi/AudioEnvironment.java | 52 ++--- .../org/netbeans/html/sound/spi/package.html | 56 ++--- src/main/javadoc/overview.html | 56 ++--- xhr4j/pom.xml | 52 ++--- .../java/org/netbeans/html/xhr4j/LoadJSON.java | 52 ++--- .../html/xhr4j/XmlHttpResourceContext.java | 52 ++--- .../netbeans/html/xhr4j/JsonDynamicHTTP.java | 52 ++--- .../java/org/netbeans/html/xhr4j/JsonFX.java | 52 ++--- .../netbeans/html/xhr4j/JsonKnockoutTest.java | 52 ++--- .../resources/org/netbeans/html/xhr4j/test.html | 56 ++--- 261 files changed, 3910 insertions(+), 9820 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/.gitignore ---------------------------------------------------------------------- diff --cc .gitignore index c23ef8d,427c21d..4352b77 --- a/.gitignore +++ b/.gitignore @@@ -1,2 -1,2 +1,2 @@@ */target/ - /target/ -target/ ++/target/ http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/.travis.yml ---------------------------------------------------------------------- diff --cc .travis.yml index ba7c1a9,0000000..2e63b0f mode 100644,000000..100644 --- a/.travis.yml +++ b/.travis.yml @@@ -1,13 -1,0 +1,31 @@@ ++# ++# Licensed to the Apache Software Foundation (ASF) under one ++# or more contributor license agreements. See the NOTICE file ++# distributed with this work for additional information ++# regarding copyright ownership. The ASF licenses this file ++# to you under the Apache License, Version 2.0 (the ++# "License"); you may not use this file except in compliance ++# with the License. You may obtain a copy of the License at ++# ++# http://www.apache.org/licenses/LICENSE-2.0 ++# ++# Unless required by applicable law or agreed to in writing, ++# software distributed under the License is distributed on an ++# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ++# KIND, either express or implied. See the License for the ++# specific language governing permissions and limitations ++# under the License. ++# +language: java +before_script: + - export DISPLAY=:99.0 + - sh -e /etc/init.d/xvfb start || echo No X11 + - sleep 3 +script: + - jdk_switcher use oraclejdk8 || java -version + - java -version + - mvn install -DskipTests + - mvn verify +os: + - linux + http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot-agent-test/pom.xml ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot-fx/pom.xml ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot-fx/src/main/java/org/netbeans/html/boot/fx/AbstractFXPresenter.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot-fx/src/main/java/org/netbeans/html/boot/fx/FXBrwsr.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot-fx/src/main/java/org/netbeans/html/boot/fx/WatchDir.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot-fx/src/test/java/org/netbeans/html/boot/fx/Periodicaly.java ---------------------------------------------------------------------- diff --cc boot-fx/src/test/java/org/netbeans/html/boot/fx/Periodicaly.java index 8c663e5,0000000..f0e6e66 mode 100644,000000..100644 --- a/boot-fx/src/test/java/org/netbeans/html/boot/fx/Periodicaly.java +++ b/boot-fx/src/test/java/org/netbeans/html/boot/fx/Periodicaly.java @@@ -1,103 -1,0 +1,79 @@@ +/** - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. ++ * Licensed to the Apache Software Foundation (ASF) under one ++ * or more contributor license agreements. See the NOTICE file ++ * distributed with this work for additional information ++ * regarding copyright ownership. The ASF licenses this file ++ * to you under the Apache License, Version 2.0 (the ++ * "License"); you may not use this file except in compliance ++ * with the License. You may obtain a copy of the License at + * - * Copyright 2013-2014 Oracle and/or its affiliates. All rights reserved. ++ * http://www.apache.org/licenses/LICENSE-2.0 + * - * Oracle and Java are registered trademarks of Oracle and/or its affiliates. - * Other names may be trademarks of their respective owners. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common - * Development and Distribution License("CDDL") (collectively, the - * "License"). You may not use this file except in compliance with the - * License. You can obtain a copy of the License at - * http://www.netbeans.org/cddl-gplv2.html - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the - * specific language governing permissions and limitations under the - * License. When distributing the software, include this License Header - * Notice in each file and include the License file at - * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the GPL Version 2 section of the License file that - * accompanied this code. If applicable, add the following below the - * License Header, with the fields enclosed by brackets [] replaced by - * your own identifying information: - * "Portions Copyrighted [year] [name of copyright owner]" - * - * Contributor(s): - * - * The Original Software is NetBeans. The Initial Developer of the Original - * Software is Oracle. Portions Copyright 2013-2016 Oracle. All Rights Reserved. - * - * If you wish your version of this file to be governed by only the CDDL - * or only the GPL Version 2, indicate your decision by adding - * "[Contributor] elects to include this software in this distribution - * under the [CDDL or GPL Version 2] license." If you do not indicate a - * single choice of license, a recipient has the option to distribute - * your version of this file under either the CDDL, the GPL Version 2 or - * to extend the choice of license to its licensees as provided above. - * However, if you add GPL Version 2 code and therefore, elected the GPL - * Version 2 license, then the option applies only if the new code is - * made subject to such option by the copyright holder. ++ * Unless required by applicable law or agreed to in writing, ++ * software distributed under the License is distributed on an ++ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ++ * KIND, either express or implied. See the License for the ++ * specific language governing permissions and limitations ++ * under the License. + */ +package org.netbeans.html.boot.fx; + +import java.util.Timer; +import java.util.TimerTask; +import net.java.html.BrwsrCtx; +import net.java.html.js.JavaScriptBody; + +// BEGIN: org.netbeans.html.boot.fx.Periodicaly +public final class Periodicaly extends TimerTask { + private final BrwsrCtx ctx; + private int counter; + + private Periodicaly(BrwsrCtx ctx) { + // remember the browser context and use it later + this.ctx = ctx; + this.counter = 0; + } + + @Override + public void run() { + // arrives on wrong thread, needs to be re-scheduled + ctx.execute(new Runnable() { + @Override + public void run() { + codeThatNeedsToBeRunInABrowserEnvironment(); + } + }); + } + + // called when your page is ready + public static void onPageLoad(String... args) throws Exception { + // the context at the time of page initialization + BrwsrCtx initialCtx = BrwsrCtx.findDefault(Periodicaly.class); + // the task that is associated with context + Periodicaly task = new Periodicaly(initialCtx); + // creates a new timer + Timer t = new Timer("Move the box"); + // run the task every 100ms + t.scheduleAtFixedRate(task, 0, 100); + } + + @JavaScriptBody(args = { "a", "b" }, body = "return a + b") + private static native int plus(int a, int b); + + void codeThatNeedsToBeRunInABrowserEnvironment() { + // invokes JavaScript function in the browser environment + counter = plus(counter, 1); +// FINISH: org.netbeans.html.boot.fx.Periodicaly + + synchronized (Periodicaly.class) { + globalCounter = counter; + Periodicaly.class.notifyAll(); + } + } + static int globalCounter; + static synchronized void assertTen() throws InterruptedException { + while (globalCounter < 10) { + Periodicaly.class.wait(); + } + } +} http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot-fx/src/test/java/org/netbeans/html/boot/fx/PeriodicalyTest.java ---------------------------------------------------------------------- diff --cc boot-fx/src/test/java/org/netbeans/html/boot/fx/PeriodicalyTest.java index f3a3d21,0000000..327ba85 mode 100644,000000..100644 --- a/boot-fx/src/test/java/org/netbeans/html/boot/fx/PeriodicalyTest.java +++ b/boot-fx/src/test/java/org/netbeans/html/boot/fx/PeriodicalyTest.java @@@ -1,64 -1,0 +1,40 @@@ +/** - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. ++ * Licensed to the Apache Software Foundation (ASF) under one ++ * or more contributor license agreements. See the NOTICE file ++ * distributed with this work for additional information ++ * regarding copyright ownership. The ASF licenses this file ++ * to you under the Apache License, Version 2.0 (the ++ * "License"); you may not use this file except in compliance ++ * with the License. You may obtain a copy of the License at + * - * Copyright 2013-2014 Oracle and/or its affiliates. All rights reserved. ++ * http://www.apache.org/licenses/LICENSE-2.0 + * - * Oracle and Java are registered trademarks of Oracle and/or its affiliates. - * Other names may be trademarks of their respective owners. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common - * Development and Distribution License("CDDL") (collectively, the - * "License"). You may not use this file except in compliance with the - * License. You can obtain a copy of the License at - * http://www.netbeans.org/cddl-gplv2.html - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the - * specific language governing permissions and limitations under the - * License. When distributing the software, include this License Header - * Notice in each file and include the License file at - * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the GPL Version 2 section of the License file that - * accompanied this code. If applicable, add the following below the - * License Header, with the fields enclosed by brackets [] replaced by - * your own identifying information: - * "Portions Copyrighted [year] [name of copyright owner]" - * - * Contributor(s): - * - * The Original Software is NetBeans. The Initial Developer of the Original - * Software is Oracle. Portions Copyright 2013-2016 Oracle. All Rights Reserved. - * - * If you wish your version of this file to be governed by only the CDDL - * or only the GPL Version 2, indicate your decision by adding - * "[Contributor] elects to include this software in this distribution - * under the [CDDL or GPL Version 2] license." If you do not indicate a - * single choice of license, a recipient has the option to distribute - * your version of this file under either the CDDL, the GPL Version 2 or - * to extend the choice of license to its licensees as provided above. - * However, if you add GPL Version 2 code and therefore, elected the GPL - * Version 2 license, then the option applies only if the new code is - * made subject to such option by the copyright holder. ++ * Unless required by applicable law or agreed to in writing, ++ * software distributed under the License is distributed on an ++ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ++ * KIND, either express or implied. See the License for the ++ * specific language governing permissions and limitations ++ * under the License. + */ +package org.netbeans.html.boot.fx; + +import java.util.concurrent.Executors; +import net.java.html.boot.BrowserBuilder; +import org.testng.annotations.Test; + +public final class PeriodicalyTest { + @Test + public void runPeriodically() throws Exception { + final BrowserBuilder bb = BrowserBuilder.newBrowser(new FXPresenter()) + .loadPage("empty.html") + .loadClass(Periodicaly.class) + .invoke("onPageLoad"); + Executors.newSingleThreadExecutor().execute(new Runnable() { + @Override + public void run() { + bb.showAndWait(); + } + }); + Periodicaly.assertTen(); + } +} http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot-fx/src/test/java/org/netbeans/html/boot/fx/PopupTest.java ---------------------------------------------------------------------- diff --cc boot-fx/src/test/java/org/netbeans/html/boot/fx/PopupTest.java index a2963bb,0000000..c7676b8 mode 100644,000000..100644 --- a/boot-fx/src/test/java/org/netbeans/html/boot/fx/PopupTest.java +++ b/boot-fx/src/test/java/org/netbeans/html/boot/fx/PopupTest.java @@@ -1,127 -1,0 +1,103 @@@ +/** - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. ++ * Licensed to the Apache Software Foundation (ASF) under one ++ * or more contributor license agreements. See the NOTICE file ++ * distributed with this work for additional information ++ * regarding copyright ownership. The ASF licenses this file ++ * to you under the Apache License, Version 2.0 (the ++ * "License"); you may not use this file except in compliance ++ * with the License. You may obtain a copy of the License at + * - * Copyright 2013-2014 Oracle and/or its affiliates. All rights reserved. ++ * http://www.apache.org/licenses/LICENSE-2.0 + * - * Oracle and Java are registered trademarks of Oracle and/or its affiliates. - * Other names may be trademarks of their respective owners. - * - * The contents of this file are subject to the terms of either the GNU - * General Public License Version 2 only ("GPL") or the Common - * Development and Distribution License("CDDL") (collectively, the - * "License"). You may not use this file except in compliance with the - * License. You can obtain a copy of the License at - * http://www.netbeans.org/cddl-gplv2.html - * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the - * specific language governing permissions and limitations under the - * License. When distributing the software, include this License Header - * Notice in each file and include the License file at - * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the GPL Version 2 section of the License file that - * accompanied this code. If applicable, add the following below the - * License Header, with the fields enclosed by brackets [] replaced by - * your own identifying information: - * "Portions Copyrighted [year] [name of copyright owner]" - * - * Contributor(s): - * - * The Original Software is NetBeans. The Initial Developer of the Original - * Software is Oracle. Portions Copyright 2013-2016 Oracle. All Rights Reserved. - * - * If you wish your version of this file to be governed by only the CDDL - * or only the GPL Version 2, indicate your decision by adding - * "[Contributor] elects to include this software in this distribution - * under the [CDDL or GPL Version 2] license." If you do not indicate a - * single choice of license, a recipient has the option to distribute - * your version of this file under either the CDDL, the GPL Version 2 or - * to extend the choice of license to its licensees as provided above. - * However, if you add GPL Version 2 code and therefore, elected the GPL - * Version 2 license, then the option applies only if the new code is - * made subject to such option by the copyright holder. ++ * Unless required by applicable law or agreed to in writing, ++ * software distributed under the License is distributed on an ++ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ++ * KIND, either express or implied. See the License for the ++ * specific language governing permissions and limitations ++ * under the License. + */ +package org.netbeans.html.boot.fx; + +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; +import javafx.stage.Stage; +import net.java.html.BrwsrCtx; +import net.java.html.boot.BrowserBuilder; +import net.java.html.js.JavaScriptBody; +import org.netbeans.html.boot.spi.Fn; +import static org.testng.Assert.*; +import org.testng.annotations.Test; + +/** + * + * @author Jaroslav Tulach + */ +public class PopupTest { + public PopupTest() { + } + + @JavaScriptBody(args = { "page" }, body = + "return window.open(page, 'secondary', 'width=300,height=150');" + ) + private static native Object openSecondaryWindow(String page); + + @Test public void checkReload() throws Throwable { + final Throwable[] arr = { null }; + + class WhenInitialized implements Runnable { + CountDownLatch cdl = new CountDownLatch(1); + AbstractFXPresenter p; + BrwsrCtx ctx; + + @Override + public void run() { + try { + p = (AbstractFXPresenter) Fn.activePresenter(); + assertNotNull(p, "Presenter is defined"); + ctx = BrwsrCtx.findDefault(WhenInitialized.class); + } catch (Throwable ex) { + arr[0] = ex; + } finally { + cdl.countDown(); + } + } + } + WhenInitialized when = new WhenInitialized(); + + final BrowserBuilder bb = BrowserBuilder.newBrowser().loadClass(PopupTest.class). + loadPage("empty.html"). + loadFinished(when); + + class ShowBrowser implements Runnable { + @Override + public void run() { + bb.showAndWait(); + } + } + + Executors.newSingleThreadExecutor().submit(new ShowBrowser()); + when.cdl.await(); + if (arr[0] != null) throw arr[0]; + + Stage s = FXBrwsr.findStage(); + assertEquals(s.getTitle(), "FX Presenter Harness"); + + final Object[] window = new Object[1]; + final CountDownLatch openWindow = new CountDownLatch(1); + when.ctx.execute(new Runnable() { + @Override + public void run() { + TitleTest.changeTitle("First window"); + window[0] = openSecondaryWindow("second.html"); + openWindow.countDown(); + } + }); + + openWindow.await(5, TimeUnit.SECONDS); + + assertNotNull(window[0], "Second window opened"); + + assertEquals(s.getTitle(), "First window", "The title is kept"); + } +} http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot-fx/src/test/resources/org/netbeans/html/boot/fx/second.html ---------------------------------------------------------------------- diff --cc boot-fx/src/test/resources/org/netbeans/html/boot/fx/second.html index a450f29,0000000..12a706d mode 100644,000000..100644 --- a/boot-fx/src/test/resources/org/netbeans/html/boot/fx/second.html +++ b/boot-fx/src/test/resources/org/netbeans/html/boot/fx/second.html @@@ -1,55 -1,0 +1,31 @@@ +<!-- + - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright 2013-2014 Oracle and/or its affiliates. All rights reserved. - - Oracle and Java are registered trademarks of Oracle and/or its affiliates. - Other names may be trademarks of their respective owners. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common - Development and Distribution License("CDDL") (collectively, the - "License"). You may not use this file except in compliance with the - License. You can obtain a copy of the License at - http://www.netbeans.org/cddl-gplv2.html - or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the - specific language governing permissions and limitations under the - License. When distributing the software, include this License Header - Notice in each file and include the License file at - nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this - particular file as subject to the "Classpath" exception as provided - by Oracle in the GPL Version 2 section of the License file that - accompanied this code. If applicable, add the following below the - License Header, with the fields enclosed by brackets [] replaced by - your own identifying information: - "Portions Copyrighted [year] [name of copyright owner]" - - Contributor(s): - - The Original Software is NetBeans. The Initial Developer of the Original - Software is Oracle. Portions Copyright 2013-2016 Oracle. All Rights Reserved. - - If you wish your version of this file to be governed by only the CDDL - or only the GPL Version 2, indicate your decision by adding - "[Contributor] elects to include this software in this distribution - under the [CDDL or GPL Version 2] license." If you do not indicate a - single choice of license, a recipient has the option to distribute - your version of this file under either the CDDL, the GPL Version 2 or - to extend the choice of license to its licensees as provided above. - However, if you add GPL Version 2 code and therefore, elected the GPL - Version 2 license, then the option applies only if the new code is - made subject to such option by the copyright holder. ++ Licensed to the Apache Software Foundation (ASF) under one ++ or more contributor license agreements. See the NOTICE file ++ distributed with this work for additional information ++ regarding copyright ownership. The ASF licenses this file ++ to you under the Apache License, Version 2.0 (the ++ "License"); you may not use this file except in compliance ++ with the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, ++ software distributed under the License is distributed on an ++ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ++ KIND, either express or implied. See the License for the ++ specific language governing permissions and limitations ++ under the License. + +--> +<!DOCTYPE html> +<html> + <head> + <title>Second Window</title> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> + <meta name="viewport" content="width=device-width"> + </head> + <body> + <div>Second Window</div> + </body> +</html> http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot-script/pom.xml ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot-script/src/test/java/net/java/html/boot/script/ko4j/KnockoutEnvJSTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot-truffle/src/main/java/net/java/html/boot/truffle/JavaObject.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot-truffle/src/test/java/net/java/html/boot/truffle/TruffleJavaScriptTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/boot/pom.xml ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/context/pom.xml ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/context/src/main/java/net/java/html/BrwsrCtx.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/equinox-agentclass-hook/pom.xml ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/geo/pom.xml ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/html4j-maven-plugin/pom.xml ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/json-tck/pom.xml ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/json-tck/src/main/java/net/java/html/js/tests/Bodies.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/json-tck/src/main/java/net/java/html/js/tests/GCBodyTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/json-tck/src/main/java/net/java/html/js/tests/JavaScriptBodyTest.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/json-tck/src/main/java/org/netbeans/html/json/tck/package.html ---------------------------------------------------------------------- diff --cc json-tck/src/main/java/org/netbeans/html/json/tck/package.html index 4e1eb4a,0000000..ed0f0ba mode 100644,000000..100644 --- a/json-tck/src/main/java/org/netbeans/html/json/tck/package.html +++ b/json-tck/src/main/java/org/netbeans/html/json/tck/package.html @@@ -1,56 -1,0 +1,32 @@@ +<!-- + - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright 2013-2014 Oracle and/or its affiliates. All rights reserved. - - Oracle and Java are registered trademarks of Oracle and/or its affiliates. - Other names may be trademarks of their respective owners. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common - Development and Distribution License("CDDL") (collectively, the - "License"). You may not use this file except in compliance with the - License. You can obtain a copy of the License at - http://www.netbeans.org/cddl-gplv2.html - or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the - specific language governing permissions and limitations under the - License. When distributing the software, include this License Header - Notice in each file and include the License file at - nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this - particular file as subject to the "Classpath" exception as provided - by Oracle in the GPL Version 2 section of the License file that - accompanied this code. If applicable, add the following below the - License Header, with the fields enclosed by brackets [] replaced by - your own identifying information: - "Portions Copyrighted [year] [name of copyright owner]" - - Contributor(s): - - The Original Software is NetBeans. The Initial Developer of the Original - Software is Oracle. Portions Copyright 2013-2016 Oracle. All Rights Reserved. - - If you wish your version of this file to be governed by only the CDDL - or only the GPL Version 2, indicate your decision by adding - "[Contributor] elects to include this software in this distribution - under the [CDDL or GPL Version 2] license." If you do not indicate a - single choice of license, a recipient has the option to distribute - your version of this file under either the CDDL, the GPL Version 2 or - to extend the choice of license to its licensees as provided above. - However, if you add GPL Version 2 code and therefore, elected the GPL - Version 2 license, then the option applies only if the new code is - made subject to such option by the copyright holder. ++ Licensed to the Apache Software Foundation (ASF) under one ++ or more contributor license agreements. See the NOTICE file ++ distributed with this work for additional information ++ regarding copyright ownership. The ASF licenses this file ++ to you under the Apache License, Version 2.0 (the ++ "License"); you may not use this file except in compliance ++ with the License. You may obtain a copy of the License at ++ ++ http://www.apache.org/licenses/LICENSE-2.0 ++ ++ Unless required by applicable law or agreed to in writing, ++ software distributed under the License is distributed on an ++ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ++ KIND, either express or implied. See the License for the ++ specific language governing permissions and limitations ++ under the License. + +--> +<!DOCTYPE html> +<html> + <head> + <title></title> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> + </head> + <body> + <div>Entry point to the + <a href="KnockoutTCK.html">test compatibility kit</a>. + </div> + </body> +</html> http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/json/pom.xml ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/json/src/main/java/org/netbeans/html/json/impl/ModelProcessor.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/ko-felix-test/pom.xml ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/ko-osgi-test/pom.xml ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/ko-ws-tyrus/pom.xml ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/ko4j/pom.xml ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/ko4j/src/main/java/org/netbeans/html/ko4j/Knockout.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/pom.xml ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/sound/pom.xml ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/src/main/javadoc/overview.html ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-netbeans-html4j/blob/9e4efe7c/xhr4j/pom.xml ----------------------------------------------------------------------
