[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[photran-dev] AbstractFortranRefactoring#checkForConflictingBindings
|
We have abstracted the fundamental precondition check for the Rename
refactoring into the following method in AbstractFortranRefactoring.
This is also useful for Encapsulate Variable, Make Common Variables
Consistent, Extract Procedure, and any other refactoring where a new
variable or subprogram will be inserted and we need to determine if the
new name will conflict with an existing declaration.
/**
* Given a {@link Definition} and a list of references to
* that Definition (see
* {@link Definition#findAllReferences(boolean)}), checks if any of
* the <code>newNames</code> will conflict in the scope of any of
* the given references; if so, the given callback is invoked to
* record an error or warning.
* <p>
* This is the fundamental precondition check for
* {@link RenameRefactoring}.
*/
protected void checkForConflictingBindings(
IConflictingBindingCallback callback,
Definition definitionToCheck,
Collection<PhotranTokenRef> allReferences,
String... newNames)
There is another overload that accepts a Collection<String>