mbien commented on code in PR #8197:
URL: https://github.com/apache/netbeans/pull/8197#discussion_r1929858411


##########
java/refactoring.java/src/org/netbeans/modules/refactoring/java/api/InnerToOuterRefactoring.java:
##########
@@ -39,53 +39,104 @@ public final class InnerToOuterRefactoring extends 
AbstractRefactoring {
     // parameters of the refactoring
     private String className;
     private String referenceName;
-    
+
+    private boolean innerIsRecord;
+
     /**
      * Creates a new instance of InnerToOuterRefactoring.
-     * 
-     * @param sourceType An inner class that should be converted to a 
top-level class.
+     *
+     * @param sourceType An inner class that should be converted to a top-level
+     * class.
      */
     public InnerToOuterRefactoring(TreePathHandle sourceType) {
         super(Lookups.singleton(sourceType));
     }
-    
-    /** Returns the type the members of which should be pulled up
-     * by this refactoring.
+
+    /**
+     * Returns the type the members of which should be pulled up by this
+     * refactoring.
+     *
      * @return Source of the members to be pulled up.
      */
     public TreePathHandle getSourceType() {
         return getRefactoringSource().lookup(TreePathHandle.class);
     }
 
     // --- PARAMETERS 
----------------------------------------------------------
-    
-    /** Returns the name for the top-level class to be created.
+    /**
+     * Returns the name for the top-level class to be created.
+     *
      * @return Class name.
      */
     public String getClassName() {
         return className;
     }
 
-    /** Sets name for the top-level class to be created.
+    /**
+     * Sets name for the top-level class to be created.
+     *
      * @param className Class name.
      */
     public void setClassName(String className) {
         this.className = className;
     }
 
-    /** Returns name of the field that should be generated as a reference to 
the original
-     * outer class. If null, no field will be generated.
-     * @return Name of the field to be generated or null if no field will be 
generated.
+    /**
+     * Returns name of the field that should be generated as a reference to the
+     * original outer class. If null, no field will be generated.
+     *
+     * @return Name of the field to be generated or null if no field will be
+     * generated.
      */
     public String getReferenceName() {
         return referenceName;
     }
-    
-    /** Sets name of the field that should be generated as a reference to the 
original
-     * outer class. Can be set to null which indicates that no field should be 
generated.
-     * @param referenceName Name of the field or null if no field should be 
generated.
-     */ 
+
+    /**
+     * Sets name of the field that should be generated as a reference to the
+     * original outer class. Can be set to null which indicates that no field
+     * should be generated.
+     *
+     * @param referenceName Name of the field or null if no field should be
+     * generated.
+     */
     public void setReferenceName(String referenceName) {
         this.referenceName = referenceName;
     }
+
+    /**
+     * Inner records need special handling because of the RecordComponents 
which
+     * are declared before the first curly brace, which differs from class,
+     * interface and enum.
+     *
+     * Also, the compact constructor should be considered.
+     *
+     * A compact constructor consists of the name of the Record, no parameters
+     * (not even the parens) and a block that does NOT assign the fields.
+     *
+     * @return the current value for this refactoring
+     */
+    public boolean isInnerIsRecord() {
+
+        return innerIsRecord;
+    }
+
+    /**
+     * Inner records need special handling because of the RecordComponents 
which
+     * are declared before the first curly brace, which differs from class,
+     * interface and enum.
+     *
+     * Also, the compact constructor should be considered.
+     *
+     * A compact constructor consists of the name of the Record, no parameters
+     * (not even the parens) and a block that does NOT assign the fields.
+     *
+     * @param innerIsRecord use when inner class needs the special handling of 
+     * an inner record.
+     */
+

Review Comment:
   remove extra line



##########
java/java.source.base/src/org/netbeans/api/java/source/ElementHandle.java:
##########
@@ -213,6 +208,8 @@ private T resolveImpl (final ModuleElement module, final 
JavacTaskImpl jt) {
             }
             case FIELD:
             case ENUM_CONSTANT:
+            case RECORD_COMPONENT:
+

Review Comment:
   remove extra line



##########
java/refactoring.java/test/unit/src/org/netbeans/modules/refactoring/java/test/RefactoringTestBase.java:
##########


Review Comment:
   this whole file was reformatted it seems. please don't do that



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

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

Reply via email to