Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-dev] What is the- jdt code flow for renaming a method

JDT Gurus,

I really need to know
    >>  how renaming a method actually making use of ASTNodes.
    >>  it would be gr8 if I can get a simple technical process flow based on RenamingRefactoing ....
          starting from the Rename dialog ... invokation of RenameMethodProcessor .. and .. interaction with AST ...

[After studying the JDT code, I found
RenameSupport
    >>   OpenDialog() - open refractory dialog for the refactoring support
    -  exhaustive precondition checking done inside the methods
    >>   RenameSupport create(IMethod method, String newName, int flags)
        >> JavaRenameProcessor processor = new RenameNonVirtualMethodProcessor(method)
        ****  JavaRenameProcessor
            >> RefactoringStatus checkFinalConditions(IProgressMonitor pm, CheckConditionsContext checkContext)
               if (Checks.compareParamTypes(getMethod().getParameterTypes(), hierarchyMethod.getParameterTypes()))   
                    -- JavaModelUtil.getFullyQualifiedName(getMethod().getDeclaringType())       
                        --- making use of ASTNode to find .. say ... indexOfEnclosingPath ..]

Thanks,
Kaniska

Back to the top