mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
fix SortAction visibility
GitOrigin-RevId: 62342c14d40d6572e37149b1b9414fc81ac9665d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e666410d59
commit
e853bb2bb4
@@ -13,6 +13,7 @@ import com.intellij.openapi.util.UserDataHolderBase;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.ui.popup.list.PopupListElementRenderer;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -130,7 +131,8 @@ public abstract class ColumnAction extends DumbAwareAction implements UserDataHo
|
||||
}
|
||||
}
|
||||
|
||||
private abstract static class SortAction extends ColumnAction {
|
||||
@ApiStatus.Internal
|
||||
public abstract static class SortAction extends ColumnAction {
|
||||
protected final RowSortOrder.Type mySortOrder;
|
||||
private final boolean myAdditive;
|
||||
private final Supplier<@Nls String> myMenuText;
|
||||
|
||||
@@ -114,7 +114,7 @@ public class ChangeSignatureProcessor extends ChangeSignatureProcessorBase {
|
||||
if (oldVisibility.equals(VisibilityUtil.getHighestVisibility(visibility, oldVisibility)) &&
|
||||
(!ApplicationManager.getApplication().isUnitTestMode() &&
|
||||
Messages.showYesNoDialog(myProject, JavaRefactoringBundle.message("dialog.message.overriding.methods.with.weaken.visibility", visibility), RefactoringBundle.message("changeSignature.refactoring.name"), Messages.getQuestionIcon()) == Messages.YES)) {
|
||||
((JavaChangeInfoImpl)myChangeInfo).propagateVisibility = true;
|
||||
((JavaChangeInfoImpl)myChangeInfo).setPropagateVisibility(true);
|
||||
}
|
||||
}
|
||||
MultiMap<PsiElement, String> conflictDescriptions = new MultiMap<>();
|
||||
|
||||
@@ -795,7 +795,7 @@ public final class JavaChangeSignatureUsageProcessor implements ChangeSignatureU
|
||||
if (changeInfo.isVisibilityChanged()) {
|
||||
PsiModifierList modifierList = method.getModifierList();
|
||||
final String targetVisibility;
|
||||
if (isOriginal || changeInfo instanceof JavaChangeInfoImpl && ((JavaChangeInfoImpl)changeInfo).propagateVisibility) {
|
||||
if (isOriginal || changeInfo instanceof JavaChangeInfoImpl && ((JavaChangeInfoImpl)changeInfo).isPropagateVisibility()) {
|
||||
targetVisibility = changeInfo.getNewVisibility();
|
||||
}
|
||||
else {
|
||||
@@ -1539,7 +1539,7 @@ public final class JavaChangeSignatureUsageProcessor implements ChangeSignatureU
|
||||
VisibilityUtil.setVisibility(modifierList, visibility);
|
||||
|
||||
searchForHierarchyConflicts(method, conflictDescriptions, visibility);
|
||||
boolean propagateVisibility = myChangeInfo instanceof JavaChangeInfoImpl && ((JavaChangeInfoImpl)myChangeInfo).propagateVisibility;
|
||||
boolean propagateVisibility = myChangeInfo instanceof JavaChangeInfoImpl && ((JavaChangeInfoImpl)myChangeInfo).isPropagateVisibility();
|
||||
|
||||
for (Iterator<UsageInfo> iterator = usages.iterator(); iterator.hasNext();) {
|
||||
UsageInfo usageInfo = iterator.next();
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.refactoring.changeSignature;
|
||||
|
||||
import com.intellij.psi.PsiDeconstructionPattern;
|
||||
import com.intellij.usageView.UsageInfo;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
final class DeconstructionUsageInfo extends UsageInfo {
|
||||
@ApiStatus.Internal
|
||||
public final class DeconstructionUsageInfo extends UsageInfo {
|
||||
private final @NotNull PsiDeconstructionPattern myDeconstruction;
|
||||
|
||||
DeconstructionUsageInfo(final @NotNull PsiDeconstructionPattern deconstruction) {
|
||||
|
||||
@@ -22,27 +22,33 @@ public class JavaChangeInfoImpl extends UserDataHolderBase implements JavaChange
|
||||
private static final Logger LOG = Logger.getInstance(JavaChangeInfoImpl.class);
|
||||
|
||||
@PsiModifier.ModifierConstant private final @NotNull String newVisibility;
|
||||
boolean propagateVisibility;
|
||||
private boolean propagateVisibility;
|
||||
|
||||
private @NotNull PsiMethod method;
|
||||
private final @NotNull String oldName;
|
||||
private final String oldType;
|
||||
String[] oldParameterNames;
|
||||
String[] oldParameterTypes;
|
||||
@ApiStatus.Internal
|
||||
public String[] oldParameterNames;
|
||||
@ApiStatus.Internal
|
||||
public String[] oldParameterTypes;
|
||||
private final @NotNull String newName;
|
||||
final CanonicalTypes.Type newReturnType;
|
||||
final ParameterInfoImpl[] newParms;
|
||||
@ApiStatus.Internal
|
||||
public final CanonicalTypes.Type newReturnType;
|
||||
@ApiStatus.Internal
|
||||
public final ParameterInfoImpl[] newParms;
|
||||
private ThrownExceptionInfo[] newExceptions;
|
||||
private final boolean[] toRemoveParm;
|
||||
private final boolean isVisibilityChanged;
|
||||
private final boolean isNameChanged;
|
||||
boolean isReturnTypeChanged;
|
||||
@ApiStatus.Internal
|
||||
public boolean isReturnTypeChanged;
|
||||
private boolean isParameterSetOrOrderChanged;
|
||||
private boolean isExceptionSetChanged;
|
||||
private boolean isExceptionSetOrOrderChanged;
|
||||
private boolean isParameterNamesChanged;
|
||||
private boolean isParameterTypesChanged;
|
||||
boolean isPropagationEnabled = true;
|
||||
@ApiStatus.Internal
|
||||
public boolean isPropagationEnabled = true;
|
||||
private final boolean wasVararg;
|
||||
private final boolean retainsVarargs;
|
||||
private final boolean obtainsVarags;
|
||||
@@ -90,7 +96,16 @@ public class JavaChangeInfoImpl extends UserDataHolderBase implements JavaChange
|
||||
javaChangeInfo.setFixFieldConflicts(fixFieldConflicts);
|
||||
return javaChangeInfo;
|
||||
}
|
||||
|
||||
|
||||
@ApiStatus.Internal
|
||||
public boolean isPropagateVisibility() {
|
||||
return propagateVisibility;
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
public void setPropagateVisibility(boolean value) {
|
||||
propagateVisibility = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param newExceptions null if not changed
|
||||
|
||||
@@ -1,24 +1,12 @@
|
||||
/*
|
||||
* Copyright 2000-2014 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.
|
||||
*/
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.dvcs.push.ui;
|
||||
|
||||
import com.intellij.ui.ColoredTreeCellRenderer;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
interface CustomRenderedTreeNode {
|
||||
@ApiStatus.Internal
|
||||
public interface CustomRenderedTreeNode {
|
||||
|
||||
void render(@NotNull ColoredTreeCellRenderer renderer);
|
||||
}
|
||||
Reference in New Issue
Block a user