org.eclipse.cdt.internal.refactoring
Class ASTManager
java.lang.Object
org.eclipse.cdt.internal.refactoring.ASTManager
public class ASTManager
- extends java.lang.Object
Used per refactoring to cache the IASTTranslationUnits. Collects methods operating
on ASTNodes.
Method Summary |
void |
analyzeTextMatches(java.util.ArrayList matches,
org.eclipse.core.runtime.IProgressMonitor monitor,
org.eclipse.ltk.core.refactoring.RefactoringStatus status)
|
static int |
backrelateNameToMacroCallArgument(org.eclipse.cdt.core.dom.ast.IASTName name,
org.eclipse.cdt.core.dom.ast.IASTMacroExpansion me)
|
static org.eclipse.cdt.core.dom.ast.IBinding[] |
findInScope(org.eclipse.cdt.core.dom.ast.IScope scope,
java.lang.String name,
boolean removeGlobalsWhenClassScope)
|
static org.eclipse.cdt.core.dom.ast.IASTFileLocation |
getLocationInTranslationUnit(org.eclipse.cdt.core.dom.ast.IASTNode node)
|
static java.lang.String |
getName(org.eclipse.cdt.core.dom.ast.IScope s1)
|
static org.eclipse.cdt.core.dom.ast.IASTName |
getSimpleName(org.eclipse.cdt.core.dom.ast.IASTName name)
|
void |
handleDOMException(org.eclipse.cdt.core.dom.ast.IASTTranslationUnit tu,
org.eclipse.cdt.core.dom.ast.DOMException e,
org.eclipse.ltk.core.refactoring.RefactoringStatus status)
|
void |
handleProblemBinding(org.eclipse.cdt.core.dom.ast.IASTTranslationUnit tu,
org.eclipse.cdt.core.dom.ast.IProblemBinding pb,
org.eclipse.ltk.core.refactoring.RefactoringStatus status)
|
static int |
hasSameSignature(org.eclipse.cdt.core.dom.ast.IFunction b1,
org.eclipse.cdt.core.dom.ast.IFunction b2)
|
static int |
hasSameSignature(org.eclipse.cdt.core.dom.ast.IFunctionType b1,
org.eclipse.cdt.core.dom.ast.IFunctionType b2)
|
static boolean |
isLocalVariable(org.eclipse.cdt.core.dom.ast.IVariable v)
|
static boolean |
isLocalVariable(org.eclipse.cdt.core.dom.ast.IVariable v,
org.eclipse.cdt.core.dom.ast.IScope scope)
|
static int |
isSameBinding(org.eclipse.cdt.core.dom.ast.IBinding b1,
org.eclipse.cdt.core.dom.ast.IBinding b2)
Returns TRUE, FALSE or UNKNOWN. |
static int |
isSameScope(org.eclipse.cdt.core.dom.ast.IScope s1,
org.eclipse.cdt.core.dom.ast.IScope s2,
boolean fileStatic)
|
static int |
isVirtualMethod(org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod method)
|
static java.lang.String |
nth_of_m(int n,
int m)
|
void |
setRenameTo(java.lang.String renameTo)
|
void |
setValidBindings(org.eclipse.cdt.core.dom.ast.IBinding[] validBindings)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TRUE
public static final int TRUE
- See Also:
- Constant Field Values
FALSE
public static final int FALSE
- See Also:
- Constant Field Values
UNKNOWN
public static final int UNKNOWN
- See Also:
- Constant Field Values
ASTManager
public ASTManager(CRefactory refactoringManager,
CRefactoringArgument arg)
nth_of_m
public static java.lang.String nth_of_m(int n,
int m)
getLocationInTranslationUnit
public static org.eclipse.cdt.core.dom.ast.IASTFileLocation getLocationInTranslationUnit(org.eclipse.cdt.core.dom.ast.IASTNode node)
getSimpleName
public static org.eclipse.cdt.core.dom.ast.IASTName getSimpleName(org.eclipse.cdt.core.dom.ast.IASTName name)
isSameBinding
public static int isSameBinding(org.eclipse.cdt.core.dom.ast.IBinding b1,
org.eclipse.cdt.core.dom.ast.IBinding b2)
throws org.eclipse.cdt.core.dom.ast.DOMException
- Returns TRUE, FALSE or UNKNOWN.
- Throws:
org.eclipse.cdt.core.dom.ast.DOMException
isSameScope
public static int isSameScope(org.eclipse.cdt.core.dom.ast.IScope s1,
org.eclipse.cdt.core.dom.ast.IScope s2,
boolean fileStatic)
throws org.eclipse.cdt.core.dom.ast.DOMException
- Throws:
org.eclipse.cdt.core.dom.ast.DOMException
getName
public static java.lang.String getName(org.eclipse.cdt.core.dom.ast.IScope s1)
hasSameSignature
public static int hasSameSignature(org.eclipse.cdt.core.dom.ast.IFunction b1,
org.eclipse.cdt.core.dom.ast.IFunction b2)
throws org.eclipse.cdt.core.dom.ast.DOMException
- Throws:
org.eclipse.cdt.core.dom.ast.DOMException
hasSameSignature
public static int hasSameSignature(org.eclipse.cdt.core.dom.ast.IFunctionType b1,
org.eclipse.cdt.core.dom.ast.IFunctionType b2)
throws org.eclipse.cdt.core.dom.ast.DOMException
- Throws:
org.eclipse.cdt.core.dom.ast.DOMException
backrelateNameToMacroCallArgument
public static int backrelateNameToMacroCallArgument(org.eclipse.cdt.core.dom.ast.IASTName name,
org.eclipse.cdt.core.dom.ast.IASTMacroExpansion me)
isVirtualMethod
public static int isVirtualMethod(org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod method)
throws org.eclipse.cdt.core.dom.ast.DOMException
- Throws:
org.eclipse.cdt.core.dom.ast.DOMException
isLocalVariable
public static boolean isLocalVariable(org.eclipse.cdt.core.dom.ast.IVariable v,
org.eclipse.cdt.core.dom.ast.IScope scope)
isLocalVariable
public static boolean isLocalVariable(org.eclipse.cdt.core.dom.ast.IVariable v)
findInScope
public static org.eclipse.cdt.core.dom.ast.IBinding[] findInScope(org.eclipse.cdt.core.dom.ast.IScope scope,
java.lang.String name,
boolean removeGlobalsWhenClassScope)
throws org.eclipse.cdt.core.dom.ast.DOMException
- Throws:
org.eclipse.cdt.core.dom.ast.DOMException
analyzeTextMatches
public void analyzeTextMatches(java.util.ArrayList matches,
org.eclipse.core.runtime.IProgressMonitor monitor,
org.eclipse.ltk.core.refactoring.RefactoringStatus status)
handleDOMException
public void handleDOMException(org.eclipse.cdt.core.dom.ast.IASTTranslationUnit tu,
org.eclipse.cdt.core.dom.ast.DOMException e,
org.eclipse.ltk.core.refactoring.RefactoringStatus status)
handleProblemBinding
public void handleProblemBinding(org.eclipse.cdt.core.dom.ast.IASTTranslationUnit tu,
org.eclipse.cdt.core.dom.ast.IProblemBinding pb,
org.eclipse.ltk.core.refactoring.RefactoringStatus status)
setValidBindings
public void setValidBindings(org.eclipse.cdt.core.dom.ast.IBinding[] validBindings)
setRenameTo
public void setRenameTo(java.lang.String renameTo)