use of org.eclipse.core.runtime.IPath in project che by eclipse.
the class ResourceModifications method addRename.
/**
* Adds the given resource to the list of renamed
* resources.
*
* @param rename the resource to be renamed
* @param arguments the arguments of the rename
*/
public void addRename(IResource rename, RenameArguments arguments) {
Assert.isNotNull(rename);
Assert.isNotNull(arguments);
if (fRename == null) {
fRename = new ArrayList(2);
fRenameArguments = new ArrayList(2);
}
fRename.add(rename);
fRenameArguments.add(arguments);
if (fIgnoreCount == 0) {
IPath newPath = rename.getFullPath().removeLastSegments(1).append(arguments.getNewName());
internalAdd(new MoveDescription(rename, newPath));
}
}
use of org.eclipse.core.runtime.IPath in project che by eclipse.
the class ResourceModifications method buildCopyDelta.
public static void buildCopyDelta(IResourceChangeDescriptionFactory builder, IResource resource, CopyArguments args) {
IPath destination = ((IResource) args.getDestination()).getFullPath().append(resource.getName());
builder.copy(resource, destination);
}
use of org.eclipse.core.runtime.IPath in project che by eclipse.
the class ResourceModifications method buildMoveDelta.
public static void buildMoveDelta(IResourceChangeDescriptionFactory builder, IResource resource, MoveArguments args) {
IPath destination = ((IResource) args.getDestination()).getFullPath().append(resource.getName());
builder.move(resource, destination);
}
use of org.eclipse.core.runtime.IPath in project che by eclipse.
the class FileUndoState method createResourceHandle.
public IResource createResourceHandle() {
IWorkspaceRoot workspaceRoot = parent.getWorkspace().getRoot();
IPath fullPath = parent.getFullPath().append(name);
return workspaceRoot.getFile(fullPath);
}
use of org.eclipse.core.runtime.IPath in project che by eclipse.
the class FolderUndoState method createResourceHandle.
public IResource createResourceHandle() {
IWorkspaceRoot workspaceRoot = getWorkspace().getRoot();
IPath folderPath = parent.getFullPath().append(name);
return workspaceRoot.getFolder(folderPath);
}
Aggregations