[netbeans] branch master updated: NEON - added FlatLaf Dark specific colors to improve legibility
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 597b92df5b NEON - added FlatLaf Dark specific colors to improve legibility 597b92df5b is described below commit 597b92df5b70a3a2e602929ef7564a8011ed8b4a Author: Tomas Prochazka AuthorDate: Sun Jul 17 21:35:31 2022 +0200 NEON - added FlatLaf Dark specific colors to improve legibility --- .../neon/resources/FontAndColors-FlatLafDark.xml | 27 ++ .../modules/languages/neon/resources/layer.xml | 7 ++ 2 files changed, 34 insertions(+) diff --git a/php/languages.neon/src/org/netbeans/modules/languages/neon/resources/FontAndColors-FlatLafDark.xml b/php/languages.neon/src/org/netbeans/modules/languages/neon/resources/FontAndColors-FlatLafDark.xml new file mode 100644 index 00..d5dac25e88 --- /dev/null +++ b/php/languages.neon/src/org/netbeans/modules/languages/neon/resources/FontAndColors-FlatLafDark.xml @@ -0,0 +1,27 @@ + + +http://www.netbeans.org/dtds/EditorFontsColors-1_1.dtd;> + + + + + diff --git a/php/languages.neon/src/org/netbeans/modules/languages/neon/resources/layer.xml b/php/languages.neon/src/org/netbeans/modules/languages/neon/resources/layer.xml index af13cf78db..d725fa52dc 100644 --- a/php/languages.neon/src/org/netbeans/modules/languages/neon/resources/layer.xml +++ b/php/languages.neon/src/org/netbeans/modules/languages/neon/resources/layer.xml @@ -125,6 +125,13 @@ + + + + + + + - 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
[netbeans] branch master updated: Add minimal support for Gradle default version catalog
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 64efba0001 Add minimal support for Gradle default version catalog 64efba0001 is described below commit 64efba000172bc6f2311984cbbd44c70dbb45e4e Author: Laszlo Kishalmi AuthorDate: Fri Jul 15 23:18:36 2022 -0700 Add minimal support for Gradle default version catalog --- extide/gradle/apichanges.xml | 16 extide/gradle/manifest.mf| 2 +- .../src/org/netbeans/modules/gradle/GradleReport.java| 2 +- .../netbeans/modules/gradle/nodes/BuildScriptsNode.java | 3 ++- .../src/org/netbeans/modules/gradle/spi/GradleFiles.java | 13 + 5 files changed, 29 insertions(+), 7 deletions(-) diff --git a/extide/gradle/apichanges.xml b/extide/gradle/apichanges.xml index 72dd83e5d4..c88bac86a1 100644 --- a/extide/gradle/apichanges.xml +++ b/extide/gradle/apichanges.xml @@ -83,6 +83,22 @@ is the proper place. + + +GradleFiles.Kind.VERSION_CATALOG introduced + + + + + +GradleFiles.Kind.VERSION_CATALOG +was addedd to represent $rootDir/gradle.libs.versions.toml file of the project. + +GradleFiles.getKind(VERSION_CATALOG) + can be used to retrieve the represented file. (The file might not exists though.) + + + GradleFiles can be obtained from API diff --git a/extide/gradle/manifest.mf b/extide/gradle/manifest.mf index 7b68809b62..8376f624ea 100644 --- a/extide/gradle/manifest.mf +++ b/extide/gradle/manifest.mf @@ -3,4 +3,4 @@ AutoUpdate-Show-In-Client: false OpenIDE-Module: org.netbeans.modules.gradle/2 OpenIDE-Module-Layer: org/netbeans/modules/gradle/layer.xml OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/gradle/Bundle.properties -OpenIDE-Module-Specification-Version: 2.24 +OpenIDE-Module-Specification-Version: 2.25 diff --git a/extide/gradle/src/org/netbeans/modules/gradle/GradleReport.java b/extide/gradle/src/org/netbeans/modules/gradle/GradleReport.java index c7d09584b6..981bf50b14 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/GradleReport.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/GradleReport.java @@ -51,7 +51,7 @@ public final class GradleReport { } public static GradleReport simple(Path script, String message) { -return new GradleReport(null, script != null ? script.toString() : null, -1, message, null); +return new GradleReport(null, Objects.toString(script), -1, message, null); } public GradleReport(Path scriptLocation, String message, GradleReport causedBy) { diff --git a/extide/gradle/src/org/netbeans/modules/gradle/nodes/BuildScriptsNode.java b/extide/gradle/src/org/netbeans/modules/gradle/nodes/BuildScriptsNode.java index e940261bd1..3be7c4e06f 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/nodes/BuildScriptsNode.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/nodes/BuildScriptsNode.java @@ -79,7 +79,7 @@ public final class BuildScriptsNode extends AnnotatedAbstractNode { // The order in this array determines the order of the nodes under Build Scripts private static final Kind[] SCRIPTS = new Kind[] { -BUILD_SRC, USER_PROPERTIES, SETTINGS_SCRIPT, ROOT_SCRIPT, ROOT_PROPERTIES, BUILD_SCRIPT, PROJECT_PROPERTIES +BUILD_SRC, VERSION_CATALOG, USER_PROPERTIES, SETTINGS_SCRIPT, ROOT_SCRIPT, ROOT_PROPERTIES, BUILD_SCRIPT, PROJECT_PROPERTIES }; @Override @@ -172,6 +172,7 @@ public final class BuildScriptsNode extends AnnotatedAbstractNode { case USER_PROPERTIES: return createBuildFileNode(fo, Bundle.LBL_UserSuffix()); case SETTINGS_SCRIPT: +case VERSION_CATALOG: return createBuildFileNode(fo, null); case BUILD_SRC: return createSubProjectNode(fo); diff --git a/extide/gradle/src/org/netbeans/modules/gradle/spi/GradleFiles.java b/extide/gradle/src/org/netbeans/modules/gradle/spi/GradleFiles.java index 788aea72de..565251092e 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/spi/GradleFiles.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/spi/GradleFiles.java @@ -58,11 +58,13 @@ public final class GradleFiles implements Serializable { PROJECT_PROPERTIES, ROOT_PROPERTIES, /** @since 2.4 */ -BUILD_SRC; +BUILD_SRC, +/** @since 2.25 */ +VERSION_CATALOG; public static final Set SCRIPTS = EnumSet.of(ROOT_SCRIPT, BUILD_SCRIPT, SETTINGS_SCRIPT, BUILD_SRC
[netbeans] branch master updated: Improved YAML curly, bracket and quotes keystroke handling
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 24a6dca51e Improved YAML curly, bracket and quotes keystroke handling 24a6dca51e is described below commit 24a6dca51e269e45df75857bb916c2c1185d8857 Author: Laszlo Kishalmi AuthorDate: Fri Jul 15 16:37:42 2022 -0700 Improved YAML curly, bracket and quotes keystroke handling --- .../languages/yaml/YamlKeystrokeHandler.java | 83 -- .../languages/yaml/YamlKeystrokeHandlerTest.java | 32 - 2 files changed, 93 insertions(+), 22 deletions(-) diff --git a/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlKeystrokeHandler.java b/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlKeystrokeHandler.java index 6be5c7b55e..d547ff19a6 100644 --- a/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlKeystrokeHandler.java +++ b/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlKeystrokeHandler.java @@ -53,6 +53,27 @@ public class YamlKeystrokeHandler implements KeystrokeHandler { BaseDocument doc = (BaseDocument) document; int dotPos = caret.getDot(); +int length = doc.getLength(); + +// Primitive handling of backslash as escape character, far from accurate +// but would work most of the time. +if ((dotPos > 0) && "\\".equals(doc.getText(dotPos - 1, 1))) { +return false; +} + +if (c == ' ' && dotPos > 0 && dotPos <= length - 1) { +try { +String sb = doc.getText(dotPos - 1, 2); +if ("{}".equals(sb) || "[]".equals(sb)) { +doc.insertString(dotPos, " ", null); +caret.setDot(dotPos + 1); +return true; +} +} catch (BadLocationException ble) { +Exceptions.printStackTrace(ble); +} +} + // Bracket matching on <% %> if (c == ' ' && dotPos >= 2) { try { @@ -60,7 +81,7 @@ public class YamlKeystrokeHandler implements KeystrokeHandler { if ("%=".equals(s) && dotPos >= 3) { // NOI18N s = doc.getText(dotPos - 3, 3); } -if ("<%".equals(s) || "<%=".equals(s) || "{{".equals(s)) { // NOI18N +if ("<%".equals(s) || "<%=".equals(s)) { // NOI18N doc.insertString(dotPos, " ", null); caret.setDot(dotPos + 1); return true; @@ -72,19 +93,26 @@ public class YamlKeystrokeHandler implements KeystrokeHandler { return false; } -if ((c == '{') && (dotPos > 0)) { +if ((c == '{')) { try { -String s = dotPos > 1 ? doc.getText(dotPos - 2, 2) : doc.getText(dotPos - 1, 1); -if ("{".equals(s) || (s.endsWith("{") && (s.length() > 1) && (s.charAt(0) != '{'))) { -doc.insertString(dotPos, "{}}", null); -caret.setDot(dotPos + 1); -return true; -} +doc.insertString(dotPos, "{}", null); +caret.setDot(dotPos + 1); } catch (BadLocationException ble) { Exceptions.printStackTrace(ble); } -return false; +return true; +} + +if ((c == '[')) { +try { +doc.insertString(dotPos, "[]", null); +caret.setDot(dotPos + 1); +} catch (BadLocationException ble) { +Exceptions.printStackTrace(ble); +} + +return true; } if ((c == '\'') || (c == '"')) { @@ -101,16 +129,25 @@ public class YamlKeystrokeHandler implements KeystrokeHandler { char[] line = doc.getChars(lineStart, lineEnd - lineStart); int quotes = 0; -for (char d : line) { +for (int i = 0; i < line.length; i++) { +char d = line[i]; +if ('\\' == d) { +i++; +continue; +} if (c == d) quotes++; } + // Try to keep the number of quotes even if ( quotes % 2 == 1 ) { // Inserting one if the number of quotes are odd return false; } else { -// Inserting double if the number of quotes are even -doc.insertString(sstart, String.valueOf(
[netbeans] branch master updated: Fix NPE when there is no build.gradle for the root project
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 e6ec1d18f2 Fix NPE when there is no build.gradle for the root project e6ec1d18f2 is described below commit e6ec1d18f246dd5cbd54bce502dc25c93f7f3fef Author: Laszlo Kishalmi AuthorDate: Fri Jul 15 22:45:34 2022 -0700 Fix NPE when there is no build.gradle for the root project --- extide/gradle/src/org/netbeans/modules/gradle/GradleProject.java | 2 +- extide/gradle/src/org/netbeans/modules/gradle/GradleReport.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extide/gradle/src/org/netbeans/modules/gradle/GradleProject.java b/extide/gradle/src/org/netbeans/modules/gradle/GradleProject.java index 0220a64f3a..91d99ea0c0 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/GradleProject.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/GradleProject.java @@ -121,7 +121,7 @@ public final class GradleProject implements Serializable, Lookup.Provider { public final GradleProject invalidate(String... reason) { GradleFiles gf = new GradleFiles(baseProject.getProjectDir(), true); -Path scriptPath = gf.getBuildScript().toPath(); +Path scriptPath = gf.getBuildScript() != null ? gf.getBuildScript().toPath() : null; List reports = new ArrayList<>(); for (String s : reason) { reports.add(GradleReport.simple(scriptPath, s)); diff --git a/extide/gradle/src/org/netbeans/modules/gradle/GradleReport.java b/extide/gradle/src/org/netbeans/modules/gradle/GradleReport.java index f6aabe0db0..c7d09584b6 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/GradleReport.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/GradleReport.java @@ -51,7 +51,7 @@ public final class GradleReport { } public static GradleReport simple(Path script, String message) { -return new GradleReport(null, script.toString(), -1, message, null); +return new GradleReport(null, script != null ? script.toString() : null, -1, message, null); } public GradleReport(Path scriptLocation, String message, GradleReport causedBy) { - 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
[netbeans] branch master updated: Upgrade Gradle Tooling API to 7.5 with Java 18 Support
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 64c489a9c6 Upgrade Gradle Tooling API to 7.5 with Java 18 Support 64c489a9c6 is described below commit 64c489a9c66944c11dc5370b4785d0eb39ded2b6 Author: Laszlo Kishalmi AuthorDate: Thu Jul 14 13:58:10 2022 -0700 Upgrade Gradle Tooling API to 7.5 with Java 18 Support --- .../src/org/netbeans/modules/gradle/api/execute/Bundle.properties | 1 + .../org/netbeans/modules/gradle/api/execute/GradleCommandLine.java| 1 + .../modules/gradle/api/execute/GradleDistributionManager.java | 1 + extide/libs.gradle/external/binaries-list | 2 +- ...tooling-api-7.4-license.txt => gradle-tooling-api-7.5-license.txt} | 4 ++-- ...e-tooling-api-7.4-notice.txt => gradle-tooling-api-7.5-notice.txt} | 0 extide/libs.gradle/manifest.mf| 2 +- extide/libs.gradle/nbproject/project.properties | 2 +- extide/libs.gradle/nbproject/project.xml | 2 +- 9 files changed, 9 insertions(+), 6 deletions(-) diff --git a/extide/gradle/src/org/netbeans/modules/gradle/api/execute/Bundle.properties b/extide/gradle/src/org/netbeans/modules/gradle/api/execute/Bundle.properties index 4934cf743a..ca3bcc51eb 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/api/execute/Bundle.properties +++ b/extide/gradle/src/org/netbeans/modules/gradle/api/execute/Bundle.properties @@ -60,6 +60,7 @@ REFRESH_DEPENDENCIES_DSC=Refresh the state of dependencies. REFRESH_KEYS_DSC=Refresh the public keys used for dependency verification. RERUN_TASKS_DSC=Ignore previously cached task results. SCAN_DSC=Creates a build scan.Gradle will emit a warning if the build scan plugin has not been applied. (https://gradle.com/build-scans;>https://gradle.com/build-scans) +SHOW_VERSION_DSC=Print version info and continue. SETTINGS_FILE_DSC=Specify the settings file.[deprecated] STATUS_DSC=Shows status of running and recently stopped Gradle Daemon(s). STACKTRACE_DSC=Print out the stacktrace for all exceptions. diff --git a/extide/gradle/src/org/netbeans/modules/gradle/api/execute/GradleCommandLine.java b/extide/gradle/src/org/netbeans/modules/gradle/api/execute/GradleCommandLine.java index 7124f862bd..df937eb4ab 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/api/execute/GradleCommandLine.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/api/execute/GradleCommandLine.java @@ -146,6 +146,7 @@ public final class GradleCommandLine implements Serializable { REFRESH_KEYS(PARAM, GradleVersionRange.from("6.2"), "--refresh-keys"), RERUN_TASKS(PARAM, "--rerun-tasks"), SCAN(PARAM, GradleVersionRange.from("4.3"), "--scan"), +SHOW_VERSION(PARAM, GradleVersionRange.from("7.5"), "-V", "--show-version"), STACKTRACE(PARAM, "-s", "--stacktrace"), STACKTRACE_FULL(PARAM, "-S", "--full-stacktrace"), STATUS(UNSUPPORTED, "--status"), diff --git a/extide/gradle/src/org/netbeans/modules/gradle/api/execute/GradleDistributionManager.java b/extide/gradle/src/org/netbeans/modules/gradle/api/execute/GradleDistributionManager.java index 1d27b0078a..6228015b2f 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/api/execute/GradleDistributionManager.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/api/execute/GradleDistributionManager.java @@ -98,6 +98,7 @@ public final class GradleDistributionManager { GradleVersion.version("6.7"), // JDK-15 GradleVersion.version("7.0"), // JDK-16 GradleVersion.version("7.3"), // JDK-17 +GradleVersion.version("7.5"), // JDK-18 }; private static final int JAVA_VERSION; diff --git a/extide/libs.gradle/external/binaries-list b/extide/libs.gradle/external/binaries-list index e625448311..26365ef594 100644 --- a/extide/libs.gradle/external/binaries-list +++ b/extide/libs.gradle/external/binaries-list @@ -15,4 +15,4 @@ # specific language governing permissions and limitations # under the License. -38AAE423ABABA1AA6B0F885874EDE451D4B2D437 https://repo.gradle.org/public/org/gradle/gradle-tooling-api/7.4/gradle-tooling-api-7.4.jar gradle-tooling-api-7.4.jar +18FB51FF62486D84F7B91F171D0E4AABF020DCDC https://repo.gradle.org/public/org/gradle/gradle-tooling-api/7.5/gradle-tooling-api-7.5.jar gradle-tooling-api-7.5.jar diff --git a/extide/libs.gradle/external/gradle-tooling-api-7.4-license.txt b/extide/libs.gradle/external/gradle-tooling-api-7.5-license.txt similarity index 99% rename from extide/libs.gradle/external/gradle-tooling-api-7.
[netbeans] branch master updated: Move NbProjectInfo out of Gradle API package
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 3929f3d892 Move NbProjectInfo out of Gradle API package 3929f3d892 is described below commit 3929f3d89229baa9ca7aa3941f10254f490225b1 Author: Laszlo Kishalmi AuthorDate: Thu Mar 31 07:00:25 2022 -0700 Move NbProjectInfo out of Gradle API package --- .../nbproject/org-netbeans-modules-gradle.sig | 26 -- .../org/netbeans/modules/gradle/DebugTooling.java | 2 +- .../gradle/tooling/NbProjectInfoBuilder.java | 2 +- .../modules/gradle/tooling/NbProjectInfoModel.java | 2 +- .../gradle/tooling/NetBeansToolingPlugin.java | 2 +- .../{api => tooling/internal}/ModelFetcher.java| 2 +- .../{api => tooling/internal}/NbProjectInfo.java | 2 +- .../modules/gradle/cache/ProjectInfoDiskCache.java | 4 ++-- .../gradle/loaders/AbstractProjectLoader.java | 2 +- .../gradle/loaders/BundleProjectLoader.java| 3 +-- .../gradle/loaders/LegacyProjectLoader.java| 4 ++-- .../modules/gradle/loaders/ModelCache.java | 2 +- .../loaders/NbProjectInfoCachingDescriptor.java| 2 +- 13 files changed, 14 insertions(+), 41 deletions(-) diff --git a/extide/gradle/nbproject/org-netbeans-modules-gradle.sig b/extide/gradle/nbproject/org-netbeans-modules-gradle.sig index c95a1b7659..a1d7b34833 100644 --- a/extide/gradle/nbproject/org-netbeans-modules-gradle.sig +++ b/extide/gradle/nbproject/org-netbeans-modules-gradle.sig @@ -230,23 +230,6 @@ meth public java.lang.String getPath() supr java.lang.Object hfds CAMLE_CASE_SPLITTER,description,group,name,path -CLSS public final org.netbeans.modules.gradle.api.ModelFetcher -cons public init() -cons public init(java.util.concurrent.ExecutorService) -meth public <%0 extends java.lang.Object, %1 extends java.lang.Object> java.util.concurrent.Future<{%%0}> requestModel(java.lang.Class<{%%0}>,java.lang.Class<{%%1}>,org.gradle.api.Action) -meth public <%0 extends java.lang.Object, %1 extends java.lang.Object> java.util.concurrent.Future<{%%0}> requestModel(java.lang.String,java.lang.Class<{%%0}>,java.lang.Class<{%%1}>,org.gradle.api.Action) -meth public <%0 extends java.lang.Object, %1 extends java.lang.Object> void modelAction(java.lang.String,java.lang.Class<{%%0}>,java.lang.Class<{%%1}>,org.gradle.api.Action,org.gradle.api.Action<{%%0}>,org.gradle.api.Action) -meth public <%0 extends java.lang.Object, %1 extends java.lang.Object> void modelAction(java.lang.String,java.lang.Class<{%%0}>,org.gradle.api.Action<{%%0}>) -meth public <%0 extends java.lang.Object, %1 extends java.lang.Object> void modelAction(java.lang.String,java.lang.Class<{%%0}>,org.gradle.api.Action<{%%0}>,org.gradle.api.Action) -meth public <%0 extends java.lang.Object> java.util.concurrent.Future<{%%0}> requestModel(java.lang.Class<{%%0}>) -meth public <%0 extends java.lang.Object> java.util.concurrent.Future<{%%0}> requestModel(java.lang.String,java.lang.Class<{%%0}>) -meth public boolean awaitTermination(long,java.util.concurrent.TimeUnit) throws java.lang.InterruptedException -meth public boolean isAcceptingRequests() -meth public void fetchModels(org.gradle.tooling.ProjectConnection,org.gradle.api.Action) -supr java.lang.Object -hfds REQUEST_SEQUENCER,action,executor,lock,modelResults -hcls ModelRequest,ModelResult,MultiModelAction - CLSS public abstract interface org.netbeans.modules.gradle.api.ModuleSearchSupport meth public abstract java.util.Set findModules(java.lang.String) meth public abstract java.util.Set findModules(java.lang.String,java.lang.String,java.lang.String) @@ -297,15 +280,6 @@ meth public static org.netbeans.modules.gradle.api.NbGradleProject$Quality value meth public static org.netbeans.modules.gradle.api.NbGradleProject$Quality[] values() supr java.lang.Enum -CLSS public abstract interface org.netbeans.modules.gradle.api.NbProjectInfo -intf org.gradle.tooling.model.Model -intf org.netbeans.modules.gradle.tooling.Model -meth public abstract boolean getMiscOnly() -meth public abstract java.util.Map getExt() -meth public abstract java.util.Map getInfo() -meth public abstract java.util.Set getProblems() -meth public abstract java.util.Set getReports() - CLSS public abstract interface org.netbeans.modules.gradle.api.execute.ActionMapping fld public final static java.lang.String CUSTOM_PREFIX = "custom-" innr public final static !enum ReloadRule diff --git a/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/DebugTooling.java b/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/DebugTooling.java index 8b2866bf00.
[netbeans] branch master updated: Fix potential NPE in GradleModuleFileCache21 when trying to resolve non-gradle artifacts.
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 d4c991929a Fix potential NPE in GradleModuleFileCache21 when trying to resolve non-gradle artifacts. d4c991929a is described below commit d4c991929ac33daf2c8733b0f700e00e0f70acb7 Author: Laszlo Kishalmi AuthorDate: Wed Jun 8 16:20:14 2022 +0200 Fix potential NPE in GradleModuleFileCache21 when trying to resolve non-gradle artifacts. --- .../src/org/netbeans/modules/gradle/GradleModuleFileCache21.java | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/extide/gradle/src/org/netbeans/modules/gradle/GradleModuleFileCache21.java b/extide/gradle/src/org/netbeans/modules/gradle/GradleModuleFileCache21.java index b81a28a26b..7782891774 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/GradleModuleFileCache21.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/GradleModuleFileCache21.java @@ -222,12 +222,16 @@ public final class GradleModuleFileCache21 { } public CachedArtifactVersion resolveCachedArtifactVersion(Path artifact) throws IllegalArgumentException { -return new CachedArtifactVersion(artifact.getParent().getParent()); +return artifact == null +|| artifact.getParent() == null +|| artifact.getParent().getParent() == null +? null +: new CachedArtifactVersion(artifact.getParent().getParent()); } public CachedArtifactVersion.Entry resolveEntry(Path artifact) throws IllegalArgumentException { CachedArtifactVersion av = resolveCachedArtifactVersion(artifact); -return av.entries.get(artifact.getFileName().toString()); +return av != null ? av.entries.get(artifact.getFileName().toString()) : null; } public CachedArtifactVersion resolveModule(String moduleId) throws IllegalArgumentException { - 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
[netbeans] branch master updated: Add property sheet for Gradle Configuration nodes
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 81af35ca15 Add property sheet for Gradle Configuration nodes 81af35ca15 is described below commit 81af35ca1534a04554019de8336a14d628a1eb50 Author: Laszlo Kishalmi AuthorDate: Thu Jun 2 21:42:38 2022 +0200 Add property sheet for Gradle Configuration nodes --- extide/gradle/nbproject/project.xml| 2 +- .../gradle/tooling/NbProjectInfoBuilder.java | 11 +++ .../gradle/api/GradleBaseProjectBuilder.java | 5 + .../modules/gradle/api/GradleConfiguration.java| 26 ++ .../modules/gradle/cache/ProjectInfoDiskCache.java | 2 +- .../modules/gradle/nodes/ConfigurationsNode.java | 104 +++-- 6 files changed, 121 insertions(+), 29 deletions(-) diff --git a/extide/gradle/nbproject/project.xml b/extide/gradle/nbproject/project.xml index 65840173c7..024a39262f 100644 --- a/extide/gradle/nbproject/project.xml +++ b/extide/gradle/nbproject/project.xml @@ -314,7 +314,7 @@ -7.38.1 +7.62 diff --git a/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java b/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java index bc3c26203f..ff6c30571d 100644 --- a/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java +++ b/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java @@ -28,6 +28,7 @@ import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; +import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; @@ -53,6 +54,8 @@ import org.gradle.api.artifacts.result.ComponentArtifactsResult; import org.gradle.api.artifacts.result.ResolvedArtifactResult; import org.gradle.api.artifacts.result.ResolvedDependencyResult; import org.gradle.api.artifacts.result.UnresolvedDependencyResult; +import org.gradle.api.attributes.Attribute; +import org.gradle.api.attributes.AttributeContainer; import org.gradle.api.distribution.DistributionContainer; import org.gradle.api.file.ConfigurableFileCollection; import org.gradle.api.initialization.IncludedBuild; @@ -417,8 +420,16 @@ class NbProjectInfoBuilder { String propBase = "configuration_" + it.getName() + "_"; model.getInfo().put(propBase + "non_resolving", !resolvable(it)); model.getInfo().put(propBase + "transitive", it.isTransitive()); +model.getInfo().put(propBase + "canBeConsumed", it.isCanBeConsumed()); model.getInfo().put(propBase + "extendsFrom", it.getExtendsFrom().stream().map(c -> c.getName()).collect(Collectors.toCollection(HashSet::new))); model.getInfo().put(propBase + "description", it.getDescription()); + +Map attributes = new LinkedHashMap<>(); +AttributeContainer attrs = it.getAttributes(); +for (Attribute attr : attrs.keySet()) { +attributes.put(attr.getName(), String.valueOf(attrs.getAttribute(attr))); +} +model.getInfo().put(propBase + "attributes", attributes); }); //visibleConfigurations = visibleConfigurations.findAll() { resolvable(it) } visibleConfigurations.forEach(it -> { diff --git a/extide/gradle/src/org/netbeans/modules/gradle/api/GradleBaseProjectBuilder.java b/extide/gradle/src/org/netbeans/modules/gradle/api/GradleBaseProjectBuilder.java index dc5586c114..5aefbc9e75 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/api/GradleBaseProjectBuilder.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/api/GradleBaseProjectBuilder.java @@ -284,6 +284,11 @@ class GradleBaseProjectBuilder implements ProjectInfoExtractor.Result { Boolean transitive = (Boolean) info.get("configuration_" + name + "_transitive"); conf.transitive = transitive == null ? true : transitive; +Boolean canBeConsumed = (Boolean) info.get("configuration_" + name + "_canBeConsumed"); +conf.canBeConsumed = canBeConsumed == null ? false : canBeConsumed; + +conf.attributes = (Map) info.get("configuration_" + name + "_attributes"); + conf.description = (String) info.get("configuration_&quo
[netbeans] branch master updated: Fix possible NPE at RunUtils.getCompatibleGradleDistribution
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 9d47c83086 Fix possible NPE at RunUtils.getCompatibleGradleDistribution 9d47c83086 is described below commit 9d47c8308680e626f8962fc61189496f9ace950d Author: Laszlo Kishalmi AuthorDate: Wed Jun 1 03:36:50 2022 -0700 Fix possible NPE at RunUtils.getCompatibleGradleDistribution --- extide/gradle/src/org/netbeans/modules/gradle/api/execute/RunUtils.java | 1 + 1 file changed, 1 insertion(+) diff --git a/extide/gradle/src/org/netbeans/modules/gradle/api/execute/RunUtils.java b/extide/gradle/src/org/netbeans/modules/gradle/api/execute/RunUtils.java index 22144f14a1..3dda266b4a 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/api/execute/RunUtils.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/api/execute/RunUtils.java @@ -259,6 +259,7 @@ public final class RunUtils { public static GradleDistribution getCompatibleGradleDistribution(Project prj) { GradleDistributionProvider pvd = prj.getLookup().lookup(GradleDistributionProvider.class); GradleDistribution ret = pvd != null ? pvd.getGradleDistribution() : GradleDistributionManager.get().defaultDistribution(); +ret = ret != null ? ret : GradleDistributionManager.get().defaultDistribution(); ret = ret.isCompatibleWithSystemJava() ? ret : GradleDistributionManager.get().defaultDistribution(); return ret; - 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
[netbeans] branch master updated: Added support for properties backed up by functional interfaces
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 bfa926fee2 Added support for properties backed up by functional interfaces bfa926fee2 is described below commit bfa926fee2a7bf52574240c7981f15ba2cd57f29 Author: Laszlo Kishalmi AuthorDate: Thu May 26 12:08:59 2022 -0700 Added support for properties backed up by functional interfaces --- platform/openide.nodes/apichanges.xml | 24 .../src/org/openide/nodes/PropertySupport.java | 135 +++-- 2 files changed, 147 insertions(+), 12 deletions(-) diff --git a/platform/openide.nodes/apichanges.xml b/platform/openide.nodes/apichanges.xml index 2c2fc5f6eb..300e1af5ec 100644 --- a/platform/openide.nodes/apichanges.xml +++ b/platform/openide.nodes/apichanges.xml @@ -25,6 +25,30 @@ Nodes API + + +Adding static methods to PropertySupport to allow easy creation +of properties using functional interfaces. + + + + + + +PropertySupport +received a bunch of static methods (readWrite, readOnly, and +writeOnly to allow easy property creation with Supplier and +Provider functional interfaces. + +Sheet.Set set = ... +SomeObject obj = getLookup().lookup(SomeObject.class); + +set.put(PropertySupport.readWrite("name", String.class, obj::getName, obj::setName)); +set.put(PropertySupport.readOnly("size", Long.class, obj::getSize)); + + + + Adding ChildFactory.Detachable to allow ChildFactory implementations to diff --git a/platform/openide.nodes/src/org/openide/nodes/PropertySupport.java b/platform/openide.nodes/src/org/openide/nodes/PropertySupport.java index 3b5d42b526..a1b45fe7b2 100644 --- a/platform/openide.nodes/src/org/openide/nodes/PropertySupport.java +++ b/platform/openide.nodes/src/org/openide/nodes/PropertySupport.java @@ -26,13 +26,17 @@ import java.beans.PropertyEditor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Modifier; +import java.util.function.Consumer; +import java.util.function.Supplier; import org.openide.util.Exceptions; import org.openide.util.NbBundle; /** Support class for Node.Property. -* -* @author Jan Jancura, Jaroslav Tulach, Ian Formanek -*/ + * + * @param the type of the represented property. + * + * @author Jan Jancura, Jaroslav Tulach, Ian Formanek + */ public abstract class PropertySupport extends Node.Property { /** flag whether the property is readable */ private boolean canR; @@ -62,6 +66,7 @@ public abstract class PropertySupport extends Node.Property { * Returns the value passed into constructor. * @return true if the read of the value is supported */ +@Override public boolean canRead() { return canR; } @@ -70,6 +75,7 @@ public abstract class PropertySupport extends Node.Property { * Returns the value passed into constructor. * @return true if the read of the value is supported */ +@Override public boolean canWrite() { return canW; } @@ -78,6 +84,7 @@ public abstract class PropertySupport extends Node.Property { * Like {@link Class#cast} but handles primitive types. * See JDK #6456930. */ +@SuppressWarnings("unchecked") static T cast(Class c, Object o) { if (c.isPrimitive()) { // Could try to actually type-check it, but never mind. @@ -87,6 +94,79 @@ public abstract class PropertySupport extends Node.Property { } } +/** + * Fluent wrapper method for {@link #setDisplayName(java.lang.String)}. + * + * @param displayName the display name to set. + * @since 7.62 + * + * @return this instance + */ +public final PropertySupport withDisplayName(String displayName) { +setDisplayName(displayName); +return this; +} + +/** + * Fluent wrapper method for {@link #setShortDescription(java.lang.String)}. + * + * @param shortDescription short description + * @since 7.62 + * @return this instance + */ +public final PropertySupport withShortDescription(String shortDescription) { +setShortDescription(shortDescription); +return this; +} + +/** + * Creates a "virtual" property where getter and setter are backed by the + * provided {@link Supplier} and {@link Consumer} functional interfaces. + * @param the type of the property + * @param name the name of the property + * @param valueType the type of the property + * @param supplier the getter
[netbeans] branch master updated: Better YAML editing with auto closing quotes and mustache
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 6543326b16 Better YAML editing with auto closing quotes and mustache 6543326b16 is described below commit 6543326b16fdcb05092fbb7af86fe817a07586b3 Author: Laszlo Kishalmi AuthorDate: Mon May 9 13:36:59 2022 -0700 Better YAML editing with auto closing quotes and mustache --- .../netbeans/modules/csl/api/test/CslTestBase.java | 21 ++--- .../languages/yaml/YamlKeystrokeHandler.java | 90 +++--- .../languages/yaml/YamlKeystrokeHandlerTest.java | 65 3 files changed, 156 insertions(+), 20 deletions(-) diff --git a/ide/csl.api/test/unit/src/org/netbeans/modules/csl/api/test/CslTestBase.java b/ide/csl.api/test/unit/src/org/netbeans/modules/csl/api/test/CslTestBase.java index 4322769943..2b4721ee61 100644 --- a/ide/csl.api/test/unit/src/org/netbeans/modules/csl/api/test/CslTestBase.java +++ b/ide/csl.api/test/unit/src/org/netbeans/modules/csl/api/test/CslTestBase.java @@ -1249,21 +1249,21 @@ public abstract class CslTestBase extends NbTestCase { Formatter formatter = getFormatter(null); int sourcePos = source.indexOf('^'); -assertNotNull(sourcePos); +assertTrue("Source text must have a caret ^ marker", sourcePos != -1); source = source.substring(0, sourcePos) + source.substring(sourcePos+1); int reformattedPos = reformatted.indexOf('^'); -assertNotNull(reformattedPos); +assertTrue("Reformatted text must have a caret ^ marker", reformattedPos != -1); reformatted = reformatted.substring(0, reformattedPos) + reformatted.substring(reformattedPos+1); JEditorPane ta = getPane(source); Caret caret = ta.getCaret(); caret.setDot(sourcePos); if (selection != null) { -int start = original.indexOf(selection); +int start = source.indexOf(selection); assertTrue(start != -1); assertTrue("Ambiguous selection - multiple occurrences of selection string", -original.indexOf(selection, start+1) == -1); +source.indexOf(selection, start+1) == -1); ta.setSelectionStart(start); ta.setSelectionEnd(start+selection.length()); assertEquals(selection, ta.getSelectedText()); @@ -1299,11 +1299,11 @@ public abstract class CslTestBase extends NbTestCase { Formatter formatter = getFormatter(null); int sourcePos = source.indexOf('^'); -assertNotNull(sourcePos); +assertTrue("Source text must have a caret ^ marker", sourcePos != -1); source = source.substring(0, sourcePos) + source.substring(sourcePos+1); int reformattedPos = reformatted.indexOf('^'); -assertNotNull(reformattedPos); +assertTrue("Reformatted text must have a caret ^ marker", reformattedPos != -1); reformatted = reformatted.substring(0, reformattedPos) + reformatted.substring(reformattedPos+1); JEditorPane ta = getPane(source); @@ -1332,11 +1332,12 @@ public abstract class CslTestBase extends NbTestCase { Formatter formatter = getFormatter(null); int sourcePos = source.indexOf('^'); -assertNotNull(sourcePos); +assertTrue("Source text must have a caret ^ marker", sourcePos != -1); + source = source.substring(0, sourcePos) + source.substring(sourcePos+1); int reformattedPos = reformatted.indexOf('^'); -assertNotNull(reformattedPos); +assertTrue("Reformatted text must have a caret ^ marker", reformattedPos != -1); reformatted = reformatted.substring(0, reformattedPos) + reformatted.substring(reformattedPos+1); JEditorPane ta = getPane(source); @@ -2529,12 +2530,12 @@ public abstract class CslTestBase extends NbTestCase { public void insertNewline(String source, String reformatted, IndentPrefs preferences) throws Exception { int sourcePos = source.indexOf('^'); -assertNotNull(sourcePos); +assertTrue("Source text must have a caret ^ marker", sourcePos != -1); source = source.substring(0, sourcePos) + source.substring(sourcePos+1); Formatter formatter = getFormatter(null); int reformattedPos = reformatted.indexOf('^'); -assertNotNull(reformattedPos); +assertTrue("Reformatted text must have a caret ^ marker", reformattedPos != -1); reformatted = reformatted.substring(0, reformattedPos) + reformatted.substring(reformattedPos+1); JEditorPane ta = getPane(source); diff --git a/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlKeystrokeHandler.java b/
[netbeans] branch master updated: Put .gradle directories on Global ignore list.
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 1af54a0072 Put .gradle directories on Global ignore list. 1af54a0072 is described below commit 1af54a007245a6512ed78d13c847564c6c11cc22 Author: Laszlo Kishalmi AuthorDate: Mon May 9 15:26:23 2022 -0700 Put .gradle directories on Global ignore list. --- .../org/netbeans/core/ui/options/filetypes/IgnoredFilesPreferences.java | 2 +- .../src/org/netbeans/modules/masterfs/GlobalVisibilityQueryImpl.java| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/core.ui/src/org/netbeans/core/ui/options/filetypes/IgnoredFilesPreferences.java b/platform/core.ui/src/org/netbeans/core/ui/options/filetypes/IgnoredFilesPreferences.java index 5c58c48a26..769897eb66 100644 --- a/platform/core.ui/src/org/netbeans/core/ui/options/filetypes/IgnoredFilesPreferences.java +++ b/platform/core.ui/src/org/netbeans/core/ui/options/filetypes/IgnoredFilesPreferences.java @@ -42,7 +42,7 @@ final class IgnoredFilesPreferences { private static final String PROP_IGNORE_HIDDEN_FILES_IN_USER_HOME = "IgnoreHiddenFilesInUserHome"; // NOI18N /** Default ignored files pattern. Pattern \.(cvsignore|svn|DS_Store) is covered by ^\..*$ **/ -static final String DEFAULT_IGNORED_FILES = "^(CVS|SCCS|vssver.?\\.scc|#.*#|%.*%|_svn)$|~$|^\\.(git|hg|svn|cache|DS_Store)$|^Thumbs.db$"; //NOI18N +static final String DEFAULT_IGNORED_FILES = "^(CVS|SCCS|vssver.?\\.scc|#.*#|%.*%|_svn)$|~$|^\\.(git|hg|svn|cache|gradle|DS_Store)$|^Thumbs.db$"; //NOI18N private static String syntaxError; private IgnoredFilesPreferences() { diff --git a/platform/masterfs/src/org/netbeans/modules/masterfs/GlobalVisibilityQueryImpl.java b/platform/masterfs/src/org/netbeans/modules/masterfs/GlobalVisibilityQueryImpl.java index eb1a99af47..94daf9448d 100644 --- a/platform/masterfs/src/org/netbeans/modules/masterfs/GlobalVisibilityQueryImpl.java +++ b/platform/masterfs/src/org/netbeans/modules/masterfs/GlobalVisibilityQueryImpl.java @@ -134,7 +134,7 @@ public class GlobalVisibilityQueryImpl implements VisibilityQueryImplementation2 protected String getIgnoredFiles() { // \.(cvsignore|svn|DS_Store) is covered by ^\..*$ -String retval = getPreferences().get(PROP_IGNORED_FILES, "^(CVS|SCCS|vssver.?\\.scc|#.*#|%.*%|_svn)$|~$|^\\.(git|hg|svn|cache|DS_Store)$|^Thumbs.db$");//NOI18N; +String retval = getPreferences().get(PROP_IGNORED_FILES, "^(CVS|SCCS|vssver.?\\.scc|#.*#|%.*%|_svn)$|~$|^\\.(git|hg|svn|cache|gradle|DS_Store)$|^Thumbs.db$");//NOI18N; PreferenceChangeListener listenerToAdd; synchronized (this) { if (preferencesListener == null) { - 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
[netbeans] branch master updated (dc859714ee -> e67baa3e0d)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git from dc859714ee Fix WeakListener usage in Gradle modules new fdc9a0d96e Using the size of the tabs as minimum size. See Netbeans issue #3710 new 24203c441c Using the height of the preferred size of the tabs as minimum height. See Netbeans issue #3710 new e67baa3e0d Merge pull request #3712 from George-Devel/#3710-correct-editor-wnd-min-size The 6966 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: .../tabcontrol/plaf/AbstractViewTabDisplayerUI.java| 18 +- .../tabcontrol/plaf/BasicScrollingTabDisplayerUI.java | 15 +-- 2 files changed, 2 insertions(+), 31 deletions(-) - 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
[netbeans] branch master updated: Fix WeakListener usage in Gradle modules
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 dc859714ee Fix WeakListener usage in Gradle modules dc859714ee is described below commit dc859714eedc8eb723372aa324703229a4116f26 Author: Laszlo Kishalmi AuthorDate: Mon Apr 18 08:26:53 2022 -0700 Fix WeakListener usage in Gradle modules --- .../src/org/netbeans/modules/gradle/GradleProjectConnection.java| 2 +- .../modules/gradle/actions/ProjectActionMappingProviderImpl.java| 2 +- .../src/org/netbeans/modules/gradle/nodes/SubProjectsNode.java | 6 -- .../modules/gradle/java/classpath/AbstractGradleClassPathImpl.java | 2 +- .../modules/gradle/java/classpath/ClassPathProviderImpl.java| 4 ++-- .../org/netbeans/modules/gradle/java/nodes/BootCPNodeFactory.java | 2 +- .../modules/gradle/java/queries/GradleCompilerOptionsQuery.java | 5 ++--- .../netbeans/modules/gradle/java/queries/GradleSourceForBinary.java | 2 +- .../netbeans/modules/gradle/java/queries/GradleSourceLevelImpl.java | 2 +- 9 files changed, 14 insertions(+), 13 deletions(-) diff --git a/extide/gradle/src/org/netbeans/modules/gradle/GradleProjectConnection.java b/extide/gradle/src/org/netbeans/modules/gradle/GradleProjectConnection.java index 768490c282..b0a40c65fa 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/GradleProjectConnection.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/GradleProjectConnection.java @@ -121,7 +121,7 @@ public final class GradleProjectConnection implements ProjectConnection { GradleConnector gconn = GradleConnector.newConnector(); GradleDistributionProvider pvd = project.getLookup().lookup(GradleDistributionProvider.class); if (pvd != null) { -pvd.addChangeListener(WeakListeners.change(listener, null)); +pvd.addChangeListener(WeakListeners.change(listener, pvd)); GradleDistribution dist = pvd.getGradleDistribution(); if (dist != null) { conn = createConnection(dist, projectDir); diff --git a/extide/gradle/src/org/netbeans/modules/gradle/actions/ProjectActionMappingProviderImpl.java b/extide/gradle/src/org/netbeans/modules/gradle/actions/ProjectActionMappingProviderImpl.java index 58f296cb51..8baddce9c6 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/actions/ProjectActionMappingProviderImpl.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/actions/ProjectActionMappingProviderImpl.java @@ -78,7 +78,7 @@ public class ProjectActionMappingProviderImpl implements ProjectActionMappingPro } } }; -NbGradleProject.addPropertyChangeListener(project, WeakListeners.propertyChange(pcl, null)); +NbGradleProject.addPropertyChangeListener(project, WeakListeners.propertyChange(pcl, NbGradleProject.get(project))); File projectDir = FileUtil.toFile(project.getProjectDirectory()); projectMappingFile = new File(projectDir, GradleFiles.GRADLE_PROPERTIES_NAME); loadProjectCustomMappings(); diff --git a/extide/gradle/src/org/netbeans/modules/gradle/nodes/SubProjectsNode.java b/extide/gradle/src/org/netbeans/modules/gradle/nodes/SubProjectsNode.java index 1aed38b5fd..234ca9925d 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/nodes/SubProjectsNode.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/nodes/SubProjectsNode.java @@ -53,6 +53,7 @@ import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; import java.util.prefs.PreferenceChangeListener; +import java.util.prefs.Preferences; import org.netbeans.api.project.ProjectUtils; import org.netbeans.modules.gradle.api.GradleBaseProject; import org.netbeans.modules.gradle.spi.GradleSettings; @@ -124,14 +125,15 @@ public class SubProjectsNode extends AbstractNode { refresh(false); } }; -NbGradleProject.addPropertyChangeListener(project, WeakListeners.propertyChange(propListener, proj)); +NbGradleProject.addPropertyChangeListener(project, WeakListeners.propertyChange(propListener, NbGradleProject.get(project))); prefListener = (evt) -> { if (GradleSettings.PROP_DISPLAY_DESCRIPTION.equals(evt.getKey())) { refresh(false); } }; - GradleSettings.getDefault().getPreferences().addPreferenceChangeListener(WeakListeners.create(PreferenceChangeListener.class, prefListener, null)); +Preferences prefs = GradleSettings.getDefault().getPreferences(); + prefs.addPreferenceChangeListener(WeakListeners.create(PreferenceChangeListener.class, prefListener, prefs)); } @Override diff --git a/j
[netbeans] branch master updated: Fix GradleReport Notification and potential NPE on Gradle earlier, than 6.8 (#3994)
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 a1abbda4f6 Fix GradleReport Notification and potential NPE on Gradle earlier, than 6.8 (#3994) a1abbda4f6 is described below commit a1abbda4f653c801d475b5fed987ba5df7e3a35e Author: Laszlo Kishalmi AuthorDate: Sun Apr 17 20:49:37 2022 -0700 Fix GradleReport Notification and potential NPE on Gradle earlier, than 6.8 (#3994) * Add meaningful toString() method for GradleReport * Fix potential UnsupportedOperationException with project using Gradle earlier than version 6.8 --- .../netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java | 9 +++-- .../gradle/src/org/netbeans/modules/gradle/GradleReport.java | 6 ++ .../netbeans/modules/gradle/loaders/LegacyProjectLoader.java | 10 ++ 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java b/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java index 802608855a..bc3c26203f 100644 --- a/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java +++ b/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java @@ -445,9 +445,14 @@ class NbProjectInfoBuilder { // do not bother with components that only select a variant, which is itself a component // TODO: represent as a special component type so the IDE shows it, but the IDE knows it is an abstract // intermediate with no artifact(s). -if (rdr.getResolvedVariant() == null || - !rdr.getResolvedVariant().getExternalVariant().isPresent()) { +if (rdr.getResolvedVariant() == null) { componentIds.add(rdr.getSelected().getId().toString()); +} else { +sinceGradle("6.8", () -> { +if (!rdr.getResolvedVariant().getExternalVariant().isPresent()) { + componentIds.add(rdr.getSelected().getId().toString()); +} +}); } } } diff --git a/extide/gradle/src/org/netbeans/modules/gradle/GradleReport.java b/extide/gradle/src/org/netbeans/modules/gradle/GradleReport.java index b26ffe4905..97eeb8d0c5 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/GradleReport.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/GradleReport.java @@ -107,6 +107,11 @@ public final class GradleReport { return Objects.equals(this.location, other.location); } +@Override +public String toString() { +return formatReportForHintOrProblem(true, null); +} + @NbBundle.Messages({ "# {0} - previous part", "# {1} - appended part", @@ -119,6 +124,7 @@ public final class GradleReport { "# {1} - the file", "FMT_MessageWithLocationNoLine={0} ({1})" }) + /** * Formats the report for simple viewing. The function concatenates report messages, starting from * outer Report. If `includeLocation` is true, script name + line is printed at the end. diff --git a/extide/gradle/src/org/netbeans/modules/gradle/loaders/LegacyProjectLoader.java b/extide/gradle/src/org/netbeans/modules/gradle/loaders/LegacyProjectLoader.java index 4496ab9e2c..b4c82ef7cc 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/loaders/LegacyProjectLoader.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/loaders/LegacyProjectLoader.java @@ -175,7 +175,7 @@ public class LegacyProjectLoader extends AbstractProjectLoader { errors.openNotification( TIT_LOAD_ISSUES(base.getProjectDir().getName()), TIT_LOAD_ISSUES(base.getProjectDir().getName()), - GradleProjectErrorNotifications.bulletedList(info.getProblems())); + GradleProjectErrorNotifications.bulletedList(info.getProblems())); } if (!info.hasException()) { if (!info.getProblems().isEmpty() || !info.getReports().isEmpty()) { @@ -373,9 +373,11 @@ public class LegacyProjectLoader extends AbstractProjectLoader { if (e.getClass().getNa
[netbeans] branch master updated: Made GradleCommandLine aware of GradleVersion (#3828)
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 032ff3cbbd Made GradleCommandLine aware of GradleVersion (#3828) 032ff3cbbd is described below commit 032ff3cbbd685ac32d8cd843f82d106422897197 Author: Laszlo Kishalmi AuthorDate: Tue Apr 12 06:08:10 2022 -0700 Made GradleCommandLine aware of GradleVersion (#3828) * Made GradleCommandLine aware of GradleVersion * Addedsome test and some minor refactor * Adjust code to avoid, Javac to generate non instatniatable GradleCliCompletionProvider. --- extide/gradle/apichanges.xml | 17 +- .../gradle/api/execute/GradleCommandLine.java | 172 ++--- .../api/execute/GradleDistributionManager.java | 75 - .../modules/gradle/api/execute/RunUtils.java | 19 +++ .../gradle/execute/GradleDaemonExecutor.java | 3 +- .../execute/GradleDistributionProviderImpl.java| 2 +- .../gradle/loaders/LegacyProjectLoader.java| 4 +- .../modules/gradle/loaders/ModelCache.java | 13 +- .../gradle/options/GradleOptionsController.java| 2 +- .../modules/gradle/options/SettingsPanel.java | 2 +- .../gradle/api/execute/GradleCommandLineTest.java | 15 ++ .../gradle/api/execute/GradleVersionRangeTest.java | 67 .../execute/GradleCliCompletionProviderTest.java | 39 + .../classpath/AbstractGradleScriptClassPath.java | 2 +- 14 files changed, 396 insertions(+), 36 deletions(-) diff --git a/extide/gradle/apichanges.xml b/extide/gradle/apichanges.xml index 3dd4f642d7..5ce8c29166 100644 --- a/extide/gradle/apichanges.xml +++ b/extide/gradle/apichanges.xml @@ -102,8 +102,21 @@ is the proper place. -Added GradleOptionItem interface to GradleCommandLine -in order to support a common interface for Flaf, Parameter, and Property enums. + +Added GradleOptionItem interface to GradleCommandLine +in order to support a common interface for Flaf, Parameter, and Property enums. + + + +GradleCommandLine + also can be aware of the GradleDistribution it is plan to be used with, so it got a few +new constructors supporting that. + + + +RunUtils.getCompatibleGradleDistribution +is added to help retrieve the closest Gradle distribution a project could use to invoke Gradle build actions. + diff --git a/extide/gradle/src/org/netbeans/modules/gradle/api/execute/GradleCommandLine.java b/extide/gradle/src/org/netbeans/modules/gradle/api/execute/GradleCommandLine.java index 942f2cfabd..7124f862bd 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/api/execute/GradleCommandLine.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/api/execute/GradleCommandLine.java @@ -44,6 +44,8 @@ import java.util.logging.Logger; import org.gradle.tooling.ConfigurableLauncher; import org.openide.util.NbBundle; import static org.netbeans.modules.gradle.api.execute.GradleCommandLine.Argument.Kind.*; +import org.netbeans.modules.gradle.api.execute.GradleDistributionManager.GradleDistribution; +import org.netbeans.modules.gradle.api.execute.GradleDistributionManager.GradleVersionRange; import org.netbeans.modules.gradle.spi.GradleSettings; import org.netbeans.modules.gradle.spi.GradleFiles; import org.openide.util.Utilities; @@ -88,58 +90,75 @@ public final class GradleCommandLine implements Serializable { * @since 2.23 */ public interface GradleOptionItem { +/** + * Shall return {@code true} if the IDE supports this option item. + * + * @return {@code true} if this option is supported by the IDE + */ boolean isSupported(); + +/** + * Shall return {@code true} if this option is supported by the provided + * GradleDistribution. + * + * @param dist the GradleDistribution to check. + * @return {@code true} if the provided {@link GradleDistribution} supports this option. + */ +boolean supportsGradle(GradleDistribution dist); List getFlags(); String getDescription(); } + + /** * Gradle command line flags */ public enum Flag implements GradleOptionItem { BUILD_CACHE(PARAM, "--build-cache"), -CONFIGURATION_CACHE(PARAM, "--configuration-cache"), +CONFIGURATION_CACHE(PARAM, GradleVersionRange.from("6.5"), "--configuration-cache"),
[netbeans] branch master updated: Filter source roots to avoids clashes between moule-info files.
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 efd05e33dc Filter source roots to avoids clashes between moule-info files. efd05e33dc is described below commit efd05e33dc04ce834d09876d411f0ea7ec9cece6 Author: Jan Lahoda AuthorDate: Mon Apr 4 06:22:16 2022 +0200 Filter source roots to avoids clashes between moule-info files. --- .../modules/java/platform/classpath/PlatformClassPathProvider.java | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/java/java.platform/src/org/netbeans/modules/java/platform/classpath/PlatformClassPathProvider.java b/java/java.platform/src/org/netbeans/modules/java/platform/classpath/PlatformClassPathProvider.java index 699211eae6..ccfdbb5749 100644 --- a/java/java.platform/src/org/netbeans/modules/java/platform/classpath/PlatformClassPathProvider.java +++ b/java/java.platform/src/org/netbeans/modules/java/platform/classpath/PlatformClassPathProvider.java @@ -78,9 +78,13 @@ public class PlatformClassPathProvider implements ClassPathProvider { ClassPath libraryPath = jp.getStandardLibraries(); ClassPath sourcePath = jp.getSourceFolders(); FileObject root = null; +boolean jdk9 = JAVA_9.compareTo(jp.getSpecification().getVersion()) <= 0; if (ClassPath.SOURCE.equals(type) && sourcePath != null && (root = sourcePath.findOwnerRoot(fo))!=null) { this.setLastUsedPlatform (root,jp); +if (jdk9) { +return ClassPathSupport.createClassPath(root); +} return sourcePath; } else if (ClassPath.BOOT.equals(type) && (root = getArtefactOwner(fo, bootClassPath, libraryPath, sourcePath)) != null ) { @@ -96,7 +100,7 @@ public class PlatformClassPathProvider implements ClassPathProvider { return this.getEmptyClassPath (); } } else if (JavaClassPathConstants.MODULE_BOOT_PATH.equals(type) && -JAVA_9.compareTo(jp.getSpecification().getVersion()) <= 0 && +jdk9 && (root = getArtefactOwner(fo, bootClassPath, libraryPath, sourcePath)) != null) { this.setLastUsedPlatform (root,jp); return bootClassPath; - 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
[netbeans] branch master updated: Prevent possible NPE at MicronautDataCompletionTask
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 d68e961fc7 Prevent possible NPE at MicronautDataCompletionTask d68e961fc7 is described below commit d68e961fc75382487e6fd1353fb37b742041d73c Author: Laszlo Kishalmi AuthorDate: Mon Mar 21 16:49:36 2022 -0700 Prevent possible NPE at MicronautDataCompletionTask --- .../completion/MicronautDataCompletionTask.java| 104 +++-- 1 file changed, 53 insertions(+), 51 deletions(-) diff --git a/enterprise/micronaut/src/org/netbeans/modules/micronaut/completion/MicronautDataCompletionTask.java b/enterprise/micronaut/src/org/netbeans/modules/micronaut/completion/MicronautDataCompletionTask.java index 92d1160670..fc9ac7cd41 100644 --- a/enterprise/micronaut/src/org/netbeans/modules/micronaut/completion/MicronautDataCompletionTask.java +++ b/enterprise/micronaut/src/org/netbeans/modules/micronaut/completion/MicronautDataCompletionTask.java @@ -135,60 +135,62 @@ public class MicronautDataCompletionTask { @Override public void run(ResultIterator resultIterator) throws Exception { CompilationController cc = CompilationController.get(resultIterator.getParserResult(caretOffset)); -cc.toPhase(JavaSource.Phase.PARSED); -anchorOffset = caretOffset; -String prefix = EMPTY; -TokenSequence ts = cc.getTokenHierarchy().tokenSequence(JavaTokenId.language()); -if (ts.move(anchorOffset) == 0 || !ts.moveNext()) { -ts.movePrevious(); -} -int len = anchorOffset - ts.offset(); -if (len > 0 && ts.token().length() >= len) { -if (ts.token().id() == JavaTokenId.IDENTIFIER || ts.token().id().primaryCategory().startsWith("keyword") || - ts.token().id().primaryCategory().equals("literal")) { -prefix = ts.token().text().toString().substring(0, len); -anchorOffset = ts.offset(); -} else if (ts.token().id() == JavaTokenId.STRING_LITERAL) { -prefix = ts.token().text().toString().substring(1, ts.token().length() - 1); -anchorOffset = ts.offset() + 1; -} else if (ts.token().id() == JavaTokenId.MULTILINE_STRING_LITERAL) { -prefix = ts.token().text().toString().substring(3, len); -anchorOffset = ts.offset() + 3; +if (cc != null) { +cc.toPhase(JavaSource.Phase.PARSED); +anchorOffset = caretOffset; +String prefix = EMPTY; +TokenSequence ts = cc.getTokenHierarchy().tokenSequence(JavaTokenId.language()); +if (ts.move(anchorOffset) == 0 || !ts.moveNext()) { +ts.movePrevious(); } -} -Consumer consumer = (namePrefix, name, type) -> { -items.add(type != null ? factory.createFinderMethodItem(name, type, anchorOffset) : factory.createFinderMethodNameItem(namePrefix, name, anchorOffset)); -}; -TreeUtilities treeUtilities = cc.getTreeUtilities(); -SourcePositions sp = cc.getTrees().getSourcePositions(); -TreePath path = treeUtilities.pathFor(anchorOffset); -switch (path.getLeaf().getKind()) { -case CLASS: -case INTERFACE: -resolveFinderMethods(cc, path, prefix, true, consumer); -break; -case METHOD: -Tree returnType = ((MethodTree) path.getLeaf()).getReturnType(); -if (returnType != null && findLastNonWhitespaceToken(ts, (int) sp.getEndPosition(path.getCompilationUnit(), returnType), anchorOffset) == null) { -resolveFinderMethods(cc, path.getParentPath(), prefix, false, consumer); +int len = anchorOffset - ts.offset(); +if (len > 0 && ts.token().length() >= len) { +if (ts.token().id() == JavaTokenId.IDENTIFIER || ts.token().id().primaryCategory().startsWith("keyword") || + ts.token().id().primaryCategory().equals("literal")) { +prefix = ts.token().text().toString
[netbeans] branch master updated: Janitor shall remove abandoned cache dirs
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 ab32c030c5 Janitor shall remove abandoned cache dirs ab32c030c5 is described below commit ab32c030c5ecb2e948252b0469391b832f9b2665 Author: Laszlo Kishalmi AuthorDate: Tue Mar 29 16:35:56 2022 -0700 Janitor shall remove abandoned cache dirs --- .../src/org/netbeans/modules/janitor/Janitor.java | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/platform/janitor/src/org/netbeans/modules/janitor/Janitor.java b/platform/janitor/src/org/netbeans/modules/janitor/Janitor.java index f93d60ee27..0d2ee6fe4a 100644 --- a/platform/janitor/src/org/netbeans/modules/janitor/Janitor.java +++ b/platform/janitor/src/org/netbeans/modules/janitor/Janitor.java @@ -30,9 +30,11 @@ import java.nio.file.attribute.BasicFileAttributes; import java.time.Duration; import java.time.Instant; import java.time.temporal.ChronoUnit; +import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.WeakHashMap; import java.util.concurrent.atomic.AtomicLong; import java.util.prefs.Preferences; @@ -70,6 +72,7 @@ public class Janitor { public static final String PROP_UNUSED_DAYS = "UnusedDays"; //NOI18N private static final String LOGFILE_NAME = "var/log/messages.log"; //NOI18N +private static final String ALL_CHECKSUM_NAME = "lastModified/all-checksum.txt"; //NOI18N @StaticResource private static final String CLEAN_ICON = "org/netbeans/modules/janitor/resources/clean.gif"; //NOI18N @@ -177,7 +180,7 @@ public class Janitor { } static void deleteDir(File dir) { -if (dir == null) return; +if ((dir == null) || !dir.exists()) return; Path path = dir.toPath(); try { Files.walkFileTree(path, new SimpleFileVisitor() { @@ -233,10 +236,12 @@ public class Janitor { static List> getOtherVersions() { File userDir = Places.getUserDirectory(); List> ret = new LinkedList<>(); +Set availableUserDirs = new HashSet<>(); Instant now = Instant.now(); if (userDir != null) { File userParent = userDir.getParentFile(); for (File f : userParent.listFiles()) { +availableUserDirs.add(f.getName()); Path logFile = new File(f, LOGFILE_NAME).toPath(); if (!f.equals(userDir) && Files.isRegularFile(logFile)) { try { @@ -251,6 +256,25 @@ public class Janitor { } } } + +//Search for abandoned cache dirs (cache dirs with no user dir) +File cacheDir = Places.getCacheDirectory(); +if (cacheDir != null) { +File cacheParent = cacheDir.getParentFile(); +for (File f : cacheParent.listFiles()) { +if (f.isDirectory() && !availableUserDirs.contains(f.getName())) { +if (new File(f, ALL_CHECKSUM_NAME).exists() && !cacheDir.equals(f)) { +try { +Instant lastModified = Files.getLastModifiedTime(f.toPath()).toInstant(); +Integer age = (int) Duration.between(lastModified, now).toDays(); +ret.add(Pair.of(f.getName(), age)); +} catch (IOException ex) { +//Just ignore what we can't process +} +} +} +} +} return ret; } - 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
[netbeans] branch master updated: Order Gradle sub-projects Nodes
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 8a8573f Order Gradle sub-projects Nodes 8a8573f is described below commit 8a8573ff910ed1de7360afdcf3a76cdfc43d2d64 Author: Laszlo Kishalmi AuthorDate: Sat Mar 26 16:36:06 2022 -0700 Order Gradle sub-projects Nodes --- .../modules/gradle/nodes/SubProjectsNode.java | 26 ++ 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/extide/gradle/src/org/netbeans/modules/gradle/nodes/SubProjectsNode.java b/extide/gradle/src/org/netbeans/modules/gradle/nodes/SubProjectsNode.java index 54b0fe0..1aed38b 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/nodes/SubProjectsNode.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/nodes/SubProjectsNode.java @@ -26,8 +26,10 @@ import java.awt.Image; import java.awt.event.ActionEvent; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; +import java.util.ArrayList; import java.util.Collection; import java.util.Collections; +import java.util.Comparator; import java.util.List; import javax.swing.AbstractAction; import javax.swing.Action; @@ -50,10 +52,13 @@ import static org.netbeans.modules.gradle.nodes.Bundle.*; import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; +import java.util.prefs.PreferenceChangeListener; import org.netbeans.api.project.ProjectUtils; import org.netbeans.modules.gradle.api.GradleBaseProject; +import org.netbeans.modules.gradle.spi.GradleSettings; import org.netbeans.modules.gradle.spi.Utils; import org.openide.nodes.Children; +import org.openide.util.WeakListeners; /** * @@ -108,18 +113,25 @@ public class SubProjectsNode extends AbstractNode { private static class SubProjectsChildFactory extends ChildFactory { private final Project project; -private final PropertyChangeListener listener; +private final PropertyChangeListener propListener; +private final PreferenceChangeListener prefListener; SubProjectsChildFactory(Project proj) { project = proj; -listener = (PropertyChangeEvent evt) -> { +propListener = (PropertyChangeEvent evt) -> { if (NbGradleProject.PROP_PROJECT_INFO.equals(evt.getPropertyName())) { ProjectManager.getDefault().clearNonProjectCache(); refresh(false); } }; -NbGradleProject.addPropertyChangeListener(project, listener); +NbGradleProject.addPropertyChangeListener(project, WeakListeners.propertyChange(propListener, proj)); +prefListener = (evt) -> { +if (GradleSettings.PROP_DISPLAY_DESCRIPTION.equals(evt.getKey())) { +refresh(false); +} +}; + GradleSettings.getDefault().getPreferences().addPreferenceChangeListener(WeakListeners.create(PreferenceChangeListener.class, prefListener, null)); } @Override @@ -127,7 +139,13 @@ public class SubProjectsNode extends AbstractNode { Set containedProjects = ProjectUtils.getContainedProjects(project, false); if (containedProjects != null) { -projects.addAll(containedProjects); +ArrayList ret = new ArrayList<>(containedProjects); +if (GradleSettings.getDefault().isDisplayDesctiption()) { +ret.sort(Comparator.comparing((Project p) -> ProjectUtils.getInformation(p).getDisplayName())); +} else { +ret.sort(Comparator.comparing((Project p) -> ProjectUtils.getInformation(p).getName())); +} +projects.addAll(ret); } else { LOG.log(Level.FINE, "No ProjectContainerProvider in the lookup of: {0}", project); } - 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
[netbeans] branch master updated: Avoid spurious errors when loading projects.
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 7af2fb9 Avoid spurious errors when loading projects. 7af2fb9 is described below commit 7af2fb9cd31a252f940002cec32fdb68c36fd421 Author: Svata Dedic AuthorDate: Mon Mar 21 19:48:34 2022 +0100 Avoid spurious errors when loading projects. --- .../gradle/tooling/NbProjectInfoBuilder.java| 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java b/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java index 467f1c2..46dc3b7 100644 --- a/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java +++ b/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java @@ -292,7 +292,7 @@ class NbProjectInfoBuilder { try { compilerArgs = (List) getProperty(compileTask, "options", "compilerArgs"); } catch (Throwable ex2) { -compilerArgs = (List) getProperty(compileTask, "kotlinOptions", "getFreeCompilerArgs"); +compilerArgs = (List) getProperty(compileTask, "kotlinOptions", "freeCompilerArgs"); } } model.getInfo().put(propBase + lang + "_compiler_args", new ArrayList<>(compilerArgs)); @@ -400,6 +400,12 @@ class NbProjectInfoBuilder { Map unresolvedProblems = new HashMap(); Map> resolvedJvmArtifacts = new HashMap(); Set visibleConfigurations = configurationsToSave(); + +// NETBEANS-5846: if this project uses javaPlatform plugin with dependencies enabled, +// do not report unresolved problems +boolean ignoreUnresolvable = (project.getPlugins().hasPlugin(JavaPlatformPlugin.class) && +Boolean.TRUE.equals(getProperty(project, "javaPlatform", "allowDependencies"))); + visibleConfigurations.forEach(it -> { String propBase = "configuration_" + it.getName() + "_"; model.getInfo().put(propBase + "non_resolving", !resolvable(it)); @@ -438,10 +444,11 @@ class NbProjectInfoBuilder { if(componentIds.contains(id)) { unresolvedIds.add(id); } -if(! project.getPlugins().hasPlugin("java-platform")) { +if(!ignoreUnresolvable && (it.isVisible() || it.isCanBeConsumed())) { +// hidden configurations like 'testCodeCoverageReportExecutionData' might contain unresolvable artifacts. +// do not report problems here unresolvedProblems.put(id, ((UnresolvedDependencyResult) it2).getFailure().getMessage()); } -unresolvedProblems.put(id, udr.getFailure().getMessage()); } }); } catch (ResolveException ex) { @@ -557,13 +564,7 @@ class NbProjectInfoBuilder { model.getExt().put("resolved_sources_artifacts", resolvedSourcesArtifacts); model.getExt().put("resolved_javadoc_artifacts", resolvedJavadocArtifacts); model.getInfo().put("project_dependencies", projects); -// NETBEANS-5846: if this project uses javaPlatform plugin with dependencies enabled, -// do not report unresolved problems -if (!(project.getPlugins().hasPlugin(JavaPlatformPlugin.class) && -Boolean.TRUE.equals(getProperty(project, "javaPlatform", "allowDependencies" { - -model.getInfo().put("unresolved_problems", unresolvedProblems); -} +model.getInfo().put("unresolved_problems", unresolvedProblems); model.registerPerf("dependencies", System.currentTimeMillis() - time); } - 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
[netbeans] branch master updated: Fix Gradle --warning-mode all action to work with any Gradle release
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 4781968 Fix Gradle --warning-mode all action to work with any Gradle release 4781968 is described below commit 47819684b4147ecb0fc89793f9270740c4bfc1d0 Author: Laszlo Kishalmi AuthorDate: Mon Mar 21 12:31:31 2022 -0700 Fix Gradle --warning-mode all action to work with any Gradle release --- .../src/org/netbeans/modules/gradle/output/GradleProcessorFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extide/gradle/src/org/netbeans/modules/gradle/output/GradleProcessorFactory.java b/extide/gradle/src/org/netbeans/modules/gradle/output/GradleProcessorFactory.java index e608a8c..5743362 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/output/GradleProcessorFactory.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/output/GradleProcessorFactory.java @@ -189,7 +189,7 @@ public class GradleProcessorFactory implements OutputProcessorFactory { static class WarningModeAllProcessor implements OutputProcessor { -private static Pattern WARNING_MODE_ALL = Pattern.compile("(You can use ')(\\-\\-warning\\-mode all)('.+)"); +private static Pattern WARNING_MODE_ALL = Pattern.compile("(.+ ')(\\-\\-warning\\-mode all)('.+)"); final RunConfig cfg; public WarningModeAllProcessor(RunConfig cfg) { - 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
[netbeans] branch master updated: Escape backslash in Gradle tooling jar path on Windows
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 fa54106 Escape backslash in Gradle tooling jar path on Windows fa54106 is described below commit fa54106621f44b098da3cc572559c8625680dc87 Author: Laszlo Kishalmi AuthorDate: Mon Mar 21 15:06:34 2022 -0700 Escape backslash in Gradle tooling jar path on Windows --- .../gradle/src/org/netbeans/modules/gradle/loaders/GradleDaemon.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extide/gradle/src/org/netbeans/modules/gradle/loaders/GradleDaemon.java b/extide/gradle/src/org/netbeans/modules/gradle/loaders/GradleDaemon.java index fc22382..152e18b 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/loaders/GradleDaemon.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/loaders/GradleDaemon.java @@ -53,8 +53,8 @@ public final class GradleDaemon { static final String INIT_SCRIPT_NAME = "modules/gradle/nb-tooling.gradle"; //NOI18N static final String TOOLING_JAR_NAME = "modules/gradle/netbeans-gradle-tooling.jar"; //NOI18N -public static final String PROP_TOOLING_JAR = "NETBEANS_TOOLING_JAR"; -public static final String TOOLING_JAR = InstalledFileLocator.getDefault().locate(TOOLING_JAR_NAME, NbGradleProject.CODENAME_BASE, false).getAbsolutePath(); +private static final String PROP_TOOLING_JAR = "NETBEANS_TOOLING_JAR"; +private static final String TOOLING_JAR = InstalledFileLocator.getDefault().locate(TOOLING_JAR_NAME, NbGradleProject.CODENAME_BASE, false).getAbsolutePath().replace("\\", ""); private static final String DAEMON_LOADED = "Daemon Loaded."; //NOI18N private static final String LOADER_PROJECT_NAME = "modules/gradle/daemon-loader"; //NOI18N - 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
[netbeans] branch master updated: Handle classfiles with too new versions.
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 c204921 Handle classfiles with too new versions. c204921 is described below commit c20492168f16094844107376a8f2e475d970269b Author: Jan Lahoda AuthorDate: Sat Feb 12 08:28:39 2022 +0100 Handle classfiles with too new versions. --- .../lib/nbjavac/services/NBClassReader.java| 73 +- .../lib/nbjavac/services/NBClassReaderTest.java| 150 + 2 files changed, 221 insertions(+), 2 deletions(-) diff --git a/java/lib.nbjavac/src/org/netbeans/lib/nbjavac/services/NBClassReader.java b/java/lib.nbjavac/src/org/netbeans/lib/nbjavac/services/NBClassReader.java index 062412f..5a26320 100644 --- a/java/lib.nbjavac/src/org/netbeans/lib/nbjavac/services/NBClassReader.java +++ b/java/lib.nbjavac/src/org/netbeans/lib/nbjavac/services/NBClassReader.java @@ -18,23 +18,40 @@ */ package org.netbeans.lib.nbjavac.services; +import com.sun.tools.javac.code.ClassFinder.BadClassFile; import java.util.Set; import com.sun.tools.javac.code.Symbol; +import com.sun.tools.javac.code.Symbol.ClassSymbol; import com.sun.tools.javac.code.Symbol.MethodSymbol; import com.sun.tools.javac.code.Type; +import com.sun.tools.javac.jvm.ClassFile; import com.sun.tools.javac.jvm.ClassFile.Version; import com.sun.tools.javac.jvm.ClassReader; +import com.sun.tools.javac.resources.CompilerProperties.Warnings; import com.sun.tools.javac.util.Context; import com.sun.tools.javac.util.List; +import com.sun.tools.javac.util.Log; import com.sun.tools.javac.util.Name; import com.sun.tools.javac.util.Names; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.lang.invoke.MethodHandles; +import java.lang.reflect.Field; +import java.util.Arrays; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.tools.ForwardingJavaFileObject; +import javax.tools.JavaFileObject; +import javax.tools.JavaFileObject.Kind; +import javax.tools.SimpleJavaFileObject; /** * * @author lahvac */ public class NBClassReader extends ClassReader { - + public static void preRegister(Context context) { context.put(classReaderKey, new Context.Factory() { public ClassReader make(Context c) { @@ -45,12 +62,14 @@ public class NBClassReader extends ClassReader { private final Names names; private final NBNames nbNames; +private final Log log; public NBClassReader(Context context) { super(context); names = Names.instance(context); nbNames = NBNames.instance(context); +log = Log.instance(context); NBAttributeReader[] readers = { new NBAttributeReader(nbNames._org_netbeans_EnclosingMethod, Version.V45_3, CLASS_OR_MEMBER_ATTRIBUTE) { @@ -65,7 +84,57 @@ public class NBClassReader extends ClassReader { for (NBAttributeReader r: readers) attributeReaders.put(r.getName(), r); } - + +@Override +public void readClassFile(ClassSymbol c) { +try { +super.readClassFile(c); +} catch (BadClassFile cf) { +if ("compiler.misc.bad.class.file.header".equals(cf.getDiagnostic().getCode())) { +JavaFileObject origFile = c.classfile; +try (InputStream in = origFile.openInputStream()) { +byte[] data = readFile(in); +int major = (Byte.toUnsignedInt(data[6]) << 8) + Byte.toUnsignedInt(data[7]); +int maxMajor = ClassFile.Version.MAX().major; +if (maxMajor < major) { +if (log.currentSourceFile() != null) { +log.warning(0, Warnings.BigMajorVersion(origFile, major, maxMajor)); +} +data[6] = (byte) (maxMajor >> 8); +data[7] = (byte) (maxMajor & 0xFF); +byte[] dataFin = data; +c.classfile = new ForwardingJavaFileObject(origFile) { +@Override +public InputStream openInputStream() throws IOException { +return new ByteArrayInputStream(dataFin); +} +}; +super.readClassFile(c); +return ; +} +} catch (IOException ex) { + Logger.getLogger(NBClassReader.class.getName()).log(Level.SEVERE, null, ex); +} finally { +c.classfile = origFile; +} +} +throw cf; +} +} + +static byte[] readFile(final Input
[netbeans] branch master updated: Prepare the code that GradleFiles.getFile() can return null
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 e934db6 Prepare the code that GradleFiles.getFile() can return null e934db6 is described below commit e934db6a4003f312a6cda992b7741965782545eb Author: Laszlo Kishalmi AuthorDate: Wed Mar 16 12:36:24 2022 -0700 Prepare the code that GradleFiles.getFile() can return null --- .../org/netbeans/modules/gradle/NbGradleProjectImpl.java| 5 - .../src/org/netbeans/modules/gradle/spi/GradleFiles.java| 13 ++--- .../org/netbeans/modules/gradle/spi/GradleFilesTest.java| 11 +++ 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/extide/gradle/src/org/netbeans/modules/gradle/NbGradleProjectImpl.java b/extide/gradle/src/org/netbeans/modules/gradle/NbGradleProjectImpl.java index 14c92c7..0986a57 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/NbGradleProjectImpl.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/NbGradleProjectImpl.java @@ -211,7 +211,10 @@ public final class NbGradleProjectImpl implements Project { GradleFiles gf = getGradleFiles(); Set ret = new LinkedHashSet<>(); for (GradleFiles.Kind kind : GradleFiles.Kind.PROJECT_FILES) { -ret.add(gf.getFile(kind)); +File f = gf.getFile(kind); +if (f != null) { +ret.add(f); +} } return ret; } diff --git a/extide/gradle/src/org/netbeans/modules/gradle/spi/GradleFiles.java b/extide/gradle/src/org/netbeans/modules/gradle/spi/GradleFiles.java index 1da428c..788aea7 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/spi/GradleFiles.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/spi/GradleFiles.java @@ -105,7 +105,7 @@ public final class GradleFiles implements Serializable { List ret = new ArrayList<>(3); for (Kind kind:Kind.PROPERTIES){ File f = getFile(kind); -if (f.exists()){ +if ((f != null) && f.exists()){ ret.add(f); } } @@ -175,6 +175,12 @@ public final class GradleFiles implements Serializable { return settingsScript; } +/** + * The list of the existing property files in the current project in + * the order of: user, root, and project properties. + * + * @return the list of existing project property files. + */ public List getPropertyFiles() { return searchPropertyFiles(); } @@ -261,10 +267,11 @@ public final class GradleFiles implements Serializable { } /** - * Returns the possible file names for a Gradle project file, + * Returns the possible file names for a Gradle project file, or + * {@code null} if that kind is not accepted in the project context. * * @param kind The role of the project file. - * @return + * @return a possible project file or {@code null} */ public File getFile(Kind kind) { if (isBuildSrcProject()) { diff --git a/extide/gradle/test/unit/src/org/netbeans/modules/gradle/spi/GradleFilesTest.java b/extide/gradle/test/unit/src/org/netbeans/modules/gradle/spi/GradleFilesTest.java index 4487f2a..5e1ff5e 100644 --- a/extide/gradle/test/unit/src/org/netbeans/modules/gradle/spi/GradleFilesTest.java +++ b/extide/gradle/test/unit/src/org/netbeans/modules/gradle/spi/GradleFilesTest.java @@ -433,6 +433,17 @@ public class GradleFilesTest { assertEquals(null, gf.getFile(GradleFiles.Kind.BUILD_SRC)); } +@Test +public void testGetBuildSrcProperties() throws IOException { +root.newFile("settings.gradle"); + +File buildSrc = root.newFolder("buildSrc"); +GradleFiles gf = new GradleFiles(buildSrc); +assertTrue(gf.isBuildSrcProject()); +int expectedSize = gf.getFile(GradleFiles.Kind.USER_PROPERTIES).exists() ? 1 : 0; +assertEquals(expectedSize, gf.getPropertyFiles().size()); +} + /** * Test of getProjectFiles method, of class GradleFiles. */ - 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
[netbeans] branch master updated: Add Apache NetBeans Snap Package as an option to GitHub Bug report
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 d7b761a Add Apache NetBeans Snap Package as an option to GitHub Bug report d7b761a is described below commit d7b761a6133619215a5fcb80376fe494635296eb Author: Laszlo Kishalmi AuthorDate: Tue Mar 15 18:07:30 2022 -0700 Add Apache NetBeans Snap Package as an option to GitHub Bug report --- .github/ISSUE_TEMPLATE/netbeans_bug_report.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/netbeans_bug_report.yml b/.github/ISSUE_TEMPLATE/netbeans_bug_report.yml index 4ce1f59..1260f1f 100644 --- a/.github/ISSUE_TEMPLATE/netbeans_bug_report.yml +++ b/.github/ISSUE_TEMPLATE/netbeans_bug_report.yml @@ -95,6 +95,7 @@ body: options: - "Apache NetBeans provided installer" - "Apache NetBeans binary zip" +- "Apache NetBeans Snap Package" - "Third-party package" - "Own source build" - "Apache VSNetBeans for VSCode" - 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
[netbeans-website] branch master updated: Fixed github links pointing to the API instead of the UI.
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans-website.git The following commit(s) were added to refs/heads/master by this push: new 5d31a2d Fixed github links pointing to the API instead of the UI. 5d31a2d is described below commit 5d31a2da9e9a7a0fc8fab7a35ffc9041a423b061 Author: Laszlo Kishalmi AuthorDate: Mon Feb 28 07:42:20 2022 -0800 Fixed github links pointing to the API instead of the UI. --- .../src/content/download/nb13/index.asciidoc | 368 ++--- 1 file changed, 184 insertions(+), 184 deletions(-) diff --git a/netbeans.apache.org/src/content/download/nb13/index.asciidoc b/netbeans.apache.org/src/content/download/nb13/index.asciidoc index 3f7a809..86ceaad 100644 --- a/netbeans.apache.org/src/content/download/nb13/index.asciidoc +++ b/netbeans.apache.org/src/content/download/nb13/index.asciidoc @@ -38,205 +38,205 @@ link:/download/nb13/nb13.html[Download, role="button success"] The full list of pull requests integrated in the 13 timeframe link:https://github.com/apache/netbeans/pulls?q=is%3Aclosed+milestone%3ANB13[is found here], while the highlights are listed below. == Editor - - [link:https://issues.apache.org/jira/browse/NETBEANS-6312[NETBEANS-6312]] Assure that TokenHierarchy is called with Document's read lock. [link:https://api.github.com/repos/apache/netbeans/issues/3379[3379]] - - [link:https://issues.apache.org/jira/browse/NETBEANS-5209[NETBEANS-5209]] Document switcher popup not grouping by project on first use. [link:https://api.github.com/repos/apache/netbeans/issues/3299[3299]] + - [link:https://issues.apache.org/jira/browse/NETBEANS-6312[NETBEANS-6312]] Assure that TokenHierarchy is called with Document's read lock. [link:https://github.com/apache/netbeans/issues/3379[3379]] + - [link:https://issues.apache.org/jira/browse/NETBEANS-5209[NETBEANS-5209]] Document switcher popup not grouping by project on first use. [link:https://github.com/apache/netbeans/issues/3299[3299]] == Java - - fixed wrong nb-javac module name so that it can be installed. [link:https://api.github.com/repos/apache/netbeans/issues/3575[3575]] - - [#3511] workaround for extends/implements panel not showing any results. [link:https://api.github.com/repos/apache/netbeans/issues/3543[3543]] - - [jackpot] DefaultRuleUtilities::referencedIn fix for single variable matching [link:https://api.github.com/repos/apache/netbeans/issues/3540[3540]] - - [#3494] Organize Imports inspection is not record aware. [link:https://api.github.com/repos/apache/netbeans/issues/3497[3497]] - - Hint/Inspection panel and dialog layout fixes [link:https://api.github.com/repos/apache/netbeans/issues/3472[3472]] - - [#3466] do not show Convert Type to Var hint for method references [link:https://api.github.com/repos/apache/netbeans/issues/3471[3471]] - - [link:https://issues.apache.org/jira/browse/NETBEANS-6388[NETBEANS-6388]] remove findbugs installer module. [link:https://api.github.com/repos/apache/netbeans/issues/3455[3455]] - - [jackpot] Add sourceVersion(int) to rule file utils and deprecate enum variant. (part 2) [link:https://api.github.com/repos/apache/netbeans/issues/3439[3439]] - - nb-javac checks cleanup and dialog removal. [link:https://api.github.com/repos/apache/netbeans/issues/3396[3396]] - - [jackpot] Add sourceVersion(int) to rule file utils and deprecate enum variant. [link:https://api.github.com/repos/apache/netbeans/issues/3395[3395]] - - javac wrapper module should clean its "external" folder. [link:https://api.github.com/repos/apache/netbeans/issues/3392[3392]] - - VaniallaPartialReparser reports incorrectly reparsed files [link:https://api.github.com/repos/apache/netbeans/issues/3286[3286]] - - [jackpot] added generics aware rule to IteratorToFor inspection [link:https://api.github.com/repos/apache/netbeans/issues/3284[3284]] - - Handle any script's URI and provide script content when not readable from file. [link:https://api.github.com/repos/apache/netbeans/issues/3277[3277]] - - Including nb-javac binaries in all the complementary distributions [link:https://api.github.com/repos/apache/netbeans/issues/3251[3251]] - - fixed class modifier auto completion for sealed classes. [link:https://api.github.com/repos/apache/netbeans/issues/3228[3228]] - - [jackpot] Rewrite "String::replaceAll with dot" inspection to apply to more cases and methods [link:https://api.github.com/repos/apache/netbeans/issues/3218[3218]] - - Dynamically switching from all-file processing to single-file processing of multi file JavaSources. [link:https://api.github.com/repos/apache/netbeans/issues/2959[2959]] - - [link:https://issues.apache.org/jira/browse/NETBEANS-4274[NETBEANS-4274]] fix refactoring of class member when a new name is the same as the name of a local variable [link:https://api.github.com/repos/ap
[netbeans-website] branch master updated: Generared an index page from GitHub PR-s
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans-website.git The following commit(s) were added to refs/heads/master by this push: new 8f7c003 Generared an index page from GitHub PR-s 8f7c003 is described below commit 8f7c003ccd893aa33f0aed117962dcadfe077492 Author: Laszlo Kishalmi AuthorDate: Sun Feb 27 17:46:47 2022 -0800 Generared an index page from GitHub PR-s --- .../src/content/download/nb13/index.asciidoc | 242 + 1 file changed, 242 insertions(+) diff --git a/netbeans.apache.org/src/content/download/nb13/index.asciidoc b/netbeans.apache.org/src/content/download/nb13/index.asciidoc new file mode 100644 index 000..3f7a809 --- /dev/null +++ b/netbeans.apache.org/src/content/download/nb13/index.asciidoc @@ -0,0 +1,242 @@ + + 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. + += Apache NetBeans 13 Features +:jbake-type: page_noaside +:jbake-tags: 13 features +:jbake-status: published +:keywords: Apache NetBeans 13 IDE features +:icons: font +:description: Apache NetBeans 13 features +:toc: left +:toc-title: +:toclevels: 4 +:syntax: true +:source-highlighter: pygments +:experimental: +:linkattrs: + +Welcome to Apache NetBeans 13! + +link:/download/nb13/nb13.html[Download, role="button success"] + +The full list of pull requests integrated in the 13 timeframe link:https://github.com/apache/netbeans/pulls?q=is%3Aclosed+milestone%3ANB13[is found here], while the highlights are listed below. + +== Editor + - [link:https://issues.apache.org/jira/browse/NETBEANS-6312[NETBEANS-6312]] Assure that TokenHierarchy is called with Document's read lock. [link:https://api.github.com/repos/apache/netbeans/issues/3379[3379]] + - [link:https://issues.apache.org/jira/browse/NETBEANS-5209[NETBEANS-5209]] Document switcher popup not grouping by project on first use. [link:https://api.github.com/repos/apache/netbeans/issues/3299[3299]] + +== Java + - fixed wrong nb-javac module name so that it can be installed. [link:https://api.github.com/repos/apache/netbeans/issues/3575[3575]] + - [#3511] workaround for extends/implements panel not showing any results. [link:https://api.github.com/repos/apache/netbeans/issues/3543[3543]] + - [jackpot] DefaultRuleUtilities::referencedIn fix for single variable matching [link:https://api.github.com/repos/apache/netbeans/issues/3540[3540]] + - [#3494] Organize Imports inspection is not record aware. [link:https://api.github.com/repos/apache/netbeans/issues/3497[3497]] + - Hint/Inspection panel and dialog layout fixes [link:https://api.github.com/repos/apache/netbeans/issues/3472[3472]] + - [#3466] do not show Convert Type to Var hint for method references [link:https://api.github.com/repos/apache/netbeans/issues/3471[3471]] + - [link:https://issues.apache.org/jira/browse/NETBEANS-6388[NETBEANS-6388]] remove findbugs installer module. [link:https://api.github.com/repos/apache/netbeans/issues/3455[3455]] + - [jackpot] Add sourceVersion(int) to rule file utils and deprecate enum variant. (part 2) [link:https://api.github.com/repos/apache/netbeans/issues/3439[3439]] + - nb-javac checks cleanup and dialog removal. [link:https://api.github.com/repos/apache/netbeans/issues/3396[3396]] + - [jackpot] Add sourceVersion(int) to rule file utils and deprecate enum variant. [link:https://api.github.com/repos/apache/netbeans/issues/3395[3395]] + - javac wrapper module should clean its "external" folder. [link:https://api.github.com/repos/apache/netbeans/issues/3392[3392]] + - VaniallaPartialReparser reports incorrectly reparsed files [link:https://api.github.com/repos/apache/netbeans/issues/3286[3286]] + - [jackpot] added generics aware rule to IteratorToFor inspection [link:https://api.github.com/repos/apache/netbeans/issues/3284[3284]] + - Handle any script's URI and provide script content when not readable from file. [link:https://api.github.com/repos/apache/netbeans/issues/3277[3277]] + - Including nb-javac binaries in all the complementary distributions [link:https://api.github.co
[netbeans] branch master updated (73732f1 -> aad1b8f)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git. from 73732f1 Merge pull request #3657 from junichi11/php81-new-in-initializer add aad1b8f Add Support for Gradle Configuration Cache No new revisions were added by this update. Summary of changes: .../src/main/resources/nb-tooling.gradle | 2 +- .../gradle/api/execute/GradleCommandLine.java | 1 + .../gradle/execute/GradleDaemonExecutor.java | 3 +- .../gradle/execute/GradlePlainEscapeProcessor.java | 3 +- .../gradle/loaders/AbstractProjectLoader.java | 5 +-- .../modules/gradle/loaders/GradleDaemon.java | 34 +-- .../gradle/loaders/LegacyProjectLoader.java| 5 +-- .../modules/gradle/options/Bundle.properties | 5 ++- .../modules/gradle/options/SettingsPanel.form | 50 ++ .../modules/gradle/options/SettingsPanel.java | 47 .../modules/gradle/spi/GradleSettings.java | 9 11 files changed, 110 insertions(+), 54 deletions(-) - 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
[netbeans] branch master updated (09075dc -> 14b5836)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git. from 09075dc Merge pull request #3654 from ppisl/NETBEANS-6463 add 14b5836 Gradle Tooling Upgrade to 7.4 No new revisions were added by this update. Summary of changes: extide/gradle/build.xml| 2 +- extide/gradle/external/binaries-list | 2 +- extide/gradle/external/gradle-7.3-bin-notice.txt | 1 - ...-bin-license.txt => gradle-7.4-bin-license.txt} | 2 +- .../gradle/external/gradle-7.4-bin-notice.txt | 0 ...-license.txt => gradle-wrapper-7.4-license.txt} | 2 +- extide/gradle/nbproject/project.xml| 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- extide/libs.gradle/external/binaries-list | 2 +- ...ense.txt => gradle-tooling-api-7.4-license.txt} | 4 +-- ...otice.txt => gradle-tooling-api-7.4-notice.txt} | 4 +-- extide/libs.gradle/manifest.mf | 2 +- extide/libs.gradle/nbproject/project.properties| 2 +- extide/libs.gradle/nbproject/project.xml | 2 +- .../org/netbeans/nbbuild/extlibs/ignored-overlaps | 38 ++ 15 files changed, 32 insertions(+), 35 deletions(-) delete mode 100644 extide/gradle/external/gradle-7.3-bin-notice.txt rename extide/gradle/external/{gradle-7.3-bin-license.txt => gradle-7.4-bin-license.txt} (99%) copy php/php.smarty/src/org/netbeans/modules/php/smarty/resources/TplTemplate.tpl => extide/gradle/external/gradle-7.4-bin-notice.txt (100%) rename extide/gradle/external/{gradle-wrapper-7.3-license.txt => gradle-wrapper-7.4-license.txt} (99%) rename extide/libs.gradle/external/{gradle-tooling-api-7.3-license.txt => gradle-tooling-api-7.4-license.txt} (99%) rename extide/libs.gradle/external/{gradle-tooling-api-7.3-notice.txt => gradle-tooling-api-7.4-notice.txt} (73%) - 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
[netbeans] branch master updated (7bccd05 -> 3b6c2e1)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git. from 7bccd05 [NETBEANS-6425] Provide outline view for Groovy file in VSCode. (#3525) add 3b6c2e1 Added Gradle '--warning-mode all' output action No new revisions were added by this update. Summary of changes: .../modules/gradle/api/output/OutputListeners.java | 48 +++--- .../gradle/output/GradleProcessorFactory.java | 38 - 2 files changed, 52 insertions(+), 34 deletions(-) - 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
[netbeans-tools] branch master updated (9643687 -> 3e16546)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans-tools.git. from 9643687 Merge pull request #47 from neilcsmith-net/nbpackage new 9a8a03f Initial script for Snap creation from source new 1451177 Prepare snap package to clean-up external nbjavac insstals from the userdir new 0807475 Added snapcraft file using a zip distribution binary and core20 new 3e16546 Merge pull request #48 from lkishalmi/snapcraft-core18 The 205 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: snap-packages/frame512.png | Bin 0 -> 20905 bytes snap-packages/from-source/build.xml| 173 .../from-source/netbeans-template.desktop | 26 +++ snap-packages/from-source/snapcraft-template.yaml | 78 + snap-packages/from-zip/build.xml | 177 + snap-packages/from-zip/netbeans-template.desktop | 26 +++ snap-packages/from-zip/snapcraft-template.yaml | 73 + snap-packages/launchers/nbjavac-cleanup| 8 + 8 files changed, 561 insertions(+) create mode 100644 snap-packages/frame512.png create mode 100644 snap-packages/from-source/build.xml create mode 100644 snap-packages/from-source/netbeans-template.desktop create mode 100644 snap-packages/from-source/snapcraft-template.yaml create mode 100644 snap-packages/from-zip/build.xml create mode 100644 snap-packages/from-zip/netbeans-template.desktop create mode 100644 snap-packages/from-zip/snapcraft-template.yaml create mode 100644 snap-packages/launchers/nbjavac-cleanup - 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
[netbeans] branch master updated: Bugfix: Go To source broken for nested classes.
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 7ae4452 Bugfix: Go To source broken for nested classes. 7ae4452 is described below commit 7ae4452ecdad828497c3317f7a5d113534978f39 Author: ratcash AuthorDate: Fri Sep 24 09:02:25 2021 +0200 Bugfix: Go To source broken for nested classes. --- java/gradle.java/apichanges.xml| 14 ++ .../modules/gradle/java/api/output/Location.java | 131 +++-- .../gradle/java/api/output/LocationOpener.java | 45 - .../gradle/java/api/output/LocationTest.java | 208 + java/gradle.test/nbproject/project.xml | 2 +- .../test/ui/nodes/GradleJUnitNodeOpener.java | 2 +- .../gradle/test/ui/nodes/GradleTestMethodNode.java | 2 +- 7 files changed, 374 insertions(+), 30 deletions(-) diff --git a/java/gradle.java/apichanges.xml b/java/gradle.java/apichanges.xml index 1796f74..f77b1ba 100644 --- a/java/gradle.java/apichanges.xml +++ b/java/gradle.java/apichanges.xml @@ -83,6 +83,20 @@ is the proper place. + + +Location can represent nested classes + + + + + +Location +is now capabe to represent java code location inside nested classes as well. + + + + Deprecating Gradle 7.0 removed API-s diff --git a/java/gradle.java/src/org/netbeans/modules/gradle/java/api/output/Location.java b/java/gradle.java/src/org/netbeans/modules/gradle/java/api/output/Location.java index 175d186..d8a1844 100644 --- a/java/gradle.java/src/org/netbeans/modules/gradle/java/api/output/Location.java +++ b/java/gradle.java/src/org/netbeans/modules/gradle/java/api/output/Location.java @@ -16,7 +16,6 @@ * specific language governing permissions and limitations * under the License. */ - package org.netbeans.modules.gradle.java.api.output; import java.util.regex.Matcher; @@ -24,6 +23,9 @@ import java.util.regex.Pattern; import org.openide.filesystems.FileObject; /** + * This class represents a location in a Java file or Class which usually + * presented in Sting form as {@code a/b/c/ClassName$SubClas1$SubClass2.java:123} or + * {@code a/b/c/ClassName$SubClas1$SubClass2.java:methodName()} * * @author Laszlo Kishalmi */ @@ -31,32 +33,102 @@ public final class Location { final String fileName; final String target; +final String[] classNames; private Integer lineNum = null; -public Location(String fileName, String target) { -this.fileName = fileName; -this.target = target; -try { -lineNum = Integer.parseInt(target); -} catch (NumberFormatException ex) { +/** + * Parses the given string in the format {@code a/b/c/ClassName$SubClas1$SubClass2.java:123} or + * {@code a/b/c/ClassName$SubClas1$SubClass2.java:methodName()} to a Location + * + * @param loc the location String + * @return the Location object represented by the location String + * @since 1.17 + */ +public static Location parseLocation(String loc) { +assert loc != null; + +// example MyFile$NestedClass.java:123 +// or // example MyFile$NestedClass.java:getMethod() +int targetDelimiterIndex = loc.lastIndexOf(':'); +if (targetDelimiterIndex == -1) { +targetDelimiterIndex = loc.length(); } -} +// the last dot will be before the .java extension +// unless there's no extension and this may be before the classname +// but those cases not supported, really +int extensionIndx = loc.lastIndexOf('.', targetDelimiterIndex); +if (extensionIndx == -1) { +extensionIndx = targetDelimiterIndex; +} +// is the dot right before the File's name (after the package's name) +int packageSlashIndx = loc.lastIndexOf('/', extensionIndx - 1); -public Location(String loc) { -int i = loc != null ? loc.indexOf(':') : 0; -if ((i > 0) && (loc != null)) { -fileName = loc.substring(0, i); -target = loc.substring(i + 1); +String[] classNames = loc.substring(packageSlashIndx + 1, extensionIndx).split("\\$"); +String ext = loc.substring(extensionIndx, targetDelimiterIndex); +String fileName = loc.substring(0, packageSlashIndx + 1) + classNames[0] + ext; + +String target; +if (targetDelimiterIndex < loc.length() - 1) { +target = loc.substring(targetDelimiterIndex + 1); } else { -fileName = loc; target = null; } + +return new Location(file
[netbeans] branch master updated: Updated Gradle CLI option support.
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 9496694 Updated Gradle CLI option support. 9496694 is described below commit 9496694e6e274b13e1574916fd68020a23485850 Author: Laszlo Kishalmi AuthorDate: Wed Feb 16 20:17:43 2022 -0800 Updated Gradle CLI option support. --- extide/gradle/apichanges.xml | 12 ++ .../modules/gradle/api/execute/Bundle.properties | 95 +++-- .../gradle/api/execute/GradleCommandLine.java | 150 - .../execute/GradleCliCompletionProvider.java | 41 -- .../gradle/api/execute/GradleCommandLineTest.java | 19 +++ 5 files changed, 234 insertions(+), 83 deletions(-) diff --git a/extide/gradle/apichanges.xml b/extide/gradle/apichanges.xml index a9592af..946aff6 100644 --- a/extide/gradle/apichanges.xml +++ b/extide/gradle/apichanges.xml @@ -83,6 +83,18 @@ is the proper place. + + +GradleCommandLine Flag, Parameter, and Property implements GradleOptionItem interface + + + + + +Added GradleOptionItem interface to GradleCommandLine +in order to support a common interface for Flaf, Parameter, and Property enums. + + NetBeans Tooling plugin recognizes "runWorkingDir" and "runEnvironment" properties. diff --git a/extide/gradle/src/org/netbeans/modules/gradle/api/execute/Bundle.properties b/extide/gradle/src/org/netbeans/modules/gradle/api/execute/Bundle.properties index e684e71..4934cf7 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/api/execute/Bundle.properties +++ b/extide/gradle/src/org/netbeans/modules/gradle/api/execute/Bundle.properties @@ -15,45 +15,64 @@ # specific language governing permissions and limitations # under the License. -NO_REBUILD_DSC=Do not rebuild project dependencies. [deprecated] -CONFIGURE_ON_DEMAND_DSC=Configure necessary projects only. Gradle will attempt to reduce configuration time for large multi-project builds. [incubating] -NO_CONFIGURE_ON_DEMAND_DSC=Disables the use of configuration on demand. [incubating] -CONTINUE_DSC=Continue task execution after a task failure. -DRY_RUN_DSC=Run the builds with all task actions disabled. -OFFLINE_DSC=Execute the build without accessing network resources. -PARALLEL_DSC=Build projects in parallel. Gradle will attempt to determine the optimal number of executor threads to use. [incubating] -NO_PARALLEL_DSC=Disables parallel execution to build projects. [incubating] -RECOMPILE_SCRIPTS_DSC= Force build script recompiling. [deprecated] -REFRESH_DEPENDENCIES_DSC=Refresh the state of dependencies. -RERUN_TASKS_DSC= Ignore previously cached task results. -MAX_WORKERS_DSC=Configure the number of concurrent workers Gradle is allowed to use. [incubating] -INCLUDE_BUILD_DSC=Include the specified build in the composite. [incubating] +BUILD_CACHE_DSC=Enables the Gradle build cache.Gradle will try to reuse outputs from previous builds. +BUILD_FILE_DSC=Specify the build file.[deprecated] +CONFIGURATION_CACHE_DSC=Enables the configuration cache.Gradle will try to reuse the build configuration from previous builds.[incubating] +CONFIGURATION_CACHE_PROBLEMS_DSC=Configures how the configuration cache handles problems (fail or warn). Defaults to fail.[incubating] +CONFIGURE_ON_DEMAND_DSC=Configure necessary projects only.Gradle will attempt to reduce configuration time for large multi-project builds.[incubating] +CONSOLE_DSC=Specifies which type of console output to generate. Values are 'plain', 'auto' (default), 'rich' or 'verbose'. +CONTINUE_DSC=Continue task execution after a task failure. +CONTINUOUS_DSC=Enables continuous build.Gradle does not exit and will re-execute tasks when task file inputs change. +DAEMON_DSC=Uses the Gradle Daemon to run the build. Starts the Daemon if not running.Builds running through the IDE are always using a daemon. +DEPENDENCY_VERIFICATION_DSC=Configures the dependency verification mode.Values are 'strict', 'lenient' or 'off'. +DRY_RUN_DSC=Run the builds with all task actions disabled. +EXCLUDE_TASK_DSC=Specify a task to be excluded from execution. +EXPORT_KEYS_DSC=Exports the public keys used for dependency verification. +FOREGROUND_DSC=Starts the Gradle Daemon in the foreground. +GUI_DSC=The Gradle GUI has been removed in Gradle 4.0. +GRADLE_USER_HOME_DSC=Specifies the Gradle user home directory. +HELP_DSC=Shows the help message. +INCLUDE_BUILD_DSC=Include the specified build in the composite. +INIT_SCRIPT_DSC=Specify an initialization script. +LOG_DEBUG_DSC=Log in debug mode (includes normal stacktrace) +LOG_INFO_DSC=Set log level to info. +LOG_QUIET_DSC=Log errors only. +
[netbeans] annotated tag 12.3 updated (c3d4f6f -> 4401a1a)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to annotated tag 12.3 in repository https://gitbox.apache.org/repos/asf/netbeans.git. *** WARNING: tag 12.3 was modified! *** from c3d4f6f (commit) to 4401a1a (tag) tagging c3d4f6fa6c956cf1b5a35e8da4f44a96ab76f6a9 (commit) replaces 12.3-beta2 by Laszlo Kishalmi on Thu Feb 10 14:44:22 2022 -0800 - Log - Apache NetBeans 12.3 --- No new revisions were added by this update. Summary of changes: - 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
[netbeans] 02/03: Retain project problems from gradle execution.
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git commit 73fe19791595c29d5b0a8e763d0bffe604eeaf33 Author: Svata Dedic AuthorDate: Wed Feb 2 11:28:31 2022 +0100 Retain project problems from gradle execution. --- .../netbeans/modules/gradle/NbGradleProjectImpl.java| 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/extide/gradle/src/org/netbeans/modules/gradle/NbGradleProjectImpl.java b/extide/gradle/src/org/netbeans/modules/gradle/NbGradleProjectImpl.java index 7901ef2..a09b799 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/NbGradleProjectImpl.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/NbGradleProjectImpl.java @@ -402,7 +402,20 @@ public final class NbGradleProjectImpl implements Project { } loadedProjectSerial = s; this.attemptedQuality = aim; -if (project != null && !force && project.getQuality().atLeast(prj.getQuality())) { + +boolean replace = project == null; +if (project != null) { +if (prj.getQuality().betterThan(project.getQuality())) { +replace = true; +} else if ( +project.getQuality().equals(prj.getQuality()) && +!project.getProblems().equals(prj.getProblems()) && +!prj.getProblems().isEmpty()) { +// exception: if the new project is the same quality fallback, but contains (different) problem info, use it +replace = true; +} +} +if (!replace) { // avoid replacing a project when nothing has changed. LOG.log(Level.FINER, "Current project {1} sufficient for attempted quality {0}", new Object[] { this.project, aim }); return CompletableFuture.completedFuture(this.project); @@ -495,7 +508,7 @@ public final class NbGradleProjectImpl implements Project { GradleProject getPrimedProject() { GradleProject gp = projectWithQuality(null, EVALUATED, false, false); -return !(gp.getQuality().notBetterThan(EVALUATED) || !gp.getProblems().isEmpty()) ? gp : null; +return gp.getQuality().betterThan(EVALUATED) ? gp : null; } /** - 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
[netbeans] 01/03: Form a single problem from the exception.
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git commit 9b9d3fff59dcd0c6df493e78673b315dc860fc88 Author: Svata Dedic AuthorDate: Wed Feb 2 11:27:35 2022 +0100 Form a single problem from the exception. --- .../gradle/GradleProjectProblemProvider.java | 10 ++- .../gradle/loaders/GradleProjectLoaderImpl.java| 6 +- .../gradle/loaders/LegacyProjectLoader.java| 84 -- 3 files changed, 90 insertions(+), 10 deletions(-) diff --git a/extide/gradle/src/org/netbeans/modules/gradle/GradleProjectProblemProvider.java b/extide/gradle/src/org/netbeans/modules/gradle/GradleProjectProblemProvider.java index 2b53729..b12edc8 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/GradleProjectProblemProvider.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/GradleProjectProblemProvider.java @@ -80,12 +80,16 @@ public class GradleProjectProblemProvider implements ProjectProblemsProvider { public Collection getProblems() { List ret = new ArrayList<>(); GradleProject gp = project.getLookup().lookup(NbGradleProjectImpl.class).getGradleProject(); -if (gp.getQuality().notBetterThan(EVALUATED)) { -ret.add(ProjectProblem.createError(Bundle.LBL_PrimingRequired(), Bundle.TXT_PrimingRequired(), resolver)); +// untrusted project can't have 'real' problems: the execution could not happen +boolean trusted = ProjectTrust.getDefault().isTrusted(project); +if (!trusted || gp.getProblems().isEmpty()) { +if (gp.getQuality().notBetterThan(EVALUATED)) { + ret.add(ProjectProblem.createError(Bundle.LBL_PrimingRequired(), Bundle.TXT_PrimingRequired(), resolver)); +} } else { for (String problem : gp.getProblems()) { String[] lines = problem.split("\\n"); //NOI18N -ret.add(ProjectProblem.createWarning(lines[0], problem.replaceAll("\\n", ""), resolver)); //NOI18N +ret.add(ProjectProblem.createWarning(lines[0], problem.replaceAll("\\n", ""), null)); //NOI18N } } return ret; diff --git a/extide/gradle/src/org/netbeans/modules/gradle/loaders/GradleProjectLoaderImpl.java b/extide/gradle/src/org/netbeans/modules/gradle/loaders/GradleProjectLoaderImpl.java index 070bf2a..833ee1c 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/loaders/GradleProjectLoaderImpl.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/loaders/GradleProjectLoaderImpl.java @@ -30,6 +30,7 @@ import org.netbeans.modules.gradle.api.NbGradleProject; import org.netbeans.modules.gradle.api.execute.GradleCommandLine; import org.netbeans.modules.gradle.api.execute.RunUtils; import org.netbeans.modules.gradle.options.GradleExperimentalSettings; +import org.openide.util.NbBundle; /** * @@ -45,6 +46,9 @@ public class GradleProjectLoaderImpl implements GradleProjectLoader { } @Override +@NbBundle.Messages({ +"ERR_ProjectNotTrusted=Gradle execution is not trusted on this project." +}) public GradleProject loadProject(NbGradleProject.Quality aim, String descriptionOpt, boolean ignoreCache, boolean interactive, String... args) { LOGGER.info("Load aiming " +aim + " for "+ project); GradleCommandLine cmd = new GradleCommandLine(args); @@ -76,7 +80,7 @@ public class GradleProjectLoaderImpl implements GradleProjectLoader { } else { ret = ctx.getPrevious(); if (ret != null) { -ret = ret.invalidate("Gradle execution is not trusted on this project."); +ret = ret.invalidate(Bundle.ERR_ProjectNotTrusted()); } LOGGER.log(Level.FINER, "Execution not allowed, invalidated {0}", ret); } diff --git a/extide/gradle/src/org/netbeans/modules/gradle/loaders/LegacyProjectLoader.java b/extide/gradle/src/org/netbeans/modules/gradle/loaders/LegacyProjectLoader.java index 488b94d..2520aa7 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/loaders/LegacyProjectLoader.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/loaders/LegacyProjectLoader.java @@ -20,6 +20,7 @@ package org.netbeans.modules.gradle.loaders; import java.io.Serializable; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; @@ -174,12 +175,7 @@ public class LegacyProjectLoader extends AbstractProjectLoader { } } catch (GradleConnectionException | IllegalStateException ex) { LOG.log(FINE, &qu
[netbeans] 03/03: Respect HTML formatting. Display "Resolve problems" actions for projects.
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git commit b15b5d6f6521ba7b550d757607188deb62894dbe Author: Svata Dedic AuthorDate: Wed Feb 2 11:29:06 2022 +0100 Respect HTML formatting. Display "Resolve problems" actions for projects. --- .../gradle/src/org/netbeans/modules/gradle/layer.xml | 4 .../ui/problems/BrokenReferencesCustomizer.form| 4 +--- .../ui/problems/BrokenReferencesCustomizer.java| 18 +- java/maven/src/org/netbeans/modules/maven/layer.xml| 4 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/extide/gradle/src/org/netbeans/modules/gradle/layer.xml b/extide/gradle/src/org/netbeans/modules/gradle/layer.xml index c3d049e..6c866a2 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/layer.xml +++ b/extide/gradle/src/org/netbeans/modules/gradle/layer.xml @@ -81,6 +81,10 @@ + + + + diff --git a/ide/projectui/src/org/netbeans/modules/project/ui/problems/BrokenReferencesCustomizer.form b/ide/projectui/src/org/netbeans/modules/project/ui/problems/BrokenReferencesCustomizer.form index 2d895e1..d46fa54 100644 --- a/ide/projectui/src/org/netbeans/modules/project/ui/problems/BrokenReferencesCustomizer.form +++ b/ide/projectui/src/org/netbeans/modules/project/ui/problems/BrokenReferencesCustomizer.form @@ -146,11 +146,9 @@ - + - - diff --git a/ide/projectui/src/org/netbeans/modules/project/ui/problems/BrokenReferencesCustomizer.java b/ide/projectui/src/org/netbeans/modules/project/ui/problems/BrokenReferencesCustomizer.java index 29f34b3..d742a8b 100644 --- a/ide/projectui/src/org/netbeans/modules/project/ui/problems/BrokenReferencesCustomizer.java +++ b/ide/projectui/src/org/netbeans/modules/project/ui/problems/BrokenReferencesCustomizer.java @@ -89,7 +89,7 @@ public class BrokenReferencesCustomizer extends javax.swing.JPanel { fix = new javax.swing.JButton(); descriptionLabel = new javax.swing.JLabel(); jScrollPane2 = new javax.swing.JScrollPane(); -description = new javax.swing.JTextArea(); +description = new javax.swing.JTextPane(); setPreferredSize(new java.awt.Dimension(550, 350)); setLayout(new java.awt.GridBagLayout()); @@ -146,8 +146,6 @@ public class BrokenReferencesCustomizer extends javax.swing.JPanel { descriptionLabel.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(BrokenReferencesCustomizer.class, "ACSD_BrokenLinksCustomizer_Description")); // NOI18N description.setEditable(false); -description.setLineWrap(true); -description.setWrapStyleWord(true); jScrollPane2.setViewportView(description); gridBagConstraints = new java.awt.GridBagConstraints(); @@ -249,7 +247,16 @@ public class BrokenReferencesCustomizer extends javax.swing.JPanel { if (value instanceof BrokenReferencesModel.ProblemReference) { final BrokenReferencesModel.ProblemReference reference = (BrokenReferencesModel.ProblemReference) value; if (!reference.resolved) { -description.setText(reference.problem.getDescription()); +String s = reference.problem.getDescription(); +// attempt to autodetect HTML tags in the description, switch content type appropriately. +if (s.contains("/>") || (s.contains("<") && s.contains(">"))) { +description.setContentType("text/html"); +} else { +description.setContentType("text/plain"); +} +description.setText(s); +// avoid possible scroll down/left if the text does not fit in the default window +description.getCaret().setDot(0); fix.setEnabled(reference.problem.isResolvable()); javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { @@ -272,13 +279,14 @@ public class BrokenReferencesCustomizer extends javax.swing.JPanel { // Variables declaration - do not modify//GEN-BEGIN:variables -private javax.swing.JTextArea description; +private javax.swing.JTextPane description; private javax.swing.JLabel descriptionLabel; private javax.swing.JList errorList; private javax.swing.JLabel errorListLabel; private javax.swing.JButton fix; private javax.swing.JScrollPane jScrollPane1;
[netbeans] branch master updated (44ea743 -> b15b5d6)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git. from 44ea743 [NETBEANS-6410] - Upgrade JAXB from 2.3.3 to 2.3.5 (#3545) new 9b9d3ff Form a single problem from the exception. new 73fe197 Retain project problems from gradle execution. new b15b5d6 Respect HTML formatting. Display "Resolve problems" actions for projects. The 3 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: .../gradle/GradleProjectProblemProvider.java | 10 ++- .../modules/gradle/NbGradleProjectImpl.java| 17 - .../src/org/netbeans/modules/gradle/layer.xml | 4 ++ .../gradle/loaders/GradleProjectLoaderImpl.java| 6 +- .../gradle/loaders/LegacyProjectLoader.java| 84 -- .../ui/problems/BrokenReferencesCustomizer.form| 4 +- .../ui/problems/BrokenReferencesCustomizer.java| 18 +++-- .../maven/src/org/netbeans/modules/maven/layer.xml | 4 ++ 8 files changed, 127 insertions(+), 20 deletions(-) - 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
[netbeans] branch master updated: Report real FULL/FULL_ONLINE status after load.
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 91983a4 Report real FULL/FULL_ONLINE status after load. 91983a4 is described below commit 91983a4c1fa0854f5ce7aca5636f28302b9ce34a Author: Svata Dedic AuthorDate: Thu Jan 20 13:24:22 2022 +0100 Report real FULL/FULL_ONLINE status after load. --- .../modules/gradle/loaders/LegacyProjectLoader.java| 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/extide/gradle/src/org/netbeans/modules/gradle/loaders/LegacyProjectLoader.java b/extide/gradle/src/org/netbeans/modules/gradle/loaders/LegacyProjectLoader.java index bf25558..488b94d 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/loaders/LegacyProjectLoader.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/loaders/LegacyProjectLoader.java @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; +import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; import static java.util.logging.Level.FINE; @@ -48,6 +49,7 @@ import static org.netbeans.modules.gradle.loaders.GradleDaemon.INIT_SCRIPT; import static org.netbeans.modules.gradle.loaders.GradleDaemon.TOOLING_JAR; import org.netbeans.modules.gradle.api.GradleBaseProject; import org.netbeans.modules.gradle.api.NbGradleProject; +import org.netbeans.modules.gradle.api.NbGradleProject.Quality; import static org.netbeans.modules.gradle.api.NbGradleProject.Quality.EVALUATED; import static org.netbeans.modules.gradle.api.NbGradleProject.Quality.FULL_ONLINE; import static org.netbeans.modules.gradle.api.NbGradleProject.Quality.SIMPLE; @@ -142,7 +144,8 @@ public class LegacyProjectLoader extends AbstractProjectLoader { try { errors.clear(); -info = retrieveProjectInfo(goOnline, pconn, cmd, token, pl); +AtomicBoolean onlineResult = new AtomicBoolean(); +info = retrieveProjectInfo(goOnline, pconn, cmd, token, pl, onlineResult); if (!info.getProblems().isEmpty()) { errors.openNotification( @@ -155,7 +158,8 @@ public class LegacyProjectLoader extends AbstractProjectLoader { // If we do not have exception, but seen some problems the we mark the quality as SIMPLE quality = SIMPLE; } else { -quality = ctx.aim; +// the project has been either fully loaded, or online checked +quality = onlineResult.get() ? Quality.FULL_ONLINE : Quality.FULL; } } else { if (info.getProblems().isEmpty()) { @@ -215,7 +219,7 @@ public class LegacyProjectLoader extends AbstractProjectLoader { return ret; } -private static NbProjectInfo retrieveProjectInfo(GoOnline goOnline, ProjectConnection pconn, GradleCommandLine cmd, CancellationToken token, ProgressListener pl) throws GradleConnectionException, IllegalStateException { +private static NbProjectInfo retrieveProjectInfo(GoOnline goOnline, ProjectConnection pconn, GradleCommandLine cmd, CancellationToken token, ProgressListener pl, AtomicBoolean wasOnline) throws GradleConnectionException, IllegalStateException { NbProjectInfo ret; GradleSettings settings = GradleSettings.getDefault(); @@ -235,6 +239,7 @@ public class LegacyProjectLoader extends AbstractProjectLoader { if (goOnline == GoOnline.NEVER || goOnline == GoOnline.ON_DEMAND) { BuildActionExecuter action = createInfoAction(pconn, offline, token, pl); +wasOnline.set(!offline.hasFlag(GradleCommandLine.Flag.OFFLINE)); try { ret = action.run(); if (goOnline == GoOnline.NEVER || !ret.hasException()) { @@ -246,8 +251,9 @@ public class LegacyProjectLoader extends AbstractProjectLoader { } } } - + BuildActionExecuter action = createInfoAction(pconn, online, token, pl); +wasOnline.set(true); ret = action.run(); return ret; } - 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
[netbeans] annotated tag 13-rc1 updated (d77f069 -> 4858da2)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to annotated tag 13-rc1 in repository https://gitbox.apache.org/repos/asf/netbeans.git. *** WARNING: tag 13-rc1 was modified! *** from d77f069 (commit) to 4858da2 (tag) tagging d77f0692fbc94e546fba48454beca58765e6e93a (commit) replaces 12.4-beta1 by Laszlo Kishalmi on Fri Jan 21 14:56:32 2022 -0800 - Log - Apache NetBeans 13-rc1 --- No new revisions were added by this update. Summary of changes: - 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
[netbeans] branch master updated: Moving snap packaging to netbeans-tools repo
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 0d32f3f Moving snap packaging to netbeans-tools repo 0d32f3f is described below commit 0d32f3f568881c1d649e0c63c55430d8b94b315c Author: Laszlo Kishalmi AuthorDate: Fri Nov 26 13:19:51 2021 -0800 Moving snap packaging to netbeans-tools repo --- .../netbeans-dev_snap/snap/gui/netbeans.desktop| 26 .../netbeans-dev_snap/snap/snapcraft.yaml | 77 -- .../netbeans_snap/snap/gui/netbeans.desktop| 26 .../packaging/netbeans_snap/snap/snapcraft.yaml| 67 --- 4 files changed, 196 deletions(-) diff --git a/nbbuild/packaging/netbeans-dev_snap/snap/gui/netbeans.desktop b/nbbuild/packaging/netbeans-dev_snap/snap/gui/netbeans.desktop deleted file mode 100644 index ad720d3..000 --- a/nbbuild/packaging/netbeans-dev_snap/snap/gui/netbeans.desktop +++ /dev/null @@ -1,26 +0,0 @@ -# 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. - -[Desktop Entry] -Type=Application -Encoding=UTF-8 -Name=Apache NetBeans (development) -Comment=Apache NetBeans, The Smarter Way to Code -Exec=netbeans-dev.netbeans %F -Categories=Development;IDE -Icon=${SNAP}/meta/gui/icon.png -Terminal=false - diff --git a/nbbuild/packaging/netbeans-dev_snap/snap/snapcraft.yaml b/nbbuild/packaging/netbeans-dev_snap/snap/snapcraft.yaml deleted file mode 100644 index 51aad31..000 --- a/nbbuild/packaging/netbeans-dev_snap/snap/snapcraft.yaml +++ /dev/null @@ -1,77 +0,0 @@ -# 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. - -name: netbeans-dev - -summary: Apache NetBeans IDE (Development Build) -description: | - Disclaimer: - This is an in Development Build of Apache NetBeans IDE , this is for sole - testing purposes and shall be not considered as a release. - - This package is refreshed weekly automatically from the NetBeans master - repository. Take it as it is, there are no additional testing is being - made on these builds. - - Apache NetBeans IDE lets you quickly and easily develop Java - desktop, enterprise, and web applications, as well as HTML5 applications - with HTML, JavaScript, and CSS. The IDE also provides a great set of tools for - PHP and C/C++ developers. - It is free and open source and has a large community of users and developers - around the world. - - It requires Java 8 or later Java Development Kit installed. - -icon: ../../../platform/core.startup/src/org/netbeans/core/startup/frame512.png -confinement: classic -grade: devel -architectures: [ amd64 ] -adopt-info: netbeans-version - -parts: - netbeans-version: -plugin: dump -source: . -override-pull: | - snapcraftctl pull - snapcraftctl set-version "$(date +%Y%m%d)" - - build: -build-attributes: [ no-patchelf ] -build-packages: - - unzip - - openjdk-11-jdk-headless -plugin: ant -source: ../../../ -filesets: -netbeans: [ netbeans/*, -netbeans/*.built ] -override-build: | -export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64" -ant -quiet -Djavac.compilerargs=-nowarn -Dbuild.compiler.deprecation=false -Dbuildnumber=$(date +%Y%m%d) -Dmetabuild.jsonurl=https://raw.githubusercontent.com/apache/netbeans-jenkins-lib/m
[netbeans] branch master updated: Updated Subversion support to 1.14.0
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 022b204 Updated Subversion support to 1.14.0 022b204 is described below commit 022b2047184d0944260c3b8de40ef044333f1b40 Author: Laszlo Kishalmi AuthorDate: Mon Dec 27 13:31:18 2021 -0800 Updated Subversion support to 1.14.0 --- ...-1.10.12-license.txt => adapter-javahl-1.14.0-license.txt} | 2 +- ide/libs.svnClientAdapter.javahl/external/binaries-list | 4 ++-- ...{svnjavahl-1.9.3-license.txt => javahl-1.14.0-license.txt} | 2 +- ide/libs.svnClientAdapter.javahl/nbproject/project.properties | 4 ++-- ide/libs.svnClientAdapter.javahl/nbproject/project.xml| 8 .../svnclientadapter/javahl/JavaHlClientAdapterFactory.java | 4 ++-- ...in-1.10.12-license.txt => adapter-base-1.14.0-license.txt} | 2 +- ide/libs.svnClientAdapter/external/binaries-list | 3 ++- ide/libs.svnClientAdapter/nbproject/project.properties| 4 ++-- ide/libs.svnClientAdapter/nbproject/project.xml | 11 --- 10 files changed, 21 insertions(+), 23 deletions(-) diff --git a/ide/libs.svnClientAdapter.javahl/external/svnClientAdapter-javahl-1.10.12-license.txt b/ide/libs.svnClientAdapter.javahl/external/adapter-javahl-1.14.0-license.txt similarity index 99% rename from ide/libs.svnClientAdapter.javahl/external/svnClientAdapter-javahl-1.10.12-license.txt rename to ide/libs.svnClientAdapter.javahl/external/adapter-javahl-1.14.0-license.txt index 7fe3468..9dc1baf 100644 --- a/ide/libs.svnClientAdapter.javahl/external/svnClientAdapter-javahl-1.10.12-license.txt +++ b/ide/libs.svnClientAdapter.javahl/external/adapter-javahl-1.14.0-license.txt @@ -1,6 +1,6 @@ Name: SVNClientAdapter Library Description: Integration library for subversion client -Version: 1.10.12 +Version: 1.14.0 Origin: Subclipse License: Apache-2.0 URL: http://subclipse.tigris.org/svnClientAdapter.html diff --git a/ide/libs.svnClientAdapter.javahl/external/binaries-list b/ide/libs.svnClientAdapter.javahl/external/binaries-list index a8565bc..862e169 100644 --- a/ide/libs.svnClientAdapter.javahl/external/binaries-list +++ b/ide/libs.svnClientAdapter.javahl/external/binaries-list @@ -14,5 +14,5 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -DAAEFA7A5F3AF75FE4CDC86A1B5904C9F3B5BBF8 svnClientAdapter-javahl-1.10.12.jar -5C47A97F05F761F190D87ED5FCBB08D1E05A7FB5 svnjavahl-1.9.3.jar +50BDFE2ACBC4FD267A3E57D437C2A84A339F2806 adapter-javahl-1.14.0.jar +F30B0E06CDC52C77F556E76044CDFD005CC5AD2F javahl-1.14.0.jar \ No newline at end of file diff --git a/ide/libs.svnClientAdapter.javahl/external/svnjavahl-1.9.3-license.txt b/ide/libs.svnClientAdapter.javahl/external/javahl-1.14.0-license.txt similarity index 99% rename from ide/libs.svnClientAdapter.javahl/external/svnjavahl-1.9.3-license.txt rename to ide/libs.svnClientAdapter.javahl/external/javahl-1.14.0-license.txt index ef6cfa6..09f49a0 100644 --- a/ide/libs.svnClientAdapter.javahl/external/svnjavahl-1.9.3-license.txt +++ b/ide/libs.svnClientAdapter.javahl/external/javahl-1.14.0-license.txt @@ -1,6 +1,6 @@ Name: Subversion Java-HL bindings Description: Java bindings library for subversion client -Version: 1.9.3 +Version: 1.14.0 Origin: Apache Software Foundation License: Apache-2.0 URL: http://subversion.apache.org/ diff --git a/ide/libs.svnClientAdapter.javahl/nbproject/project.properties b/ide/libs.svnClientAdapter.javahl/nbproject/project.properties index a74447e..51c4a3f 100644 --- a/ide/libs.svnClientAdapter.javahl/nbproject/project.properties +++ b/ide/libs.svnClientAdapter.javahl/nbproject/project.properties @@ -18,8 +18,8 @@ is.eager=true javac.source=1.6 -release.external/svnClientAdapter-javahl-1.10.12.jar=modules/ext/svnClientAdapter-javahl.jar -release.external/svnjavahl-1.9.3.jar=modules/ext/svnjavahl.jar +release.external/adapter-javahl-1.14.0.jar=modules/ext/adapter-javahl.jar +release.external/javahl-1.14.0.jar=modules/ext/javahl.jar # Hidden class found: org.tigris.subversion.svnclientadapter.commandline.CommandLine$CmdArguments in method protected byte[] org.tigris.subversion.svnclientadapter.commandline.SvnCommandLine.execBytes(org.tigris.subversion.svnclientadapter.commandline.CommandLine$CmdArguments,boolean) throws java.lang.Exception in class org.tigris.subversion.svnclientadapter.commandline.SvnCommandLine # Hidden class found: org.tigris.subversion.svnclientadapter.commandline.CommandLine$CmdArguments in method protected java.lang.String org.tigris.subversion.svnclientadapter.commandline.SvnAdminCommandLine.execString(org.tigris.subversion.svnclientadapter.commandline.CommandLine$CmdArguments,boolean) throws java.lang.Exception
[netbeans] branch master updated: Rewrite lambda to an inner class to prevent from Gradle warning about execution optimizations.
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 b93f750 Rewrite lambda to an inner class to prevent from Gradle warning about execution optimizations. b93f750 is described below commit b93f750c5f15ef7db8d9ee91d3e6767f82150adc Author: Martin Entlicher AuthorDate: Thu Dec 16 22:30:20 2021 +0100 Rewrite lambda to an inner class to prevent from Gradle warning about execution optimizations. --- .../modules/gradle/tooling/NetBeansRunSinglePlugin.java | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NetBeansRunSinglePlugin.java b/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NetBeansRunSinglePlugin.java index 6693f9f..b3041bf 100644 --- a/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NetBeansRunSinglePlugin.java +++ b/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NetBeansRunSinglePlugin.java @@ -25,6 +25,7 @@ import org.gradle.api.Plugin; import org.gradle.api.Project; import org.gradle.api.tasks.JavaExec; import org.gradle.api.tasks.SourceSetContainer; +import org.gradle.process.CommandLineArgumentProvider; /** * @@ -48,8 +49,14 @@ class NetBeansRunSinglePlugin implements Plugin { } p.getTasks().withType(JavaExec.class).configureEach(je -> { if (p.hasProperty(RUN_SINGLE_JVM_ARGS)) { -je.getJvmArgumentProviders().add(() -> { -return asList(p.property(RUN_SINGLE_JVM_ARGS).toString().split(" ")); +// Property jvmArgumentProviders should not be implemented as a lambda to allow execution optimizations. +// See https://docs.gradle.org/current/userguide/validation_problems.html#implementation_unknown +je.getJvmArgumentProviders().add(new CommandLineArgumentProvider() { +// Do not convert to lambda. +@Override +public Iterable asArguments() { +return asList(p.property(RUN_SINGLE_JVM_ARGS).toString().split(" ")); +} }); } je.setStandardInput(System.in); - 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
[netbeans] branch master updated (e3711b1 -> 418b01c)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git. from e3711b1 Merge pull request #3372 from mbien/permgen add 418b01c Options panel use default colors in gtk laf No new revisions were added by this update. Summary of changes: .../src/org/netbeans/swing/plaf/LFCustoms.java | 7 ++ .../org/netbeans/swing/plaf/gtk/GtkLFCustoms.java | 5 + .../netbeans/swing/plaf/metal/MetalLFCustoms.java | 3 +++ .../swing/plaf/nimbus/NimbusLFCustoms.java | 4 platform/options.api/nbproject/project.properties | 2 +- .../org/netbeans/modules/options/OptionsPanel.java | 25 +++--- 6 files changed, 33 insertions(+), 13 deletions(-) - 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
[netbeans] branch master updated: Remove jruby related YAML parser libs
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 29b50ea Remove jruby related YAML parser libs 29b50ea is described below commit 29b50ea4ab6aad8d5105f7bb0e07baf2afc397b8 Author: Laszlo Kishalmi AuthorDate: Fri Nov 26 15:10:12 2021 -0800 Remove jruby related YAML parser libs --- ide/libs.bytelist/build.xml| 24 - ide/libs.bytelist/external/binaries-list | 17 - .../external/bytelist-1.0.15-license.txt | 95 --- ide/libs.bytelist/manifest.mf | 4 - .../nbproject/org-netbeans-libs-bytelist.sig | 141 ide/libs.bytelist/nbproject/project.properties | 20 - ide/libs.bytelist/nbproject/project.xml| 55 -- .../org/netbeans/libs/bytelist/Bundle.properties | 22 - ide/libs.jvyamlb/build.xml | 24 - ide/libs.jvyamlb/external/binaries-list| 17 - .../external/jvyamlb-0.2.6-license.txt | 26 - ide/libs.jvyamlb/manifest.mf | 4 - .../nbproject/org-netbeans-libs-jvyamlb.sig| 773 - ide/libs.jvyamlb/nbproject/project.properties | 21 - ide/libs.jvyamlb/nbproject/project.xml | 66 -- .../org/netbeans/libs/jvyamlb/Bundle.properties| 22 - nbbuild/cluster.properties | 2 - 17 files changed, 1333 deletions(-) diff --git a/ide/libs.bytelist/build.xml b/ide/libs.bytelist/build.xml deleted file mode 100644 index 4125b64..000 --- a/ide/libs.bytelist/build.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/ide/libs.bytelist/external/binaries-list b/ide/libs.bytelist/external/binaries-list deleted file mode 100644 index e3ec14a..000 --- a/ide/libs.bytelist/external/binaries-list +++ /dev/null @@ -1,17 +0,0 @@ -# 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. -80294E59315B314D57782DC37F983AE5B29C2E4C org.jruby.extras:bytelist:1.0.15 \ No newline at end of file diff --git a/ide/libs.bytelist/external/bytelist-1.0.15-license.txt b/ide/libs.bytelist/external/bytelist-1.0.15-license.txt deleted file mode 100644 index ac9148d..000 --- a/ide/libs.bytelist/external/bytelist-1.0.15-license.txt +++ /dev/null @@ -1,95 +0,0 @@ -Name: Bytelist -Version: 1.0.15 -Description: The ByteList library from JRuby. -License: EPL-v10 -Origin: https://github.com/jruby/bytelist -Comment: This library was wrongly reported in Maven as released under the MIT license. Version 1.0.15 is licensed under the GPL 3, LGPL 3 or EPL 1.0 see: https://github.com/jruby/bytelist/commit/9a0d9de4d21f6fc4342f946166d43cf3bf8b798a or https://github.com/jruby/bytelist/blob/bytelist-1.0.15/src/org/jruby/util/ByteList.java - - -Eclipse Public License - v 1.0 - -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and - -b) in the case of each subsequent Contributor: - -i) changes to the Program, and - -ii) additions to the Program; - -where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. -
[netbeans] annotated tag 12.6 updated (9cacf1f -> d93a984)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to annotated tag 12.6 in repository https://gitbox.apache.org/repos/asf/netbeans.git. *** WARNING: tag 12.6 was modified! *** from 9cacf1f (commit) to d93a984 (tag) tagging 9cacf1fd305b775b176576c8b633b10b73524861 (commit) replaces 12.6-rc2 by Laszlo Kishalmi on Mon Nov 29 09:30:00 2021 -0800 - Log - Apache NetBeans 12.6 --- No new revisions were added by this update. Summary of changes: - 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
[netbeans] branch master updated: Fixed typo: runSingle presence depends on runClassName property.
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 2de3370 Fixed typo: runSingle presence depends on runClassName property. 2de3370 is described below commit 2de3370040ec4ea3ebe8e6c0510ba7de239a8cf8 Author: Svata Dedic AuthorDate: Fri Nov 26 13:33:49 2021 +0100 Fixed typo: runSingle presence depends on runClassName property. --- .../org/netbeans/modules/gradle/tooling/NetBeansRunSinglePlugin.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NetBeansRunSinglePlugin.java b/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NetBeansRunSinglePlugin.java index c112a09..5663c01 100644 --- a/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NetBeansRunSinglePlugin.java +++ b/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NetBeansRunSinglePlugin.java @@ -44,7 +44,7 @@ class NetBeansRunSinglePlugin implements Plugin { project.afterEvaluate(p -> { if (p.getPlugins().hasPlugin("java") && (project.getTasks().findByPath(RUN_SINGLE_TASK) == null) -&& project.hasProperty(RUN_SINGLE_CWD)){ +&& project.hasProperty(RUN_SINGLE_MAIN)){ addTask(p); } if(p.hasProperty(RUN_SINGLE_JVM_ARGS)) { - 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
[netbeans] branch master updated: Small improvement on GitBranchHash which is able to get at least the hash of a detached HEAD
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 7c345e9 Small improvement on GitBranchHash which is able to get at least the hash of a detached HEAD 7c345e9 is described below commit 7c345e94105289f290b0c6d96f33cdd1b99d477b Author: Laszlo Kishalmi AuthorDate: Thu Nov 25 13:48:48 2021 -0800 Small improvement on GitBranchHash which is able to get at least the hash of a detached HEAD --- .../antsrc/org/netbeans/nbbuild/GitBranchHash.java | 33 ++ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/nbbuild/antsrc/org/netbeans/nbbuild/GitBranchHash.java b/nbbuild/antsrc/org/netbeans/nbbuild/GitBranchHash.java index 2d53fe8..2418f4b 100644 --- a/nbbuild/antsrc/org/netbeans/nbbuild/GitBranchHash.java +++ b/nbbuild/antsrc/org/netbeans/nbbuild/GitBranchHash.java @@ -79,19 +79,25 @@ public class GitBranchHash extends Task { if (headroot != null && Files.size(headroot) > 0l) { List lines = Files.readAllLines(headroot); String line = lines.get(0); -String revLink = line.substring(line.indexOf(':')+1).trim(); -branch = revLink.substring(revLink.lastIndexOf('/')+1).trim(); -Path revPath = headroot.getParent().resolve(revLink); -if(Files.isRegularFile(revPath) && Files.size(revPath) > 0l) { -List revlines = Files.readAllLines(revPath); -String revline = revlines.get(0); -if(revline.length()>=12){ -hash = revline.trim(); +if (!line.contains(":") && (line.length() == 40)) { +//Detached HEAD +hash = line; +log("Detached HEAD please specify '" + branchProperty + "' externally.", Project.MSG_WARN); +} else { +String revLink = line.substring(line.indexOf(':')+1).trim(); +branch = revLink.substring(revLink.lastIndexOf('/')+1).trim(); +Path revPath = headroot.getParent().resolve(revLink); +if(Files.isRegularFile(revPath) && Files.size(revPath) > 0l) { +List revlines = Files.readAllLines(revPath); +String revline = revlines.get(0); +if(revline.length()>=12){ +hash = revline.trim(); +} else { +log("no content in " + revPath, Project.MSG_WARN); +} } else { -log("no content in " + revPath, Project.MSG_WARN); +log("unable to find revision info for " + revPath, Project.MSG_WARN); } -} else { -log("unable to find revision info for " + revPath, Project.MSG_WARN); } } else { log("No HEAD found starting from " + file, Project.MSG_WARN); @@ -99,11 +105,14 @@ public class GitBranchHash extends Task { } catch(IOException ex) { log("Could not read " + headroot + ": " + ex, Project.MSG_WARN); } -if (!branch.isEmpty() && !hash.isEmpty()) { +if (!branch.isEmpty()) { getProject().setNewProperty(branchProperty, branch); +} +if (!hash.isEmpty()) { getProject().setNewProperty(hashProperty, hash); } } } + - 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
[netbeans] annotated tag 12.6-rc3 updated (9cacf1f -> ac8b481)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to annotated tag 12.6-rc3 in repository https://gitbox.apache.org/repos/asf/netbeans.git. *** WARNING: tag 12.6-rc3 was modified! *** from 9cacf1f (commit) to ac8b481 (tag) tagging 9cacf1fd305b775b176576c8b633b10b73524861 (commit) replaces 12.6-rc2 by Laszlo Kishalmi on Thu Nov 25 13:11:38 2021 -0800 - Log - Apache NetBeans 12.6-rc3 --- No new revisions were added by this update. Summary of changes: - 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
[netbeans] branch master updated: Fixed some lost-in-translation issues with Gradle Tooling
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 5fb2d4a Fixed some lost-in-translation issues with Gradle Tooling 5fb2d4a is described below commit 5fb2d4af96d8a62812f8d7613bdf61cb80d24b67 Author: Laszlo Kishalmi AuthorDate: Mon Nov 22 11:10:35 2021 -0800 Fixed some lost-in-translation issues with Gradle Tooling --- .../gradle/tooling/NbProjectInfoBuilder.java | 2 +- .../gradle/tooling/NetBeansExplodedWarPlugin.java | 16 +++--- .../gradle/tooling/NetBeansRunSinglePlugin.java| 61 ++ 3 files changed, 37 insertions(+), 42 deletions(-) diff --git a/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java b/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java index 258afb4..73de19e 100644 --- a/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java +++ b/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java @@ -480,7 +480,7 @@ class NbProjectInfoBuilder { long time_report = System.currentTimeMillis(); model.registerPerf(depPrefix + "collect", time_report - time_collect); -model.getInfo().put(configPrefix + "components", storeSet(componentIds)); +model.getInfo().put(configPrefix + "components", componentIds); model.getInfo().put(configPrefix + "projects", projectNames); model.getInfo().put(configPrefix + "files", fileDeps); model.getInfo().put(configPrefix + "unresolved", unresolvedIds); diff --git a/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NetBeansExplodedWarPlugin.java b/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NetBeansExplodedWarPlugin.java index c5fd19f..fe847d5 100644 --- a/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NetBeansExplodedWarPlugin.java +++ b/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NetBeansExplodedWarPlugin.java @@ -22,7 +22,6 @@ package org.netbeans.modules.gradle.tooling; import java.io.File; import org.gradle.api.Plugin; import org.gradle.api.Project; -import org.gradle.api.Task; import org.gradle.api.tasks.Sync; import org.gradle.api.tasks.bundling.War; @@ -43,13 +42,14 @@ class NetBeansExplodedWarPlugin implements Plugin { } private void addTask(Project p) { -War war = (War) p.property("war"); -Sync sync = new Sync(); -sync.setGroup("build"); -sync.into(new File(new File(p.getBuildDir(), "exploded"), war.getArchiveFileName().get())); -sync.with(war); -Task explodedWar = p.getTasks().create(EXPLODED_WAR_TASK, Sync.class, sync); -war.getDependsOn().add(explodedWar); +War war = (War) p.getTasks().getByName("war"); +p.getTasks().register(EXPLODED_WAR_TASK, Sync.class, (sync) -> { +sync.setGroup("build"); +sync.into(new File(new File(p.getBuildDir(), "exploded"), war.getArchiveFileName().get())); +sync.with(war); + +}); +war.dependsOn(EXPLODED_WAR_TASK); } } diff --git a/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NetBeansRunSinglePlugin.java b/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NetBeansRunSinglePlugin.java index 152dcfd..c112a09 100644 --- a/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NetBeansRunSinglePlugin.java +++ b/extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NetBeansRunSinglePlugin.java @@ -20,14 +20,11 @@ package org.netbeans.modules.gradle.tooling; import java.util.ArrayList; -import java.util.Arrays; import static java.util.Arrays.asList; -import java.util.Map; import org.gradle.api.Plugin; import org.gradle.api.Project; import org.gradle.api.tasks.JavaExec; -import org.gradle.api.tasks.SourceSet; -import org.gradle.process.CommandLineArgumentProvider; +import org.gradle.api.tasks.SourceSetContainer; /** * @@ -61,39 +58,37 @@ class NetBeansRunSinglePlugin implements Plugin { } private void addTask(Project project) { -Map sourceSets = (Map) project.property("sourceSets"); +SourceSetContainer sourceSets = project.getExtensions().findByType(SourceSetContainer.class); -JavaExec
[netbeans] branch master updated (07639d1 -> 41155e4)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git. from 07639d1 Merge pull request #3296 from junichi11/netbeans-3362-cls-navigation-inherited-filter new 3e11ed1 Allow downloading external dependencies via http/https new 01c3ccd Update gradle to 7.3 and rewrite netbeans-gradle-tooling in java new 41155e4 Merge pull request #3326 from matthiasblaesing/pr-3322-alt The 6184 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: extide/gradle/build.xml| 28 +- extide/gradle/external/binaries-list |3 +- extide/gradle/external/gradle-6.7-bin-license.txt | 1025 extide/gradle/external/gradle-6.7-bin-notice.txt | 20 - extide/gradle/external/gradle-7.3-bin-license.txt | 428 .../gradle/external/gradle-7.3-bin-notice.txt |0 ...-license.txt => gradle-wrapper-7.3-license.txt} |3 +- extide/gradle/netbeans-gradle-tooling/build.gradle |1 - .../gradle/wrapper/gradle-wrapper.properties |2 +- .../gradle/tooling/NbProjectInfoBuilder.groovy | 577 --- .../tooling/NetBeansExplodedWarPlugin.groovy | 50 - .../org/netbeans/modules/gradle/DebugTooling.java |0 .../netbeans/modules/gradle/api/ModelFetcher.java |0 .../netbeans/modules/gradle/api/NbProjectInfo.java |0 .../netbeans/modules/gradle/tooling/BaseModel.java |0 .../org/netbeans/modules/gradle/tooling/Model.java |0 .../gradle/tooling/NbProjectInfoBuilder.java | 638 .../modules/gradle/tooling/NbProjectInfoModel.java | 25 +- .../gradle/tooling/NetBeansExplodedWarPlugin.java | 56 ++ .../gradle/tooling/NetBeansRunSinglePlugin.java} | 115 +-- .../gradle/tooling/NetBeansToolingPlugin.java |2 +- extide/libs.gradle/external/binaries-list |3 +- .../netbeans/nbbuild/extlibs/DownloadBinaries.java |8 + .../nbbuild/extlibs/VerifyLibsAndLicenses.java |5 + .../org/netbeans/nbbuild/extlibs/ignored-overlaps | 29 +- nbbuild/licenses/Gradle| 998 --- 26 files changed, 1459 insertions(+), 2557 deletions(-) delete mode 100644 extide/gradle/external/gradle-6.7-bin-license.txt delete mode 100644 extide/gradle/external/gradle-6.7-bin-notice.txt create mode 100644 extide/gradle/external/gradle-7.3-bin-license.txt copy php/php.smarty/src/org/netbeans/modules/php/smarty/resources/TplTemplate.tpl => extide/gradle/external/gradle-7.3-bin-notice.txt (100%) rename extide/gradle/external/{gradle-wrapper-4.10.2-license.txt => gradle-wrapper-7.3-license.txt} (99%) delete mode 100644 extide/gradle/netbeans-gradle-tooling/src/main/groovy/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.groovy delete mode 100644 extide/gradle/netbeans-gradle-tooling/src/main/groovy/org/netbeans/modules/gradle/tooling/NetBeansExplodedWarPlugin.groovy rename extide/gradle/netbeans-gradle-tooling/src/main/{groovy => java}/org/netbeans/modules/gradle/DebugTooling.java (100%) rename extide/gradle/netbeans-gradle-tooling/src/main/{groovy => java}/org/netbeans/modules/gradle/api/ModelFetcher.java (100%) rename extide/gradle/netbeans-gradle-tooling/src/main/{groovy => java}/org/netbeans/modules/gradle/api/NbProjectInfo.java (100%) rename extide/gradle/netbeans-gradle-tooling/src/main/{groovy => java}/org/netbeans/modules/gradle/tooling/BaseModel.java (100%) rename extide/gradle/netbeans-gradle-tooling/src/main/{groovy => java}/org/netbeans/modules/gradle/tooling/Model.java (100%) create mode 100644 extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.java rename extide/gradle/netbeans-gradle-tooling/src/main/{groovy => java}/org/netbeans/modules/gradle/tooling/NbProjectInfoModel.java (72%) create mode 100644 extide/gradle/netbeans-gradle-tooling/src/main/java/org/netbeans/modules/gradle/tooling/NetBeansExplodedWarPlugin.java rename extide/gradle/netbeans-gradle-tooling/src/main/{groovy/org/netbeans/modules/gradle/tooling/NetBeansRunSinglePlugin.groovy => java/org/netbeans/modules/gradle/tooling/NetBeansRunSinglePlugin.java} (59%) rename extide/gradle/netbeans-gradle-tooling/src/main/{groovy => java}/org/netbeans/modules/gradle/tooling/NetBeansToolingPlugin.java (98%) - 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
[netbeans] branch master updated: [NETBEANS-5846] Minimal support of java-platfom Gradle projects.
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 224dfc0 [NETBEANS-5846] Minimal support of java-platfom Gradle projects. 224dfc0 is described below commit 224dfc07b432249e216c170be32130cc66d12318 Author: Laszlo Kishalmi AuthorDate: Mon Nov 1 09:13:12 2021 -0700 [NETBEANS-5846] Minimal support of java-platfom Gradle projects. --- .../gradle/tooling/NbProjectInfoBuilder.groovy | 94 +- .../gradle/GradleProjectErrorNotifications.java| 2 +- .../gradle/api/GradleBaseProjectBuilder.java | 14 +++- .../modules/gradle/api/GradleConfiguration.java| 5 +- .../modules/gradle/nodes/ConfigurationsNode.java | 32 .../gradle/java/JavaSEProjectIconProvider.java | 8 ++ 6 files changed, 115 insertions(+), 40 deletions(-) diff --git a/extide/gradle/netbeans-gradle-tooling/src/main/groovy/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.groovy b/extide/gradle/netbeans-gradle-tooling/src/main/groovy/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.groovy index ad7a61b..3e71104 100644 --- a/extide/gradle/netbeans-gradle-tooling/src/main/groovy/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.groovy +++ b/extide/gradle/netbeans-gradle-tooling/src/main/groovy/org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.groovy @@ -29,7 +29,8 @@ import org.gradle.api.artifacts.ProjectDependency import org.gradle.api.artifacts.ResolvedDependency import org.gradle.api.artifacts.ResolveException import org.gradle.api.artifacts.FileCollectionDependency -import org.gradle.api.artifacts.ExternalModuleDependency +import org.gradle.api.artifacts.ModuleDependency +import org.gradle.api.artifacts.Dependency import org.gradle.api.artifacts.component.ModuleComponentSelector import org.gradle.api.artifacts.component.ProjectComponentSelector import org.gradle.api.artifacts.result.ArtifactResult @@ -51,10 +52,53 @@ import org.gradle.util.VersionNumber */ class NbProjectInfoBuilder { def NB_PREFIX = 'netbeans.' -def CONFIG_EXCLUDES = ['archives', 'checkstyle', 'pmd', 'jacocoAgent', \ -'jacocoAnt', 'findbugs', 'findbugsPlugins', 'jdepend', 'codenarc', \ -'classycle'] - +def CONFIG_EXCLUDES = [\ +'archives', +'checkstyle', +'classycle', +'codenarc', +'findbugs', +'findbugsPlugins', +'jacocoAgent', +'jacocoAnt', +'jdepend', +'pmd', +] + +def RECOGNISED_PLUGINS = [ +'antlr', +'application', +'base', +'checkstyle', +'com.android.application', +'com.android.library', +'com.github.lkishalmi.gatling', +'distribution', +'ear', +'findbugs', +'groovy', +'groovy-base', +'io.micronaut.application', +'ivy-publish', +'jacoco', +'java', +'java-base', +'java-library-distribution', +'java-platform', +'maven', +'maven-publish', +'org.jetbrains.kotlin.js', +'org.jetbrains.kotlin.jvm', +'org.jetbrains.kotlin.android', +'org.springframework.boot', +'osgi', +'play', +'pmd', +'scala', +'scala-base', +'war', +] + final Project project; final VersionNumber gradleVersion; @@ -147,18 +191,7 @@ class NbProjectInfoBuilder { private void detectPlugins(NbProjectInfoModel model) { long time = System.currentTimeMillis() Set plugins = new HashSet<>(); -for (String plugin: ['base', 'java-base', 'java', 'war', \ -'scala-base', 'scala', 'groovy-base', 'groovy',\ -'distribution', 'application', 'maven', 'osgi', \ -'jacoco', 'checkstyle', 'pmd', 'findbugs', 'ear', \ -'play', 'java-library-distribution', 'maven-publish', -'ivy-publish', 'antlr', \ -'org.springframework.boot', \ -'com.github.lkishalmi.gatling', \ -'com.android.library', 'com.android.application', -'org.jetbrains.kotlin.android', 'org.jetbrains.kotlin.js', -'org.jetbrains.kotlin.jvm', -'io.micronaut.application']) { +for (String plugin: RECOGNISED_PLUGINS) { if (project.plugins.hasPlugin(plugin)) { plugins.add(plugin); } @@ -341,10 +374,18 @@ class NbProjectInfoBuilder { } //visibleConfigurations = visibleConfigurations.findAll() { resolvable(it) } visibleConfigurations.each() { -def componentIds = [] +def componentIds = new HashSet()
[netbeans] branch master updated: [NETBEANS-6004] Give info when the IDE's Java is not compatible with Gradle
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 3878d56 [NETBEANS-6004] Give info when the IDE's Java is not compatible with Gradle 3878d56 is described below commit 3878d562a1b88a700584eefe9f99b8c440550755 Author: Laszlo Kishalmi AuthorDate: Sat Nov 13 12:37:51 2021 -0800 [NETBEANS-6004] Give info when the IDE's Java is not compatible with Gradle --- .../gradle/GradleJavaCompatProblemsProvider.java | 96 ++ .../api/execute/GradleDistributionManager.java | 18 +++- 2 files changed, 110 insertions(+), 4 deletions(-) diff --git a/extide/gradle/src/org/netbeans/modules/gradle/GradleJavaCompatProblemsProvider.java b/extide/gradle/src/org/netbeans/modules/gradle/GradleJavaCompatProblemsProvider.java new file mode 100644 index 000..52c7d2e --- /dev/null +++ b/extide/gradle/src/org/netbeans/modules/gradle/GradleJavaCompatProblemsProvider.java @@ -0,0 +1,96 @@ +/* + * 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.gradle; + +import java.beans.PropertyChangeEvent; +import java.beans.PropertyChangeListener; +import java.beans.PropertyChangeSupport; +import java.util.Collection; +import java.util.Collections; +import org.netbeans.api.project.Project; +import org.netbeans.modules.gradle.api.NbGradleProject; +import org.netbeans.modules.gradle.api.execute.GradleDistributionManager; +import org.netbeans.modules.gradle.api.execute.GradleDistributionManager.GradleDistribution; +import org.netbeans.modules.gradle.spi.execute.GradleDistributionProvider; +import org.netbeans.spi.project.ProjectServiceProvider; +import org.netbeans.spi.project.ui.ProjectProblemsProvider; +import static org.netbeans.spi.project.ui.ProjectProblemsProvider.PROP_PROBLEMS; +import org.openide.util.NbBundle; +import org.openide.util.NbBundle.Messages; + +/** + * + * @author lkishalmi + */ +@ProjectServiceProvider(service = ProjectProblemsProvider.class, projectType = NbGradleProject.GRADLE_PROJECT_TYPE) +public final class GradleJavaCompatProblemsProvider implements ProjectProblemsProvider { + +private final PropertyChangeSupport support = new PropertyChangeSupport(this); +private final Project project; +private final PropertyChangeListener listener; + +public GradleJavaCompatProblemsProvider(Project project) { +this.project = project; +listener = (PropertyChangeEvent evt) -> { +if (NbGradleProject.PROP_PROJECT_INFO.equals(evt.getPropertyName())) { +support.firePropertyChange(PROP_PROBLEMS, null, null); +} +}; +NbGradleProject.addPropertyChangeListener(project, listener); +} + +@Override +public void addPropertyChangeListener(PropertyChangeListener listener) { +support.addPropertyChangeListener(listener); +} + +@Override +public void removePropertyChangeListener(PropertyChangeListener listener) { +support.removePropertyChangeListener(listener); +} + +@Messages({ +"LBL_JavaVersionMismatch=Unsupported Java Runtime", +"# {0} - Java Version", +"# {1} - Supported Java Version", +"# {2} - Required Gradle Version", +"# {3} - Forced Gradle Version", +"TXT_JavaVersionMismatch=The IDE is running on Java {0} that is not supported by Gradle {2}.\n" ++ "The IDE will attempt to use Gradle {3} to gather the project information.\n\n" ++ "Either upgrade your Gradle version on your project or run the IDE on " ++ "Java {1} to avoid this problem!" +}) +@Override +public Collection getProblems() { +GradleDistributionProvider pvd = project.getLookup().lookup(GradleDistributionProvider.class); +if (pvd != null) { +GradleDistribution dist = pvd.getGradleDistribution(); +if ((dist != null) && !dist.isCompatibleWithSystemJava()) {
[netbeans] branch master updated (0c8e413 -> e472795)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git. from 0c8e413 Merge pull request #3208 from mbien/hints_spi_cleanup new a09ec17 Gradle projects should recognize Kotlin source directories. new 2ca5798 Changes requested on PR review. new e472795 Merge pull request #2541 from jpeseknb/gradle-kotlin The 6036 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/gradle/tooling/NbProjectInfoBuilder.groovy | 17 ++--- java/gradle.java/apichanges.xml | 15 +++ .../modules/gradle/java/JavaActionProvider.java | 2 +- .../gradle/java/api/GradleJavaProjectBuilder.java | 7 ++- .../modules/gradle/java/api/GradleJavaSourceSet.java| 13 - .../gradle/java/classpath/GradleSourcesImpl.java| 8 ++-- .../modules/gradle/java/nodes/SourcesNodeFactory.java | 1 + .../gradle/java/queries/GradleSourceForBinary.java | 2 +- .../gradle/java/queries/GradleTestForSourceImpl.java| 2 +- 9 files changed, 57 insertions(+), 10 deletions(-) - 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
[netbeans] branch master updated: Fix wrong Groovy library name
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 0aaf5b5 Fix wrong Groovy library name 0aaf5b5 is described below commit 0aaf5b53c4dc31bcd98f4a366a46bef788ba08cb Author: José Contreras AuthorDate: Thu Oct 14 14:32:11 2021 -0500 Fix wrong Groovy library name --- .../src/org/netbeans/modules/libs/groovy/Bundle.properties| 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groovy/libs.groovy/src/org/netbeans/modules/libs/groovy/Bundle.properties b/groovy/libs.groovy/src/org/netbeans/modules/libs/groovy/Bundle.properties index d3a0a08..4981faf 100644 --- a/groovy/libs.groovy/src/org/netbeans/modules/libs/groovy/Bundle.properties +++ b/groovy/libs.groovy/src/org/netbeans/modules/libs/groovy/Bundle.properties @@ -16,5 +16,5 @@ # under the License. OpenIDE-Module-Name=Groovy Binaries -groovy=Groovy 2.5.11 -groovy-ant=Groovy Ant 2.5.11 +groovy=Groovy 3.0.8 +groovy-ant=Groovy Ant 3.0.8 - 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
[netbeans] branch master updated (835f0fe -> 2a8722c)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git. from 835f0fe Merge pull request #3245 from lkishalmi/use-snakeyaml-parser-improved add 2a8722c [NETBEANS-6008] Update FlatLaf from 1.5 to 1.6.1 No new revisions were added by this update. Summary of changes: platform/libs.flatlaf/external/binaries-list | 2 +- .../external/{flatlaf-1.5-license.txt => flatlaf-1.6.1-license.txt} | 4 ++-- platform/libs.flatlaf/nbproject/project.properties| 2 +- platform/libs.flatlaf/nbproject/project.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) rename platform/libs.flatlaf/external/{flatlaf-1.5-license.txt => flatlaf-1.6.1-license.txt} (99%) - 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
[netbeans] branch master updated (1c4e68a -> 835f0fe)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git. from 1c4e68a jackpot sourceVersion() fix for java 8 and newer. new 4fdface Added snakeyaml-engine 2.3 as a library project new a6ba4ab Replace JRuby YAML parser to SnakeYaml new cae021b Made the new parser work against the tests new c3e2a02 Working YAML Parser without auto-recovery. new 2e9400a Made the YAML parser recover from errors. new 3b2b6c8 Added unittest for YamlSection. new 835f0fe Merge pull request #3245 from lkishalmi/use-snakeyaml-parser-improved The 6014 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: ide/languages.yaml/nbproject/project.xml | 15 +- .../modules/languages/yaml/YamlParser.java | 277 ++- .../modules/languages/yaml/YamlParserResult.java | 91 ++- .../modules/languages/yaml/YamlScanner.java| 300 + .../modules/languages/yaml/YamlSection.java| 299 .../languages/yaml/YamlSemanticAnalyzer.java | 99 ++- .../modules/languages/yaml/YamlStructureItem.java | 200 ++ .../test/unit/data/testfiles/error.yaml.errors | 2 +- .../test/unit/data/testfiles/error2.yaml.errors| 2 +- .../test/unit/data/testfiles/error3.yaml.errors| 2 +- .../test/unit/data/testfiles/error4.yaml | 7 + .../test/unit/data/testfiles/error4.yaml.errors| 1 + .../unit/data/testfiles/fixture3.yml.structure | 2 - .../test/unit/data/testfiles/test5.yaml.structure | 12 +- .../modules/languages/yaml/YamlParserTest.java | 48 ++-- .../modules/languages/yaml/YamlSectionTest.java| 259 ++ ide/libs.snakeyaml_engine/build.xml| 24 ++ ide/libs.snakeyaml_engine/external/binaries-list | 17 ++ .../external/snakeyaml-engine-2.3-license.txt | 207 ++ ide/libs.snakeyaml_engine/manifest.mf | 4 + .../nbproject/project.properties | 21 ++ ide/libs.snakeyaml_engine/nbproject/project.xml| 38 +++ .../libs/snakeyaml_engine/Bundle.properties| 22 ++ nbbuild/cluster.properties | 1 + 24 files changed, 1280 insertions(+), 670 deletions(-) create mode 100644 ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlSection.java create mode 100644 ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlStructureItem.java create mode 100644 ide/languages.yaml/test/unit/data/testfiles/error4.yaml create mode 100644 ide/languages.yaml/test/unit/data/testfiles/error4.yaml.errors create mode 100644 ide/languages.yaml/test/unit/src/org/netbeans/modules/languages/yaml/YamlSectionTest.java create mode 100644 ide/libs.snakeyaml_engine/build.xml create mode 100644 ide/libs.snakeyaml_engine/external/binaries-list create mode 100644 ide/libs.snakeyaml_engine/external/snakeyaml-engine-2.3-license.txt create mode 100644 ide/libs.snakeyaml_engine/manifest.mf create mode 100644 ide/libs.snakeyaml_engine/nbproject/project.properties create mode 100644 ide/libs.snakeyaml_engine/nbproject/project.xml create mode 100644 ide/libs.snakeyaml_engine/src/org/netbeans/libs/snakeyaml_engine/Bundle.properties - 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
[netbeans] 04/06: Working YAML Parser without auto-recovery.
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a commit to branch use-snakeyaml-parser-improved in repository https://gitbox.apache.org/repos/asf/netbeans.git commit c3e2a0293142578085cc5b8853b75945063efe74 Author: Laszlo Kishalmi AuthorDate: Tue Oct 12 18:10:41 2021 -0700 Working YAML Parser without auto-recovery. --- .../modules/languages/yaml/YamlParser.java | 26 +++ .../modules/languages/yaml/YamlParserResult.java | 2 +- .../modules/languages/yaml/YamlSection.java| 81 ++ .../test/unit/data/testfiles/error3.yaml.errors| 2 +- .../test/unit/data/testfiles/error4.yaml | 7 ++ .../test/unit/data/testfiles/error4.yaml.errors| 1 + .../modules/languages/yaml/YamlParserTest.java | 4 ++ 7 files changed, 91 insertions(+), 32 deletions(-) diff --git a/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlParser.java b/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlParser.java index 01bef63..ff230f4 100644 --- a/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlParser.java +++ b/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlParser.java @@ -38,7 +38,6 @@ import org.netbeans.modules.parsing.api.Task; import org.netbeans.modules.parsing.spi.ParseException; import org.netbeans.modules.parsing.spi.SourceModificationEvent; import org.openide.util.NbBundle; -import org.snakeyaml.engine.v2.exceptions.MarkedYamlEngineException; import org.snakeyaml.engine.v2.exceptions.ParserException; import org.snakeyaml.engine.v2.exceptions.ScannerException; @@ -90,7 +89,7 @@ public class YamlParser extends org.netbeans.modules.parsing.spi.Parser { } private YamlParserResult resultForTooLargeFile(Snapshot snapshot) { -YamlParserResult result = new YamlParserResult(snapshot, false); +YamlParserResult result = new YamlParserResult(snapshot); // FIXME this can violate contract of DefaultError (null fo) DefaultError error = new DefaultError(null, NbBundle.getMessage(YamlParser.class, "TooLarge"), null, snapshot.getSource().getFileObject(), 0, 0, Severity.WARNING); @@ -177,7 +176,7 @@ public class YamlParser extends org.netbeans.modules.parsing.spi.Parser { replaceCommonSpecialCharacters(sb); //source = replaceInlineRegexBrackets(source); -YamlParserResult result = new YamlParserResult(snapshot, false); +YamlParserResult result = new YamlParserResult(snapshot); Deque sources = new LinkedList<>(); sources.push(new YamlSection(sb.toString())); @@ -189,22 +188,13 @@ public class YamlParser extends org.netbeans.modules.parsing.spi.Parser { result.addStructure(items); } catch (ScannerException se) { result.addError(section.processScannerException(snapshot, se)); -YamlSection after = section.after(se.getProblemMark().get().getIndex()); -YamlSection before = section.before(se.getContextMark().get().getIndex()); -if (!after.isEmpty()) sources.push(after); -if (!before.isEmpty()) sources.push(before); -if ((before.getLength() + after.getLength()) == section.getLength()) { -LOGGER.info("Chanche to loop forever"); -} +//YamlSection after = section.after(se.getProblemMark().get().getIndex()); +//YamlSection before = section.before(se.getContextMark().get().getIndex()); +//if (!after.isEmpty()) sources.push(after); +//if (!before.isEmpty()) sources.push(before); } catch (ParserException pe ){ result.addError(section.processParserException(snapshot, pe)); -YamlSection after = section.after(pe.getProblemMark().get().getIndex()); -YamlSection before = section.before(pe.getProblemMark().get().getIndex()); -if (!after.isEmpty()) sources.push(after); -if (!before.isEmpty()) sources.push(before); -if ((before.getLength() + after.getLength()) == section.getLength()) { -LOGGER.info("Chanche to loop forever"); -} +//sources.addAll(section.splitOnParserException(pe)); } catch (Exception ex) { String message = ex.getMessage(); if (message != null && message.length() > 0) { @@ -291,7 +281,7 @@ public class YamlParser extends org.netbeans.modules.parsing.spi.Parser { lastResult = parse(source, snapshot); } catch (Exception ioe) { -lastResult = new YamlParserResult(snapshot, false); +lastResult = new YamlParserResult(snapshot); } } } diff --git a/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlParserResu
[netbeans] 02/06: Replace JRuby YAML parser to SnakeYaml
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a commit to branch use-snakeyaml-parser-improved in repository https://gitbox.apache.org/repos/asf/netbeans.git commit a6ba4ab4ad16a8e85b537ef19a3cfe2834c7 Author: Laszlo Kishalmi AuthorDate: Mon Oct 4 23:21:19 2021 -0700 Replace JRuby YAML parser to SnakeYaml --- ide/languages.yaml/nbproject/project.xml | 15 +- .../modules/languages/yaml/YamlParser.java | 145 ++-- .../modules/languages/yaml/YamlParserResult.java | 60 +-- .../modules/languages/yaml/YamlScanner.java| 193 - .../languages/yaml/YamlSemanticAnalyzer.java | 84 +++-- 5 files changed, 86 insertions(+), 411 deletions(-) diff --git a/ide/languages.yaml/nbproject/project.xml b/ide/languages.yaml/nbproject/project.xml index 2941904..09f58a9 100644 --- a/ide/languages.yaml/nbproject/project.xml +++ b/ide/languages.yaml/nbproject/project.xml @@ -35,21 +35,12 @@ -org.netbeans.libs.bytelist + org.netbeans.libs.snakeyaml_engine -1 -0.1 - - - -org.netbeans.libs.jvyamlb - - - -1 -0.2.2 +2 +2.3 diff --git a/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlParser.java b/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlParser.java index 6b6d85b..86db263 100644 --- a/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlParser.java +++ b/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlParser.java @@ -18,30 +18,14 @@ */ package org.netbeans.modules.languages.yaml; -import java.io.ByteArrayOutputStream; -import java.io.OutputStreamWriter; import java.util.ArrayList; import java.util.Collections; -import java.util.Iterator; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.swing.event.ChangeListener; -import org.jruby.util.ByteList; -import org.jvyamlb.Composer; -import org.jvyamlb.ParserImpl; -import org.jvyamlb.PositioningComposerImpl; -import org.jvyamlb.PositioningParserImpl; -import org.jvyamlb.PositioningScannerImpl; -import org.jvyamlb.ResolverImpl; -import org.jvyamlb.YAMLConfig; -import org.jvyamlb.events.Event; -import org.jvyamlb.exceptions.PositionedComposerException; -import org.jvyamlb.exceptions.PositionedParserException; -import org.jvyamlb.exceptions.PositionedScannerException; -import org.jvyamlb.nodes.Node; import org.netbeans.api.lexer.Token; import org.netbeans.api.lexer.TokenHierarchy; import org.netbeans.api.lexer.TokenId; @@ -54,6 +38,12 @@ import org.netbeans.modules.parsing.spi.ParseException; import org.netbeans.modules.parsing.spi.Parser; import org.netbeans.modules.parsing.spi.SourceModificationEvent; import org.openide.util.NbBundle; +import org.snakeyaml.engine.v2.api.LoadSettings; +import org.snakeyaml.engine.v2.composer.Composer; +import org.snakeyaml.engine.v2.nodes.Node; +import org.snakeyaml.engine.v2.parser.ParserImpl; +import org.snakeyaml.engine.v2.scanner.ScannerImpl; +import org.snakeyaml.engine.v2.scanner.StreamReader; /** * Parser for YAML. Delegates to the YAML parser shipped with JRuby (jvyamlb) @@ -103,7 +93,7 @@ public class YamlParser extends Parser { } private YamlParserResult resultForTooLargeFile(Snapshot snapshot) { -YamlParserResult result = new YamlParserResult(Collections.emptyList(), this, snapshot, false, null, null); +YamlParserResult result = new YamlParserResult(Collections.emptyList(), this, snapshot, false); // FIXME this can violate contract of DefaultError (null fo) DefaultError error = new DefaultError(null, NbBundle.getMessage(YamlParser.class, "TooLarge"), null, snapshot.getSource().getFileObject(), 0, 0, Severity.WARNING); @@ -203,122 +193,23 @@ public class YamlParser extends Parser { if (isTooLarge(source)) { return resultForTooLargeFile(snapshot); } -ByteList byteList; -int[] byteToUtf8 = null; -int[] utf8toByte = null; - -byte[] bytes = source.getBytes("UTF-8"); // NOI18N -if (bytes.length == source.length()) { -// No position translations necessary - this should be fast -byteList = new ByteList(bytes); -} else { -// There's some encoding happening of unicode characters. -
[netbeans] 01/06: Added snakeyaml-engine 2.3 as a library project
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a commit to branch use-snakeyaml-parser-improved in repository https://gitbox.apache.org/repos/asf/netbeans.git commit 4fdfacecf4fdc2c38631d843cbaae89ea636cc1b Author: Laszlo Kishalmi AuthorDate: Mon Oct 4 07:54:23 2021 -0700 Added snakeyaml-engine 2.3 as a library project --- ide/libs.snakeyaml_engine/build.xml| 24 +++ ide/libs.snakeyaml_engine/external/binaries-list | 17 ++ .../external/snakeyaml-engine-2.3-license.txt | 207 + ide/libs.snakeyaml_engine/manifest.mf | 4 + .../nbproject/project.properties | 21 +++ ide/libs.snakeyaml_engine/nbproject/project.xml| 38 .../libs/snakeyaml_engine/Bundle.properties| 22 +++ nbbuild/cluster.properties | 1 + 8 files changed, 334 insertions(+) diff --git a/ide/libs.snakeyaml_engine/build.xml b/ide/libs.snakeyaml_engine/build.xml new file mode 100644 index 000..0bce4dc --- /dev/null +++ b/ide/libs.snakeyaml_engine/build.xml @@ -0,0 +1,24 @@ + + + + + diff --git a/ide/libs.snakeyaml_engine/external/binaries-list b/ide/libs.snakeyaml_engine/external/binaries-list new file mode 100644 index 000..2b6a948 --- /dev/null +++ b/ide/libs.snakeyaml_engine/external/binaries-list @@ -0,0 +1,17 @@ +# 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. +E6EAAFDC8DEA303778E3459707DA0E3D71E969EF org.snakeyaml:snakeyaml-engine:2.3 diff --git a/ide/libs.snakeyaml_engine/external/snakeyaml-engine-2.3-license.txt b/ide/libs.snakeyaml_engine/external/snakeyaml-engine-2.3-license.txt new file mode 100644 index 000..1dba14a --- /dev/null +++ b/ide/libs.snakeyaml_engine/external/snakeyaml-engine-2.3-license.txt @@ -0,0 +1,207 @@ +Name: snakeyaml-engine +Description: YAML 1.2 parser, reader, writer library +Origin: GitHub +Version: 2.3 +License: Apache-2.0 + + Apache License + Version 2.0, January 2004 +http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the pur
[netbeans] 06/06: Added unittest for YamlSection.
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a commit to branch use-snakeyaml-parser-improved in repository https://gitbox.apache.org/repos/asf/netbeans.git commit 3b2b6c82ebec310198ea4fa5f4f1defcf5732099 Author: Laszlo Kishalmi AuthorDate: Sat Oct 16 11:13:06 2021 -0700 Added unittest for YamlSection. --- .../modules/languages/yaml/YamlSection.java| 57 - .../modules/languages/yaml/YamlSectionTest.java| 259 + 2 files changed, 308 insertions(+), 8 deletions(-) diff --git a/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlSection.java b/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlSection.java index 8ad1ed8..131e7af 100644 --- a/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlSection.java +++ b/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlSection.java @@ -21,6 +21,7 @@ package org.netbeans.modules.languages.yaml; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; +import java.util.Objects; import java.util.Optional; import org.netbeans.modules.csl.api.Severity; import org.netbeans.modules.csl.api.StructureItem; @@ -78,10 +79,10 @@ public class YamlSection { while ((index > 0) && Character.isWhitespace(source.charAt(index))) { index--; } -while ((index > 0) && !Character.isWhitespace(source.charAt(index))) { +while ((index > -1) && !Character.isWhitespace(source.charAt(index))) { index--; } -return before(index); +return before(index + 1); } public YamlSection trimHead() { @@ -228,16 +229,26 @@ public class YamlSection { } } +List split(int a) { +List ret = new LinkedList<>(); +YamlSection before = a < source.length() ? before(a) : trimTail(); +YamlSection after = a > 0 ? after(a) : trimHead(); +if (!after.isEmpty()) { +ret.add(after); +} +if (!before.isEmpty()) { +ret.add(before); +} +return ret; +} + List split(int a, int b) { +if (a == b){ +return split(a); +} List ret = new LinkedList<>(); YamlSection before = before(a); YamlSection after = after(b); -if (before.isEmpty()) { -after = after.trimHead(); -} -if (after.isEmpty()) { -before = before.trimTail(); -} if (!after.isEmpty()) { ret.add(after); } @@ -252,6 +263,36 @@ public class YamlSection { } @Override +public int hashCode() { +int hash = 7; +hash = 79 * hash + this.offset; +hash = 79 * hash + Objects.hashCode(this.source); +return hash; +} + +@Override +public boolean equals(Object obj) { +if (this == obj) { +return true; +} +if (obj == null) { +return false; +} +if (getClass() != obj.getClass()) { +return false; +} +final YamlSection other = (YamlSection) obj; +if (this.offset != other.offset) { +return false; +} +if (!Objects.equals(this.source, other.source)) { +return false; +} +return true; +} + + +@Override public String toString() { return "" + offset + ":" + source; } diff --git a/ide/languages.yaml/test/unit/src/org/netbeans/modules/languages/yaml/YamlSectionTest.java b/ide/languages.yaml/test/unit/src/org/netbeans/modules/languages/yaml/YamlSectionTest.java new file mode 100644 index 000..3940b0e --- /dev/null +++ b/ide/languages.yaml/test/unit/src/org/netbeans/modules/languages/yaml/YamlSectionTest.java @@ -0,0 +1,259 @@ +/* + * 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.languages.yaml; + +import java.util.Iterator; +import java.util.List; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Before; +impor
[netbeans] 03/06: Made the new parser work against the tests
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a commit to branch use-snakeyaml-parser-improved in repository https://gitbox.apache.org/repos/asf/netbeans.git commit cae021baef6c203a6951af77d2aa517fffd0e333 Author: Laszlo Kishalmi AuthorDate: Tue Oct 12 11:44:08 2021 -0700 Made the new parser work against the tests --- .../modules/languages/yaml/YamlParser.java | 167 + .../modules/languages/yaml/YamlParserResult.java | 34 +--- .../modules/languages/yaml/YamlScanner.java| 183 +++ .../modules/languages/yaml/YamlSection.java| 187 +++ .../languages/yaml/YamlSemanticAnalyzer.java | 67 +++ .../modules/languages/yaml/YamlStructureItem.java | 200 + .../test/unit/data/testfiles/error.yaml.errors | 2 +- .../test/unit/data/testfiles/error2.yaml.errors| 2 +- .../test/unit/data/testfiles/error3.yaml.errors| 2 +- .../unit/data/testfiles/fixture3.yml.structure | 2 - .../test/unit/data/testfiles/test5.yaml.structure | 12 +- .../modules/languages/yaml/YamlParserTest.java | 44 +++-- 12 files changed, 553 insertions(+), 349 deletions(-) diff --git a/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlParser.java b/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlParser.java index 86db263..01bef63 100644 --- a/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlParser.java +++ b/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlParser.java @@ -18,8 +18,8 @@ */ package org.netbeans.modules.languages.yaml; -import java.util.ArrayList; -import java.util.Collections; +import java.util.Deque; +import java.util.LinkedList; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; @@ -31,26 +31,23 @@ import org.netbeans.api.lexer.TokenHierarchy; import org.netbeans.api.lexer.TokenId; import org.netbeans.api.lexer.TokenSequence; import org.netbeans.modules.csl.api.Severity; +import org.netbeans.modules.csl.api.StructureItem; import org.netbeans.modules.csl.spi.DefaultError; import org.netbeans.modules.parsing.api.Snapshot; import org.netbeans.modules.parsing.api.Task; import org.netbeans.modules.parsing.spi.ParseException; -import org.netbeans.modules.parsing.spi.Parser; import org.netbeans.modules.parsing.spi.SourceModificationEvent; import org.openide.util.NbBundle; -import org.snakeyaml.engine.v2.api.LoadSettings; -import org.snakeyaml.engine.v2.composer.Composer; -import org.snakeyaml.engine.v2.nodes.Node; -import org.snakeyaml.engine.v2.parser.ParserImpl; -import org.snakeyaml.engine.v2.scanner.ScannerImpl; -import org.snakeyaml.engine.v2.scanner.StreamReader; +import org.snakeyaml.engine.v2.exceptions.MarkedYamlEngineException; +import org.snakeyaml.engine.v2.exceptions.ParserException; +import org.snakeyaml.engine.v2.exceptions.ScannerException; /** * Parser for YAML. Delegates to the YAML parser shipped with JRuby (jvyamlb) * * @author Tor Norbye */ -public class YamlParser extends Parser { +public class YamlParser extends org.netbeans.modules.parsing.spi.Parser { private static final Logger LOGGER = Logger.getLogger(YamlParser.class.getName()); /** @@ -93,7 +90,7 @@ public class YamlParser extends Parser { } private YamlParserResult resultForTooLargeFile(Snapshot snapshot) { -YamlParserResult result = new YamlParserResult(Collections.emptyList(), this, snapshot, false); +YamlParserResult result = new YamlParserResult(snapshot, false); // FIXME this can violate contract of DefaultError (null fo) DefaultError error = new DefaultError(null, NbBundle.getMessage(YamlParser.class, "TooLarge"), null, snapshot.getSource().getFileObject(), 0, 0, Severity.WARNING); @@ -102,68 +99,56 @@ public class YamlParser extends Parser { } // package private for unit tests -static String replacePhpFragments(String source) { -// this is a hack. The right solution would be to create a toplevel language, which -// will have embeded yaml and php. -// This code replaces php fragments with space, because jruby parser fails -// on this. -int startReplace = source.indexOf(" -1) { -int endReplace = result.indexOf("?>", startReplace); -if (endReplace > -1) { -endReplace = endReplace + 1; -StringBuilder spaces = new StringBuilder(endReplace - startReplace); -for (int i = 0; i <= endReplace - startReplace; i++) { -spaces.append(' '); +int endReplace = source.indexOf(endToken, startReplace) + 1; +if (endReplace > startReplace) { +for (int i = startReplace; i <= endReplace; i++) { +source.setCharAt(i, ' '); } -
[netbeans] 05/06: Made the YAML parser recover from errors.
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a commit to branch use-snakeyaml-parser-improved in repository https://gitbox.apache.org/repos/asf/netbeans.git commit 2e9400a80231a4c16325a346d32bf7c3fba29c9c Author: Laszlo Kishalmi AuthorDate: Wed Oct 13 15:50:06 2021 -0700 Made the YAML parser recover from errors. --- .../modules/languages/yaml/YamlParser.java | 55 ++ .../modules/languages/yaml/YamlParserResult.java | 11 - .../modules/languages/yaml/YamlSection.java| 36 +- 3 files changed, 70 insertions(+), 32 deletions(-) diff --git a/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlParser.java b/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlParser.java index ff230f4..9ce1ecf 100644 --- a/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlParser.java +++ b/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlParser.java @@ -18,7 +18,6 @@ */ package org.netbeans.modules.languages.yaml; -import java.util.Deque; import java.util.LinkedList; import java.util.List; import java.util.logging.Level; @@ -103,7 +102,6 @@ public class YamlParser extends org.netbeans.modules.parsing.spi.Parser { if (startReplace == -1) { return; } - while (startReplace > -1) { int endReplace = source.indexOf(endToken, startReplace) + 1; if (endReplace > startReplace) { @@ -178,28 +176,45 @@ public class YamlParser extends org.netbeans.modules.parsing.spi.Parser { YamlParserResult result = new YamlParserResult(snapshot); -Deque sources = new LinkedList<>(); +LinkedList sources = new LinkedList<>(); sources.push(new YamlSection(sb.toString())); +int sourceLength = Integer.MAX_VALUE; +int stallCounter = 0; while (!sources.isEmpty()) { +int len = 0; +for (YamlSection source : sources) { +len += source.length(); +} -YamlSection section = sources.pop(); -try { -List items = section.collectItems(); -result.addStructure(items); -} catch (ScannerException se) { -result.addError(section.processScannerException(snapshot, se)); -//YamlSection after = section.after(se.getProblemMark().get().getIndex()); -//YamlSection before = section.before(se.getContextMark().get().getIndex()); -//if (!after.isEmpty()) sources.push(after); -//if (!before.isEmpty()) sources.push(before); -} catch (ParserException pe ){ -result.addError(section.processParserException(snapshot, pe)); -//sources.addAll(section.splitOnParserException(pe)); -} catch (Exception ex) { -String message = ex.getMessage(); -if (message != null && message.length() > 0) { -result.addError(processError(message, snapshot, 0)); +if (len < sourceLength) { +sourceLength = len; +stallCounter = 0; +} else { +stallCounter++; +} +if (stallCounter < 2) { +YamlSection section = sources.pop(); +try { +List items = section.collectItems(); +result.addStructure(items); +} catch (ScannerException se) { +result.addError(section.processException(snapshot, se)); +for (YamlSection part : section.splitOnException(se)) { +sources.push(part); +} +} catch (ParserException pe ){ +result.addError(section.processException(snapshot, pe)); +for (YamlSection part : section.splitOnException(pe)) { +sources.push(part); +} +} catch (Exception ex) { +String message = ex.getMessage(); +if (message != null && message.length() > 0) { +result.addError(processError(message, snapshot, 0)); +} } +} else { +sources.clear(); } } return result; diff --git a/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlParserResult.java b/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlParserResult.java index 4010e73..08f8b7e 100644 --- a/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlParserResult.java +++ b/ide/languages.yaml/src/org/netbeans/modules/languages/yaml/YamlParserResult.java @@ -41,7 +41,16 @@ public class YamlParserResult extends ParserResult { } public void addError(Error error)
[netbeans] branch use-snakeyaml-parser-improved created (now 3b2b6c8)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to branch use-snakeyaml-parser-improved in repository https://gitbox.apache.org/repos/asf/netbeans.git. at 3b2b6c8 Added unittest for YamlSection. This branch includes the following new commits: new 4fdface Added snakeyaml-engine 2.3 as a library project new a6ba4ab Replace JRuby YAML parser to SnakeYaml new cae021b Made the new parser work against the tests new c3e2a02 Working YAML Parser without auto-recovery. new 2e9400a Made the YAML parser recover from errors. new 3b2b6c8 Added unittest for YamlSection. The 6 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. - 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
[netbeans] branch master updated: [NETBEANS-6107] Bumped Gradle Tooling to 7.3-rc-1 with Java 17 support.
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 35a7889 [NETBEANS-6107] Bumped Gradle Tooling to 7.3-rc-1 with Java 17 support. 35a7889 is described below commit 35a7889a55e6f1a183c3e862e1834231e7033f57 Author: Laszlo Kishalmi AuthorDate: Thu Oct 14 08:51:40 2021 -0700 [NETBEANS-6107] Bumped Gradle Tooling to 7.3-rc-1 with Java 17 support. --- extide/gradle/nbproject/project.xml | 2 +- .../modules/gradle/api/execute/GradleDistributionManager.java | 4 ++-- extide/libs.gradle/external/binaries-list | 2 +- ...ng-api-7.0-license.txt => gradle-tooling-api-7.3-rc-1-license.txt} | 4 ++-- ...ling-api-7.0-notice.txt => gradle-tooling-api-7.3-rc-1-notice.txt} | 2 +- extide/libs.gradle/manifest.mf| 2 +- extide/libs.gradle/nbproject/project.properties | 2 +- extide/libs.gradle/nbproject/project.xml | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/extide/gradle/nbproject/project.xml b/extide/gradle/nbproject/project.xml index 318d459..4831e4a 100644 --- a/extide/gradle/nbproject/project.xml +++ b/extide/gradle/nbproject/project.xml @@ -30,7 +30,7 @@ 7 -7.0 +7.3 diff --git a/extide/gradle/src/org/netbeans/modules/gradle/api/execute/GradleDistributionManager.java b/extide/gradle/src/org/netbeans/modules/gradle/api/execute/GradleDistributionManager.java index 7603756..387eae1 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/api/execute/GradleDistributionManager.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/api/execute/GradleDistributionManager.java @@ -360,7 +360,7 @@ public final class GradleDistributionManager { File distributionBaseDir(URI downloadLocation, String version) { WrapperConfiguration conf = new WrapperConfiguration(); conf.setDistribution(downloadLocation); -PathAssembler pa = new PathAssembler(gradleUserHome); +PathAssembler pa = new PathAssembler(gradleUserHome, null); PathAssembler.LocalDistribution dist = pa.getDistribution(conf); return new File(dist.getDistributionDir(), "gradle-" + version); } @@ -566,7 +566,7 @@ public final class GradleDistributionManager { try { WrapperConfiguration conf = new WrapperConfiguration(); conf.setDistribution(dist.getDistributionURI()); -PathAssembler pa = new PathAssembler(gradleUserHome); +PathAssembler pa = new PathAssembler(gradleUserHome, null); Install install = new Install(new Logger(true), this, pa); install.createDist(conf); } catch (Exception ex) { diff --git a/extide/libs.gradle/external/binaries-list b/extide/libs.gradle/external/binaries-list index 8e51574..121211d 100644 --- a/extide/libs.gradle/external/binaries-list +++ b/extide/libs.gradle/external/binaries-list @@ -14,4 +14,4 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -DFC57AE4562914B649BF530C2D9BB22EC9677CF1 gradle-tooling-api-7.0.jar +B2123DF25C938DD072C7D07716629AABEF0ABD10 gradle-tooling-api-7.3-rc-1.jar \ No newline at end of file diff --git a/extide/libs.gradle/external/gradle-tooling-api-7.0-license.txt b/extide/libs.gradle/external/gradle-tooling-api-7.3-rc-1-license.txt similarity index 99% rename from extide/libs.gradle/external/gradle-tooling-api-7.0-license.txt rename to extide/libs.gradle/external/gradle-tooling-api-7.3-rc-1-license.txt index 6f7c43c..d6bae9d 100644 --- a/extide/libs.gradle/external/gradle-tooling-api-7.0-license.txt +++ b/extide/libs.gradle/external/gradle-tooling-api-7.3-rc-1-license.txt @@ -1,7 +1,7 @@ Name: Gradle Wrapper Description: Gradle Tooling API -Version: 7.0 -Files: gradle-tooling-api-7.0.jar +Version: 7.3-rc-1 +Files: gradle-tooling-api-7.3-rc-1.jar License: Apache-2.0 Origin: Gradle Inc. URL: https://gradle.org/ diff --git a/extide/libs.gradle/external/gradle-tooling-api-7.0-notice.txt b/extide/libs.gradle/external/gradle-tooling-api-7.3-rc-1-notice.txt similarity index 86% rename from extide/libs.gradle/external/gradle-tooling-api-7.0-notice.txt rename to extide/libs.gradle/external/gradle-tooling-api-7.3-rc-1-notice.txt index c8d33b5..dd60be3 100644 --- a/extide/libs.gradle/external/gradle-tooling-api-7.0-notice.txt +++ b/extide/libs.gradle/external/gradle-tooling-api-7.3-rc-1-notice.txt @@ -5,4 +5,4 @@ This product includes software develope
[netbeans] branch master updated: [NETBEANS-6107] Allow to use Gradle 7.2 distributions on JDK17.
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 b7ab958 [NETBEANS-6107] Allow to use Gradle 7.2 distributions on JDK17. b7ab958 is described below commit b7ab9583784b270da78a7cf043a1496ab08e33ad Author: Svata Dedic AuthorDate: Wed Oct 6 15:34:17 2021 +0200 [NETBEANS-6107] Allow to use Gradle 7.2 distributions on JDK17. --- .../netbeans/modules/gradle/api/execute/GradleDistributionManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/extide/gradle/src/org/netbeans/modules/gradle/api/execute/GradleDistributionManager.java b/extide/gradle/src/org/netbeans/modules/gradle/api/execute/GradleDistributionManager.java index d6a2d3f..7603756 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/api/execute/GradleDistributionManager.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/api/execute/GradleDistributionManager.java @@ -96,6 +96,7 @@ public final class GradleDistributionManager { GradleVersion.version("6.3"), // JDK-14 GradleVersion.version("6.7"), // JDK-15 GradleVersion.version("7.0"), // JDK-16 +GradleVersion.version("7.2"), // JDK-17 }; private static final int JAVA_VERSION; - 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
[netbeans] branch master updated (992550c -> ca25399)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git. from 992550c NETBEANS-6080: NoSuchMethodError thrown while applying CreateClassFix. (#3199) add ca25399 [NETBEANS-6055] Prevent NPE form GradleDistributionManager No new revisions were added by this update. Summary of changes: .../modules/gradle/api/execute/GradleDistributionManager.java | 2 +- .../modules/gradle/execute/GradleDistributionProviderImpl.java| 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) - 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
[netbeans] branch master updated: [NETBEANS-6065] Make Gradle Project test close connections to Gradle Daemon
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 f0d2711 [NETBEANS-6065] Make Gradle Project test close connections to Gradle Daemon f0d2711 is described below commit f0d2711a279075025a3021c129ecede8409ae022 Author: Laszlo Kishalmi AuthorDate: Sat Sep 25 09:58:14 2021 -0700 [NETBEANS-6065] Make Gradle Project test close connections to Gradle Daemon --- .../modules/gradle/GradleProjectConnection.java| 6 ++- .../modules/gradle/NbGradleProjectImplTest.java| 47 -- 2 files changed, 40 insertions(+), 13 deletions(-) diff --git a/extide/gradle/src/org/netbeans/modules/gradle/GradleProjectConnection.java b/extide/gradle/src/org/netbeans/modules/gradle/GradleProjectConnection.java index 6a97395..768490c 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/GradleProjectConnection.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/GradleProjectConnection.java @@ -46,7 +46,7 @@ import org.openide.util.WeakListeners; * @author lkishalmi */ @ProjectServiceProvider(service = ProjectConnection.class, projectType = NbGradleProject.GRADLE_PROJECT_TYPE) -public class GradleProjectConnection implements ProjectConnection { +public final class GradleProjectConnection implements ProjectConnection { final Project project; ProjectConnection conn; @@ -111,6 +111,10 @@ public class GradleProjectConnection implements ProjectConnection { compatConn = null; } +synchronized boolean hasConnection() { +return conn != null || compatConn != null; +} + private synchronized ProjectConnection getConnection(boolean compatible) { if (conn == null) { File projectDir = FileUtil.toFile(project.getProjectDirectory()); diff --git a/extide/gradle/test/unit/src/org/netbeans/modules/gradle/NbGradleProjectImplTest.java b/extide/gradle/test/unit/src/org/netbeans/modules/gradle/NbGradleProjectImplTest.java index ea679ba..2ee0041 100644 --- a/extide/gradle/test/unit/src/org/netbeans/modules/gradle/NbGradleProjectImplTest.java +++ b/extide/gradle/test/unit/src/org/netbeans/modules/gradle/NbGradleProjectImplTest.java @@ -27,6 +27,9 @@ import java.util.Random; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.CompletableFuture; import java.util.concurrent.Semaphore; +import org.gradle.tooling.ProjectConnection; +import org.junit.After; +import org.junit.Before; import org.netbeans.api.project.FileOwnerQuery; import org.netbeans.api.project.Project; import org.netbeans.api.project.ProjectManager; @@ -49,6 +52,26 @@ public class NbGradleProjectImplTest extends AbstractGradleProjectTestCase { } private FileObject projectDir; +private Project prj; + +@Before +@Override +public void setUp() throws Exception { +super.setUp(); +prj = createProject(); +} + +@After +@Override +public void tearDown() throws Exception { +ProjectConnection pconn = prj.getLookup().lookup(ProjectConnection.class); +if (pconn instanceof GradleProjectConnection) { +GradleProjectConnection gpconn = (GradleProjectConnection) pconn; +gpconn.close(); +} +prj = null; +super.tearDown(); +} private Project createProject() throws Exception { int rnd = new Random().nextInt(100); @@ -58,12 +81,19 @@ public class NbGradleProjectImplTest extends AbstractGradleProjectTestCase { return ProjectManager.getDefault().findProject(a); } +private void assertHasNoConnection(Project p) throws Exception { +ProjectConnection pconn = p.getLookup().lookup(ProjectConnection.class); +if (pconn instanceof GradleProjectConnection) { +GradleProjectConnection gpconn = (GradleProjectConnection) pconn; +assertFalse(gpconn.hasConnection()); +} +} + /** * Checks that untrusted unopened project will present itself as a fallback. * @throws Exception */ public void testUntrustedProjectFallback() throws Exception { -Project prj = createProject(); NbGradleProject ngp = NbGradleProject.get(prj); assertTrue(ngp.getQuality().worseThan(NbGradleProject.Quality.EVALUATED)); @@ -74,9 +104,9 @@ public class NbGradleProjectImplTest extends AbstractGradleProjectTestCase { * @throws Exception */ public void testInitialLoadDoesNotFireChange() throws Exception { -Project prj = createProject(); NbGradleProject ngp = NbGradleProject.get(prj); assertTrue(ngp.getQuality().worseThan(NbGradleProject.Quality.EVALUATED)); +assertHasNoConnection(prj); } /** @@ -85,7 +115,6 @@ public class
[netbeans] annotated tag 12.5 updated (fd523dd -> 80df1e7)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to annotated tag 12.5 in repository https://gitbox.apache.org/repos/asf/netbeans.git. *** WARNING: tag 12.5 was modified! *** from fd523dd (commit) to 80df1e7 (tag) tagging fd523ddc12d6156412d7b81f0c8663d8913d1021 (commit) replaces 12.5-beta2 by Laszlo Kishalmi on Sun Sep 19 14:06:16 2021 -0700 - Log - Apache NetBeans 12.5 --- No new revisions were added by this update. Summary of changes: - 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
[netbeans] annotated tag 12.5-beta2 updated (0067d3c -> a2e0b34)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to annotated tag 12.5-beta2 in repository https://gitbox.apache.org/repos/asf/netbeans.git. *** WARNING: tag 12.5-beta2 was modified! *** from 0067d3c (commit) to a2e0b34 (tag) tagging 0067d3cd693282f4bf7d6e407665a4c2ebcab8dd (commit) replaces 12.5-beta1 by Laszlo Kishalmi on Thu Sep 2 18:05:02 2021 -0700 - Log - Apache NetBeans 12.5-beta2 --- No new revisions were added by this update. Summary of changes: - 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
[netbeans] annotated tag 12.5-beta3 updated (fd523dd -> bd90b68)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to annotated tag 12.5-beta3 in repository https://gitbox.apache.org/repos/asf/netbeans.git. *** WARNING: tag 12.5-beta3 was modified! *** from fd523dd (commit) to bd90b68 (tag) tagging fd523ddc12d6156412d7b81f0c8663d8913d1021 (commit) replaces 12.5-beta2 by Laszlo Kishalmi on Thu Sep 2 18:05:49 2021 -0700 - Log - Apache NetBeans 12.5-beta3 --- No new revisions were added by this update. Summary of changes: - 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
[netbeans] branch delivery updated: NETBEANS-5906: treat custom actions as enabled (#3105)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a commit to branch delivery in repository https://gitbox.apache.org/repos/asf/netbeans.git The following commit(s) were added to refs/heads/delivery by this push: new 145f06a NETBEANS-5906: treat custom actions as enabled (#3105) 145f06a is described below commit 145f06ae1dcd6cedc91d0ce12f515eb91712c319 Author: Svatopluk Dedic AuthorDate: Sun Aug 22 21:38:26 2021 +0200 NETBEANS-5906: treat custom actions as enabled (#3105) * [NETBEANS-5918] listener for gradle.properties creation was weak-refed and GCed * [NETBEANS-5919] [NETBEANS-5906] Custom actions are always on. Report custom actions as supported. --- .../modules/gradle/ActionProviderImpl.java | 10 ++--- .../modules/gradle/actions/ActionToTaskUtils.java | 41 -- .../actions/ConfigurableActionsProviderImpl.java | 7 +-- .../ConfigurableActionsProviderImplTest.java | 50 ++ 4 files changed, 92 insertions(+), 16 deletions(-) diff --git a/extide/gradle/src/org/netbeans/modules/gradle/ActionProviderImpl.java b/extide/gradle/src/org/netbeans/modules/gradle/ActionProviderImpl.java index 3bf4d48..d11d1ed 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/ActionProviderImpl.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/ActionProviderImpl.java @@ -121,11 +121,7 @@ public class ActionProviderImpl implements ActionProvider { @Override public String[] getSupportedActions() { -List providers = ActionToTaskUtils.actionProviders(project); -Set actions = new HashSet<>(); -for (GradleActionsProvider provider : providers) { -actions.addAll(provider.getSupportedActions()); -} +Set actions = new HashSet<>(ActionToTaskUtils.getAllSupportedActions(project)); // add a fixed 'prime build' action actions.add(ActionProvider.COMMAND_PRIME); actions.add(COMMAND_DL_SOURCES); @@ -184,7 +180,7 @@ public class ActionProviderImpl implements ActionProvider { LOG.log(Level.FINEST, "Priming build action for {0} is: {1}", new Object[] { project, enabled }); return enabled; } -return ActionToTaskUtils.isActionEnabled(command, project, context); +return ActionToTaskUtils.isActionEnabled(command, null, project, context); } @NbBundle.Messages({ @@ -259,7 +255,7 @@ public class ActionProviderImpl implements ActionProvider { LOG.log(Level.FINE, "Attempt to run a config-disabled action: {0}", action); return false; } -if (!ActionToTaskUtils.isActionEnabled(action, project, context)) { +if (!ActionToTaskUtils.isActionEnabled(action, mapping, project, context)) { LOG.log(Level.FINE, "Attempt to run action that is not enabled: {0}", action); return false; } diff --git a/extide/gradle/src/org/netbeans/modules/gradle/actions/ActionToTaskUtils.java b/extide/gradle/src/org/netbeans/modules/gradle/actions/ActionToTaskUtils.java index 98c55c6..5c2939d 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/actions/ActionToTaskUtils.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/actions/ActionToTaskUtils.java @@ -23,7 +23,9 @@ import org.netbeans.modules.gradle.spi.actions.ProjectActionMappingProvider; import org.netbeans.modules.gradle.api.execute.ActionMapping; import org.netbeans.modules.gradle.spi.actions.GradleActionsProvider; import java.util.ArrayList; +import java.util.HashSet; import java.util.List; +import java.util.Set; import org.netbeans.api.annotations.common.NonNull; import org.netbeans.api.project.Project; import org.netbeans.modules.gradle.api.execute.GradleExecConfiguration; @@ -47,10 +49,43 @@ public final class ActionToTaskUtils { providers.addAll(Lookup.getDefault().lookupAll(GradleActionsProvider.class)); return providers; } - -public static boolean isActionEnabled(String action, Project project, Lookup lookup) { -ActionMapping mapping = getActiveMapping(action, project, lookup); + +public static Set getAllSupportedActions(@NonNull Project project) { +Set actions = new HashSet<>(); +for (GradleActionsProvider provider : actionProviders(project)) { +actions.addAll(provider.getSupportedActions()); +} +ProjectActionMappingProvider projectProvider = project.getLookup().lookup(ProjectActionMappingProvider.class); +ConfigurableActionProvider contextProvider = project.getLookup().lookup(ConfigurableActionProvider.class); +ProjectConfigurationProvider pcp = project.getLookup().lookup(ProjectConfigurationProvider.class); +if (contextProvider == null || projectProvider == null) { +return actions; +} +if (pcp == null || contex
[netbeans] annotated tag 12.5-beta1 updated (c0f4399 -> 1763beb)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to annotated tag 12.5-beta1 in repository https://gitbox.apache.org/repos/asf/netbeans.git. *** WARNING: tag 12.5-beta1 was modified! *** from c0f4399 (commit) to 1763beb (tag) tagging c0f4399cbf5c4ea5083f4b5d4dde0193065aff79 (commit) replaces 12.4-beta1 by Laszlo Kishalmi on Sun Aug 15 22:33:24 2021 -0700 - Log - Apache NetBeans 12.5-beta1 --- No new revisions were added by this update. Summary of changes: - 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
[netbeans] annotated tag 12.4 updated (2172674 -> 186f346)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to annotated tag 12.4 in repository https://gitbox.apache.org/repos/asf/netbeans.git. *** WARNING: tag 12.4 was modified! *** from 2172674 (commit) to 186f346 (tag) tagging 21726744165c946ba6619bff89e98d5863f26e22 (commit) replaces 12.4-rc2 by Laszlo Kishalmi on Sun Aug 15 22:31:32 2021 -0700 - Log - Apache NetBeans 12.4. --- No new revisions were added by this update. Summary of changes: - 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
[netbeans] branch master updated: [NETBEANS-5859] Upgraded Jacoco to 0.8.7 to support JDK 17 coverage in Gradle projects
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 2a603b6 [NETBEANS-5859] Upgraded Jacoco to 0.8.7 to support JDK 17 coverage in Gradle projects 2a603b6 is described below commit 2a603b681e52eafa754fcef2cecf9afebfeebbf2 Author: Laszlo Kishalmi AuthorDate: Thu Jul 15 05:22:20 2021 -0700 [NETBEANS-5859] Upgraded Jacoco to 0.8.7 to support JDK 17 coverage in Gradle projects --- java/gradle.java.coverage/external/binaries-list | 2 +- ...acoco.core-0.8.6-license.txt => org.jacoco.core-0.8.7-license.txt} | 2 +- jacoco.core-0.8.6-notice.txt => org.jacoco.core-0.8.7-notice.txt} | 2 +- java/gradle.java.coverage/nbproject/project.properties| 2 +- java/gradle.java.coverage/nbproject/project.xml | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/java/gradle.java.coverage/external/binaries-list b/java/gradle.java.coverage/external/binaries-list index 0a2de06..e5912eb 100644 --- a/java/gradle.java.coverage/external/binaries-list +++ b/java/gradle.java.coverage/external/binaries-list @@ -14,4 +14,4 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -8C20544D06B8A54DE1A585E4FCD0B101C0B433D9 org.jacoco:org.jacoco.core:0.8.6 +2C2DC2B720A7FB33AFCF4F45B05DB2EB5B4FFA10 org.jacoco:org.jacoco.core:0.8.7 diff --git a/java/gradle.java.coverage/external/org.jacoco.core-0.8.6-license.txt b/java/gradle.java.coverage/external/org.jacoco.core-0.8.7-license.txt similarity index 99% rename from java/gradle.java.coverage/external/org.jacoco.core-0.8.6-license.txt rename to java/gradle.java.coverage/external/org.jacoco.core-0.8.7-license.txt index 8ad978b..80b2c8f 100644 --- a/java/gradle.java.coverage/external/org.jacoco.core-0.8.6-license.txt +++ b/java/gradle.java.coverage/external/org.jacoco.core-0.8.7-license.txt @@ -1,6 +1,6 @@ Name: JaCoCo Core Description: Java Code Coverage for Eclipse -Version: 0.8.6 +Version: 0.8.7 License: EPL-v10 Origin: EclEmma Project URL: https://www.jacoco.org/ diff --git a/java/gradle.java.coverage/external/org.jacoco.core-0.8.6-notice.txt b/java/gradle.java.coverage/external/org.jacoco.core-0.8.7-notice.txt similarity index 61% rename from java/gradle.java.coverage/external/org.jacoco.core-0.8.6-notice.txt rename to java/gradle.java.coverage/external/org.jacoco.core-0.8.7-notice.txt index 622252c..c5edbf6 100644 --- a/java/gradle.java.coverage/external/org.jacoco.core-0.8.6-notice.txt +++ b/java/gradle.java.coverage/external/org.jacoco.core-0.8.7-notice.txt @@ -1,2 +1,2 @@ This product includes/uses JaCoCo Core (https://www.jacoco.org/) -developed by EclEmma Project, 2006-2019 +developed by EclEmma Project, 2006-2021 diff --git a/java/gradle.java.coverage/nbproject/project.properties b/java/gradle.java.coverage/nbproject/project.properties index de3cde4..0535329 100644 --- a/java/gradle.java.coverage/nbproject/project.properties +++ b/java/gradle.java.coverage/nbproject/project.properties @@ -23,4 +23,4 @@ is.eager=true test-unit-sys-prop.test.netbeans.dest.dir=${netbeans.dest.dir} test-unit-sys-prop.java.awt.headless=true -release.external/org.jacoco.core-0.8.6.jar=modules/gradle/org.jacoco.core.jar +release.external/org.jacoco.core-0.8.7.jar=modules/gradle/org.jacoco.core.jar diff --git a/java/gradle.java.coverage/nbproject/project.xml b/java/gradle.java.coverage/nbproject/project.xml index b08eaf1..3807f57 100644 --- a/java/gradle.java.coverage/nbproject/project.xml +++ b/java/gradle.java.coverage/nbproject/project.xml @@ -111,7 +111,7 @@ org.netbeans.libs.asm -5.10 +5.15 @@ -119,7 +119,7 @@ gradle/org.jacoco.core.jar - external/org.jacoco.core-0.8.6.jar + external/org.jacoco.core-0.8.7.jar - 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
[netbeans] branch master updated: [NETBEANS-5862] Remove gtk version override in launcher configuration
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 2fa8bad [NETBEANS-5862] Remove gtk version override in launcher configuration 2fa8bad is described below commit 2fa8bad073ba153baae5e01359bd9f1b52eed5ce Author: Matthias Bläsing AuthorDate: Sun Jul 18 11:58:27 2021 +0200 [NETBEANS-5862] Remove gtk version override in launcher configuration --- nb/ide.launcher/netbeans.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nb/ide.launcher/netbeans.conf b/nb/ide.launcher/netbeans.conf index 9c963ba..edc8226 100644 --- a/nb/ide.launcher/netbeans.conf +++ b/nb/ide.launcher/netbeans.conf @@ -63,7 +63,7 @@ netbeans_default_cachedir="${DEFAULT_CACHEDIR_ROOT}/@@metabuild.RawVersion@@" # (see: https://issues.apache.org/jira/browse/NETBEANS-1344) # -netbeans_default_options="-J-XX:+UseStringDeduplication -J-Xss2m @@metabuild.logcli@@ -J-Djdk.gtk.version=2.2 -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.dpiaware=true -J-Dsun.zip.disableMemoryMapping=true -J-Dplugin.manager.check.updates=false -J-Dnetbeans.extbrowser.manual_chrome_plugin_install=yes -J--add-opens=java.base/java.net=ALL-UNNAMED -J--add-opens=java.base/java.lang.ref=ALL-UNNAMED -J--add-opens=java.bas [...] +netbeans_default_options="-J-XX:+UseStringDeduplication -J-Xss2m @@metabuild.logcli@@ -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Dsun.java2d.noddraw=true -J-Dsun.java2d.dpiaware=true -J-Dsun.zip.disableMemoryMapping=true -J-Dplugin.manager.check.updates=false -J-Dnetbeans.extbrowser.manual_chrome_plugin_install=yes -J--add-opens=java.base/java.net=ALL-UNNAMED -J--add-opens=java.base/java.lang.ref=ALL-UNNAMED -J--add-opens=java.base/java.lang=ALL-UNNAMED [...] # Default location of JDK: # (set by installer or commented out if launcher should decide) - 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
[netbeans] 01/01: Moved Snapcraft package to core18
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a commit to branch snapcraft-core18 in repository https://gitbox.apache.org/repos/asf/netbeans.git commit cf0ebbdefde57655d217aeb0b33f70af97c59a6f Author: Laszlo Kishalmi AuthorDate: Mon Jun 7 11:18:07 2021 -0700 Moved Snapcraft package to core18 --- .../packaging/netbeans-dev_snap/snap/gui/frame512.png | Bin 0 -> 20905 bytes nbbuild/packaging/netbeans-dev_snap/snap/snapcraft.yaml | 11 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/nbbuild/packaging/netbeans-dev_snap/snap/gui/frame512.png b/nbbuild/packaging/netbeans-dev_snap/snap/gui/frame512.png new file mode 100644 index 000..2550364 Binary files /dev/null and b/nbbuild/packaging/netbeans-dev_snap/snap/gui/frame512.png differ diff --git a/nbbuild/packaging/netbeans-dev_snap/snap/snapcraft.yaml b/nbbuild/packaging/netbeans-dev_snap/snap/snapcraft.yaml index 51aad31..13ba521 100644 --- a/nbbuild/packaging/netbeans-dev_snap/snap/snapcraft.yaml +++ b/nbbuild/packaging/netbeans-dev_snap/snap/snapcraft.yaml @@ -35,9 +35,10 @@ description: | It requires Java 8 or later Java Development Kit installed. -icon: ../../../platform/core.startup/src/org/netbeans/core/startup/frame512.png +icon: snap/gui/frame512.png confinement: classic grade: devel +base: core18 architectures: [ amd64 ] adopt-info: netbeans-version @@ -55,7 +56,8 @@ parts: - unzip - openjdk-11-jdk-headless plugin: ant -source: ../../../ +source: https://github.com/apache/netbeans.git +source-branch: master filesets: netbeans: [ netbeans/*, -netbeans/*.built ] override-build: | @@ -63,12 +65,13 @@ parts: ant -quiet -Djavac.compilerargs=-nowarn -Dbuild.compiler.deprecation=false -Dbuildnumber=$(date +%Y%m%d) -Dmetabuild.jsonurl=https://raw.githubusercontent.com/apache/netbeans-jenkins-lib/master/meta/netbeansrelease.json mv nbbuild/netbeans $SNAPCRAFT_PART_INSTALL/netbeans # Make the default cache and data directory relative to Snap user directory -sed -i 's/${HOME}\/.netbeans/${SNAP_USER_DATA}\/data/' $SNAPCRAFT_PART_INSTALL/netbeans/bin/netbeans -sed -i 's/${HOME}\/.cache\/netbeans/${SNAP_USER_DATA}\/cache/' $SNAPCRAFT_PART_INSTALL/netbeans/bin/netbeans +sed -i 's/${HOME}\/.netbeans/${SNAP_USER_DATA}/' $SNAPCRAFT_PART_INSTALL/netbeans/bin/netbeans +sed -i 's/${HOME}\/.cache\/netbeans/${SNAP_USER_COMMON}\/${SNAP_REVISION}/' $SNAPCRAFT_PART_INSTALL/netbeans/bin/netbeans sed -i 's/"${DEFAULT_USERDIR_ROOT}\/.*"/"${DEFAULT_USERDIR_ROOT}"/g' $SNAPCRAFT_PART_INSTALL/netbeans/etc/netbeans.conf sed -i 's/"${DEFAULT_CACHEDIR_ROOT}\/.*"/"${DEFAULT_CACHEDIR_ROOT}"/g' $SNAPCRAFT_PART_INSTALL/netbeans/etc/netbeans.conf sed -i 's/-J-Dapple.laf.useScreenMenuBar=true/-J-Dplugin.manager.install.global=false/' $SNAPCRAFT_PART_INSTALL/netbeans/etc/netbeans.conf chmod a+r $SNAPCRAFT_PART_INSTALL/netbeans/etc/netbeans.conf +find $SNAPCRAFT_PART_INSTALL/netbeans -type f -name *.sh -exec chmod a+rx {} \; stage: - $netbeans - 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
[netbeans] branch snapcraft-core18 created (now cf0ebbd)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to branch snapcraft-core18 in repository https://gitbox.apache.org/repos/asf/netbeans.git. at cf0ebbd Moved Snapcraft package to core18 This branch includes the following new commits: new cf0ebbd Moved Snapcraft package to core18 The 1 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. - 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
[netbeans] branch master updated (408a348 -> ef5b61b)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git. from 408a348 [NETBEANS-2373] Better than nothing support for Gradle Distribution dirs. add ef5b61b Sync timestamps in test. Detailed logging added. No new revisions were added by this update. Summary of changes: .../src/org/netbeans/modules/gradle/NbGradleProjectImpl.java | 10 +- .../modules/gradle/loaders/DiskCacheProjectLoader.java | 6 +- .../modules/gradle/loaders/GradleProjectLoaderImpl.java| 4 .../org/netbeans/modules/gradle/NbGradleProjectImplTest.java | 6 +- 4 files changed, 23 insertions(+), 3 deletions(-) - 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
[netbeans] branch master updated: [NETBEANS-2373] Better than nothing support for Gradle Distribution dirs.
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 408a348 [NETBEANS-2373] Better than nothing support for Gradle Distribution dirs. 408a348 is described below commit 408a348701536e057e9f0329180aff34ffd1a52b Author: Laszlo Kishalmi AuthorDate: Wed Apr 28 08:05:05 2021 -0700 [NETBEANS-2373] Better than nothing support for Gradle Distribution dirs. --- extide/gradle.dists/build.xml | 26 extide/gradle.dists/manifest.mf| 5 + extide/gradle.dists/nbproject/project.properties | 25 extide/gradle.dists/nbproject/project.xml | 108 .../modules/gradle/dists/Bundle.properties | 21 +++ .../gradle/dists/DistribitionSourceWatchList.java | 55 .../gradle/dists/DistributionNodeFactory.java | 113 .../gradle/dists/DistributionSourcesImpl.java | 142 + .../modules/gradle/dists/LookupProviders.java | 46 +++ .../gradle/dists/api/GradleDistProject.java| 60 + .../gradle/dists/api/GradleDistProjectBuilder.java | 63 + extide/gradle/manifest.mf | 2 +- .../gradle/tooling/NbProjectInfoBuilder.groovy | 7 + .../modules/gradle/cache/ProjectInfoDiskCache.java | 2 +- nbbuild/cluster.properties | 1 + 15 files changed, 674 insertions(+), 2 deletions(-) diff --git a/extide/gradle.dists/build.xml b/extide/gradle.dists/build.xml new file mode 100644 index 000..a2607e5 --- /dev/null +++ b/extide/gradle.dists/build.xml @@ -0,0 +1,26 @@ + + + +Builds, tests, and runs the project org.netbeans.modules.gradle.dists + + + diff --git a/extide/gradle.dists/manifest.mf b/extide/gradle.dists/manifest.mf new file mode 100644 index 000..7992844 --- /dev/null +++ b/extide/gradle.dists/manifest.mf @@ -0,0 +1,5 @@ +Manifest-Version: 1.0 +AutoUpdate-Show-In-Client: true +OpenIDE-Module: org.netbeans.modules.gradle.dists +OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/gradle/dists/Bundle.properties +OpenIDE-Module-Specification-Version: 1.0 diff --git a/extide/gradle.dists/nbproject/project.properties b/extide/gradle.dists/nbproject/project.properties new file mode 100644 index 000..0c0bc24 --- /dev/null +++ b/extide/gradle.dists/nbproject/project.properties @@ -0,0 +1,25 @@ +# 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. + +is.eager=true +javac.source=1.8 +javac.compilerargs=-Xlint -Xlint:-serial + +nbm.module.author=Laszlo Kishalmi + +test-unit-sys-prop.test.netbeans.dest.dir=${netbeans.dest.dir} +test-unit-sys-prop.java.awt.headless=true diff --git a/extide/gradle.dists/nbproject/project.xml b/extide/gradle.dists/nbproject/project.xml new file mode 100644 index 000..b4ed22b --- /dev/null +++ b/extide/gradle.dists/nbproject/project.xml @@ -0,0 +1,108 @@ + + +http://www.netbeans.org/ns/project/1;> +org.netbeans.modules.apisupport.project + +http://www.netbeans.org/ns/nb-module-project/3;> +org.netbeans.modules.gradle.dists + + + org.netbeans.modules.gradle + + + +2 +2.12 + + + + org.netbeans.modules.projectapi + + + +1 +1.80 + + + + org.netbeans.modules.projectuiapi + + + +1 +1.100 + + + +org.openide.filesystems + + + +9.23 + + + +
[netbeans] branch master updated: [NETBEANS-5668] Fix slipping -s in the Project Problem Dialog
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 99e1b1c [NETBEANS-5668] Fix slipping -s in the Project Problem Dialog 99e1b1c is described below commit 99e1b1ca22b744e88c85bd0989cce112d61ae0e5 Author: Laszlo Kishalmi AuthorDate: Mon May 10 09:21:59 2021 -0700 [NETBEANS-5668] Fix slipping -s in the Project Problem Dialog --- .../gradle/tooling/NetBeansToolingPlugin.java | 14 ++-- .../gradle/GradleProjectErrorNotifications.java| 37 +++-- .../gradle/loaders/LegacyProjectLoader.java| 38 -- 3 files changed, 60 insertions(+), 29 deletions(-) diff --git a/extide/gradle/netbeans-gradle-tooling/src/main/groovy/org/netbeans/modules/gradle/tooling/NetBeansToolingPlugin.java b/extide/gradle/netbeans-gradle-tooling/src/main/groovy/org/netbeans/modules/gradle/tooling/NetBeansToolingPlugin.java index 15e8459..9b1da37 100644 --- a/extide/gradle/netbeans-gradle-tooling/src/main/groovy/org/netbeans/modules/gradle/tooling/NetBeansToolingPlugin.java +++ b/extide/gradle/netbeans-gradle-tooling/src/main/groovy/org/netbeans/modules/gradle/tooling/NetBeansToolingPlugin.java @@ -30,6 +30,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; import javax.inject.Inject; +import org.gradle.api.GradleException; import org.gradle.api.Plugin; import org.gradle.api.Project; import org.gradle.tooling.provider.model.ToolingModelBuilder; @@ -97,12 +98,21 @@ public class NetBeansToolingPlugin implements Plugin { pw.println(ex.toString()); ex.printStackTrace(pw); -BaseModel ret = new NbProjectInfoModel(); +NbProjectInfoModel ret = new NbProjectInfoModel(); ret.setGradleException(sw.toString()); + +Throwable cause = ex; +while ((cause != null) || (cause.getCause() != cause)) { +if (cause instanceof GradleException) { +ret.noteProblem((GradleException) cause); +break; +} +cause = cause.getCause(); +} return ret; } } - + } } diff --git a/extide/gradle/src/org/netbeans/modules/gradle/GradleProjectErrorNotifications.java b/extide/gradle/src/org/netbeans/modules/gradle/GradleProjectErrorNotifications.java index 7ec2df5..d284d43 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/GradleProjectErrorNotifications.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/GradleProjectErrorNotifications.java @@ -36,10 +36,10 @@ public class GradleProjectErrorNotifications { public synchronized void openNotification(String title, String problem, String details) { StringBuilder sb = new StringBuilder(details.length()); -sb.append(""); -String[] lines = details.split("\n"); +sb.append(""); //NOI18N +String[] lines = details.split("\n");//NOI18N for (String line : lines) { -sb.append(line).append(""); +sb.append(line).append(""); //NOI18N } Notification ntn = NotificationDisplayer.getDefault().notify(title, NbGradleProject.getWarningIcon(), @@ -59,22 +59,39 @@ public class GradleProjectErrorNotifications { public static String bulletedList(Collection elements) { StringBuilder sb = new StringBuilder(); -sb.append(""); +sb.append(""); //NOI18N for (Object element : elements) { -sb.append(""); -String[] lines = element.toString().split("\n"); +sb.append(""); //NOI18N +String[] lines = element.toString().split("\n"); //NOI18N for (int i = 0; i < lines.length; i++) { String line = lines[i]; -sb.append(line); +sb.append(lineWrap(line, 78)); if (i < lines.length - 1) { -sb.append(""); +sb.append(""); //NOI18N } } -sb.append(""); +sb.append(""); //NOI18N } -sb.append(""); +sb.append(""); //NOI18N return sb.toString(); } +private static String lineWrap(String line, int maxCol) { +StringBuilder sb = new StringBuilder(line.length()); +
[netbeans] branch master updated: [NETBEANS-4252] Added PathFinder to Gradle Build Scripts Node
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 f6a745c [NETBEANS-4252] Added PathFinder to Gradle Build Scripts Node f6a745c is described below commit f6a745c5b9b0460ac4482c207e5a617cef1c2e64 Author: Laszlo Kishalmi AuthorDate: Sun May 2 13:18:35 2021 -0700 [NETBEANS-4252] Added PathFinder to Gradle Build Scripts Node --- .../modules/gradle/nodes/BuildScriptsNode.java | 32 +- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/extide/gradle/src/org/netbeans/modules/gradle/nodes/BuildScriptsNode.java b/extide/gradle/src/org/netbeans/modules/gradle/nodes/BuildScriptsNode.java index b6f4fa1..3513723 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/nodes/BuildScriptsNode.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/nodes/BuildScriptsNode.java @@ -34,6 +34,7 @@ import java.util.logging.Logger; import java.util.prefs.PreferenceChangeEvent; import java.util.prefs.PreferenceChangeListener; import org.netbeans.api.annotations.common.StaticResource; +import org.netbeans.api.project.FileOwnerQuery; import org.netbeans.api.project.Project; import org.netbeans.api.project.ProjectManager; import org.netbeans.modules.gradle.spi.GradleFiles.Kind; @@ -54,6 +55,7 @@ import org.openide.util.Pair; import org.openide.util.lookup.Lookups; import static org.netbeans.modules.gradle.spi.GradleFiles.Kind.*; +import org.netbeans.spi.project.ui.PathFinder; import org.openide.util.Exceptions; /** * @@ -70,7 +72,7 @@ public final class BuildScriptsNode extends AnnotatedAbstractNode { @NbBundle.Messages("LBL_Build_Scripts=Build Scripts") public BuildScriptsNode(NbGradleProjectImpl prj) { super(Children.create(new ProjectFilesChildren(prj), true), -Lookups.fixed(prj.getProjectDirectory())); +Lookups.fixed(prj.getProjectDirectory(), new Finder(prj))); setName("buildscripts"); //NOI18N setDisplayName(Bundle.LBL_Build_Scripts()); } @@ -96,6 +98,34 @@ public final class BuildScriptsNode extends AnnotatedAbstractNode { return img; } +private static class Finder implements PathFinder { + +final Project project; + +public Finder(Project project) { +this.project = project; +} + +@Override +public Node findPath(Node node, Object target) { +if (target instanceof FileObject) { +FileObject fo = (FileObject) target; +if (project != FileOwnerQuery.getOwner(fo)) { +return null; // Don't waste time if project does not own the fo +} +Node[] nodes = node.getChildren().getNodes(true); +for (Node n : nodes) { +FileObject nf = n.getLookup().lookup(FileObject.class); +if ((nf != null) && (nf.equals(fo))) { + return n; +} +} +} + +return null; +} +} + private static class ProjectFilesChildren extends ChildFactory.Detachable> implements PropertyChangeListener { private final NbGradleProjectImpl project; - 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
[netbeans] branch master updated: Fix NPE summary may be null
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 f4b4a52 Fix NPE summary may be null f4b4a52 is described below commit f4b4a525b980c5465df58476f76fe227219576f2 Author: Eric Barboni AuthorDate: Fri Apr 23 12:51:48 2021 +0200 Fix NPE summary may be null --- .../gsf/codecoverage/CoverageReportTopComponent.java | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ide/gsf.codecoverage/src/org/netbeans/modules/gsf/codecoverage/CoverageReportTopComponent.java b/ide/gsf.codecoverage/src/org/netbeans/modules/gsf/codecoverage/CoverageReportTopComponent.java index bdca717..6888b99 100644 --- a/ide/gsf.codecoverage/src/org/netbeans/modules/gsf/codecoverage/CoverageReportTopComponent.java +++ b/ide/gsf.codecoverage/src/org/netbeans/modules/gsf/codecoverage/CoverageReportTopComponent.java @@ -167,9 +167,7 @@ final class CoverageReportTopComponent extends TopComponent { //sorter.setComparator(i, comparableComparator); //} totalCoverage.setCoveragePercentage(model.getTotalCoverage()); -FileCoverageSummary summary = model.getCoverageSummary(); -totalCoverage.setStats(summary.getLineCount(), summary.getExecutedLineCount(), -summary.getPartialCount(), summary.getInferredCount()); +updateStats(); } public void resizeColumnWidth(JTable table) { @@ -363,12 +361,18 @@ final class CoverageReportTopComponent extends TopComponent { model = new CoverageTableModel(results); table.setModel(model); totalCoverage.setCoveragePercentage(model.getTotalCoverage()); -FileCoverageSummary summary = model.getCoverageSummary(); -totalCoverage.setStats(summary.getLineCount(), summary.getExecutedLineCount(), -summary.getPartialCount(), summary.getInferredCount()); +updateStats(); resizeColumnWidth(table); } +private void updateStats() { +FileCoverageSummary summary = model.getCoverageSummary(); +if (summary != null) { +totalCoverage.setStats(summary.getLineCount(), summary.getExecutedLineCount(), +summary.getPartialCount(), summary.getInferredCount()); +} +} + private static class CoverageTableModel implements TableModel { List results; - 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
[netbeans] branch master updated: [NETBEANS-5588] Upgradle to JaCoCo 0.8.6 for Gradle Code Coverage
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 075282e [NETBEANS-5588] Upgradle to JaCoCo 0.8.6 for Gradle Code Coverage 075282e is described below commit 075282e325a9f2319018fdb17257f23796b404b3 Author: Laszlo Kishalmi AuthorDate: Thu Apr 15 20:23:27 2021 -0700 [NETBEANS-5588] Upgradle to JaCoCo 0.8.6 for Gradle Code Coverage --- java/gradle.java.coverage/external/binaries-list| 2 +- jacoco.core-0.8.5-license.txt => org.jacoco.core-0.8.6-license.txt} | 2 +- ...rg.jacoco.core-0.8.5-notice.txt => org.jacoco.core-0.8.6-notice.txt} | 0 java/gradle.java.coverage/nbproject/project.properties | 2 +- java/gradle.java.coverage/nbproject/project.xml | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) diff --git a/java/gradle.java.coverage/external/binaries-list b/java/gradle.java.coverage/external/binaries-list index 8bd9922..0a2de06 100644 --- a/java/gradle.java.coverage/external/binaries-list +++ b/java/gradle.java.coverage/external/binaries-list @@ -14,4 +14,4 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -1AC96769AA83E5492D1A1A694774F6BAEC4EB704 org.jacoco:org.jacoco.core:0.8.5 +8C20544D06B8A54DE1A585E4FCD0B101C0B433D9 org.jacoco:org.jacoco.core:0.8.6 diff --git a/java/gradle.java.coverage/external/org.jacoco.core-0.8.5-license.txt b/java/gradle.java.coverage/external/org.jacoco.core-0.8.6-license.txt similarity index 99% rename from java/gradle.java.coverage/external/org.jacoco.core-0.8.5-license.txt rename to java/gradle.java.coverage/external/org.jacoco.core-0.8.6-license.txt index 1bab72b..8ad978b 100644 --- a/java/gradle.java.coverage/external/org.jacoco.core-0.8.5-license.txt +++ b/java/gradle.java.coverage/external/org.jacoco.core-0.8.6-license.txt @@ -1,6 +1,6 @@ Name: JaCoCo Core Description: Java Code Coverage for Eclipse -Version: 0.8.5 +Version: 0.8.6 License: EPL-v10 Origin: EclEmma Project URL: https://www.jacoco.org/ diff --git a/java/gradle.java.coverage/external/org.jacoco.core-0.8.5-notice.txt b/java/gradle.java.coverage/external/org.jacoco.core-0.8.6-notice.txt similarity index 100% rename from java/gradle.java.coverage/external/org.jacoco.core-0.8.5-notice.txt rename to java/gradle.java.coverage/external/org.jacoco.core-0.8.6-notice.txt diff --git a/java/gradle.java.coverage/nbproject/project.properties b/java/gradle.java.coverage/nbproject/project.properties index a94a5bd..de3cde4 100644 --- a/java/gradle.java.coverage/nbproject/project.properties +++ b/java/gradle.java.coverage/nbproject/project.properties @@ -23,4 +23,4 @@ is.eager=true test-unit-sys-prop.test.netbeans.dest.dir=${netbeans.dest.dir} test-unit-sys-prop.java.awt.headless=true -release.external/org.jacoco.core-0.8.5.jar=modules/gradle/org.jacoco.core.jar +release.external/org.jacoco.core-0.8.6.jar=modules/gradle/org.jacoco.core.jar diff --git a/java/gradle.java.coverage/nbproject/project.xml b/java/gradle.java.coverage/nbproject/project.xml index b1211d3..b08eaf1 100644 --- a/java/gradle.java.coverage/nbproject/project.xml +++ b/java/gradle.java.coverage/nbproject/project.xml @@ -119,7 +119,7 @@ gradle/org.jacoco.core.jar - external/org.jacoco.core-0.8.5.jar + external/org.jacoco.core-0.8.6.jar - 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
[netbeans] branch master updated (bf76d65 -> 03773dd)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git. from bf76d65 Merge pull request #2854 from emilianbold/jdk-download add 03773dd [NETBEANS-5541] Upgrade Gradle Tooling to 7.0 No new revisions were added by this update. Summary of changes: extide/gradle/nbproject/project.xml | 4 ++-- extide/libs.gradle/external/binaries-list| 2 +- 7-license.txt => gradle-tooling-api-7.0-license.txt} | 4 ++-- ...-6.7-notice.txt => gradle-tooling-api-7.0-notice.txt} | 2 +- extide/libs.gradle/manifest.mf | 5 ++--- extide/libs.gradle/nbproject/project.properties | 2 +- extide/libs.gradle/nbproject/project.xml | 2 +- java/gradle.java/apichanges.xml | 15 +++ java/gradle.java/manifest.mf | 2 +- .../modules/gradle/java/api/GradleJavaSourceSet.java | 16 java/gradle.test/nbproject/project.xml | 4 ++-- 11 files changed, 44 insertions(+), 14 deletions(-) rename extide/libs.gradle/external/{gradle-tooling-api-6.7-license.txt => gradle-tooling-api-7.0-license.txt} (99%) rename extide/libs.gradle/external/{gradle-tooling-api-6.7-notice.txt => gradle-tooling-api-7.0-notice.txt} (86%) - 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
[netbeans] branch master updated (d100687 -> cca230b)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git. from d100687 Test Explorer fixes. (#2878) add cca230b [NETBEANS-5522] Minimal support for Gradle 7.0 No new revisions were added by this update. Summary of changes: .../org/netbeans/modules/gradle/tooling/NbProjectInfoBuilder.groovy | 6 -- .../modules/gradle/api/execute/GradleDistributionManager.java | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) - 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
[netbeans] branch master updated (3ea8571 -> 7d9651d)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git. from 3ea8571 Merge pull request #2826 from lbruun/NETBEANS-5478-DownloadBinaries-improvement new ae4124d Initial multi model fetcher for Gradle new 49f73e1 Split up GradleProjectCache for better maintainability new 45bf8a1 Started to split the Disk Cache from Legacy project loader new c1733e4 Normalized calls and Trust handling. new 568fbd3 A still very raw, but kind of functional implementation new 09cd06f Improved The quality of FALLBACK Gradle projects when project structure is available. new 6be05d6 Making rebase from master compile agein new 403cebe Simplified Gradle AbstractDiskCache new 3e1bcd8 Fixed bugs prevent unittests pass. new 14ef75d Fixed license header on netbeans-gradle-tooling/gradle.properties file new 7d9651d Merge pull request #2747 from lkishalmi/NETBEANS-2665 The 5243 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: .../netbeans-gradle-tooling/gradle.properties | 18 ++ .../netbeans/modules/gradle/api/ModelFetcher.java | 232 .../netbeans/modules/gradle/api/NbProjectInfo.java | 2 +- .../gradle/GradleAuxiliaryPropertiesImpl.java | 4 +- .../gradle/GradleProjectErrorNotifications.java| 80 ++ .../modules/gradle/GradleProjectLoader.java} | 26 +- .../gradle/GradleProjectProblemProvider.java | 2 +- .../modules/gradle/GradleProjectStructure.java}| 27 +- .../modules/gradle/NbGradleProjectImpl.java| 68 +++-- .../org/netbeans/modules/gradle/ReloadAction.java | 3 +- .../modules/gradle/api/GradleBaseProject.java | 33 ++- .../gradle/api/GradleBaseProjectBuilder.java | 2 +- .../modules/gradle/api/GradleProjects.java | 2 +- .../modules/gradle/cache/AbstractDiskCache.java| 126 + .../modules/gradle/cache/ProjectInfoDiskCache.java | 17 +- .../modules/gradle/cache/SubProjectDiskCache.java | 128 +++-- .../gradle/execute/GradleDaemonExecutor.java | 2 +- .../execute/GradleDistributionProviderImpl.java| 23 +- .../gradle/loaders/AbstractProjectLoader.java | 135 ++ .../gradle/loaders/BundleProjectLoader.java| 73 + .../gradle/loaders/DiskCacheProjectLoader.java | 59 .../gradle/loaders/FallbackProjectLoader.java | 77 ++ .../gradle/{ => loaders}/GradleArtifactStore.java | 3 +- .../modules/gradle/{ => loaders}/GradleDaemon.java | 2 +- .../gradle/loaders/GradleProjectLoaderImpl.java| 91 +++ .../LegacyProjectLoader.java} | 296 - .../modules/gradle/loaders/ModelCache.java | 103 +++ .../modules/gradle/loaders/ModelCacheManager.java | 56 .../gradle/loaders/ModelCachingDescriptor.java}| 37 ++- .../loaders/NbProjectInfoCachingDescriptor.java| 77 ++ .../loaders/ProjectStructureCachingDescriptor.java | 74 ++ .../modules/gradle/nodes/ConfigurationsNode.java | 2 +- .../modules/gradle/options/Bundle.properties | 2 + .../gradle/options/GradleExperimentalSettings.java | 9 +- .../modules/gradle/options/SettingsPanel.form | 15 +- .../modules/gradle/options/SettingsPanel.java | 15 +- .../queries/ProjectContainerProviderImpl.java | 1 - .../netbeans/modules/gradle/spi/GradleFiles.java | 4 + .../gradle/spi/newproject/TemplateOperation.java | 7 +- .../gradle/AbstractGradleProjectTestCase.java | 3 +- 40 files changed, 1480 insertions(+), 456 deletions(-) create mode 100644 extide/gradle/netbeans-gradle-tooling/gradle.properties create mode 100644 extide/gradle/netbeans-gradle-tooling/src/main/groovy/org/netbeans/modules/gradle/api/ModelFetcher.java create mode 100644 extide/gradle/src/org/netbeans/modules/gradle/GradleProjectErrorNotifications.java copy extide/gradle/{netbeans-gradle-tooling/src/main/groovy/org/netbeans/modules/gradle/api/NbProjectInfo.java => src/org/netbeans/modules/gradle/GradleProjectLoader.java} (58%) copy extide/gradle/{netbeans-gradle-tooling/src/main/groovy/org/netbeans/modules/gradle/api/NbProjectInfo.java => src/org/netbeans/modules/gradle/GradleProjectStructure.java} (59%) create mode 100644 extide/gradle/src/org/netbeans/modules/gradle/loaders/AbstractProjectLoader.java create mode 100644 extide/gradle/src/org/netbeans/modules/gradle/loaders/BundleProjectLoader.java create mode 100644 extide/gradle/src/org/netbeans/modules/gradle/loaders/DiskCacheProjectLoader.java create mode 100644 extide/gradle/src/org/netbeans/modules/gradle/loaders/FallbackProjectLoader.ja
[netbeans] branch master updated (f5dfe1e -> 77da129)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git. from f5dfe1e [NETBEANS-5499] Felix removed in favour of Netbinox, fixes URLStreamHandlerFactory. add-opens added for jdk.compiler. (#2844) add 77da129 [NETBEANS-5524] Check for priming action before use. No new revisions were added by this update. Summary of changes: .../src/org/netbeans/modules/project/ui/OpenProjectList.java | 4 +++- .../org/netbeans/modules/project/ui/ProjectChooserAccessory.java | 8 +++- 2 files changed, 10 insertions(+), 2 deletions(-) - 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
[netbeans] branch master updated (8328d7c -> e3c016c)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git. from 8328d7c [NETBEANS-5008] : Support for finalization of pattern-matching-instance-of feature (#2804) add e3c016c Trust checkbox changed to tri-option combobox to indicate temporal trust. (#2768) No new revisions were added by this update. Summary of changes: .../org/netbeans/modules/gradle/ProjectTrust.java | 6 +- .../modules/gradle/customizer/Bundle.properties| 5 +- .../gradle/customizer/GradleExecutionPanel.form| 40 +++ .../gradle/customizer/GradleExecutionPanel.java| 77 ++ 4 files changed, 97 insertions(+), 31 deletions(-) - 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
[netbeans] branch master updated (4b25610 -> 9ff122d)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git. from 4b25610 Merge pull request #2829 from pepness/javadoc-16 add 9ff122d Update .gitattributes - support for shell scripts No new revisions were added by this update. Summary of changes: .gitattributes | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) - 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
[netbeans] branch master updated: [NETBEANS-5484] Clear NB Non-Project cache when we have more info from Gradle
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 190e5c4 [NETBEANS-5484] Clear NB Non-Project cache when we have more info from Gradle 190e5c4 is described below commit 190e5c4e4315595794ca7b78af5a1318d05c290c Author: Laszlo Kishalmi AuthorDate: Sun Mar 28 19:50:09 2021 -0700 [NETBEANS-5484] Clear NB Non-Project cache when we have more info from Gradle --- extide/gradle/src/org/netbeans/modules/gradle/GradleProjectCache.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extide/gradle/src/org/netbeans/modules/gradle/GradleProjectCache.java b/extide/gradle/src/org/netbeans/modules/gradle/GradleProjectCache.java index a64ba17..86d9b21 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/GradleProjectCache.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/GradleProjectCache.java @@ -63,6 +63,7 @@ import org.netbeans.modules.gradle.api.NbGradleProject; import org.netbeans.modules.gradle.api.execute.GradleCommandLine; import java.util.WeakHashMap; import javax.swing.JLabel; +import org.netbeans.api.project.ProjectManager; import org.netbeans.modules.gradle.cache.AbstractDiskCache.CacheEntry; import org.netbeans.modules.gradle.cache.ProjectInfoDiskCache.QualifiedProjectInfo; import org.netbeans.modules.gradle.api.execute.RunUtils; @@ -412,6 +413,7 @@ public final class GradleProjectCache { if (baseProject.isRoot()) { SubProjectDiskCache spCache = SubProjectDiskCache.get(baseProject.getRootDir()); spCache.storeData(new SubProjectDiskCache.SubProjectInfo(baseProject)); +ProjectManager.getDefault().clearNonProjectCache(); } } } - 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
[netbeans] branch master updated (9147055 -> 25d228f)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git. from 9147055 Merge pull request #2833 from JaroslavTulach/jtulach/Talk2CompilerAvoidNPE add 25d228f [NETBEANS-5484] Handle NPE when the project Gradle project discovery fails for some reason. No new revisions were added by this update. Summary of changes: .../org/netbeans/modules/gradle/nodes/BuildScriptsNode.java| 10 +- .../modules/gradle/queries/ProjectContainerProviderImpl.java | 10 +- 2 files changed, 18 insertions(+), 2 deletions(-) - 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
[netbeans] branch master updated (d81e530 -> 29dcfe0)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git. from d81e530 Fix userdir and cachedir location for netbeans-dev Snap add 29dcfe0 [NETBEANS-5141] Support Gradle Source Groups from Alien Projects No new revisions were added by this update. Summary of changes: .../gradle/java/classpath/GradleSourcesImpl.java | 3 -- .../gradle/java/nodes/SourcesNodeFactory.java | 52 +++--- 2 files changed, 35 insertions(+), 20 deletions(-) - 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
[netbeans] branch master updated: Fix userdir and cachedir location for netbeans-dev Snap
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 d81e530 Fix userdir and cachedir location for netbeans-dev Snap d81e530 is described below commit d81e53090fbde10d90b8e813691168921a1fd755 Author: Laszlo Kishalmi AuthorDate: Fri Mar 19 19:55:51 2021 -0700 Fix userdir and cachedir location for netbeans-dev Snap --- nbbuild/packaging/netbeans-dev_snap/snap/snapcraft.yaml | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nbbuild/packaging/netbeans-dev_snap/snap/snapcraft.yaml b/nbbuild/packaging/netbeans-dev_snap/snap/snapcraft.yaml index 599d554..51aad31 100644 --- a/nbbuild/packaging/netbeans-dev_snap/snap/snapcraft.yaml +++ b/nbbuild/packaging/netbeans-dev_snap/snap/snapcraft.yaml @@ -63,9 +63,12 @@ parts: ant -quiet -Djavac.compilerargs=-nowarn -Dbuild.compiler.deprecation=false -Dbuildnumber=$(date +%Y%m%d) -Dmetabuild.jsonurl=https://raw.githubusercontent.com/apache/netbeans-jenkins-lib/master/meta/netbeansrelease.json mv nbbuild/netbeans $SNAPCRAFT_PART_INSTALL/netbeans # Make the default cache and data directory relative to Snap user directory -sed -i 's/${HOME}\/.netbeans\/dev/${SNAP_USER_DATA}\/data/' $SNAPCRAFT_PART_INSTALL/netbeans/bin/netbeans -sed -i 's/${HOME}\/.cache\/netbeans\/dev/${SNAP_USER_DATA}\/cache/' $SNAPCRAFT_PART_INSTALL/netbeans/bin/netbeans +sed -i 's/${HOME}\/.netbeans/${SNAP_USER_DATA}\/data/' $SNAPCRAFT_PART_INSTALL/netbeans/bin/netbeans +sed -i 's/${HOME}\/.cache\/netbeans/${SNAP_USER_DATA}\/cache/' $SNAPCRAFT_PART_INSTALL/netbeans/bin/netbeans +sed -i 's/"${DEFAULT_USERDIR_ROOT}\/.*"/"${DEFAULT_USERDIR_ROOT}"/g' $SNAPCRAFT_PART_INSTALL/netbeans/etc/netbeans.conf +sed -i 's/"${DEFAULT_CACHEDIR_ROOT}\/.*"/"${DEFAULT_CACHEDIR_ROOT}"/g' $SNAPCRAFT_PART_INSTALL/netbeans/etc/netbeans.conf sed -i 's/-J-Dapple.laf.useScreenMenuBar=true/-J-Dplugin.manager.install.global=false/' $SNAPCRAFT_PART_INSTALL/netbeans/etc/netbeans.conf +chmod a+r $SNAPCRAFT_PART_INSTALL/netbeans/etc/netbeans.conf stage: - $netbeans - 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
[netbeans] branch master updated (2227157 -> d436e35)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git. from 2227157 Merge pull request #2790 from premek/patch-1 add d436e35 Use GitHub to get netbeansrelease.json at Snap builds No new revisions were added by this update. Summary of changes: nbbuild/packaging/netbeans-dev_snap/snap/snapcraft.yaml | 2 +- nbbuild/packaging/netbeans_snap/snap/snapcraft.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) - 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
[netbeans] branch master updated: Use Java 11 to Build NetBeans dev Snap
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 d1e363b Use Java 11 to Build NetBeans dev Snap d1e363b is described below commit d1e363b6655428e0119b15bbdc46cc95285d3209 Author: Laszlo Kishalmi AuthorDate: Thu Mar 4 09:22:53 2021 -0800 Use Java 11 to Build NetBeans dev Snap --- nbbuild/packaging/netbeans-dev_snap/snap/snapcraft.yaml | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nbbuild/packaging/netbeans-dev_snap/snap/snapcraft.yaml b/nbbuild/packaging/netbeans-dev_snap/snap/snapcraft.yaml index 0e0b63a..090703a 100644 --- a/nbbuild/packaging/netbeans-dev_snap/snap/snapcraft.yaml +++ b/nbbuild/packaging/netbeans-dev_snap/snap/snapcraft.yaml @@ -53,18 +53,18 @@ parts: build-attributes: [ no-patchelf ] build-packages: - unzip - - openjdk-8-jdk-headless + - openjdk-11-jdk-headless plugin: ant source: ../../../ filesets: netbeans: [ netbeans/*, -netbeans/*.built ] override-build: | -export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64" +export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64" ant -quiet -Djavac.compilerargs=-nowarn -Dbuild.compiler.deprecation=false -Dbuildnumber=$(date +%Y%m%d) mv nbbuild/netbeans $SNAPCRAFT_PART_INSTALL/netbeans # Make the default cache and data directory relative to Snap user directory -sed -i 's/${HOME}\/.netbeans/${SNAP_USER_COMMON}\/data/' $SNAPCRAFT_PART_INSTALL/netbeans/bin/netbeans -sed -i 's/${HOME}\/.cache\/netbeans/${SNAP_USER_COMMON}\/cache/' $SNAPCRAFT_PART_INSTALL/netbeans/bin/netbeans +sed -i 's/${HOME}\/.netbeans\/dev/${SNAP_USER_DATA}\/data/' $SNAPCRAFT_PART_INSTALL/netbeans/bin/netbeans +sed -i 's/${HOME}\/.cache\/netbeans\/dev/${SNAP_USER_DATA}\/cache/' $SNAPCRAFT_PART_INSTALL/netbeans/bin/netbeans sed -i 's/-J-Dapple.laf.useScreenMenuBar=true/-J-Dplugin.manager.install.global=false/' $SNAPCRAFT_PART_INSTALL/netbeans/etc/netbeans.conf stage: - $netbeans - 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
[netbeans] branch master updated: Delete unused imports and constant in UIHandler
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 707d0c5 Delete unused imports and constant in UIHandler 707d0c5 is described below commit 707d0c598fbd9cb9dffef28866e19736f2fd8d5b Author: Tomas Prochazka AuthorDate: Sat Feb 6 19:35:53 2021 +0100 Delete unused imports and constant in UIHandler --- platform/uihandler/src/org/netbeans/modules/uihandler/UIHandler.java | 4 1 file changed, 4 deletions(-) diff --git a/platform/uihandler/src/org/netbeans/modules/uihandler/UIHandler.java b/platform/uihandler/src/org/netbeans/modules/uihandler/UIHandler.java index dd00380..e23fd81 100644 --- a/platform/uihandler/src/org/netbeans/modules/uihandler/UIHandler.java +++ b/platform/uihandler/src/org/netbeans/modules/uihandler/UIHandler.java @@ -23,8 +23,6 @@ import java.awt.Window; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.beans.PropertyChangeSupport; -import java.net.MalformedURLException; -import java.net.URL; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.atomic.AtomicBoolean; @@ -39,7 +37,6 @@ import org.netbeans.modules.uihandler.api.Controller; import org.openide.DialogDescriptor; import org.openide.DialogDisplayer; import org.openide.NotifyDescriptor; -import org.openide.awt.HtmlBrowser; import org.openide.awt.Mnemonics; import org.openide.util.NbBundle; import org.openide.util.RequestProcessor; @@ -65,7 +62,6 @@ implements ActionListener, Runnable, Callable { private final SlownessReporter reporter; private final AtomicBoolean someRecordsScheduled = new AtomicBoolean(false); -private static final String ISSUE_REPORTER_LINK = "https://issues.apache.org/jira/projects/NETBEANS;; //NOI18N private static boolean exceptionHandler; public static void registerExceptionHandler(boolean enable) { - 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
[netbeans] branch master updated: [NETBEANS-5318] Confirmed projects are trusted in single IDE session.
This is an automated email from the ASF dual-hosted git repository. lkishalmi 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 754b2a0 [NETBEANS-5318] Confirmed projects are trusted in single IDE session. 754b2a0 is described below commit 754b2a0ed97e27163ab04036bfa39741b74a9bd3 Author: Svata Dedic AuthorDate: Mon Feb 15 16:28:35 2021 +0100 [NETBEANS-5318] Confirmed projects are trusted in single IDE session. --- .../org/netbeans/modules/gradle/ProjectTrust.java | 58 +++--- .../modules/gradle/api/execute/RunUtils.java | 5 +- 2 files changed, 53 insertions(+), 10 deletions(-) diff --git a/extide/gradle/src/org/netbeans/modules/gradle/ProjectTrust.java b/extide/gradle/src/org/netbeans/modules/gradle/ProjectTrust.java index adec605..114bfe7 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/ProjectTrust.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/ProjectTrust.java @@ -26,8 +26,10 @@ import java.security.InvalidKeyException; import java.security.Key; import java.security.NoSuchAlgorithmException; import java.util.Collections; +import java.util.HashSet; import java.util.List; import java.util.Random; +import java.util.Set; import java.util.prefs.Preferences; import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; @@ -53,6 +55,11 @@ public class ProjectTrust { private final Key key; final Preferences projectTrust; final byte[] salt; + +/** + * Projects that are trusted just "transiently", for a single IDE session. + */ +private final Set temporaryTrustedIds = new HashSet<>(); ProjectTrust(Preferences prefs) { byte[] buf = prefs.getByteArray(KEY_SALT, null); @@ -65,7 +72,7 @@ public class ProjectTrust { projectTrust = prefs.node(NODE_PROJECT); key = new SecretKeySpec(salt, HMAC_SHA256); } - + /** * Returns true if the specified project is trusted. * @@ -73,6 +80,23 @@ public class ProjectTrust { * @return true if the given project is trusted. */ public boolean isTrusted(Project project) { +synchronized (this) { +if (temporaryTrustedIds.contains(getPathId(project))) { +return true; +} +} +return isTrustedPermanetly(project); +} + +/** + * Returns true if the specified project is trusted permanently. + * You should be probably using {@link #isTrusted} to avoid duplicate questions + * during one IDE run. + * + * @param project of the trust check. + * @return true if the given project is trusted. + */ +public boolean isTrustedPermanetly(Project project) { String pathId = getPathId(project); String projectId = projectTrust.get(pathId, null); if (projectId == null) { @@ -88,14 +112,19 @@ public class ProjectTrust { } return ret; } - + /** - * Marks the given project trusted, if it was not trusted before. + * Marks the given project trusted, if it was not trusted before. If {@code permanently} + * is true, the decision will be recorded for further IDE runs. + * * @param project the project to trust. */ -public void trustProject(Project project) { -if (!isTrusted(project)) { -String pathId = getPathId(project); +public void trustProject(Project project, boolean permanently) { +String pathId = getPathId(project); +synchronized (this) { +temporaryTrustedIds.add(pathId); +} +if (permanently && !isTrustedPermanetly(project)) { Path trustFile = getProjectTrustFile(project); byte[] rnd = new byte[16]; new Random().nextBytes(rnd); @@ -109,12 +138,27 @@ public class ProjectTrust { } /** - * Marks the given project not trusted. + * Marks the given project trusted, if it was not trusted before. The decision + * will be recorded persistently. + * + * @param project the project to trust. + */ +public void trustProject(Project project) { +trustProject(project, true); +} + +/** + * Marks the given project not trusted. The decision will be deleted also + * from the persistent storage and from the temporarily trusted projects. + * * @param project the project to remove trust from. */ public void distrustProject(Project project) { String pathId = getPathId(project); projectTrust.remove(pathId); +synchronized (this) { +temporaryTrustedIds.remove(pathId); +} Path trustFile = getProjectTrustFile(project); if (trustFile != null) { try { diff --git a/extide/gradle/src/org/netbeans/modules/gradle/api/execute/RunUtils.java b/extide
[netbeans] branch master updated (3875441 -> bdc741c)
This is an automated email from the ASF dual-hosted git repository. lkishalmi pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git. from 3875441 docs (DialogDisplayer notifyLater) small typo add bdc741c [NETBEANS-5353] Use cleanTest instead of rerun-tasks to force test to run. No new revisions were added by this update. Summary of changes: .../src/org/netbeans/modules/gradle/java/action-mapping.xml | 8 1 file changed, 4 insertions(+), 4 deletions(-) - 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