mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
vcs: cleanup - add default method implementation
This commit is contained in:
committed by
Aleksey Pivovarov
parent
dd4541964a
commit
cd7caa1c12
+3
-1
@@ -49,7 +49,9 @@ public interface CommittedChangeList extends ChangeList {
|
||||
*/
|
||||
AbstractVcs getVcs();
|
||||
|
||||
Collection<Change> getChangesWithMovedTrees();
|
||||
default Collection<Change> getChangesWithMovedTrees() {
|
||||
return getChanges();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if this change list can be modified, for example, by reverting some of the changes.
|
||||
|
||||
-8
@@ -63,10 +63,6 @@ public class CommittedChangeListImpl implements CommittedChangeList {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Collection<Change> getChangesWithMovedTrees() {
|
||||
return getChangesWithMovedTreesImpl(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isModifiable() {
|
||||
return true;
|
||||
@@ -77,10 +73,6 @@ public class CommittedChangeListImpl implements CommittedChangeList {
|
||||
myComment = newMessage;
|
||||
}
|
||||
|
||||
public static Collection<Change> getChangesWithMovedTreesImpl(final CommittedChangeList list) {
|
||||
return list.getChanges();
|
||||
}
|
||||
|
||||
public Collection<Change> getChanges() {
|
||||
return myChanges;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ import com.intellij.openapi.vcs.AbstractVcs;
|
||||
import com.intellij.openapi.vcs.changes.Change;
|
||||
import com.intellij.openapi.vcs.changes.ContentRevision;
|
||||
import com.intellij.openapi.vcs.versionBrowser.CommittedChangeList;
|
||||
import com.intellij.openapi.vcs.versionBrowser.CommittedChangeListImpl;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.util.io.IOUtil;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
@@ -110,10 +109,6 @@ public class CvsChangeList implements CommittedChangeList {
|
||||
return CvsVcs2.getInstance(myProject);
|
||||
}
|
||||
|
||||
public Collection<Change> getChangesWithMovedTrees() {
|
||||
return CommittedChangeListImpl.getChangesWithMovedTreesImpl(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isModifiable() {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user