use of org.eclipse.che.ide.api.resources.ResourceDelta in project che by eclipse.
the class CopyPasteManager method onResourceChanged.
@Override
public void onResourceChanged(ResourceChangedEvent event) {
final ResourceDelta delta = event.getDelta();
//delta should be removed and resources is not null
if (delta.getKind() != REMOVED || resources == null) {
return;
}
for (int i = 0; i < resources.length; i++) {
final Resource resource = resources[i];
if (delta.getResource().getLocation().isPrefixOf(resource.getLocation())) {
int size = resources.length;
int numMoved = resources.length - i - 1;
if (numMoved > 0) {
System.arraycopy(resources, i + 1, resources, i, numMoved);
}
resources = copyOf(resources, --size);
}
}
}
Aggregations