mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Remove "CommitExecutorWithHelp" - use "HelpIdProvider" instead
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
/*
|
||||
* Copyright 2000-2010 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;
|
||||
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
|
||||
/**
|
||||
* @author irengrig
|
||||
*/
|
||||
public interface CommitExecutorWithHelp extends CommitExecutor {
|
||||
@NonNls
|
||||
String getHelpId();
|
||||
}
|
||||
@@ -15,5 +15,7 @@
|
||||
*/
|
||||
package com.intellij.openapi.vcs.changes;
|
||||
|
||||
public abstract class LocalCommitExecutor implements CommitExecutorWithHelp {
|
||||
import com.intellij.ide.HelpIdProvider;
|
||||
|
||||
public abstract class LocalCommitExecutor implements CommitExecutor, HelpIdProvider {
|
||||
}
|
||||
|
||||
+3
-7
@@ -3,6 +3,7 @@ package com.intellij.openapi.vcs.changes.ui;
|
||||
|
||||
import com.intellij.diff.util.DiffPlaces;
|
||||
import com.intellij.diff.util.DiffUserDataKeysEx;
|
||||
import com.intellij.ide.HelpIdProvider;
|
||||
import com.intellij.ide.ui.UISettings;
|
||||
import com.intellij.ide.util.PropertiesComponent;
|
||||
import com.intellij.openapi.Disposable;
|
||||
@@ -41,6 +42,7 @@ import com.intellij.util.ui.GridBag;
|
||||
import com.intellij.util.ui.JBDimension;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.components.BorderLayoutPanel;
|
||||
import one.util.streamex.StreamEx;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -463,13 +465,7 @@ public class CommitChangeListDialog extends DialogWrapper implements CheckinProj
|
||||
|
||||
@Nullable
|
||||
private static String getHelpId(@NotNull List<CommitExecutor> executors) {
|
||||
for (CommitExecutor executor : executors) {
|
||||
if (executor instanceof CommitExecutorWithHelp) {
|
||||
String helpId = ((CommitExecutorWithHelp)executor).getHelpId();
|
||||
if (helpId != null) return helpId;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return StreamEx.of(executors).select(HelpIdProvider.class).map(HelpIdProvider::getHelpId).nonNull().findFirst().orElse(null);
|
||||
}
|
||||
|
||||
private void setComment(@Nullable LocalChangeList initialSelection, @Nullable String comment) {
|
||||
|
||||
Reference in New Issue
Block a user