This is an automated email from the ASF dual-hosted git repository. sdedic pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-netbeans.git
The following commit(s) were added to refs/heads/master by this push: new efea113 [NETBEANS-1074] Module Review javascript2.requirejs (#735) efea113 is described below commit efea11366860f74fe7c630e41b85c13d2f777106 Author: Svatopluk Dedic <svatopluk.de...@oracle.com> AuthorDate: Wed Aug 22 15:24:52 2018 +0200 [NETBEANS-1074] Module Review javascript2.requirejs (#735) [NETBEANS-1074] Review Module javascript2.requirejs --- javascript2.requirejs/.gitignore | 2 + javascript2.requirejs/build.xml | 10 ++- javascript2.requirejs/external/binaries-list | 19 ++++- .../javascript2.requirejs-requirejs-license.txt | 89 ---------------------- .../external/requirejs-2.1.8-license.txt | 30 ++++++++ .../{build.xml => licenseinfo.xml} | 16 ++-- .../javascript2/requirejs/ui/Bundle.properties | 56 ++++---------- .../editor/RequireJSCodeCompletionTest.java | 2 + .../editor/RequireJsDeclarationFinderCodeTest.java | 63 +++++---------- 9 files changed, 102 insertions(+), 185 deletions(-) diff --git a/javascript2.requirejs/.gitignore b/javascript2.requirejs/.gitignore new file mode 100644 index 0000000..9169293 --- /dev/null +++ b/javascript2.requirejs/.gitignore @@ -0,0 +1,2 @@ +test/unit/data/TestProject2/public_html/js/lib/require.js/require.js + diff --git a/javascript2.requirejs/build.xml b/javascript2.requirejs/build.xml index 464411a..b5e365d 100644 --- a/javascript2.requirejs/build.xml +++ b/javascript2.requirejs/build.xml @@ -23,8 +23,14 @@ <description>Builds, tests, and runs the project org.netbeans.modules.javascript2.requirejs</description> <import file="../nbbuild/templates/projectized.xml"/> - <target name="build-init" depends="projectized.build-init"> - <unzip src="external/javascript2.requirejs-requirejs-resources.zip" dest="."/> + <target name="build-init" depends="projectized.build-init"> + <mkdir dir="test/unit/data/TestProject2/public_html/js/lib/require.js"/> + <unzip src="external/requirejs-2.1.8.jar" dest="test/unit/data/TestProject2/public_html/js/lib/require.js"> + <mapper type="flatten"/> + <patternset> + <include name="META-INF/resources/webjars/requirejs/2.1.8/require.js"/> + </patternset> + </unzip> </target> </project> diff --git a/javascript2.requirejs/external/binaries-list b/javascript2.requirejs/external/binaries-list index bfe7a2f..1ea41fe 100644 --- a/javascript2.requirejs/external/binaries-list +++ b/javascript2.requirejs/external/binaries-list @@ -1 +1,18 @@ -CBD2C9E078492B00E2402E9282AC8686351D9D56 javascript2.requirejs-requirejs-resources.zip +# 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. +531D2F915DE16E2A47FD89D61A2B1FED7316BEBC org.webjars:requirejs:2.1.8 + diff --git a/javascript2.requirejs/external/javascript2.requirejs-requirejs-license.txt b/javascript2.requirejs/external/javascript2.requirejs-requirejs-license.txt deleted file mode 100644 index b2411f5..0000000 --- a/javascript2.requirejs/external/javascript2.requirejs-requirejs-license.txt +++ /dev/null @@ -1,89 +0,0 @@ -Copyright jQuery Foundation and other contributors, https://jquery.org/ - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/requirejs/requirejs - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules directory, and certain utilities used -to build or test the software in the test and dist directories, are -externally maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above.Copyright jQuery Foundation and other contributors, https://jquery.org/ - -This software consists of voluntary contributions made by many -individuals. For exact contribution history, see the revision history -available at https://github.com/requirejs/requirejs - -The following license applies to all parts of this software except as -documented below: - -==== - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -==== - -Copyright and related rights for sample code are waived via CC0. Sample -code is defined as all source code displayed within the prose of the -documentation. - -CC0: http://creativecommons.org/publicdomain/zero/1.0/ - -==== - -Files located in the node_modules directory, and certain utilities used -to build or test the software in the test and dist directories, are -externally maintained libraries used by this software which have their own -licenses; we recommend you read them, as their terms may differ from the -terms above. diff --git a/javascript2.requirejs/external/requirejs-2.1.8-license.txt b/javascript2.requirejs/external/requirejs-2.1.8-license.txt new file mode 100644 index 0000000..b3a7b4c --- /dev/null +++ b/javascript2.requirejs/external/requirejs-2.1.8-license.txt @@ -0,0 +1,30 @@ +Name: RequireJS +Version: 2.1.8 +License: MIT +Origin: https://requirejs.org/ +Source: https://github.com/requirejs/requirejs/archive/2.1.8.zip +Description: RequireJS module loader +Type: compile-time +Comment: RequireJS used just for testing, is not distributed with NetBeans build. + +The MIT License + +Copyright (c) 2010-2011, The Dojo Foundation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/javascript2.requirejs/build.xml b/javascript2.requirejs/licenseinfo.xml similarity index 67% copy from javascript2.requirejs/build.xml copy to javascript2.requirejs/licenseinfo.xml index 464411a..32acbee 100644 --- a/javascript2.requirejs/build.xml +++ b/javascript2.requirejs/licenseinfo.xml @@ -19,12 +19,10 @@ under the License. --> -<project basedir="." default="netbeans" name="javascript2.requirejs"> - <description>Builds, tests, and runs the project org.netbeans.modules.javascript2.requirejs</description> - <import file="../nbbuild/templates/projectized.xml"/> - - <target name="build-init" depends="projectized.build-init"> - <unzip src="external/javascript2.requirejs-requirejs-resources.zip" dest="."/> - </target> - -</project> +<licenseinfo> + <fileset> + <file>src/org/netbeans/modules/javascript2/requirejs/resources/requirejs.js.model</file> + <license ref="Apache-2.0-ASF" /> + <comment type="COMMENT_UNSUPPORTED" /> + </fileset> +</licenseinfo> diff --git a/javascript2.requirejs/src/org/netbeans/modules/javascript2/requirejs/ui/Bundle.properties b/javascript2.requirejs/src/org/netbeans/modules/javascript2/requirejs/ui/Bundle.properties index 3dcecaf..118915a 100644 --- a/javascript2.requirejs/src/org/netbeans/modules/javascript2/requirejs/ui/Bundle.properties +++ b/javascript2.requirejs/src/org/netbeans/modules/javascript2/requirejs/ui/Bundle.properties @@ -1,43 +1,19 @@ - -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - -# Copyright 2010 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]" - -# 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. - -# Contributor(s): - -# Portions Copyrighted 2011 Sun Microsystems, Inc. +# 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. # customizer panel RequireJsPanel.enabledCheckBox.text=&Enabled diff --git a/javascript2.requirejs/test/unit/src/org/netbeans/modules/javascript2/requirejs/editor/RequireJSCodeCompletionTest.java b/javascript2.requirejs/test/unit/src/org/netbeans/modules/javascript2/requirejs/editor/RequireJSCodeCompletionTest.java index b7aabea..c94a034 100644 --- a/javascript2.requirejs/test/unit/src/org/netbeans/modules/javascript2/requirejs/editor/RequireJSCodeCompletionTest.java +++ b/javascript2.requirejs/test/unit/src/org/netbeans/modules/javascript2/requirejs/editor/RequireJSCodeCompletionTest.java @@ -28,6 +28,7 @@ import java.util.List; import java.util.Map; import org.netbeans.api.java.classpath.ClassPath; import org.netbeans.api.project.Project; +import org.netbeans.junit.RandomlyFails; import org.netbeans.modules.javascript2.editor.JsCodeCompletionBase; import static org.netbeans.modules.javascript2.editor.JsTestBase.JS_SOURCE_ID; import org.netbeans.modules.javascript2.requirejs.RequireJsPreferences; @@ -73,6 +74,7 @@ public class RequireJSCodeCompletionTest extends JsCodeCompletionBase { } + @RandomlyFails public void testObjectLiteral01() throws Exception { checkCompletion("TestProject1/js/folder1/usingObjectLiteral.js", " ob.ol1^", false); } diff --git a/javascript2.requirejs/test/unit/src/org/netbeans/modules/javascript2/requirejs/editor/RequireJsDeclarationFinderCodeTest.java b/javascript2.requirejs/test/unit/src/org/netbeans/modules/javascript2/requirejs/editor/RequireJsDeclarationFinderCodeTest.java index e7af359..39b3483 100644 --- a/javascript2.requirejs/test/unit/src/org/netbeans/modules/javascript2/requirejs/editor/RequireJsDeclarationFinderCodeTest.java +++ b/javascript2.requirejs/test/unit/src/org/netbeans/modules/javascript2/requirejs/editor/RequireJsDeclarationFinderCodeTest.java @@ -1,3 +1,22 @@ +/* + * 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.javascript2.requirejs.editor; import java.io.File; @@ -18,50 +37,6 @@ import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; import org.openide.util.test.MockLookup; - - -/* - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - * - * Copyright 2015 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]" - * - * 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. - * - * Contributor(s): - * - * Portions Copyrighted 2015 Sun Microsystems, Inc. - */ - /** * * @author Petr Pisl --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists