You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2020/08/13 08:24:13 UTC

[GitHub] [netbeans] singh-akhilesh opened a new pull request #2310: [NETBEANS-4681] Fixed issue : refactor record rename & move record fi…

singh-akhilesh opened a new pull request #2310:
URL: https://github.com/apache/netbeans/pull/2310


   …le to other package
   
   https://issues.apache.org/jira/browse/NETBEANS-4681


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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

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


[GitHub] [netbeans] singh-akhilesh edited a comment on pull request #2310: [NETBEANS-4681] Fixed issue : refactor record rename & move record fi…

Posted by GitBox <gi...@apache.org>.
singh-akhilesh edited a comment on pull request #2310:
URL: https://github.com/apache/netbeans/pull/2310#issuecomment-673385424


   @junichi11 Please review and approve your comments.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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

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


[GitHub] [netbeans] singh-akhilesh commented on a change in pull request #2310: [NETBEANS-4681] Fixed issue : refactor record rename & move record fi…

Posted by GitBox <gi...@apache.org>.
singh-akhilesh commented on a change in pull request #2310:
URL: https://github.com/apache/netbeans/pull/2310#discussion_r476222454



##########
File path: java/refactoring.java/src/org/netbeans/modules/refactoring/java/ui/MoveClassUI.java
##########
@@ -305,7 +305,11 @@ public RefactoringUI create(CompilationInfo info, TreePathHandle[] handles, File
                 Collection<TreePathHandle> tphs = new ArrayList<TreePathHandle>();
                 SourcePositions sourcePositions = info.getTrees().getSourcePositions();
                 for (Element ele : e.getEnclosedElements()) {
-                    Tree leaf = info.getTrees().getPath(ele).getLeaf();
+                    TreePath path = info.getTrees().getPath(ele);
+                    if (path == null) {

Review comment:
       Yes, Its for synthetic record members.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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

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


[GitHub] [netbeans] junichi11 commented on pull request #2310: [NETBEANS-4681] Fixed issue : refactor record rename & move record fi…

Posted by GitBox <gi...@apache.org>.
junichi11 commented on pull request #2310:
URL: https://github.com/apache/netbeans/pull/2310#issuecomment-673408223


   As I wrote before, I'm not an expert of this area. So, I've just checked code style.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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

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


[GitHub] [netbeans] singh-akhilesh commented on a change in pull request #2310: [NETBEANS-4681] Fixed issue : refactor record rename & move record fi…

Posted by GitBox <gi...@apache.org>.
singh-akhilesh commented on a change in pull request #2310:
URL: https://github.com/apache/netbeans/pull/2310#discussion_r476223546



##########
File path: java/java.source.base/src/org/netbeans/api/java/source/TreeUtilities.java
##########
@@ -124,7 +125,14 @@
      * @since 0.67
      */
     public static final Set<Kind> CLASS_TREE_KINDS = EnumSet.of(Kind.ANNOTATION_TYPE, Kind.CLASS, Kind.ENUM, Kind.INTERFACE);
-    
+    static {

Review comment:
       Yes, we could. Will make immutable later.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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

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


[GitHub] [netbeans] junichi11 commented on pull request #2310: [NETBEANS-4681] Fixed issue : refactor record rename & move record fi…

Posted by GitBox <gi...@apache.org>.
junichi11 commented on pull request #2310:
URL: https://github.com/apache/netbeans/pull/2310#issuecomment-673409230


   @jlahoda Could you please review this if you can make time? Thanks.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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

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


[GitHub] [netbeans] singh-akhilesh commented on a change in pull request #2310: [NETBEANS-4681] Fixed issue : refactor record rename & move record fi…

Posted by GitBox <gi...@apache.org>.
singh-akhilesh commented on a change in pull request #2310:
URL: https://github.com/apache/netbeans/pull/2310#discussion_r469877265



##########
File path: java/refactoring.java/src/org/netbeans/modules/refactoring/java/ui/MoveClassUI.java
##########
@@ -305,7 +305,11 @@ public RefactoringUI create(CompilationInfo info, TreePathHandle[] handles, File
                 Collection<TreePathHandle> tphs = new ArrayList<TreePathHandle>();
                 SourcePositions sourcePositions = info.getTrees().getSourcePositions();
                 for (Element ele : e.getEnclosedElements()) {
-                    Tree leaf = info.getTrees().getPath(ele).getLeaf();
+                    TreePath path = info.getTrees().getPath(ele);
+                    if(path == null){
+                        continue;
+                    }

Review comment:
       comment addressed




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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

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


[GitHub] [netbeans] singh-akhilesh edited a comment on pull request #2310: [NETBEANS-4681] Fixed issue : refactor record rename & move record fi…

Posted by GitBox <gi...@apache.org>.
singh-akhilesh edited a comment on pull request #2310:
URL: https://github.com/apache/netbeans/pull/2310#issuecomment-673385424


   @junichi11 Please review and approve your comments. I have addressed all your earlier review comment of PR2301 in this PR.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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

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


[GitHub] [netbeans] lahodaj commented on a change in pull request #2310: [NETBEANS-4681] Fixed issue : refactor record rename & move record fi…

Posted by GitBox <gi...@apache.org>.
lahodaj commented on a change in pull request #2310:
URL: https://github.com/apache/netbeans/pull/2310#discussion_r475693716



##########
File path: java/java.source.base/src/org/netbeans/api/java/source/TreeUtilities.java
##########
@@ -124,7 +125,14 @@
      * @since 0.67
      */
     public static final Set<Kind> CLASS_TREE_KINDS = EnumSet.of(Kind.ANNOTATION_TYPE, Kind.CLASS, Kind.ENUM, Kind.INTERFACE);
-    
+    static {

Review comment:
       We could make CLASS_TREE_KINDS immutable, although not necessarily in this PR.

##########
File path: java/refactoring.java/src/org/netbeans/modules/refactoring/java/ui/MoveClassUI.java
##########
@@ -305,7 +305,11 @@ public RefactoringUI create(CompilationInfo info, TreePathHandle[] handles, File
                 Collection<TreePathHandle> tphs = new ArrayList<TreePathHandle>();
                 SourcePositions sourcePositions = info.getTrees().getSourcePositions();
                 for (Element ele : e.getEnclosedElements()) {
-                    Tree leaf = info.getTrees().getPath(ele).getLeaf();
+                    TreePath path = info.getTrees().getPath(ele);
+                    if (path == null) {

Review comment:
       I assume this is null for the synthetic record members, etc., right?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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

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


[GitHub] [netbeans] junichi11 commented on a change in pull request #2310: [NETBEANS-4681] Fixed issue : refactor record rename & move record fi…

Posted by GitBox <gi...@apache.org>.
junichi11 commented on a change in pull request #2310:
URL: https://github.com/apache/netbeans/pull/2310#discussion_r469865325



##########
File path: java/refactoring.java/src/org/netbeans/modules/refactoring/java/ui/MoveClassUI.java
##########
@@ -305,7 +305,11 @@ public RefactoringUI create(CompilationInfo info, TreePathHandle[] handles, File
                 Collection<TreePathHandle> tphs = new ArrayList<TreePathHandle>();
                 SourcePositions sourcePositions = info.getTrees().getSourcePositions();
                 for (Element ele : e.getEnclosedElements()) {
-                    Tree leaf = info.getTrees().getPath(ele).getLeaf();
+                    TreePath path = info.getTrees().getPath(ele);
+                    if(path == null){
+                        continue;
+                    }

Review comment:
       Please reformat.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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

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


[GitHub] [netbeans] singh-akhilesh commented on pull request #2310: [NETBEANS-4681] Fixed issue : refactor record rename & move record fi…

Posted by GitBox <gi...@apache.org>.
singh-akhilesh commented on pull request #2310:
URL: https://github.com/apache/netbeans/pull/2310#issuecomment-673385424


   @junichi11 Please review and approved your comments.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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

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


[GitHub] [netbeans] arvindaprameya commented on pull request #2310: [NETBEANS-4681] Fixed issue : refactor record rename & move record fi…

Posted by GitBox <gi...@apache.org>.
arvindaprameya commented on pull request #2310:
URL: https://github.com/apache/netbeans/pull/2310#issuecomment-677322822


   Approved, 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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

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


[GitHub] [netbeans] lkishalmi merged pull request #2310: [NETBEANS-4681] Fixed issue : refactor record rename & move record fi…

Posted by GitBox <gi...@apache.org>.
lkishalmi merged pull request #2310:
URL: https://github.com/apache/netbeans/pull/2310


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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

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


[GitHub] [netbeans] lahodaj commented on pull request #2310: [NETBEANS-4681] Fixed issue : refactor record rename & move record fi…

Posted by GitBox <gi...@apache.org>.
lahodaj commented on pull request #2310:
URL: https://github.com/apache/netbeans/pull/2310#issuecomment-675888829


   Looks good to me.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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

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


[GitHub] [netbeans] singh-akhilesh commented on pull request #2310: [NETBEANS-4681] Fixed issue : refactor record rename & move record fi…

Posted by GitBox <gi...@apache.org>.
singh-akhilesh commented on pull request #2310:
URL: https://github.com/apache/netbeans/pull/2310#issuecomment-676240174


   @lahodaj Please approve the PR.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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

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


[GitHub] [netbeans] arvindaprameya commented on pull request #2310: [NETBEANS-4681] Fixed issue : refactor record rename & move record fi…

Posted by GitBox <gi...@apache.org>.
arvindaprameya commented on pull request #2310:
URL: https://github.com/apache/netbeans/pull/2310#issuecomment-679832656


   Approved, Thanks for completing this


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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

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