[netbeans] branch master updated: JPDA Evaluator: Value, Description and Children should not be fetched on the EDT
This is an automated email from the ASF dual-hosted git repository. matthiasblaesing 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 d505b71a9b JPDA Evaluator: Value, Description and Children should not be fetched on the EDT new 75d723505c Merge pull request #5877 from matthiasblaesing/jpda_edt d505b71a9b is described below commit d505b71a9bdfd56b38f061f775fda4f1c12b9488 Author: Matthias Bläsing AuthorDate: Mon Apr 24 21:15:53 2023 +0200 JPDA Evaluator: Value, Description and Children should not be fetched on the EDT While running NetBeans with assertions enabled, while tryping to open the detail/value dialog for the "String value", an AssertionError was observed. java.lang.AssertionError: Debugger lock taken in AWT Event Queue! at org.netbeans.modules.debugger.jpda.JPDADebuggerImpl$DebuggerReentrantReadWriteLock$DebuggerReadLock.lock(JPDADebuggerImpl.java:2710) at org.netbeans.modules.debugger.jpda.models.JPDAThreadImpl$ThreadReentrantReadWriteLock$ThreadWriteLock.lock(JPDAThreadImpl.java:2581) at org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.invokeMethod(JPDADebuggerImpl.java:1080) at org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.invokeMethod(JPDADebuggerImpl.java:1022) at org.netbeans.modules.debugger.jpda.models.AbstractObjectVariable.getToStringValue(AbstractObjectVariable.java:500) at org.netbeans.modules.debugger.jpda.models.AbstractObjectVariable.getToStringValue(AbstractObjectVariable.java:464) at org.netbeans.modules.debugger.jpda.models.AbstractObjectVariable.getToStringValue(AbstractObjectVariable.java:428) at org.netbeans.modules.debugger.jpda.ui.models.VariablesTableModel.getValueAt(VariablesTableModel.java:108) at org.netbeans.spi.viewmodel.Models$DelegatingTableModel.getValueAt(Models.java:2249) at org.netbeans.modules.debugger.jpda.ui.models.NumericDisplayFilter.getValueAt(NumericDisplayFilter.java:112) at org.netbeans.spi.viewmodel.Models$CompoundTableModel.getValueAt(Models.java:1439) at org.netbeans.modules.debugger.jpda.ui.models.VariablesTreeModelFilter.getValueAt(VariablesTreeModelFilter.java:530) at org.netbeans.spi.viewmodel.Models$CompoundTableModel.getValueAt(Models.java:1439) at org.netbeans.modules.debugger.jpda.ui.models.EvaluatorTableModelFilter.getValueAt(EvaluatorTableModelFilter.java:71) at org.netbeans.spi.viewmodel.Models$CompoundTableModel.getValueAt(Models.java:1439) at org.netbeans.spi.viewmodel.Models$CompoundTableModel.getValueAt(Models.java:1441) at org.netbeans.spi.viewmodel.Models$CompoundTableModel.getValueAt(Models.java:1441) at org.netbeans.spi.viewmodel.Models$CompoundModel.getValueAt(Models.java:4565) at org.netbeans.modules.viewmodel.TreeModelNode$MyProperty.updateShortDescription(TreeModelNode.java:2094) at org.netbeans.modules.viewmodel.TreeModelNode$MyProperty.getShortDescription(TreeModelNode.java:2076) at org.openide.explorer.propertysheet.CustomEditorAction.actionPerformed(CustomEditorAction.java:290) at org.openide.explorer.propertysheet.PropertyPanel$CustomEditorProxyAction.actionPerformed(PropertyPanel.java:1199) at org.openide.explorer.view.OutlineView$OutlineViewOutline.editCellAt(OutlineView.java:2115) at java.desktop/javax.swing.plaf.basic.BasicTableUI$Handler.adjustSelection(BasicTableUI.java:1147) at java.desktop/javax.swing.plaf.basic.BasicTableUI$Handler.mousePressed(BasicTableUI.java:1077) Indeed here the call comes from the EDT and directly tries to access the JPDA connection. The fix is inspired from JPDAAsynchronousModel and moves value fetching from the EDT to the JPDA thread. --- .../jpda/ui/models/EvaluatorTableModelFilter.java | 43 +++--- 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/EvaluatorTableModelFilter.java b/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/EvaluatorTableModelFilter.java index 5dc216241d..c0932190ed 100644 --- a/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/EvaluatorTableModelFilter.java +++ b/java/debugger.jpda.ui/src/org/netbeans/modules/debugger/jpda/ui/models/EvaluatorTableModelFilter.java @@ -21,38 +21,55 @@ package org.netbeans.modules.debugger.jpda.ui.models; import java.util.Collection; import java.util.HashSet; -import java.util.List; +import java.util.concurrent.Executor; +import org.netbeans.api.debugger.jpda.JPDADebugger; +import org.netbeans.modules.debugger.jpda.JPDADebuggerImpl; +import org.netbeans.spi.debugger.ContextProvider; import org.netbeans.spi.debugger.DebuggerServiceRegistration; -import org.netbeans.spi.debugger.ui.CodeEvaluator; import org.netbe
[netbeans] branch master updated (75d723505c -> 9338afd3e3)
This is an automated email from the ASF dual-hosted git repository. matthiasblaesing pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git from 75d723505c Merge pull request #5877 from matthiasblaesing/jpda_edt new 962ec7fb8b Retain information whether function was generated new a9ae09b5e3 Fix handling of class constructor in classes in anonymous functions new 9338afd3e3 Merge pull request #5951 from matthiasblaesing/javascript_constructor The 8669 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: webcommon/javascript2.model/nbproject/project.xml | 2 +- .../modules/javascript2/model/ModelVisitor.java| 18 ++-- .../unit/data/testfiles/model/classConstructor.js | 44 +++ .../data/testfiles/model/classConstructor.js.model | 51 ++ .../modules/javascript2/model/ModelTest.java | 4 ++ webcommon/libs.nashorn/manifest.mf | 2 +- .../src/com/oracle/js/parser/Parser.java | 1 + .../src/com/oracle/js/parser/ir/FunctionNode.java | 7 +++ .../src/com/oracle/js/parser/DumpingVisitor.java | 4 +- .../unit/src/com/oracle/js/parser/ParserTest.java | 34 +++ 10 files changed, 161 insertions(+), 6 deletions(-) create mode 100644 webcommon/javascript2.model/test/unit/data/testfiles/model/classConstructor.js create mode 100644 webcommon/javascript2.model/test/unit/data/testfiles/model/classConstructor.js.model - 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: Adding an option to disable unused hint for package private elements, ignoring elements that possibly are looked up using MethodHandles.Lookup.
This is an automated email from the ASF dual-hosted git repository. jlahoda 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 731e7c9e05 Adding an option to disable unused hint for package private elements, ignoring elements that possibly are looked up using MethodHandles.Lookup. new c649c82879 Merge pull request #5173 from jlahoda/unused-improvements 731e7c9e05 is described below commit 731e7c9e05f38ee7950bf32150391d5ca2cc474a Author: Jan Lahoda AuthorDate: Sun Jan 1 09:21:22 2023 +0100 Adding an option to disable unused hint for package private elements, ignoring elements that possibly are looked up using MethodHandles.Lookup. --- .../java/editor/base/semantic/UnusedDetector.java | 88 +++- .../editor/base/semantic/UnusedDetectorTest.java | 225 + .../netbeans/modules/java/hints/bugs/Unused.java | 14 +- .../modules/java/hints/bugs/UnusedTest.java| 20 ++ 4 files changed, 335 insertions(+), 12 deletions(-) diff --git a/java/java.editor.base/src/org/netbeans/modules/java/editor/base/semantic/UnusedDetector.java b/java/java.editor.base/src/org/netbeans/modules/java/editor/base/semantic/UnusedDetector.java index d5a7cadce4..6e2e28e46f 100644 --- a/java/java.editor.base/src/org/netbeans/modules/java/editor/base/semantic/UnusedDetector.java +++ b/java/java.editor.base/src/org/netbeans/modules/java/editor/base/semantic/UnusedDetector.java @@ -22,15 +22,19 @@ import com.sun.source.tree.AssignmentTree; import com.sun.source.tree.ClassTree; import com.sun.source.tree.CompoundAssignmentTree; import com.sun.source.tree.EnhancedForLoopTree; +import com.sun.source.tree.ExpressionTree; import com.sun.source.tree.IdentifierTree; +import com.sun.source.tree.LiteralTree; import com.sun.source.tree.MemberReferenceTree; import com.sun.source.tree.MemberSelectTree; +import com.sun.source.tree.MethodInvocationTree; import com.sun.source.tree.MethodTree; import com.sun.source.tree.NewClassTree; import com.sun.source.tree.Tree; import com.sun.source.tree.Tree.Kind; import com.sun.source.tree.VariableTree; import com.sun.source.util.TreePath; +import java.lang.invoke.MethodHandles; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.Arrays; @@ -76,11 +80,13 @@ public class UnusedDetector { public static class UnusedDescription { public final Element unusedElement; public final TreePath unusedElementPath; +public final boolean packagePrivate; public final UnusedReason reason; -public UnusedDescription(Element unusedElement, TreePath unusedElementPath, UnusedReason reason) { +public UnusedDescription(Element unusedElement, TreePath unusedElementPath, boolean packagePrivate, UnusedReason reason) { this.unusedElement = unusedElement; this.unusedElementPath = unusedElementPath; +this.packagePrivate = packagePrivate; this.reason = reason; } @@ -118,39 +124,39 @@ public class UnusedDetector { boolean isWritten = uses.contains(UseTypes.WRITTEN); boolean isRead = uses.contains(UseTypes.READ); if (!isWritten && !isRead) { -result.add(new UnusedDescription(el, declaration, UnusedReason.NOT_WRITTEN_READ)); +result.add(new UnusedDescription(el, declaration, isPkgPrivate, UnusedReason.NOT_WRITTEN_READ)); } else if (!isWritten) { -result.add(new UnusedDescription(el, declaration, UnusedReason.NOT_WRITTEN)); +result.add(new UnusedDescription(el, declaration, isPkgPrivate, UnusedReason.NOT_WRITTEN)); } else if (!isRead) { -result.add(new UnusedDescription(el, declaration, UnusedReason.NOT_READ)); +result.add(new UnusedDescription(el, declaration, isPkgPrivate, UnusedReason.NOT_READ)); } } else if (el.getKind().isField() && (isPrivate || isPkgPrivate)) { -if (!isSerialSpecField(info, el)) { +if (!isSerialSpecField(info, el) && !lookedUpElement(el, uv.type2LookedUpFields, uv.allStringLiterals)) { boolean isWritten = uses.contains(UseTypes.WRITTEN); boolean isRead = uses.contains(UseTypes.READ); if (!isWritten && !isRead) { if (isPrivate || isUnusedInPkg(info, el, cancel)) { -result.add(new UnusedDescription(el, declaration, UnusedReason.NOT_WRITTEN_READ)); +result.add(new UnusedDescription(el, declaration, isPkgPrivate, UnusedReason.NOT_WRITTEN_READ)); } } else if (!isWritten) { -result.add(new UnusedDescription(el, decl
[netbeans-website] branch master updated: Archive Apache NetBeans 17.
This is an automated email from the ASF dual-hosted git repository. neilcsmith 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 8e9ec26d2 Archive Apache NetBeans 17. new e90a885e7 Merge pull request #656 from neilcsmith-net/nb17-archive 8e9ec26d2 is described below commit 8e9ec26d2446721418260fda7d57abddd5ea7b34 Author: Neil C Smith AuthorDate: Sat Jun 10 14:17:22 2023 +0100 Archive Apache NetBeans 17. --- netbeans.apache.org/src/content/download/nb17/index.adoc | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/netbeans.apache.org/src/content/download/nb17/index.adoc b/netbeans.apache.org/src/content/download/nb17/index.adoc index 6583958c1..4ddb2b4a7 100644 --- a/netbeans.apache.org/src/content/download/nb17/index.adoc +++ b/netbeans.apache.org/src/content/download/nb17/index.adoc @@ -37,10 +37,8 @@ for important requirements for download pages for Apache projects. :netbeans-version: 17 // base URLs - when archiving, delete the next 2 lines and uncomment the following 2 -:url-download: https://www.apache.org/dyn/closer.cgi/netbeans/ -:url-download-keychecksum: https://downloads.apache.org/netbeans/ -// :url-download: https://archive.apache.org/dist/netbeans/ -// :url-download-keychecksum: https://archive.apache.org/dist/netbeans/ +:url-download: https://archive.apache.org/dist/netbeans/ +:url-download-keychecksum: https://archive.apache.org/dist/netbeans/ url-download depends of release status archived or not - 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
svn commit: r62360 - in /release/netbeans: netbeans-installers/17/ netbeans-vscode-ext/17.0.301/ netbeans-vscode-ext/17.0/ netbeans/17/
Author: neilcsmith Date: Sat Jun 10 14:11:18 2023 New Revision: 62360 Log: Archive Apache NetBeans 17. Removed: release/netbeans/netbeans-installers/17/ release/netbeans/netbeans-vscode-ext/17.0/ release/netbeans/netbeans-vscode-ext/17.0.301/ release/netbeans/netbeans/17/ - 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: maven remote index filters
This is an automated email from the ASF dual-hosted git repository. mbien pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/netbeans.git The following commit(s) were added to refs/heads/master by this push: new afac5970d9 maven remote index filters new a48daa0b9c Merge pull request #5922 from mbien/index-filters afac5970d9 is described below commit afac5970d9f63d48344174f104bd02ca0e40a01f Author: Michael Bien AuthorDate: Fri May 12 12:14:24 2023 +0200 maven remote index filters - index only interesting fields to reduce index size - this is achieved by using a custom index creator since filters can't remove fields during extraction - index creator has some optimizations to avoid using String.split() which can be contributed upstream at some point - reduces single threaded index size from 5.7 GB to 2.8 GB and multi threaded size from 6.4 GB to 3,4 GB - new configurable artifact date cutoff filter - off by default, configurable in options - can shrink the index further --- .../MinimalArtifactInfoRemoteIndexCreator.java | 204 + .../maven/indexer/NexusRepositoryIndexerImpl.java | 100 +- .../maven/indexer/api/RepositoryPreferences.java | 9 + .../modules/maven/options/Bundle.properties| 4 + .../modules/maven/options/SettingsPanel.form | 74 +++- .../modules/maven/options/SettingsPanel.java | 76 ++-- 6 files changed, 403 insertions(+), 64 deletions(-) diff --git a/java/maven.indexer/src/org/netbeans/modules/maven/indexer/MinimalArtifactInfoRemoteIndexCreator.java b/java/maven.indexer/src/org/netbeans/modules/maven/indexer/MinimalArtifactInfoRemoteIndexCreator.java new file mode 100644 index 00..0a2cdc7141 --- /dev/null +++ b/java/maven.indexer/src/org/netbeans/modules/maven/indexer/MinimalArtifactInfoRemoteIndexCreator.java @@ -0,0 +1,204 @@ +/* + * 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.maven.indexer; + +import org.apache.lucene.document.Document; +import org.apache.maven.index.ArtifactAvailability; +import org.apache.maven.index.ArtifactInfo; +import org.apache.maven.index.creator.MinimalArtifactInfoIndexCreator; + +/** + * Creates compact remote repository indices by discarding less important fields, + * or fields which can be easily substituted by online search services. + * + * @author mbien + */ +final class MinimalArtifactInfoRemoteIndexCreator extends MinimalArtifactInfoIndexCreator { + +private static final char FS = ArtifactInfo.FS.charAt(0); + +static { +if (ArtifactInfo.FS.length() != 1) { +throw new IllegalStateException("field format changed"); +} +} + +@Override +public void updateDocument(ArtifactInfo ai, Document doc) { +String info = ArtifactInfo.nvl(ai.getPackaging()) ++ ArtifactInfo.FS ++ ai.getLastModified() ++ ArtifactInfo.FS ++ ai.getSize() ++ ArtifactInfo.FS ++ ai.getSourcesExists().toString() ++ ArtifactInfo.FS ++ ai.getJavadocExists().toString() ++ ArtifactInfo.FS ++ ai.getSignatureExists().toString() ++ ArtifactInfo.FS ++ ai.getFileExtension(); + +doc.add(FLD_INFO.toField(info)); + +doc.add(FLD_GROUP_ID_KW.toField(ai.getGroupId())); +doc.add(FLD_ARTIFACT_ID_KW.toField(ai.getArtifactId())); +doc.add(FLD_VERSION_KW.toField(ai.getVersion())); + +// V3 +doc.add(FLD_GROUP_ID.toField(ai.getGroupId())); +doc.add(FLD_ARTIFACT_ID.toField(ai.getArtifactId())); +doc.add(FLD_VERSION.toField(ai.getVersion())); +doc.add(FLD_EXTENSION.toField(ai.getFileExtension())); + +if (ai.getName() != null) { +doc.add(FLD_NAME.toField(ai.getName())); +} + +//if (ai.getDescription() != null) { +//doc.add(FLD_DESCRIPTION.toField(ai.getDescription())); +//} + +if (ai.getPackaging() != null) { +doc.add(FLD_PACKA