use of org.eclipse.ltk.core.refactoring.participants.MoveArguments in project che by eclipse.
the class MoveModifications method move.
public void move(ICompilationUnit unit, MoveArguments args) throws CoreException {
add(unit, args, null);
IType[] types = unit.getTypes();
for (int tt = 0; tt < types.length; tt++) {
add(types[tt], args, null);
}
IResource resourceDestination = getResourceDestination(args);
if (resourceDestination != null && unit.getResource() != null) {
IResource parent = resourceDestination;
while (!parent.exists()) {
getResourceModifications().addCreate(parent);
parent = parent.getParent();
}
getResourceModifications().addMove(unit.getResource(), new MoveArguments(resourceDestination, args.getUpdateReferences()));
}
}
Aggregations