mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
vcs: remove unused ChangeListChooser EP
This commit is contained in:
committed by
Aleksey Pivovarov
parent
3c67581381
commit
f04eb6b3c7
@@ -21,7 +21,6 @@ import com.intellij.openapi.options.UnnamedConfigurable;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.vcs.annotate.AnnotationProvider;
|
||||
import com.intellij.openapi.vcs.changes.ChangeListEditHandler;
|
||||
import com.intellij.openapi.vcs.changes.ChangeProvider;
|
||||
import com.intellij.openapi.vcs.changes.CommitExecutor;
|
||||
import com.intellij.openapi.vcs.changes.LocalChangeList;
|
||||
@@ -457,11 +456,6 @@ public abstract class AbstractVcs<ComList extends CommittedChangeList> extends S
|
||||
return null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public ChangeListEditHandler getEditHandler() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean allowsNestedRoots() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.openapi.vcs.changes;
|
||||
|
||||
/**
|
||||
* for IDEA changelist name, IDEA changelist comment editing,
|
||||
* when, for example, under Perforce, comment corresponds to whole Perforce native changelist description,
|
||||
* while name is only a piece of description
|
||||
*
|
||||
* in that case, editing handler should be set for changelist in order to always edit name and comment consistently
|
||||
*/
|
||||
public interface ChangeListEditHandler {
|
||||
String changeCommentOnChangeName(final String name, final String comment);
|
||||
String changeNameOnChangeComment(final String name, final String comment);
|
||||
String correctCommentWhenInstalled(final String name, final String comment);
|
||||
}
|
||||
@@ -299,10 +299,6 @@ public class ChangeListWorker implements ChangeListsWriteOperations {
|
||||
listImpl.setNameImpl(toName);
|
||||
myMap.remove(fromName);
|
||||
myMap.put(toName, list);
|
||||
final ChangeListEditHandler editHandler = listImpl.getEditHandler();
|
||||
if (editHandler != null) {
|
||||
listImpl.setCommentImpl(editHandler.changeCommentOnChangeName(toName, listImpl.getComment()));
|
||||
}
|
||||
}
|
||||
return canEdit;
|
||||
}
|
||||
@@ -315,14 +311,6 @@ public class ChangeListWorker implements ChangeListsWriteOperations {
|
||||
if (! Comparing.equal(oldComment, newComment)) {
|
||||
final LocalChangeListImpl listImpl = (LocalChangeListImpl) list;
|
||||
listImpl.setCommentImpl(newComment);
|
||||
final ChangeListEditHandler editHandler = listImpl.getEditHandler();
|
||||
if (editHandler != null) {
|
||||
listImpl.setNameImpl(editHandler.changeNameOnChangeComment(listImpl.getName(), listImpl.getComment()));
|
||||
if (! fromName.equals(listImpl.getName())) {
|
||||
myMap.remove(fromName);
|
||||
myMap.put(listImpl.getName(), list);
|
||||
}
|
||||
}
|
||||
}
|
||||
return oldComment;
|
||||
}
|
||||
|
||||
@@ -281,11 +281,6 @@ public class LocalChangeListImpl extends LocalChangeList {
|
||||
return copy;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public ChangeListEditHandler getEditHandler() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
myId = id;
|
||||
}
|
||||
|
||||
@@ -18,9 +18,7 @@ package com.intellij.openapi.vcs.changes.ui;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.ui.DialogWrapper;
|
||||
import com.intellij.openapi.vcs.changes.ChangeList;
|
||||
import com.intellij.openapi.vcs.changes.ChangeListEditHandler;
|
||||
import com.intellij.openapi.vcs.changes.LocalChangeList;
|
||||
import com.intellij.openapi.vcs.changes.LocalChangeListImpl;
|
||||
import com.intellij.util.NullableConsumer;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -44,14 +42,6 @@ public class ChangeListChooser extends DialogWrapper {
|
||||
super(project, false);
|
||||
myProject = project;
|
||||
|
||||
ChangeListEditHandler handler;
|
||||
for (ChangeList changelist : changelists) {
|
||||
handler = ((LocalChangeListImpl)changelist).getEditHandler();
|
||||
if (handler != null) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
myPanel = new ChangeListChooserPanel(myProject, new NullableConsumer<String>() {
|
||||
public void consume(final @Nullable String errorMessage) {
|
||||
setOKActionEnabled(errorMessage == null);
|
||||
|
||||
Reference in New Issue
Block a user