[jira] [Updated] (NETBEANS-3045) Add customize panel in Installer wizard to select install components
[ https://issues.apache.org/jira/browse/NETBEANS-3045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ASF GitHub Bot updated NETBEANS-3045: - Labels: pull-request-available (was: ) > Add customize panel in Installer wizard to select install components > -- > > Key: NETBEANS-3045 > URL: https://issues.apache.org/jira/browse/NETBEANS-3045 > Project: NetBeans > Issue Type: Improvement >Reporter: Reema Taneja >Assignee: Reema Taneja >Priority: Major > Labels: pull-request-available > > Need to add Customize panel in Installer wizard that provides option to users > to install a subset of the full IDE, eg like PHP, HTML/JavaScript, Javase, > Javaee, CPP -- This message was sent by Atlassian Jira (v8.3.2#803003) - 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
[jira] [Commented] (NETBEANS-3100) Ant project not runnable
[ https://issues.apache.org/jira/browse/NETBEANS-3100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16930255#comment-16930255 ] Geertjan Wielenga commented on NETBEANS-3100: - Start with the current release, which is 11.1. Can you reproduce the problem there? > Ant project not runnable > > > Key: NETBEANS-3100 > URL: https://issues.apache.org/jira/browse/NETBEANS-3100 > Project: NetBeans > Issue Type: Bug > Components: projects - Ant Project >Affects Versions: 11.2 > Environment: NetBeans-dev-netbeans-linux-1247-on-20190915-release > Windows > OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.222-b10, mixed mode) > OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.4+11, mixed mode) >Reporter: Benjamin Graf >Priority: Major > > Plain Ant based Java Application is not runnable when using Java 11. It does > work with Java 8. No error message, no log, total silence. -- This message was sent by Atlassian Jira (v8.3.2#803003) - 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
[jira] [Commented] (NETBEANS-3100) Ant project not runnable
[ https://issues.apache.org/jira/browse/NETBEANS-3100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16930250#comment-16930250 ] Benjamin Graf commented on NETBEANS-3100: - Have a look to environment. I'm talking about current snapshots! ;-) > Ant project not runnable > > > Key: NETBEANS-3100 > URL: https://issues.apache.org/jira/browse/NETBEANS-3100 > Project: NetBeans > Issue Type: Bug > Components: projects - Ant Project >Affects Versions: 11.2 > Environment: NetBeans-dev-netbeans-linux-1247-on-20190915-release > Windows > OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.222-b10, mixed mode) > OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.4+11, mixed mode) >Reporter: Benjamin Graf >Priority: Major > > Plain Ant based Java Application is not runnable when using Java 11. It does > work with Java 8. No error message, no log, total silence. -- This message was sent by Atlassian Jira (v8.3.2#803003) - 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
[jira] [Resolved] (NETBEANS-3085) One unit test of php.editor fails
[ https://issues.apache.org/jira/browse/NETBEANS-3085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Junichi Yamamoto resolved NETBEANS-3085. Fix Version/s: 11.2 Resolution: Fixed > One unit test of php.editor fails > - > > Key: NETBEANS-3085 > URL: https://issues.apache.org/jira/browse/NETBEANS-3085 > Project: NetBeans > Issue Type: Bug > Components: editor - Formatting & Indentation, php - Editor >Reporter: Junichi Yamamoto >Assignee: Jan Lahoda >Priority: Major > Labels: pull-request-available > Fix For: 11.2 > > Time Spent: 0.5h > Remaining Estimate: 0h > > PhpTypedTextInterceptorTest.testIssue256659_08()[1] seems to fails after > [https://github.com/apache/netbeans/pull/1443]. > [1][https://github.com/apache/netbeans/blob/0580490be48a9a2ec6279218fd0e39561affdab8/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/typinghooks/PhpTypedTextInterceptorTest.java#L645-L647] -- This message was sent by Atlassian Jira (v8.3.2#803003) - 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
[jira] [Assigned] (NETBEANS-3085) One unit test of php.editor fails
[ https://issues.apache.org/jira/browse/NETBEANS-3085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Junichi Yamamoto reassigned NETBEANS-3085: -- Assignee: Jan Lahoda > One unit test of php.editor fails > - > > Key: NETBEANS-3085 > URL: https://issues.apache.org/jira/browse/NETBEANS-3085 > Project: NetBeans > Issue Type: Bug > Components: editor - Formatting & Indentation, php - Editor >Reporter: Junichi Yamamoto >Assignee: Jan Lahoda >Priority: Major > Labels: pull-request-available > Time Spent: 0.5h > Remaining Estimate: 0h > > PhpTypedTextInterceptorTest.testIssue256659_08()[1] seems to fails after > [https://github.com/apache/netbeans/pull/1443]. > [1][https://github.com/apache/netbeans/blob/0580490be48a9a2ec6279218fd0e39561affdab8/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/typinghooks/PhpTypedTextInterceptorTest.java#L645-L647] -- This message was sent by Atlassian Jira (v8.3.2#803003) - 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: Improving code completion appearance for both LSP client and Java LSP server.
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 aa742a6 Improving code completion appearance for both LSP client and Java LSP server. aa742a6 is described below commit aa742a673a21c13de008f5f30621a936997e478f Author: Jan Lahoda AuthorDate: Mon Sep 16 07:17:33 2019 +0200 Improving code completion appearance for both LSP client and Java LSP server. --- .../client/bindings/CompletionProviderImpl.java| 121 ++--- .../lsp/server/text/TextDocumentServiceImpl.java | 36 +++--- .../modules/java/lsp/server/ServerTest.java| 4 +- 3 files changed, 99 insertions(+), 62 deletions(-) diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/CompletionProviderImpl.java b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/CompletionProviderImpl.java index 75a017f..8c873b4 100644 --- a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/CompletionProviderImpl.java +++ b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/CompletionProviderImpl.java @@ -37,8 +37,11 @@ import javax.swing.text.StyledDocument; import org.eclipse.lsp4j.CompletionItem; import org.eclipse.lsp4j.CompletionItemKind; import org.eclipse.lsp4j.CompletionList; +import org.eclipse.lsp4j.CompletionOptions; import org.eclipse.lsp4j.CompletionParams; +import org.eclipse.lsp4j.MarkupContent; import org.eclipse.lsp4j.ParameterInformation; +import org.eclipse.lsp4j.ServerCapabilities; import org.eclipse.lsp4j.SignatureHelp; import org.eclipse.lsp4j.SignatureInformation; import org.eclipse.lsp4j.TextDocumentIdentifier; @@ -62,6 +65,7 @@ import org.openide.filesystems.FileObject; import org.openide.text.NbDocument; import org.openide.util.Exceptions; import org.openide.util.ImageUtilities; +import org.openide.xml.XMLUtil; /** * @@ -162,20 +166,13 @@ public class CompletionProviderImpl implements CompletionProvider { for (CompletionItem i : items) { String insert = i.getInsertText() != null ? i.getInsertText() : i.getLabel(); String leftLabel = encode(i.getLabel()); -String rightLabel = encode(""); //TODO: anything we could show there? -String sortText = i.getSortText() != null ? i.getSortText() : i.getLabel(); -String header = "" + "" + (i.getDetail() != null ? i.getDetail() : i.getLabel()) + ""; -String documentation; -if (i.getDocumentation() != null) { -header += ""; -if (i.getDocumentation().isLeft()) { -documentation = header + i.getDocumentation().getLeft(); -} else { -documentation = header + i.getDocumentation().getRight().getValue(); //TODO: convert markup! -} +String rightLabel; +if (i.getDetail() != null) { +rightLabel = encode(i.getDetail()); } else { -documentation = header; +rightLabel = null; } +String sortText = i.getSortText() != null ? i.getSortText() : i.getLabel(); CompletionItemKind kind = i.getKind(); Icon ic = Icons.getCompletionIcon(kind); ImageIcon icon = new ImageIcon(ImageUtilities.icon2Image(ic)); @@ -226,36 +223,66 @@ public class CompletionProviderImpl implements CompletionProvider { @Override public CompletionTask createDocumentationTask() { -return new CompletionTask() { +return new AsyncCompletionTask(new AsyncCompletionQuery() { @Override -public void query(CompletionResultSet resultSet) { -resultSet.setDocumentation(new CompletionDocumentation() { -@Override -public String getText() { -return documentation; -} -@Override -public URL getURL() { -return null; -} -@Override -public CompletionDocumentatio
[netbeans] branch master updated: [NETBEANS-3085] Improving text block handling.
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 1485d27 [NETBEANS-3085] Improving text block handling. 1485d27 is described below commit 1485d27179ef28f750bdb4ceb8017b3c93e6098c Author: Jan Lahoda AuthorDate: Mon Sep 16 07:16:41 2019 +0200 [NETBEANS-3085] Improving text block handling. --- .../src/org/netbeans/editor/BaseKit.java | 7 +-- ide/editor.lib2/apichanges.xml | 12 + ide/editor.lib2/nbproject/project.properties | 2 +- .../editor/typinghooks/TypedTextInterceptor.java | 30 +++- java/java.editor/nbproject/project.xml | 2 +- .../modules/editor/java/TypingCompletion.java | 39 --- .../java/editor/imports/ClipboardHandler.java | 3 +- .../editor/java/TypingCompletionUnitTest.java | 32 - java/java.lexer/apichanges.xml | 4 +- .../src/org/netbeans/lib/java/lexer/JavaLexer.java | 37 -- .../lib/java/lexer/JavaLexerBatchTest.java | 56 ++ .../org/netbeans/api/java/source/SourceUtils.java | 20 .../modules/java/source/pretty/VeryPretty.java | 3 +- 13 files changed, 172 insertions(+), 75 deletions(-) diff --git a/ide/editor.lib/src/org/netbeans/editor/BaseKit.java b/ide/editor.lib/src/org/netbeans/editor/BaseKit.java index 0add683..3eeebc3 100644 --- a/ide/editor.lib/src/org/netbeans/editor/BaseKit.java +++ b/ide/editor.lib/src/org/netbeans/editor/BaseKit.java @@ -1250,9 +1250,10 @@ public class BaseKit extends DefaultEditorKit { Object[] r = transaction.textTyped(); String insertionText = r == null ? cmd : (String) r[0]; int caretPosition = r == null ? -1 : (Integer) r[1]; +boolean formatNewLines = r == null ? false : (Boolean) r[2]; try { -performTextInsertion(target, insertionOffset.getOffset(), insertionText, caretPosition); +performTextInsertion(target, insertionOffset.getOffset(), insertionText, caretPosition, formatNewLines); result[0] = Boolean.TRUE; result[1] = insertionText; } catch (BadLocationException ble) { @@ -1357,7 +1358,7 @@ public class BaseKit extends DefaultEditorKit { // Private implementation // -private void performTextInsertion(JTextComponent target, int insertionOffset, String insertionText, int caretPosition) throws BadLocationException { +private void performTextInsertion(JTextComponent target, int insertionOffset, String insertionText, int caretPosition, boolean formatNewLines) throws BadLocationException { final BaseDocument doc = (BaseDocument)target.getDocument(); try { @@ -1378,7 +1379,7 @@ public class BaseKit extends DefaultEditorKit { int targetCaretOffset = caretPosition; for (int i = 0; i < insertionText.length();) { int end = insertionText.indexOf('\n', i); -if (end == (-1)) end = insertionText.length(); +if (end == (-1) || !formatNewLines) end = insertionText.length(); String currentLine = insertionText.substring(i, end); if (i == 0) { if (Utilities.isSelectionShowing(caret)) { // valid selection diff --git a/ide/editor.lib2/apichanges.xml b/ide/editor.lib2/apichanges.xml index 62f76c5..0387d66 100644 --- a/ide/editor.lib2/apichanges.xml +++ b/ide/editor.lib2/apichanges.xml @@ -83,6 +83,18 @@ is the proper place. + +Ability to indent text set to TypedTextInterceptor + + + + + +Added TypedTextInterceptor.MutableContext.setText overload, which + optionally re-indents the provided text. + + + Prepended text for highlights diff --git a/ide/editor.lib2/nbproject/project.properties b/ide/editor.lib2/nbproject/project.properties index 8af21d9..a469b5b 100644 --- a/ide/editor.lib2/nbproject/project.properties +++ b/ide/editor.lib2/nbproject/project.properties @@ -18,7 +18,7 @@ is.autoload=true javac.source=1.7 javac.compilerargs=-Xlint:unchecked -spec.version.base=2.25.0 +spec.version.base=2.26.0 javadoc.arch=${basedir}/arch.xml javadoc.apichanges=${
[jira] [Commented] (NETBEANS-2158) No error when accessing undeclared or private properties
[ https://issues.apache.org/jira/browse/NETBEANS-2158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16930240#comment-16930240 ] Czukowski commented on NETBEANS-2158: - [~fabs25], [~hosunlee] this is not necessarily an error, some PHP classes implement wild magic tricks to allow just that and NetBeans would have to work really hard to not produce a false positive warning in those cases. I suggest you give PHPStan a try, which is specifically designed to parse PHP code and warn about all kinds of errors, Netbeans has a support for it. > No error when accessing undeclared or private properties > > > Key: NETBEANS-2158 > URL: https://issues.apache.org/jira/browse/NETBEANS-2158 > Project: NetBeans > Issue Type: New Feature > Components: php - Code Analysis, php - Editor >Affects Versions: 10.0, 11.0 >Reporter: Fabian Kleinhans >Priority: Major > Labels: php, php7 > Attachments: code.png > > > Hi, > I just switched from Netbeans 8.2 to 10 some days ago. Now I wonder why > accessing undeclared or private properties in my PHP files are not marked in > the code like in 8.2. E.g.: > {code:java} > class A { > > private $bar; > > public function __construct() { > $this->bar = 1; > } > } > $foo = new A(); > echo $foo->bar; > echo $foo->bar2; > {code} > This code has green status saying "No errors". The project is set as > PHP-project. > Have I missed a setting? I spent hours of research but didn't find a solution. > Thanks for any hint! > Fabian > -- This message was sent by Atlassian Jira (v8.3.2#803003) - 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
[jira] [Commented] (NETBEANS-3100) Ant project not runnable
[ https://issues.apache.org/jira/browse/NETBEANS-3100?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16930064#comment-16930064 ] Geertjan Wielenga commented on NETBEANS-3100: - But 11.2 does not exist. > Ant project not runnable > > > Key: NETBEANS-3100 > URL: https://issues.apache.org/jira/browse/NETBEANS-3100 > Project: NetBeans > Issue Type: Bug > Components: projects - Ant Project >Affects Versions: 11.2 > Environment: NetBeans-dev-netbeans-linux-1247-on-20190915-release > Windows > OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.222-b10, mixed mode) > OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.4+11, mixed mode) >Reporter: Benjamin Graf >Priority: Major > > Plain Ant based Java Application is not runnable when using Java 11. It does > work with Java 8. No error message, no log, total silence. -- This message was sent by Atlassian Jira (v8.3.2#803003) - 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
[jira] [Updated] (NETBEANS-3085) One unit test of php.editor fails
[ https://issues.apache.org/jira/browse/NETBEANS-3085?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ASF GitHub Bot updated NETBEANS-3085: - Labels: pull-request-available (was: ) > One unit test of php.editor fails > - > > Key: NETBEANS-3085 > URL: https://issues.apache.org/jira/browse/NETBEANS-3085 > Project: NetBeans > Issue Type: Bug > Components: editor - Formatting & Indentation, php - Editor >Reporter: Junichi Yamamoto >Priority: Major > Labels: pull-request-available > > PhpTypedTextInterceptorTest.testIssue256659_08()[1] seems to fails after > [https://github.com/apache/netbeans/pull/1443]. > [1][https://github.com/apache/netbeans/blob/0580490be48a9a2ec6279218fd0e39561affdab8/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/typinghooks/PhpTypedTextInterceptorTest.java#L645-L647] -- This message was sent by Atlassian Jira (v8.3.2#803003) - 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
[jira] [Created] (NETBEANS-3100) Ant project not runnable
Benjamin Graf created NETBEANS-3100: --- Summary: Ant project not runnable Key: NETBEANS-3100 URL: https://issues.apache.org/jira/browse/NETBEANS-3100 Project: NetBeans Issue Type: Bug Components: projects - Ant Project Affects Versions: 11.2 Environment: NetBeans-dev-netbeans-linux-1247-on-20190915-release Windows OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.222-b10, mixed mode) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.4+11, mixed mode) Reporter: Benjamin Graf Plain Ant based Java Application is not runnable when using Java 11. It does work with Java 8. No error message, no log, total silence. -- This message was sent by Atlassian Jira (v8.3.2#803003) - 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
[jira] [Resolved] (NETBEANS-3098) Netbeans 11.1 threw a Null Pointer Exception on start up
[ https://issues.apache.org/jira/browse/NETBEANS-3098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Laszlo Kishalmi resolved NETBEANS-3098. --- Resolution: Duplicate > Netbeans 11.1 threw a Null Pointer Exception on start up > > > Key: NETBEANS-3098 > URL: https://issues.apache.org/jira/browse/NETBEANS-3098 > Project: NetBeans > Issue Type: Bug >Affects Versions: 11.1 > Environment: Windows 10 Pro >Reporter: kenneth west >Priority: Trivial > Attachments: messages.log > > > NetBeans 11.1 issued a "Null Pointer Exception" notification on start up. > However, it did start up OK and the bug doesn't seem to have adversely > affected its operation in respect to PHP and Javascript coding. I'm > reporting it as requested by the notification and have attached the Message > Log for your review. > > UPDATE: after filing this Bug Report I restarted Windows and NetBeans and > the error didn't reoccur. > > Ken West -- This message was sent by Atlassian Jira (v8.3.2#803003) - 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-2349] Convert switch typecast case to switch expression (#1237)
This is an automated email from the ASF dual-hosted git repository. arusinha 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 dfa1107 [NETBEANS-2349] Convert switch typecast case to switch expression (#1237) dfa1107 is described below commit dfa11078c6edcc82d999d797fc1c9648a7d114ce Author: Vikas Prabhakar AuthorDate: Sun Sep 15 18:00:26 2019 +0530 [NETBEANS-2349] Convert switch typecast case to switch expression (#1237) --- .../modules/java/hints/errors/Utilities.java | 59 +- .../java/hints/jdk/ConvertSwitchToRuleSwitch.java | 6 +- .../hints/jdk/ConvertSwitchToRuleSwitchTest.java | 94 ++ 3 files changed, 135 insertions(+), 24 deletions(-) diff --git a/java/java.hints/src/org/netbeans/modules/java/hints/errors/Utilities.java b/java/java.hints/src/org/netbeans/modules/java/hints/errors/Utilities.java index b436b55..9b8f8f9 100644 --- a/java/java.hints/src/org/netbeans/modules/java/hints/errors/Utilities.java +++ b/java/java.hints/src/org/netbeans/modules/java/hints/errors/Utilities.java @@ -122,7 +122,6 @@ import org.openide.NotifyDescriptor; import org.openide.filesystems.FileObject; import org.openide.text.NbDocument; import org.openide.util.Exceptions; - import static com.sun.source.tree.Tree.Kind.*; import com.sun.source.tree.UnaryTree; import com.sun.source.util.TreePathScanner; @@ -137,7 +136,6 @@ import com.sun.tools.javac.tree.JCTree; import com.sun.tools.javac.util.JCDiagnostic; import com.sun.tools.javac.util.Log; import java.net.URI; -import java.util.concurrent.Callable; import javax.lang.model.element.NestingKind; import javax.lang.model.type.ErrorType; import javax.lang.model.type.UnionType; @@ -161,6 +159,7 @@ import org.openide.util.Pair; public class Utilities { public static final String JAVA_MIME_TYPE = "text/x-java"; private static final String DEFAULT_NAME = "name"; +enum SWITCH_TYPE { TRADITIONAL_SWITCH, RULE_SWITCH, SWITCH_EXPRESSION } public Utilities() { } @@ -3167,18 +3166,20 @@ public class Utilities { return true; } -public static void performRewriteRuleSwitch(JavaFix.TransformationContext ctx, TreePath tp, Tree st, boolean isExpression) { +public static void performRewriteRuleSwitch(JavaFix.TransformationContext ctx, TreePath tp, Tree st, boolean isSwitchExpression) { WorkingCopy wc = ctx.getWorkingCopy(); TreeMaker make = wc.getTreeMaker(); List newCases = new ArrayList<>(); +SWITCH_TYPE switchType = SWITCH_TYPE.TRADITIONAL_SWITCH; +Tree typeCastTree = null; List cases; Set variablesDeclaredInOtherCases = new HashSet<>(); List patterns = new ArrayList<>(); -Tree variable = null; -boolean isReturnExpression = false; -boolean switchExpressionFlag = st.getKind().toString().equals(TreeShims.SWITCH_EXPRESSION); -if (switchExpressionFlag) { +Tree leftVariable = null; +boolean ruleSwitchFlag = st.getKind().toString().equals(TreeShims.SWITCH_EXPRESSION); +if (ruleSwitchFlag) { cases = TreeShims.getCases(st); +switchType = SWITCH_TYPE.RULE_SWITCH; } else { cases = ((SwitchTree) st).getCases(); } @@ -3197,7 +3198,7 @@ public class Utilities { continue; } //last case, no break -} else if (!switchExpressionFlag && statements.get(statements.size() - 1).getKind() == Tree.Kind.BREAK +} else if (!ruleSwitchFlag && statements.get(statements.size() - 1).getKind() == Tree.Kind.BREAK && ctx.getWorkingCopy().getTreeUtilities().getBreakContinueTarget(new TreePath(new TreePath(tp, ct), statements.get(statements.size() - 1))) == st) { statements.remove(statements.size() - 1); } else { @@ -3259,15 +3260,19 @@ public class Utilities { body = statements.get(0); } } -if (isExpression) { +if (isSwitchExpression) { +switchType = SWITCH_TYPE.SWITCH_EXPRESSION; if (statements.get(0).getKind() == Tree.Kind.RETURN) { body = ((JCTree.JCReturn) statements.get(0)).getExpression(); -isReturnExpression = true; } else { JCTree.JCExpressionStatement jceTree = (JCTree.JCExpressionStatement) statements.get(0); body = ((JCTree.JCAssign) jceTree.expr).rhs; -variable = ((JCTree.JCAssign) jceTree.expr).lhs; +leftVariable = ((JCTree.JCAssign) jceTree.expr).lhs; } +if (body.getKind() == Tree.Kind.TYPE_CAST) { +typeCastTree = ((JCTree.JCTypeCast)body).getType(); +
[jira] [Created] (NETBEANS-3099) Test-Cases Failures in JDK-13 nb-javac
ARUNAVA SINHA created NETBEANS-3099: --- Summary: Test-Cases Failures in JDK-13 nb-javac Key: NETBEANS-3099 URL: https://issues.apache.org/jira/browse/NETBEANS-3099 Project: NetBeans Issue Type: Bug Affects Versions: 11.2 Reporter: ARUNAVA SINHA Below Test-cases needs to be corrected which are failing in JDK-13 [junit] Testcase: testTextBlock1(org.netbeans.modules.editor.java.TypingCompletionUnitTest): Caused an ERROR [junit] Testcase: testTextBlock4(org.netbeans.modules.editor.java.TypingCompletionUnitTest): Caused an ERROR [junit] Testcase: testTextBlock5(org.netbeans.modules.editor.java.TypingCompletionUnitTest): Caused an ERROR" [junit] Testcase: testYield(org.netbeans.modules.java.editor.base.semantic.DetectorTest): Caused an ERROR [junit] Testcase: testRawStringLiteral(org.netbeans.modules.java.editor.base.semantic.DetectorTest): Caused an ERROR" [junit] Testcase: testCase1(org.netbeans.modules.java.hints.errors.VarCompDeclarationTest): Caused an ERROR [junit] Testcase: testCase2(org.netbeans.modules.java.hints.errors.VarCompDeclarationTest): Caused an ERROR [junit] Testcase: testCase3(org.netbeans.modules.java.hints.errors.VarCompDeclarationTest): Caused an ERROR [junit] Testcase: testCase4(org.netbeans.modules.java.hints.errors.VarCompDeclarationTest): Caused an ERROR [junit] Testcase: testCase5(org.netbeans.modules.java.hints.errors.VarCompDeclarationTest): Caused an ERROR [junit] Testcase: testCase6(org.netbeans.modules.java.hints.errors.VarCompDeclarationTest): Caused an ERROR [junit] Testcase: testCase7(org.netbeans.modules.java.hints.errors.VarCompDeclarationTest): Caused an ERROR [junit] Testcase: testCase8(org.netbeans.modules.java.hints.errors.VarCompDeclarationTest): Caused an ERROR [junit] Testcase: testCase9(org.netbeans.modules.java.hints.errors.VarCompDeclarationTest): Caused an ERROR [junit] Testcase: testCase10(org.netbeans.modules.java.hints.errors.VarCompDeclarationTest): Caused an ERROR [junit] Testcase: testCase11(org.netbeans.modules.java.hints.errors.VarCompDeclarationTest): Caused an ERROR [junit] Testcase: testNewLinesAtEnd(org.netbeans.modules.java.hints.jdk.ConvertToTextBlockTest): Caused an ERROR [junit] Testcase: testNewLineAtEnd(org.netbeans.modules.java.hints.jdk.ConvertToTextBlockTest): Caused an ERROR [junit] Testcase: testFixWorking(org.netbeans.modules.java.hints.jdk.ConvertToTextBlockTest): Caused an ERROR [junit] Testcase: test175535(org.netbeans.api.java.source.ElementsTest): Caused an ERROR [junit] Testcase: testTextBlocksNew(org.netbeans.api.java.source.gen.LiteralTest): Caused an ERROR" -- This message was sent by Atlassian Jira (v8.3.2#803003) - 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
[jira] [Resolved] (NETBEANS-2207) Removing (old) javadoc from nb-javac for JDK-13
[ https://issues.apache.org/jira/browse/NETBEANS-2207?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ARUNAVA SINHA resolved NETBEANS-2207. - Fix Version/s: (was: 12.0) 11.1 Resolution: Fixed > Removing (old) javadoc from nb-javac for JDK-13 > --- > > Key: NETBEANS-2207 > URL: https://issues.apache.org/jira/browse/NETBEANS-2207 > Project: NetBeans > Issue Type: Bug >Reporter: ARUNAVA SINHA >Assignee: ARUNAVA SINHA >Priority: Major > Fix For: 11.1 > > > nb-javac currently provides the "old" javadoc API (com.sun.javadoc.**), which > is used on several places inside NetBeans. > > But, that API has been removed from JDK 13: > [https://bugs.openjdk.java.net/browse/JDK-8215584] > > So, we cannot really use the API anymore for JDK 13 and beyond > So support for the same has to be removed in nb-javac -- This message was sent by Atlassian Jira (v8.3.2#803003) - 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
[jira] [Updated] (NETBEANS-3096) NB-Javac Upgrade to JDK-13
[ https://issues.apache.org/jira/browse/NETBEANS-3096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ASF GitHub Bot updated NETBEANS-3096: - Labels: pull-request-available (was: ) > NB-Javac Upgrade to JDK-13 > -- > > Key: NETBEANS-3096 > URL: https://issues.apache.org/jira/browse/NETBEANS-3096 > Project: NetBeans > Issue Type: Task >Affects Versions: 11.2 >Reporter: ARUNAVA SINHA >Assignee: ARUNAVA SINHA >Priority: Major > Labels: pull-request-available > Fix For: 11.2 > > > NB-11.2 will Support JDK-13. Need to upgrade nb-javac to make it in sync > with JDK-13 > nb-javac link: [https://hg.netbeans.org/main/nb-java-x] -- This message was sent by Atlassian Jira (v8.3.2#803003) - 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
[jira] [Resolved] (NETBEANS-2953) NPE after pressing "DTDs and XML Schemas" menu entry
[ https://issues.apache.org/jira/browse/NETBEANS-2953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Graf resolved NETBEANS-2953. - Resolution: Fixed > NPE after pressing "DTDs and XML Schemas" menu entry > > > Key: NETBEANS-2953 > URL: https://issues.apache.org/jira/browse/NETBEANS-2953 > Project: NetBeans > Issue Type: Bug >Affects Versions: 11.1 > Environment: Windows 10 > OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.4+11, mixed mode) >Reporter: Benjamin Graf >Priority: Major > Labels: pull-request-available > Fix For: 11.2 > > Time Spent: 40m > Remaining Estimate: 0h > > Following stacktrace occurs every time when trying to open "DTDs and XML > Schemas" menu entry: > {noformat} > java.lang.NullPointerException > at > java.base/java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936) > at java.base/java.util.Properties.get(Properties.java:1311) > at org.openide.util.NbCollections$CheckedMap.get(NbCollections.java:385) > at org.openide.util.NbBundle$PBundle.handleGetObject(NbBundle.java:880) > at java.base/java.util.ResourceBundle.getObject(ResourceBundle.java:555) > at java.base/java.util.ResourceBundle.getString(ResourceBundle.java:521) > at org.openide.util.NbBundle.getMessage(NbBundle.java:617) > at > org.netbeans.modules.payara.jakartaee.RunTimeDDCatalog.getDisplayName(RunTimeDDCatalog.java:382) > at > org.netbeans.modules.xml.catalog.CatalogRootNode$RootChildren.compare(CatalogRootNode.java:249) > at java.base/java.util.TreeMap.put(TreeMap.java:550) > at java.base/java.util.TreeSet.add(TreeSet.java:255) > at > org.netbeans.modules.xml.catalog.CatalogRootNode$RootChildren.createKeys(CatalogRootNode.java:225) > at > org.netbeans.modules.xml.catalog.CatalogRootNode$RootChildren.addNotify(CatalogRootNode.java:183) > at org.openide.nodes.Children.callAddNotify(Children.java:550) > at > org.openide.nodes.EntrySupportDefault.getArray(EntrySupportDefault.java:627) > at > org.openide.nodes.EntrySupportDefault.getNodes(EntrySupportDefault.java:98) > at > org.openide.nodes.EntrySupportDefault.getNodes(EntrySupportDefault.java:149) > at > org.openide.nodes.EntrySupportDefault.getNodesCount(EntrySupportDefault.java:153) > at org.openide.nodes.Children.getNodesCount(Children.java:484) > at > org.openide.explorer.view.VisualizerNode.getChildren(VisualizerNode.java:234) > at > org.openide.explorer.view.VisualizerNode.getChildren(VisualizerNode.java:224) > at > org.openide.explorer.view.VisualizerNode.getChildCount(VisualizerNode.java:301) > at > java.desktop/javax.swing.tree.DefaultTreeModel.getChildCount(DefaultTreeModel.java:192) > at > java.desktop/javax.swing.tree.FixedHeightLayoutCache$FHTreeStateNode.expand(FixedHeightLayoutCache.java:1155) > at > java.desktop/javax.swing.tree.FixedHeightLayoutCache.rebuild(FixedHeightLayoutCache.java:620) > at > java.desktop/javax.swing.tree.FixedHeightLayoutCache.treeStructureChanged(FixedHeightLayoutCache.java:492) > at > java.desktop/javax.swing.plaf.basic.BasicTreeUI$Handler.treeStructureChanged(BasicTreeUI.java:4324) > at > java.desktop/javax.swing.tree.DefaultTreeModel.fireTreeStructureChanged(DefaultTreeModel.java:607) > at > java.desktop/javax.swing.tree.DefaultTreeModel.nodeStructureChanged(DefaultTreeModel.java:391) > at > java.desktop/javax.swing.tree.DefaultTreeModel.setRoot(DefaultTreeModel.java:141) > at org.openide.explorer.view.NodeTreeModel$1.run(NodeTreeModel.java:98) > at > org.netbeans.modules.openide.util.NbMutexEventProvider$Event.doEvent(NbMutexEventProvider.java:95) > at > org.netbeans.modules.openide.util.NbMutexEventProvider$Event.readAccess(NbMutexEventProvider.java:70) > at > org.netbeans.modules.openide.util.LazyMutexImplementation.readAccess(LazyMutexImplementation.java:66) > at org.openide.util.Mutex.readAccess(Mutex.java:235) > at > org.openide.explorer.view.NodeTreeModel.setNode(NodeTreeModel.java:83) > at org.openide.explorer.view.TreeView$4.run(TreeView.java:831) > at > org.netbeans.modules.openide.util.NbMutexEventProvider$Event.doEvent(NbMutexEventProvider.java:95) > at > org.netbeans.modules.openide.util.NbMutexEventProvider$Event.readAccess(NbMutexEventProvider.java:70) > at > org.netbeans.modules.openide.util.LazyMutexImplementation.readAccess(LazyMutexImplementation.java:66) > at org.openide.util.Mutex.readAccess(Mutex.java:235) > at > org.openide.explorer.view.TreeView.synchronizeRootContext(TreeView.java:821) > at > org.openide.explorer.view.TreeView.lookupExplorerManager(Tree
[jira] [Commented] (NETBEANS-2953) NPE after pressing "DTDs and XML Schemas" menu entry
[ https://issues.apache.org/jira/browse/NETBEANS-2953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16929917#comment-16929917 ] Benjamin Graf commented on NETBEANS-2953: - Patch works for me thx! :) > NPE after pressing "DTDs and XML Schemas" menu entry > > > Key: NETBEANS-2953 > URL: https://issues.apache.org/jira/browse/NETBEANS-2953 > Project: NetBeans > Issue Type: Bug >Affects Versions: 11.1 > Environment: Windows 10 > OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.4+11, mixed mode) >Reporter: Benjamin Graf >Priority: Major > Labels: pull-request-available > Fix For: 11.2 > > Time Spent: 40m > Remaining Estimate: 0h > > Following stacktrace occurs every time when trying to open "DTDs and XML > Schemas" menu entry: > {noformat} > java.lang.NullPointerException > at > java.base/java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936) > at java.base/java.util.Properties.get(Properties.java:1311) > at org.openide.util.NbCollections$CheckedMap.get(NbCollections.java:385) > at org.openide.util.NbBundle$PBundle.handleGetObject(NbBundle.java:880) > at java.base/java.util.ResourceBundle.getObject(ResourceBundle.java:555) > at java.base/java.util.ResourceBundle.getString(ResourceBundle.java:521) > at org.openide.util.NbBundle.getMessage(NbBundle.java:617) > at > org.netbeans.modules.payara.jakartaee.RunTimeDDCatalog.getDisplayName(RunTimeDDCatalog.java:382) > at > org.netbeans.modules.xml.catalog.CatalogRootNode$RootChildren.compare(CatalogRootNode.java:249) > at java.base/java.util.TreeMap.put(TreeMap.java:550) > at java.base/java.util.TreeSet.add(TreeSet.java:255) > at > org.netbeans.modules.xml.catalog.CatalogRootNode$RootChildren.createKeys(CatalogRootNode.java:225) > at > org.netbeans.modules.xml.catalog.CatalogRootNode$RootChildren.addNotify(CatalogRootNode.java:183) > at org.openide.nodes.Children.callAddNotify(Children.java:550) > at > org.openide.nodes.EntrySupportDefault.getArray(EntrySupportDefault.java:627) > at > org.openide.nodes.EntrySupportDefault.getNodes(EntrySupportDefault.java:98) > at > org.openide.nodes.EntrySupportDefault.getNodes(EntrySupportDefault.java:149) > at > org.openide.nodes.EntrySupportDefault.getNodesCount(EntrySupportDefault.java:153) > at org.openide.nodes.Children.getNodesCount(Children.java:484) > at > org.openide.explorer.view.VisualizerNode.getChildren(VisualizerNode.java:234) > at > org.openide.explorer.view.VisualizerNode.getChildren(VisualizerNode.java:224) > at > org.openide.explorer.view.VisualizerNode.getChildCount(VisualizerNode.java:301) > at > java.desktop/javax.swing.tree.DefaultTreeModel.getChildCount(DefaultTreeModel.java:192) > at > java.desktop/javax.swing.tree.FixedHeightLayoutCache$FHTreeStateNode.expand(FixedHeightLayoutCache.java:1155) > at > java.desktop/javax.swing.tree.FixedHeightLayoutCache.rebuild(FixedHeightLayoutCache.java:620) > at > java.desktop/javax.swing.tree.FixedHeightLayoutCache.treeStructureChanged(FixedHeightLayoutCache.java:492) > at > java.desktop/javax.swing.plaf.basic.BasicTreeUI$Handler.treeStructureChanged(BasicTreeUI.java:4324) > at > java.desktop/javax.swing.tree.DefaultTreeModel.fireTreeStructureChanged(DefaultTreeModel.java:607) > at > java.desktop/javax.swing.tree.DefaultTreeModel.nodeStructureChanged(DefaultTreeModel.java:391) > at > java.desktop/javax.swing.tree.DefaultTreeModel.setRoot(DefaultTreeModel.java:141) > at org.openide.explorer.view.NodeTreeModel$1.run(NodeTreeModel.java:98) > at > org.netbeans.modules.openide.util.NbMutexEventProvider$Event.doEvent(NbMutexEventProvider.java:95) > at > org.netbeans.modules.openide.util.NbMutexEventProvider$Event.readAccess(NbMutexEventProvider.java:70) > at > org.netbeans.modules.openide.util.LazyMutexImplementation.readAccess(LazyMutexImplementation.java:66) > at org.openide.util.Mutex.readAccess(Mutex.java:235) > at > org.openide.explorer.view.NodeTreeModel.setNode(NodeTreeModel.java:83) > at org.openide.explorer.view.TreeView$4.run(TreeView.java:831) > at > org.netbeans.modules.openide.util.NbMutexEventProvider$Event.doEvent(NbMutexEventProvider.java:95) > at > org.netbeans.modules.openide.util.NbMutexEventProvider$Event.readAccess(NbMutexEventProvider.java:70) > at > org.netbeans.modules.openide.util.LazyMutexImplementation.readAccess(LazyMutexImplementation.java:66) > at org.openide.util.Mutex.readAccess(Mutex.java:235) > at > org.openide.explorer.view.TreeView.synchronizeRootContext(TreeView.java:821) > at >