[netbeans] branch master updated: basic auto completion for maven version properties.
This is an automated email from the ASF dual-hosted git repository. mbien pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git The following commit(s) were added to refs/heads/master by this push: new 34ceceed3e basic auto completion for maven version properties. new 5cb46cf145 Merge pull request #5823 from mbien/maven-version-property-completion 34ceceed3e is described below commit 34ceceed3e9ef5fcf45986cee9a622db5d589537 Author: Michael Bien AuthorDate: Thu Apr 13 21:10:05 2023 +0200 basic auto completion for maven version properties. It is somewhat common to use properties for artifact versions, esp when several artifacts share the same version. This implements basic auto completion for properties which are used as version field. In contrast to hints, completion is implemented in the grammar and doesn't have the full context. This will only take properties into account which are in the same pom file as their usage. --- .../modules/maven/grammar/MavenProjectGrammar.java | 149 - .../modules/maven/grammar/POM-abbreviations.xml| 2 +- 2 files changed, 147 insertions(+), 4 deletions(-) diff --git a/java/maven.grammar/src/org/netbeans/modules/maven/grammar/MavenProjectGrammar.java b/java/maven.grammar/src/org/netbeans/modules/maven/grammar/MavenProjectGrammar.java index b5076c3474..6bd648ffe2 100644 --- a/java/maven.grammar/src/org/netbeans/modules/maven/grammar/MavenProjectGrammar.java +++ b/java/maven.grammar/src/org/netbeans/modules/maven/grammar/MavenProjectGrammar.java @@ -33,13 +33,16 @@ import java.util.Collections; import java.util.Enumeration; import java.util.HashSet; import java.util.Iterator; +import java.util.LinkedHashSet; import java.util.List; +import java.util.Objects; import java.util.Properties; import java.util.Set; import java.util.jar.JarEntry; import java.util.jar.JarFile; import java.util.logging.Level; import java.util.logging.Logger; +import java.util.stream.Collectors; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.repository.metadata.Metadata; import org.apache.maven.artifact.repository.metadata.Versioning; @@ -464,6 +467,80 @@ public class MavenProjectGrammar extends AbstractSchemaBasedGrammar { return Collections.enumeration(elems); } } +// version property completion +String propXPath = "/project/properties/"; //NOI18N +if (path.startsWith(propXPath) && path.indexOf("/", propXPath.length()) == -1) { //NOI18N +String propName = path.substring(propXPath.length()); +String decorated = "${"+propName+"}"; //NOI18N + +Set usages = new HashSet<>(); + +NodeList pomNodes; +if (virtualTextCtx.getCurrentPrefix().isEmpty()) { +pomNodes = virtualTextCtx.getParentNode().getParentNode().getChildNodes(); +} else { +pomNodes = virtualTextCtx.getParentNode().getParentNode().getParentNode().getChildNodes(); +} + +for (Node node : iterate(pomNodes)) { +if ("dependencies".equals(node.getNodeName())) { //NOI18N +collectArtifacts("dependency", node, decorated, usages); //NOI18N +} else if ("dependencyManagement".equals(node.getNodeName())) { //NOI18N +for (Node dmChild : iterate(node.getChildNodes())) { +if ("dependencies".equals(dmChild.getNodeName())) { //NOI18N +collectArtifacts("dependency", dmChild, decorated, usages); //NOI18N +break; +} +} +} else if ("build".equals(node.getNodeName())) { //NOI18N +for (Node buildChild : iterate(node.getChildNodes())) { +if ("plugins".equals(buildChild.getNodeName())) { //NOI18N +collectArtifacts("plugin", buildChild, decorated, usages); //NOI18N +} else if ("pluginManagement".equals(buildChild.getNodeName())) { //NOI18N +for (Node pmChild : iterate(buildChild.getChildNodes())) { +if ("plugins".equals(pmChild.getNodeName())) { //NOI18N +collectArtifacts("plugin", pmChild, decorated, usages); //NOI18N +break; +} +} +} +} +} +} + +// intersection set; make sure all usages support the suggested versions +Set versions = new LinkedHashSet<>(); +boolean first = true; +boolean partial = false; +for (ArtifactInfoHolder artifact : usages) { +
[netbeans] branch master updated: FlatLaf: use NetBeans folder icons in NB Explorer component instead of FlatLaf outlined folder icons (e.g. Projects or Files views)
This is an automated email from the ASF dual-hosted git repository. mbien pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git The following commit(s) were added to refs/heads/master by this push: new a79bf74082 FlatLaf: use NetBeans folder icons in NB Explorer component instead of FlatLaf outlined folder icons (e.g. Projects or Files views) new 1b16acb909 Merge pull request #5760 from DevCharly/flatlaf-explorer-folder-icons a79bf74082 is described below commit a79bf740828ea2af998ff7b5ebd9bdaf73d95b5d Author: Karl Tauber AuthorDate: Tue Apr 11 19:03:55 2023 +0200 FlatLaf: use NetBeans folder icons in NB Explorer component instead of FlatLaf outlined folder icons (e.g. Projects or Files views) patch from https://gist.github.com/eirikbakke/5587bd548a668cb0588c3fdc7d9e9f48 --- .../netbeans/swing/laf/flatlaf/FlatLaf.properties | 6 ++ .../swing/laf/flatlaf/icons/NBFlatAdapterIcon.java | 68 ++ .../laf/flatlaf/icons/NBFlatTreeClosedIcon.java| 26 + .../laf/flatlaf/icons/NBFlatTreeOpenIcon.java | 26 + 4 files changed, 126 insertions(+) diff --git a/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatLaf.properties b/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatLaf.properties index 72b253d074..14e9814aa5 100644 --- a/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatLaf.properties +++ b/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatLaf.properties @@ -36,6 +36,12 @@ TabbedPane.tabHeight=30 TabbedPane.inactiveUnderlineColor = $TabbedContainer.editor.contentBorderColor +# Tree + +Tree.closedIcon = org.netbeans.swing.laf.flatlaf.icons.NBFlatTreeClosedIcon +Tree.openIcon = org.netbeans.swing.laf.flatlaf.icons.NBFlatTreeOpenIcon + + # TabbedContainer TabbedContainer.editor.contentBorderColor=$Component.borderColor diff --git a/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/icons/NBFlatAdapterIcon.java b/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/icons/NBFlatAdapterIcon.java new file mode 100644 index 00..6d7b1cea0a --- /dev/null +++ b/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/icons/NBFlatAdapterIcon.java @@ -0,0 +1,68 @@ +/* + * 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.swing.laf.flatlaf.icons; + +import com.formdev.flatlaf.util.UIScale; +import java.awt.Component; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.Image; +import javax.swing.Icon; +import javax.swing.ImageIcon; +import javax.swing.plaf.UIResource; +import org.openide.util.ImageUtilities; + +/** + * Adapter class which allows a NetBeans-loaded PNG or SVG icon to be used as a FlatLAF + * configuration setting. Respects FlatLAF's own scaling properties, as in + * {@code com.formdev.flatlaf.icons.FlatAbstractIcon}. + */ +abstract class NBFlatAdapterIcon implements Icon, UIResource { +private final Icon delegate; + +public NBFlatAdapterIcon(String resourcePath) { +if (resourcePath == null) { +throw new NullPointerException(); +} +Image delegateImg = ImageUtilities.loadImage(resourcePath); +this.delegate = delegateImg == null ? new ImageIcon() : ImageUtilities.image2Icon(delegateImg); +} + +@Override +public void paintIcon(Component c, Graphics g, int x, int y) { +Graphics2D g2 = (Graphics2D) g.create(); +try { +g2.translate(x, y); +UIScale.scaleGraphics(g2); +delegate.paintIcon(c, g2, 0, 0); +} finally { +g2.dispose(); +} +} + +@Override +public int getIconWidth() { +return UIScale.scale(delegate.getIconWidth()); +} + +@Override +public int getIconHeight() { +return UIScale.scale(delegate.getIconHeight()); +} +} diff --git a/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/icons/NBFlatTreeClosedIcon.java b/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/icons/NBFlatTreeClosedIcon.java new file mode 100644 index
[netbeans] branch master updated: FlatLaf: add "accent color" combobox to Options dialog (Appearance > FlatLaf)
This is an automated email from the ASF dual-hosted git repository. mbien pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git The following commit(s) were added to refs/heads/master by this push: new e2c1ee7a87 FlatLaf: add "accent color" combobox to Options dialog (Appearance > FlatLaf) new cfda31b155 Merge pull request #5795 from DevCharly/flatlaf-accent-color e2c1ee7a87 is described below commit e2c1ee7a87c404f7111788f7e1e6fdb5a1fc10af Author: Karl Tauber AuthorDate: Sat Apr 8 01:29:49 2023 +0200 FlatLaf: add "accent color" combobox to Options dialog (Appearance > FlatLaf) --- .../netbeans/swing/laf/flatlaf/Bundle.properties | 12 +- .../netbeans/swing/laf/flatlaf/FlatLaf.properties | 9 ++ .../swing/laf/flatlaf/FlatLafOptionsPanel.form | 41 ++- .../swing/laf/flatlaf/FlatLafOptionsPanel.java | 131 - .../netbeans/swing/laf/flatlaf/FlatLafPrefs.java | 24 .../org/netbeans/swing/laf/flatlaf/Installer.java | 4 + 6 files changed, 207 insertions(+), 14 deletions(-) diff --git a/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/Bundle.properties b/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/Bundle.properties index e8949a77ba..d12d75e322 100644 --- a/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/Bundle.properties +++ b/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/Bundle.properties @@ -25,8 +25,10 @@ Editors/FontsColors/FlatLafDark=FlatLaf Dark Editors/FontsColors/FlatLafLight=FlatLaf Light FlatLaf_DisplayName=FlatLaf -KW_FlatLafOptions=FlatLaf, Look and Feel, Window decorations, Unified title bar, Embedded menu bar, underline menu, mnemonics +KW_FlatLafOptions=FlatLaf, Look and Feel, Accent color, Window decorations, Unified title bar, Embedded menu bar, underline menu, mnemonics +FlatLafOptionsPanel.accentColorLabel.text=Accent color: +FlatLafOptionsPanel.needsRestartLabel.text=(needs restart) FlatLafOptionsPanel.useWindowDecorationsCheckBox.text= decorations FlatLafOptionsPanel.unifiedTitleBarCheckBox.text= window title bar FlatLafOptionsPanel.menuBarEmbeddedCheckBox.text= menu bar @@ -41,6 +43,8 @@ FlatLafOptionsPanel.customProperties.content=\ \# FlatLaf custom property overrides.\n\ \# Save file and restart NetBeans to apply.\n\ \# For full documentation see https://www.formdev.com/flatlaf/properties-files/\n\ -\#\n\ -\# @accentColor=#dd\n\ -\# [dark]@accentColor=#bb3232\n +\#and https://www.formdev.com/flatlaf/components/\n\ +\#\n + +FlatLafOptionsPanel.restartTitle=Restart IDE +FlatLafOptionsPanel.restartDetails=Click here to restart IDE and apply your selected accent color. diff --git a/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatLaf.properties b/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatLaf.properties index 72b253d074..25f49801c9 100644 --- a/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatLaf.properties +++ b/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatLaf.properties @@ -18,6 +18,15 @@ Nb.LFCustoms={instance}org.netbeans.swing.laf.flatlaf.FlatLFCustoms +# accent colors from https://github.com/89netraM/SystemColors/blob/master/src/net/asberg/macos/AccentColor.java +nb.accentColors.predefined = \ +blue: #0A84FF; \ +purple: #BF5AF2; \ +red: #FF453A; \ +orange: #FF9F0A; \ +green: #32D74B + + nb.explorer.unfocusedSelBg=@selectionInactiveBackground nb.explorer.unfocusedSelFg=@selectionInactiveForeground nb.explorer.noFocusSelectionBackground=@selectionInactiveBackground diff --git a/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatLafOptionsPanel.form b/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatLafOptionsPanel.form index bd19aac737..a419354601 100644 --- a/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatLafOptionsPanel.form +++ b/platform/o.n.swing.laf.flatlaf/src/org/netbeans/swing/laf/flatlaf/FlatLafOptionsPanel.form @@ -44,6 +44,7 @@ + @@ -51,15 +52,28 @@ + + + + + + + + - + - + + + + + + @@ -71,12 +85,31 @@ - + + + + + + + + + + + +
[netbeans] branch master updated: Use antlr runtimes from ide.libs (like go.grammar) instead of downloading again.
This is an automated email from the ASF dual-hosted git repository. mbien pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git The following commit(s) were added to refs/heads/master by this push: new 59e6394590 Use antlr runtimes from ide.libs (like go.grammar) instead of downloading again. new 9a07595c99 Merge pull request #5804 from pepness/antlr-4.11.1 59e6394590 is described below commit 59e6394590cfbcf7bc59ba21447ce8cb99be71d0 Author: José Contreras AuthorDate: Sat Apr 8 15:25:28 2023 -0600 Use antlr runtimes from ide.libs (like go.grammar) instead of downloading again. --- ide/libs.antlr4.runtime/build.xml | 2 +- .../netbeans/libs/antlr4/runtime/Bundle.properties | 4 +-- rust/rust.grammar/build.xml| 5 ++- .../external/antlr-runtime-3.5.3-license.txt | 36 .../external/antlr4-runtime-4.11.1-license.txt | 39 -- rust/rust.grammar/external/binaries-list | 23 - .../org/netbeans/modules/rust/grammar/layer.xml| 3 +- 7 files changed, 6 insertions(+), 106 deletions(-) diff --git a/ide/libs.antlr4.runtime/build.xml b/ide/libs.antlr4.runtime/build.xml index bc2414a21c..af33de48b2 100644 --- a/ide/libs.antlr4.runtime/build.xml +++ b/ide/libs.antlr4.runtime/build.xml @@ -24,6 +24,6 @@ -Builds, tests, and runs the lib antlr 4.7.2 runtime. +Builds, tests, and runs the lib antlr 4.11.1 runtime. diff --git a/ide/libs.antlr4.runtime/src/org/netbeans/libs/antlr4/runtime/Bundle.properties b/ide/libs.antlr4.runtime/src/org/netbeans/libs/antlr4/runtime/Bundle.properties index 5c0cc8b4bc..02a09674e6 100644 --- a/ide/libs.antlr4.runtime/src/org/netbeans/libs/antlr4/runtime/Bundle.properties +++ b/ide/libs.antlr4.runtime/src/org/netbeans/libs/antlr4/runtime/Bundle.properties @@ -18,7 +18,5 @@ OpenIDE-Module-Name=Antlr 4 Runtime OpenIDE-Module-Short-Description=Antlr Runtime Libraries -OpenIDE-Module-Long-Description=Contains Antlr 4.7.2 runtime libraries +OpenIDE-Module-Long-Description=Contains Antlr 4.11.1 runtime libraries OpenIDE-Module-Display-Category=Libraries - - diff --git a/rust/rust.grammar/build.xml b/rust/rust.grammar/build.xml index c4460006aa..1fd914dc7f 100644 --- a/rust/rust.grammar/build.xml +++ b/rust/rust.grammar/build.xml @@ -25,9 +25,8 @@ - - - + + diff --git a/rust/rust.grammar/external/antlr-runtime-3.5.3-license.txt b/rust/rust.grammar/external/antlr-runtime-3.5.3-license.txt deleted file mode 100644 index 0c40a9a38a..00 --- a/rust/rust.grammar/external/antlr-runtime-3.5.3-license.txt +++ /dev/null @@ -1,36 +0,0 @@ -Name: Antlr 3 -Description: ANother Tool for Language Recognition, is a language tool that provides a framework for constructing recognizers, interpreters, compilers, and translators from grammatical descriptions. -Version: 3.5.3 -License: BSD-antlr-runtime3 -Origin: Antlr -URL: https://www.antlr3.org/license.html -Files: antlr-runtime-3.5.3.jar - - [The "BSD license"] - Copyright (c) 2010 Terence Parr - Maven Plugin - Copyright (c) 2009 Jim Idle - - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - 3. The name of the author may not be used to endorse or promote products -derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/rust/rust.grammar/external/antlr4-runtime-4.11.1-license.txt b/rust/rust.grammar/external/antlr4-runtime-4.11.1-license.txt deleted file mode 100644 index 842d642aa9..00 --- a/rust/rust.grammar/external/antlr4-runtime-4.11.1-license.txt +++ /dev/null @@ -1,39 +0,0 @@ -Name: Antlr -Description: ANother Tool for Language
[netbeans] branch master updated (6862116550 -> efa6483fb3)
This is an automated email from the ASF dual-hosted git repository. junichi11 pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git from 6862116550 VSCode: Renaming Java 8+ debug configuration to Java+. (#5816) new 9ae85ac64f Add the "End of File" blank line formatting option #4641 new d61e1d09ea Add the new hint for PSR-12 Files new efa6483fb3 Merge pull request #5824 from junichi11/php-gh-4641-formatter-blank-lines-eof The 8461 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../modules/php/editor/indent/CodeStyle.java | 4 + .../modules/php/editor/indent/FmtOptions.java | 6 +- .../modules/php/editor/indent/TokenFormatter.java | 35 .../modules/php/editor/indent/ui/Bundle.properties | 1 + .../php/editor/indent/ui/FmtBlankLines.form| 12 +- .../php/editor/indent/ui/FmtBlankLines.java| 10 +- .../modules/php/editor/resources/layer.xml | 4 + .../php/editor/verification/Bundle.properties | 1 + .../php/editor/verification/PSR12FilesHint.java| 133 ++ .../modules/php/editor/verification/PSR12Hint.java | 112 .../testfiles/formatting/blankLines/eof_01.php | 21 +++ .../blankLines/eof_01.php.testEOF_01a.formatted| 21 +++ .../blankLines/eof_01.php.testEOF_01b.formatted| 21 +++ .../testfiles/formatting/blankLines/eof_02.php | 21 +++ .../blankLines/eof_02.php.testEOF_02a.formatted| 21 +++ .../blankLines/eof_02.php.testEOF_02b.formatted| 21 +++ .../testEndWithWhitespace.php | 21 +++ ...dWithWhitespace.php.testEndWithWhitespace.hints | 3 + .../PSR12/Files/testHasNewline/testHasNewline.php | 20 +++ .../testHasNewline.php.testHasNewline.hints| 0 .../testHasNewlineCRLF/testHasNewlineCRLF.php | 20 +++ ...testHasNewlineCRLF.php.testHasNewlineCRLF.hints | 4 + .../testNoNewlineAtEOF/testNoNewlineAtEOF.php | 20 +++ ...testNoNewlineAtEOF.php.testNoNewlineAtEOF.hints | 3 + .../indent/PHPFormatterBlankLinesEOFTest.java | 191 + .../php/editor/indent/PHPFormatterTestBase.java| 2 +- .../editor/verification/PSR12FilesHintTest.java| 73 .../php/editor/verification/PSR12HintTestBase.java | 56 ++ 28 files changed, 853 insertions(+), 4 deletions(-) create mode 100644 php/php.editor/src/org/netbeans/modules/php/editor/verification/PSR12FilesHint.java create mode 100644 php/php.editor/src/org/netbeans/modules/php/editor/verification/PSR12Hint.java create mode 100644 php/php.editor/test/unit/data/testfiles/formatting/blankLines/eof_01.php create mode 100644 php/php.editor/test/unit/data/testfiles/formatting/blankLines/eof_01.php.testEOF_01a.formatted create mode 100644 php/php.editor/test/unit/data/testfiles/formatting/blankLines/eof_01.php.testEOF_01b.formatted create mode 100644 php/php.editor/test/unit/data/testfiles/formatting/blankLines/eof_02.php create mode 100644 php/php.editor/test/unit/data/testfiles/formatting/blankLines/eof_02.php.testEOF_02a.formatted create mode 100644 php/php.editor/test/unit/data/testfiles/formatting/blankLines/eof_02.php.testEOF_02b.formatted create mode 100644 php/php.editor/test/unit/data/testfiles/verification/PSR12/Files/testEndWithWhitespace/testEndWithWhitespace.php create mode 100644 php/php.editor/test/unit/data/testfiles/verification/PSR12/Files/testEndWithWhitespace/testEndWithWhitespace.php.testEndWithWhitespace.hints create mode 100644 php/php.editor/test/unit/data/testfiles/verification/PSR12/Files/testHasNewline/testHasNewline.php copy enterprise/web.jspparser/test/unit/data/jspparser-data/wmroot/subdir/Page1.jsp => php/php.editor/test/unit/data/testfiles/verification/PSR12/Files/testHasNewline/testHasNewline.php.testHasNewline.hints (100%) create mode 100644 php/php.editor/test/unit/data/testfiles/verification/PSR12/Files/testHasNewlineCRLF/testHasNewlineCRLF.php create mode 100644 php/php.editor/test/unit/data/testfiles/verification/PSR12/Files/testHasNewlineCRLF/testHasNewlineCRLF.php.testHasNewlineCRLF.hints create mode 100644 php/php.editor/test/unit/data/testfiles/verification/PSR12/Files/testNoNewlineAtEOF/testNoNewlineAtEOF.php create mode 100644 php/php.editor/test/unit/data/testfiles/verification/PSR12/Files/testNoNewlineAtEOF/testNoNewlineAtEOF.php.testNoNewlineAtEOF.hints create mode 100644 php/php.editor/test/unit/src/org/netbeans/modules/php/editor/indent/PHPFormatterBlankLinesEOFTest.java create mode 100644 php/php.editor/test/unit/src/org/netbeans/modules/php/editor/verification/PSR12FilesHintTest.java create mode 100644 php/php.editor/test/unit/src/org/netbeans/modules/php/editor/verification/PSR12HintTestBase.java
[netbeans] branch master updated: VSCode: Renaming Java 8+ debug configuration to Java+. (#5816)
This is an automated email from the ASF dual-hosted git repository. dbalek pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git The following commit(s) were added to refs/heads/master by this push: new 6862116550 VSCode: Renaming Java 8+ debug configuration to Java+. (#5816) 6862116550 is described below commit 68621165502b00599adf4622e0e7a14fc0565cb1 Author: Dusan Balek AuthorDate: Fri Apr 14 09:58:43 2023 +0200 VSCode: Renaming Java 8+ debug configuration to Java+. (#5816) --- .../java/lsp/server/db/DBSetEnvCommand.java| 2 +- .../attach/AttachConfigurationCompletion.java | 4 +- .../debugging/attach/AttachConfigurations.java | 2 +- .../protocol/ProjectConfigurationCompletion.java | 8 ++- .../java/lsp/server/protocol/ServerTest.java | 4 +- java/java.lsp.server/vscode/CHANGELOG.md | 3 + java/java.lsp.server/vscode/README.md | 10 +-- java/java.lsp.server/vscode/package-lock.json | 16 ++--- java/java.lsp.server/vscode/package.json | 29 java/java.lsp.server/vscode/src/extension.ts | 20 +++--- .../vscode/src/launchConfigurations.ts | 77 +++--- .../java.lsp.server/vscode/src/runConfiguration.ts | 2 +- .../vscode/src/test/suite/extension.test.ts| 2 +- 13 files changed, 110 insertions(+), 69 deletions(-) diff --git a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/db/DBSetEnvCommand.java b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/db/DBSetEnvCommand.java index f77f06ba7e..e27c7cf334 100644 --- a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/db/DBSetEnvCommand.java +++ b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/db/DBSetEnvCommand.java @@ -45,7 +45,7 @@ import org.openide.util.lookup.ServiceProvider; @ServiceProvider(service = CodeActionsProvider.class) public class DBSetEnvCommand extends CodeActionsProvider { private static final String COMMAND_SET_DB_ENV = "java.db.set.env"; //NOI18N -private static final String CONFIG_SECTION = "java8+.runConfig"; //NOI18N +private static final String CONFIG_SECTION = "java+.runConfig"; //NOI18N private static final Set COMMANDS = new HashSet<>(Arrays.asList( COMMAND_SET_DB_ENV diff --git a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/attach/AttachConfigurationCompletion.java b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/attach/AttachConfigurationCompletion.java index e17c152481..5ff3e14209 100644 --- a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/attach/AttachConfigurationCompletion.java +++ b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/attach/AttachConfigurationCompletion.java @@ -30,6 +30,7 @@ import java.util.function.Supplier; import java.util.stream.Collectors; import org.eclipse.lsp4j.CompletionItem; +import org.eclipse.lsp4j.CompletionItemKind; import org.eclipse.lsp4j.InsertTextFormat; import org.netbeans.api.project.Project; import org.netbeans.modules.java.lsp.server.Utils; @@ -69,7 +70,8 @@ public class AttachConfigurationCompletion implements LaunchConfigurationComplet } private static CompletionItem createCompletion(ConfigurationAttributes configAttrs) { -CompletionItem ci = new CompletionItem("Java 8+: " + configAttrs.getName());// NOI18N +CompletionItem ci = new CompletionItem("Java+: " + configAttrs.getName());// NOI18N +ci.setKind(CompletionItemKind.Module); StringWriter sw = new StringWriter(); try (JsonWriter w = new JsonWriter(sw)) { w.setIndent("\t"); // NOI18N diff --git a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/attach/AttachConfigurations.java b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/attach/AttachConfigurations.java index 3a79ead521..7989a0598b 100644 --- a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/attach/AttachConfigurations.java +++ b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/debugging/attach/AttachConfigurations.java @@ -54,7 +54,7 @@ import org.openide.util.RequestProcessor; */ public final class AttachConfigurations { -static final String CONFIG_TYPE = "java8+"; // NOI18N +static final String CONFIG_TYPE = "java+"; // NOI18N static final String CONFIG_REQUEST = "attach"; // NOI18N static final RequestProcessor RP = new RequestProcessor(AttachConfigurations.class); diff --git a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/ProjectConfigurationCompletion.java b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/ProjectConfigurationCompletion.java index 159a2b4b4c..4a3e4098ab 100644 ---