mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
p4: apply patch to a newly created changelist should really move all files to that changelist
This commit is contained in:
@@ -46,14 +46,14 @@ public abstract class VcsDirtyScopeManager {
|
||||
*
|
||||
* @param file the file for which the status update is requested.
|
||||
*/
|
||||
public abstract void fileDirty(VirtualFile file);
|
||||
public abstract void fileDirty(@NotNull VirtualFile file);
|
||||
|
||||
/**
|
||||
* Requests an asynchronous file status update for the specified file path. Must be called from a read action.
|
||||
*
|
||||
* @param file the file path for which the status update is requested.
|
||||
*/
|
||||
public abstract void fileDirty(FilePath file);
|
||||
public abstract void fileDirty(@NotNull FilePath file);
|
||||
|
||||
/**
|
||||
* Requests an asynchronous file status update for all files under the specified directory.
|
||||
|
||||
@@ -32,22 +32,15 @@ import java.util.List;
|
||||
* @author yole
|
||||
*/
|
||||
public abstract class VcsBackgroundTask<T> extends Task.ConditionalModal {
|
||||
@NotNull private final PerformInBackgroundOption myBackgroundOption;
|
||||
private final Collection<T> myItems;
|
||||
private final List<VcsException> myExceptions = new ArrayList<VcsException>();
|
||||
|
||||
public VcsBackgroundTask(final Project project, @NotNull final String title, @NotNull final PerformInBackgroundOption backgroundOption,
|
||||
final Collection<T> itemsToProcess) {
|
||||
super(project, title, false, backgroundOption);
|
||||
myBackgroundOption = backgroundOption;
|
||||
myItems = itemsToProcess;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public PerformInBackgroundOption getBackgroundOption() {
|
||||
return myBackgroundOption;
|
||||
}
|
||||
|
||||
public void run(@NotNull ProgressIndicator indicator) {
|
||||
for(T item: myItems) {
|
||||
try {
|
||||
|
||||
+2
-2
@@ -252,7 +252,7 @@ public class VcsDirtyScopeManagerImpl extends VcsDirtyScopeManager implements Pr
|
||||
}
|
||||
}
|
||||
|
||||
public void fileDirty(final VirtualFile file) {
|
||||
public void fileDirty(@NotNull final VirtualFile file) {
|
||||
try {
|
||||
final AbstractVcs vcs = myGuess.getVcsForDirty(file);
|
||||
if (vcs == null) return;
|
||||
@@ -269,7 +269,7 @@ public class VcsDirtyScopeManagerImpl extends VcsDirtyScopeManager implements Pr
|
||||
}
|
||||
}
|
||||
|
||||
public void fileDirty(final FilePath file) {
|
||||
public void fileDirty(@NotNull final FilePath file) {
|
||||
try {
|
||||
final AbstractVcs vcs = myGuess.getVcsForDirty(file);
|
||||
if (vcs == null) return;
|
||||
|
||||
+2
-2
@@ -54,11 +54,11 @@ class VcsDirtyScopeManagerProxy extends VcsDirtyScopeManager {
|
||||
myFiles.clear();
|
||||
}
|
||||
|
||||
public void fileDirty(final VirtualFile file) {
|
||||
public void fileDirty(@NotNull final VirtualFile file) {
|
||||
myVFiles.add(file);
|
||||
}
|
||||
|
||||
public void fileDirty(final FilePath file) {
|
||||
public void fileDirty(@NotNull final FilePath file) {
|
||||
myFiles.add(file);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.intellij.openapi.vcs.FilePath;
|
||||
import com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl;
|
||||
import com.intellij.openapi.vfs.VfsUtil;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class VcsGuess {
|
||||
@@ -41,7 +42,7 @@ public class VcsGuess {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public AbstractVcs getVcsForDirty(final VirtualFile file) {
|
||||
public AbstractVcs getVcsForDirty(@NotNull final VirtualFile file) {
|
||||
if (!file.isInLocalFileSystem()) {
|
||||
return null;
|
||||
}
|
||||
@@ -56,7 +57,7 @@ public class VcsGuess {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public AbstractVcs getVcsForDirty(final FilePath filePath) {
|
||||
public AbstractVcs getVcsForDirty(@NotNull final FilePath filePath) {
|
||||
if (filePath.isNonLocal()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user