You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "karthikeyan (Jira)" <ji...@apache.org> on 2021/07/18 06:33:00 UTC

[jira] [Commented] (NETBEANS-5861) Java/NetBeans : Navigator Hangs upon encountering Anonymous Classes

    [ https://issues.apache.org/jira/browse/NETBEANS-5861?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17382750#comment-17382750 ] 

karthikeyan commented on NETBEANS-5861:
---------------------------------------

Hope I have installed unsupported version of JDK (15) for NetBeans 12.0. Did not encounter such a problem with the following environment:

Product Version: NetBeans IDE 8.1 (Build 201510222201)
Updates: NetBeans IDE is updated to version NetBeans 8.1 Patch 1
Java: 1.8.0_92; Java HotSpot(TM) 64-Bit Server VM 25.92-b14
Runtime: Java(TM) SE Runtime Environment 1.8.0_92-b14
System: Windows 7 version 6.1 running on amd64; UTF-8; en_US (nb)

 

Will try configure supported versions of JDK with NetBeans 12.0...

> Java/NetBeans : Navigator Hangs upon encountering Anonymous Classes
> -------------------------------------------------------------------
>
>                 Key: NETBEANS-5861
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-5861
>             Project: NetBeans
>          Issue Type: Bug
>          Components: ide - UI, java - Editor
>    Affects Versions: 12.0
>         Environment: Product Version: Apache NetBeans IDE 12.0
> Java: 15.0.1; Java HotSpot(TM) 64-Bit Server VM 15.0.1+9-18
> Runtime: Java(TM) SE Runtime Environment 15.0.1+9-18
> System: Windows 10 version 10.0
>            Reporter: karthikeyan
>            Priority: Major
>         Attachments: AnonymousClassReplaced.jpg, JFrameCreationErr.jpg, NavigatorHangs.jpg
>
>
> 1. IDE displays error while creating a Java Swing, JFrame Form using IDE (
> E.g. While trying to create a JFrame form with name "SwingButtonDemo" inside package "Demo" it shows
> "The file SwingButtonDemo.java already exists"
> Screen shot attached (JFrameCreationErr.jpg)
> But, anyway it creates the package and the Java Source file and it is visible in the Project Window
> 2. The Design View of this JFrame Source File has no problem but when trying to explore the source code of this java file "SwingButtonDemo.java", the Navigator Window simply hangs. Screen shot attached (NavigatorHangs.jpg). This happens not only here. Wherever there is an anonymous class used, the Navigator simply hangs. So it is not possible to do the coding in the source editor as the context sensitive help of showing up list of members/functions of an object does not work because the Navigator hangs.
> Here the following code snippet which caused the problem is :
> java.awt.EventQueue.invokeLater(new Runnable() {
>  public void run() {
>  new SwingButtonDemo().setVisible(true);
>  }
>  });
> Replacing the above code snippet with Lambda Expression solves the problem and bring back the Navigator to function properly. Screen shot attached AnonymousClassReplaced.jpg).
> Runnable SwRun = () -> { 
>  new SwingButtonDemo().setVisible(true);
>  };
>  
>  java.awt.EventQueue.invokeLater(SwRun);
> But the problem is , here the source code is editable. But when we add components and register EventListeners, the IDE generates code that are uneditable and it invariably uses Anonymous classes, making the Navigator to hang. Is there any setting with which the Navigator can be configured to ignore Anonymous classes or there any fix ?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists