Search in sources :

Example 1 with AssumeUnchangedOperation

use of org.eclipse.egit.core.op.AssumeUnchangedOperation in project egit by eclipse.

the class StagingView method assumeUnchanged.

private void assumeUnchanged(@NonNull IStructuredSelection selection) {
    List<IPath> locations = new ArrayList<>();
    collectPaths(selection.toList(), locations);
    if (locations.isEmpty()) {
        return;
    }
    JobUtil.scheduleUserJob(new AssumeUnchangedOperation(currentRepository, locations, true), UIText.AssumeUnchanged_assumeUnchanged, JobFamilies.ASSUME_NOASSUME_UNCHANGED);
}
Also used : AssumeUnchangedOperation(org.eclipse.egit.core.op.AssumeUnchangedOperation) IPath(org.eclipse.core.runtime.IPath) ArrayList(java.util.ArrayList)

Example 2 with AssumeUnchangedOperation

use of org.eclipse.egit.core.op.AssumeUnchangedOperation in project egit by eclipse.

the class NoAssumeUnchangedActionHandler method execute.

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    IResource[] resources = getSelectedResources(event);
    if (resources.length == 0)
        return null;
    AssumeUnchangedOperation op = new AssumeUnchangedOperation(Arrays.asList(resources), false);
    JobUtil.scheduleUserJob(op, UIText.AssumeUnchanged_assumeUnchanged, JobFamilies.ASSUME_NOASSUME_UNCHANGED);
    return null;
}
Also used : AssumeUnchangedOperation(org.eclipse.egit.core.op.AssumeUnchangedOperation) IResource(org.eclipse.core.resources.IResource)

Example 3 with AssumeUnchangedOperation

use of org.eclipse.egit.core.op.AssumeUnchangedOperation in project egit by eclipse.

the class AssumeUnchangedActionHandler method execute.

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    IResource[] resources = getSelectedResources(event);
    if (resources.length == 0)
        return null;
    AssumeUnchangedOperation op = new AssumeUnchangedOperation(Arrays.asList(resources), true);
    JobUtil.scheduleUserJob(op, UIText.AssumeUnchanged_assumeUnchanged, JobFamilies.ASSUME_NOASSUME_UNCHANGED);
    return null;
}
Also used : AssumeUnchangedOperation(org.eclipse.egit.core.op.AssumeUnchangedOperation) IResource(org.eclipse.core.resources.IResource)

Aggregations

AssumeUnchangedOperation (org.eclipse.egit.core.op.AssumeUnchangedOperation)3 IResource (org.eclipse.core.resources.IResource)2 ArrayList (java.util.ArrayList)1 IPath (org.eclipse.core.runtime.IPath)1