This is an automated email from the ASF dual-hosted git repository. junichi11 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 1fc7924 [NETBEANS-1074] Module Review php.editor (#720) 1fc7924 is described below commit 1fc79242360ac88c1f7ebe4b7d226bbf8011df96 Author: Junichi Yamamoto <junichi0...@gmail.com> AuthorDate: Tue Aug 21 08:13:11 2018 +0900 [NETBEANS-1074] Module Review php.editor (#720) - Change the license header of Bundle.properties and PrintASTVisitor.java - Add licenseinfo.xml - Disable unit tests because test data are removed https://hg.netbeans.org/releases/rev/c08284c26be3 --- php.editor/licenseinfo.xml | 60 ++++++++++++++++++++++ .../modules/php/editor/codegen/Bundle.properties | 53 ++++++------------- .../php/editor/codegen/ui/Bundle.properties | 53 ++++++------------- .../modules/php/editor/sql/ui/Bundle.properties | 53 ++++++------------- .../php/editor/actions/ImportDataCreatorTest.java | 48 ++++++++--------- .../php/editor/indent/PHPFormatterHtmlTest.java | 8 +-- .../php/editor/parser/ASTPHP5ParserTest.java | 8 +-- .../php/editor/parser/ParserPerformanceTest.java | 26 +++++----- .../modules/php/editor/parser/PrintASTVisitor.java | 51 +++++------------- .../modules/php/editor/verification/HintsTest.java | 6 +-- 10 files changed, 167 insertions(+), 199 deletions(-) diff --git a/php.editor/licenseinfo.xml b/php.editor/licenseinfo.xml new file mode 100644 index 0000000..cde52a7 --- /dev/null +++ b/php.editor/licenseinfo.xml @@ -0,0 +1,60 @@ +<?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/php/editor/indent/ui/BlankLines.php</file> + <file>src/org/netbeans/modules/php/editor/indent/ui/Braces.php</file> + <file>src/org/netbeans/modules/php/editor/indent/ui/Spaces.php</file> + <file>src/org/netbeans/modules/php/editor/indent/ui/TabsIndents.php</file> + <file>src/org/netbeans/modules/php/editor/indent/ui/Uses.php</file> + <file>src/org/netbeans/modules/php/editor/indent/ui/Wrapping.php</file> + <file>src/org/netbeans/modules/php/editor/resources/PHP5Example</file> + <license ref="Apache-2.0-ASF" /> + <comment type="GUI_USABILITY"/> + </fileset> + <fileset> + <file>tools/skeleton.netbeans</file> + <file>tools/skeletonParser.netbeans</file> + <file>src/org/netbeans/modules/php/editor/resources/annotation.png</file> + <file>src/org/netbeans/modules/php/editor/resources/catalog.png</file> + <file>src/org/netbeans/modules/php/editor/resources/class.png</file> + <file>src/org/netbeans/modules/php/editor/resources/connection.gif</file> + <file>src/org/netbeans/modules/php/editor/resources/constant.png</file> + <file>src/org/netbeans/modules/php/editor/resources/error-glyph.gif</file> + <file>src/org/netbeans/modules/php/editor/resources/fieldPrivate.png</file> + <file>src/org/netbeans/modules/php/editor/resources/fieldProtected.png</file> + <file>src/org/netbeans/modules/php/editor/resources/fieldPublic.png</file> + <file>src/org/netbeans/modules/php/editor/resources/function.png</file> + <file>src/org/netbeans/modules/php/editor/resources/interface.png</file> + <file>src/org/netbeans/modules/php/editor/resources/methodProtected.png</file> + <file>src/org/netbeans/modules/php/editor/resources/methodStaticProtected.png</file> + <file>src/org/netbeans/modules/php/editor/resources/methodStaticPublic.png</file> + <file>src/org/netbeans/modules/php/editor/resources/php16.png</file> + <file>src/org/netbeans/modules/php/editor/resources/php16Key.png</file> + <file>src/org/netbeans/modules/php/editor/resources/refresh.png</file> + <file>src/org/netbeans/modules/php/editor/resources/subtypehierarchy.gif</file> + <file>src/org/netbeans/modules/php/editor/resources/supertypehierarchy.gif</file> + <file>src/org/netbeans/modules/php/editor/resources/trait.png</file> + <license ref="Apache-2.0-ASF" /> + <comment type="COMMENT_UNSUPPORTED" /> + </fileset> +</licenseinfo> diff --git a/php.editor/src/org/netbeans/modules/php/editor/codegen/Bundle.properties b/php.editor/src/org/netbeans/modules/php/editor/codegen/Bundle.properties index e849d7a..c6e0cef 100644 --- a/php.editor/src/org/netbeans/modules/php/editor/codegen/Bundle.properties +++ b/php.editor/src/org/netbeans/modules/php/editor/codegen/Bundle.properties @@ -1,42 +1,19 @@ -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - -# Copyright 2010 Oracle and/or its affiliates. All rights reserved. +# 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 # -# 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 enLBL_TITLE_GETTERS_AND_SETTERSclosed 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 2008 Sun Microsystems, Inc. +# 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. LBL_ConnectionToDatabase=Connection to Database... LBL_DatabaseTable=Database Table... diff --git a/php.editor/src/org/netbeans/modules/php/editor/codegen/ui/Bundle.properties b/php.editor/src/org/netbeans/modules/php/editor/codegen/ui/Bundle.properties index cfdd492..ac6913a 100644 --- a/php.editor/src/org/netbeans/modules/php/editor/codegen/ui/Bundle.properties +++ b/php.editor/src/org/netbeans/modules/php/editor/codegen/ui/Bundle.properties @@ -1,42 +1,19 @@ -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - -# Copyright 2010 Oracle and/or its affiliates. All rights reserved. +# 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 # -# 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 2008 Sun Microsystems, Inc. +# 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. TableGeneratorPanel.tableLabel.text=&Table: TableGeneratorPanel.columnLabel.text=&Columns: TableGeneratorPanel.connVariableLabel.text=Connection &Variable: diff --git a/php.editor/src/org/netbeans/modules/php/editor/sql/ui/Bundle.properties b/php.editor/src/org/netbeans/modules/php/editor/sql/ui/Bundle.properties index e835c49..6adb539 100644 --- a/php.editor/src/org/netbeans/modules/php/editor/sql/ui/Bundle.properties +++ b/php.editor/src/org/netbeans/modules/php/editor/sql/ui/Bundle.properties @@ -1,42 +1,19 @@ -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - -# Copyright 2010 Oracle and/or its affiliates. All rights reserved. +# 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 # -# 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 2009 Sun Microsystems, Inc. +# 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. ChooseConnectionPanel.dbconnComboBox.AccessibleContext.accessibleName=Database connections ChooseConnectionPanel.dbconnComboBox.AccessibleContext.accessibleDescription=List of database connections diff --git a/php.editor/test/unit/src/org/netbeans/modules/php/editor/actions/ImportDataCreatorTest.java b/php.editor/test/unit/src/org/netbeans/modules/php/editor/actions/ImportDataCreatorTest.java index 9b41d67..248dace 100644 --- a/php.editor/test/unit/src/org/netbeans/modules/php/editor/actions/ImportDataCreatorTest.java +++ b/php.editor/test/unit/src/org/netbeans/modules/php/editor/actions/ImportDataCreatorTest.java @@ -56,30 +56,30 @@ public class ImportDataCreatorTest extends PHPTestBase { super(testName); } - public void testImportData_01() throws Exception { - performTest("Homepage^Presenter"); - } - - public void testImportData_02() throws Exception { - performTest("Homepage^Presenter"); - } - - public void testImportData_03() throws Exception { - performTest("Homepage^Presenter"); - } - - public void testImportData_04() throws Exception { - // see issue #219548 - performTest("Homepage^Presenter"); - } - - public void testImportData_05() throws Exception { - performTest("Homepage^Presenter", new Options(true, false, false, false, false)); - } - - public void testImportData_06() throws Exception { - performTest("Homepage^Presenter", new Options(false, false, false, false, false)); - } +// public void testImportData_01() throws Exception { +// performTest("Homepage^Presenter"); +// } +// +// public void testImportData_02() throws Exception { +// performTest("Homepage^Presenter"); +// } +// +// public void testImportData_03() throws Exception { +// performTest("Homepage^Presenter"); +// } +// +// public void testImportData_04() throws Exception { +// // see issue #219548 +// performTest("Homepage^Presenter"); +// } +// +// public void testImportData_05() throws Exception { +// performTest("Homepage^Presenter", new Options(true, false, false, false, false)); +// } +// +// public void testImportData_06() throws Exception { +// performTest("Homepage^Presenter", new Options(false, false, false, false, false)); +// } public void testImportData_07() throws Exception { performTest("class ^Blah"); diff --git a/php.editor/test/unit/src/org/netbeans/modules/php/editor/indent/PHPFormatterHtmlTest.java b/php.editor/test/unit/src/org/netbeans/modules/php/editor/indent/PHPFormatterHtmlTest.java index 5e9f59b..a56ea6b 100644 --- a/php.editor/test/unit/src/org/netbeans/modules/php/editor/indent/PHPFormatterHtmlTest.java +++ b/php.editor/test/unit/src/org/netbeans/modules/php/editor/indent/PHPFormatterHtmlTest.java @@ -48,10 +48,10 @@ public class PHPFormatterHtmlTest extends PHPFormatterTestBase { reformatFileContents("testfiles/formatting/html/html03.php", options); } - public void testHtml04() throws Exception { - HashMap<String, Object> options = new HashMap<String, Object>(FmtOptions.getDefaults()); - reformatFileContents("testfiles/formatting/html/html04.php", options); - } +// public void testHtml04() throws Exception { +// HashMap<String, Object> options = new HashMap<String, Object>(FmtOptions.getDefaults()); +// reformatFileContents("testfiles/formatting/html/html04.php", options); +// } public void testHtml05() throws Exception { HashMap<String, Object> options = new HashMap<String, Object>(FmtOptions.getDefaults()); diff --git a/php.editor/test/unit/src/org/netbeans/modules/php/editor/parser/ASTPHP5ParserTest.java b/php.editor/test/unit/src/org/netbeans/modules/php/editor/parser/ASTPHP5ParserTest.java index 5ef3990..bf2e048 100644 --- a/php.editor/test/unit/src/org/netbeans/modules/php/editor/parser/ASTPHP5ParserTest.java +++ b/php.editor/test/unit/src/org/netbeans/modules/php/editor/parser/ASTPHP5ParserTest.java @@ -107,10 +107,10 @@ public class ASTPHP5ParserTest extends ParserTestBase { public void testUseSubNamespace() throws Exception { performTest("parser/useSubNamespace"); } - public void testTextSearchQuery () throws Exception { - // testing real file from phpwiki - performTest("parser/TextSearchQuery"); - } +// public void testTextSearchQuery () throws Exception { +// // testing real file from phpwiki +// performTest("parser/TextSearchQuery"); +// } public void testPHPDoc () throws Exception { //unfinished phpdoc diff --git a/php.editor/test/unit/src/org/netbeans/modules/php/editor/parser/ParserPerformanceTest.java b/php.editor/test/unit/src/org/netbeans/modules/php/editor/parser/ParserPerformanceTest.java index 76a1967..fe3ae01 100644 --- a/php.editor/test/unit/src/org/netbeans/modules/php/editor/parser/ParserPerformanceTest.java +++ b/php.editor/test/unit/src/org/netbeans/modules/php/editor/parser/ParserPerformanceTest.java @@ -47,17 +47,17 @@ public class ParserPerformanceTest extends NbTestCase { } // the current time is around 1200 ms - public void testBigFile() throws Exception { - File testFile = new File(getDataDir(), "testfiles/parser/performance/performance.php"); - assertTrue(testFile.exists()); - String testSource = TestUtilities.copyFileToString(testFile); - ASTPHP5Scanner scanner = new ASTPHP5Scanner(new StringReader(testSource)); - ASTPHP5Parser parser = new ASTPHP5Parser(scanner); - Date start = new Date(); - Symbol root = parser.parse(); - Date end = new Date(); - long time = end.getTime() - start.getTime(); - System.out.println("Parsing of big files takes: " + time); - assertTrue(time < 2500); - } +// public void testBigFile() throws Exception { +// File testFile = new File(getDataDir(), "testfiles/parser/performance/performance.php"); +// assertTrue(testFile.exists()); +// String testSource = TestUtilities.copyFileToString(testFile); +// ASTPHP5Scanner scanner = new ASTPHP5Scanner(new StringReader(testSource)); +// ASTPHP5Parser parser = new ASTPHP5Parser(scanner); +// Date start = new Date(); +// Symbol root = parser.parse(); +// Date end = new Date(); +// long time = end.getTime() - start.getTime(); +// System.out.println("Parsing of big files takes: " + time); +// assertTrue(time < 2500); +// } } diff --git a/php.editor/test/unit/src/org/netbeans/modules/php/editor/parser/PrintASTVisitor.java b/php.editor/test/unit/src/org/netbeans/modules/php/editor/parser/PrintASTVisitor.java index 694e6dd..9133851 100644 --- a/php.editor/test/unit/src/org/netbeans/modules/php/editor/parser/PrintASTVisitor.java +++ b/php.editor/test/unit/src/org/netbeans/modules/php/editor/parser/PrintASTVisitor.java @@ -1,43 +1,20 @@ /* - * 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 2010 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, append 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 appending - * "[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 append 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 2008 Sun Microsystems, Inc. + * 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.php.editor.parser; diff --git a/php.editor/test/unit/src/org/netbeans/modules/php/editor/verification/HintsTest.java b/php.editor/test/unit/src/org/netbeans/modules/php/editor/verification/HintsTest.java index 6325368..c669ebe 100644 --- a/php.editor/test/unit/src/org/netbeans/modules/php/editor/verification/HintsTest.java +++ b/php.editor/test/unit/src/org/netbeans/modules/php/editor/verification/HintsTest.java @@ -339,9 +339,9 @@ public class HintsTest extends PHPHintsTestBase { checkHints(new SuperglobalsHint.RequestSuperglobalHint(), "testRequestSuperglobalsHint.php"); } - public void testEmptyStatementHint() throws Exception { - checkHints(new EmptyStatementHint(), "testEmptyStatementHint.php"); - } +// public void testEmptyStatementHint() throws Exception { +// checkHints(new EmptyStatementHint(), "testEmptyStatementHint.php"); +// } public void testUnreachableStatementHint() throws Exception { checkHints(new UnreachableStatementHint(), "testUnreachableStatementHint.php"); --------------------------------------------------------------------- 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