[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.jdt] Change Signature Parameter Info

Hi Everybody,

Following situation; I have defined a ChangeMethodSignatureParticipant for the 'Change Method Signature' Refactoring operation. In the createChange(...) method of the participant I now need the information from the RefactoringProcessor what changes the user has entered in the UI. Eclipse itself uses for this a ChangeSignatureProcessor. Which in my case does not work, because the getProcessor() method only returns an instance of RefactoringProcessor.

The code at the moment looks as follows:

@Override
public Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException {
/*
* Find out what operation was performed in the refactoring.
*/
pm.subTask("Creating change results ...");
ChangeSignatureProcessor processor = (ChangeSignatureProcessor) getProcessor();
List parameterInfos = processor.getParameterInfos();
for (Object object : parameterInfos) {
ParameterInfo param = (ParameterInfo) object;
System.out.println(param.getOldName());
System.out.println(param.getNewName());
System.out.println(param.isAdded());
System.out.println(param.isRenamed());
System.out.println(param.getOldIndex());
System.out.println("------------------");
}
}


So far so good. The problem is now, that ParameterInfo and ChangeSignatureProcessor are part of the package internal and so declared as Discouraged. The Syso's show exactly what I need. Does anybody has an idea how to get the parameter information without using Discouraged Access blocked classes? Or another way to find out which changes have to be done, e.g. param was added, param was removed, etc.

Thank you in advance for your help and thoughts.

Kind regards,
Wolfgang