You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2018/08/22 13:24:54 UTC

[GitHub] sdedic closed pull request #735: [NETBEANS-1074] Module Review javascript2.requirejs

sdedic closed pull request #735: [NETBEANS-1074] Module Review javascript2.requirejs
URL: https://github.com/apache/incubator-netbeans/pull/735
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/javascript2.requirejs/.gitignore b/javascript2.requirejs/.gitignore
new file mode 100644
index 0000000000..91692931ec
--- /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 464411a641..b5e365d5ca 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 bfe7a2fd45..1ea41fe7c1 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 b2411f5d92..0000000000
--- 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 0000000000..b3a7b4cb25
--- /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/licenseinfo.xml b/javascript2.requirejs/licenseinfo.xml
new file mode 100644
index 0000000000..32acbee35e
--- /dev/null
+++ b/javascript2.requirejs/licenseinfo.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<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 3dcecaf6e8..118915ae62 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 b7aabea40d..c94a03459b 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.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 @@ protected void setUp() throws Exception {
 
     }
 
+    @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 e7af359044..39b3483965 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.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


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists