Skip to content

Commit 09884b2

Browse files
committed
Add targeted JavaDoc improvements to DOM utility classes
1 parent 2f23f8b commit 09884b2

5 files changed

Lines changed: 23 additions & 8 deletions

File tree

org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/CodeScopeBuilder.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@
3030
import org.eclipse.jdt.core.dom.SimpleName;
3131
import org.eclipse.jdt.core.dom.TypeDeclarationStatement;
3232

33-
33+
/**
34+
* Builds a scope tree for code blocks, tracking variable declarations and their visibility.
35+
* Used to analyze variable scoping and name conflicts in Java code.
36+
*/
3437
public class CodeScopeBuilder extends ASTVisitor {
3538

3639
public static class Scope {

org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/IASTSharedValues.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ public interface IASTSharedValues {
2323
*/
2424
int SHARED_AST_LEVEL= AST.getJLSLatest();
2525

26+
/**
27+
* Enables statement recovery to allow partial AST construction when source contains syntax errors.
28+
*/
2629
boolean SHARED_AST_STATEMENT_RECOVERY= true;
2730

31+
/**
32+
* Enables binding recovery to provide best-effort type resolution when source contains errors.
33+
*/
2834
boolean SHARED_BINDING_RECOVERY= true;
2935
}

org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/LinkedNodeFinder.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@
3939

4040

4141
/**
42-
* Find all nodes connected to a given binding or node. e.g. Declaration of a field and all references.
43-
* For types this includes also the constructor declaration, for methods also overridden methods
44-
* or methods overriding (if existing in the same AST), for constructors also the type and all other constructors.
45-
*/
46-
42+
* Finds all AST nodes connected to a given binding or node. For example, finds a field declaration
43+
* and all its references. For types, includes constructor declarations. For methods, includes
44+
* overridden methods or methods that override (if in the same AST). For constructors, includes
45+
* the type and all other constructors.
46+
*/
4747
public class LinkedNodeFinder {
4848

4949
private LinkedNodeFinder() {

org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/LocalVariableIndex.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@
2626
import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
2727
import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
2828

29-
29+
/**
30+
* Computes the maximum number of local variable declarations in a method, initializer, or field.
31+
* Used to determine the local variable table size for bytecode generation.
32+
*/
3033
public class LocalVariableIndex extends ASTVisitor {
3134

3235
private int fTopIndex;

org.eclipse.jdt.core.manipulation/core extension/org/eclipse/jdt/internal/corext/dom/Selection.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919

2020
import org.eclipse.jdt.core.dom.ASTNode;
2121

22-
22+
/**
23+
* A text selection in a compilation unit. Used to determine which AST nodes
24+
* are affected by a user's selection during refactoring and code manipulation operations.
25+
*/
2326
public class Selection {
2427

2528
/** Flag indicating that the AST node somehow intersects with the selection. */

0 commit comments

Comments
 (0)