mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
notnull
This commit is contained in:
+1
@@ -80,6 +80,7 @@ public class PackagingElementNode<E extends PackagingElement<?>> extends Artifac
|
||||
return myPackagingElements.size() == 1 ? myPackagingElements.get(0) : null;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Object[] getEqualityObjects() {
|
||||
return ArrayUtil.toObjectArray(myPackagingElements);
|
||||
|
||||
+2
@@ -20,6 +20,7 @@ import com.intellij.openapi.roots.ui.configuration.artifacts.ArtifactEditorEx;
|
||||
import com.intellij.packaging.ui.ArtifactEditorContext;
|
||||
import com.intellij.packaging.ui.PackagingSourceItem;
|
||||
import com.intellij.ui.treeStructure.SimpleTree;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.awt.event.InputEvent;
|
||||
import java.util.Collections;
|
||||
@@ -35,6 +36,7 @@ public class SourceItemNode extends SourceItemNodeBase {
|
||||
mySourceItem = sourceItem;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Object[] getEqualityObjects() {
|
||||
return new Object[]{mySourceItem};
|
||||
|
||||
+1
@@ -35,6 +35,7 @@ public class SourceItemsTreeRoot extends SourceItemNodeBase {
|
||||
return null;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Object[] getEqualityObjects() {
|
||||
return new Object[]{"root"};
|
||||
|
||||
+1
@@ -290,6 +290,7 @@ public class ProjectStructureDaemonAnalyzer implements Disposable {
|
||||
return myElement.equals(other.myElement) && (!other.myCheck || myCheck) && (!other.myCollectUsages || myCollectUsages);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Object[] getEqualityObjects() {
|
||||
return myEqualityObjects;
|
||||
|
||||
@@ -269,6 +269,7 @@ public abstract class ChooseLibrariesDialogBase extends DialogWrapper {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Object[] getEqualityObjects() {
|
||||
return new Object[] {myElement};
|
||||
|
||||
@@ -144,6 +144,7 @@ public class SliceNode extends AbstractTreeNode<SliceUsage> implements Duplicate
|
||||
@Override
|
||||
protected PresentationData createPresentation() {
|
||||
return new PresentationData(){
|
||||
@NotNull
|
||||
@Override
|
||||
public Object[] getEqualityObjects() {
|
||||
return ArrayUtil.append(super.getEqualityObjects(), changed);
|
||||
|
||||
+2
-1
@@ -111,8 +111,9 @@ public class DaemonTooltipRendererProvider implements ErrorStripTooltipRendererP
|
||||
return new MyRenderer(text, width, new Object[] {text});
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public TrafficTooltipRenderer createTrafficTooltipRenderer(Runnable onHide, Editor editor) {
|
||||
public TrafficTooltipRenderer createTrafficTooltipRenderer(@NotNull Runnable onHide, @NotNull Editor editor) {
|
||||
return new TrafficTooltipRendererImpl(onHide, editor);
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -7,6 +7,7 @@ import com.intellij.ui.SimpleTextAttributes;
|
||||
import com.intellij.ui.treeStructure.SimpleNode;
|
||||
import com.intellij.util.Function;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.awt.*;
|
||||
public class BlockTreeNode extends SimpleNode {
|
||||
@@ -56,6 +57,7 @@ public class BlockTreeNode extends SimpleNode {
|
||||
}
|
||||
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Object[] getEqualityObjects() {
|
||||
return new Object[]{myBlock};
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.intellij.ui.DeferredIconImpl;
|
||||
import com.intellij.ui.mac.foundation.Foundation;
|
||||
import com.intellij.util.Function;
|
||||
import com.intellij.util.ui.update.ComparableObject;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -134,6 +135,7 @@ public class NativeFileIconProvider implements FileIconProvider {
|
||||
myText = new Object[] {text, flags};
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Object[] getEqualityObjects() {
|
||||
return myText;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ package com.intellij.ide;
|
||||
|
||||
import com.intellij.util.ui.update.ComparableObject;
|
||||
import com.intellij.util.ui.update.ComparableObjectCheck;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -38,6 +39,7 @@ public class UiActivity implements ComparableObject{
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Object[] getEqualityObjects() {
|
||||
return new Object[] {myElements};
|
||||
|
||||
@@ -247,6 +247,7 @@ public class PresentationData implements ColoredItemPresentation, ComparableObje
|
||||
mySeparatorAbove = false;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Object[] getEqualityObjects() {
|
||||
return new Object[]{myOpenIcon, myClosedIcon, myColoredText, myAttributesKey, myFont, myForcedTextForeground, myPresentableText,
|
||||
myLocationString, mySeparatorAbove};
|
||||
|
||||
@@ -16,17 +16,18 @@
|
||||
package com.intellij.openapi.util;
|
||||
|
||||
import com.intellij.util.ui.update.ComparableObject;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public abstract class ActiveRunnable extends ComparableObject.Impl {
|
||||
|
||||
protected ActiveRunnable() {
|
||||
}
|
||||
|
||||
protected ActiveRunnable(final Object object) {
|
||||
protected ActiveRunnable(@NotNull Object object) {
|
||||
super(object);
|
||||
}
|
||||
|
||||
protected ActiveRunnable(final Object[] objects) {
|
||||
protected ActiveRunnable(@NotNull Object[] objects) {
|
||||
super(objects);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ public class Place implements ComparableObject {
|
||||
|
||||
private LinkedHashMap<String, Object> myPath = new LinkedHashMap<String, Object>();
|
||||
|
||||
@NotNull
|
||||
public final Object[] getEqualityObjects() {
|
||||
return new Object[] {myPath};
|
||||
}
|
||||
|
||||
@@ -3221,6 +3221,7 @@ public class JBTabsImpl extends JComponent
|
||||
return myInfo.getText();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Object[] getEqualityObjects() {
|
||||
return new Object[] {myInfo};
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.intellij.openapi.vcs.FileStatus;
|
||||
import com.intellij.ui.SimpleTextAttributes;
|
||||
import com.intellij.util.ui.update.ComparableObject;
|
||||
import com.intellij.util.ui.update.ComparableObjectCheck;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -263,6 +264,7 @@ public abstract class SimpleNode extends PresentableNodeDescriptor implements Co
|
||||
return list.toArray(new ColoredFragment[list.size()]);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Object[] getEqualityObjects() {
|
||||
return NONE;
|
||||
}
|
||||
|
||||
+1
@@ -243,6 +243,7 @@ public class FilteringTreeStructure extends AbstractTreeStructure {
|
||||
return super.getWeight();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Object[] getEqualityObjects() {
|
||||
return new Object[]{myDelegate};
|
||||
}
|
||||
|
||||
+2
-1
@@ -34,5 +34,6 @@ public interface ErrorStripTooltipRendererProvider {
|
||||
TooltipRenderer calcTooltipRenderer(@NotNull String text);
|
||||
TooltipRenderer calcTooltipRenderer(@NotNull String text, int width);
|
||||
|
||||
TrafficTooltipRenderer createTrafficTooltipRenderer(Runnable onHide, Editor editor);
|
||||
@NotNull
|
||||
TrafficTooltipRenderer createTrafficTooltipRenderer(@NotNull Runnable onHide, @NotNull Editor editor);
|
||||
}
|
||||
+2
-1
@@ -813,8 +813,9 @@ public class EditorMarkupModelImpl extends MarkupModelImpl implements EditorMark
|
||||
return new LineTooltipRenderer(text, width, new Object[] {text});
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public TrafficTooltipRenderer createTrafficTooltipRenderer(final Runnable onHide, Editor editor) {
|
||||
public TrafficTooltipRenderer createTrafficTooltipRenderer(@NotNull final Runnable onHide, @NotNull Editor editor) {
|
||||
return new TrafficTooltipRenderer() {
|
||||
@Override
|
||||
public void repaintTooltipWindow() {
|
||||
|
||||
+1
@@ -556,6 +556,7 @@ public class ToolWindowContentUi extends JPanel implements ContentUI, PropertyCh
|
||||
return myContent.getDisplayName();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Object[] getEqualityObjects() {
|
||||
return new Object[] {myContent};
|
||||
|
||||
@@ -115,17 +115,17 @@ public class HeavyweightHint implements Hint {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLocation(RelativePoint point) {
|
||||
public void setLocation(@NotNull RelativePoint point) {
|
||||
if (myWindow != null) {
|
||||
myWindow.setLocation(point.getScreenPoint().x, point.getScreenPoint().y);
|
||||
}
|
||||
}
|
||||
|
||||
public void addHintListener(HintListener listener) {
|
||||
public void addHintListener(@NotNull HintListener listener) {
|
||||
myListenerList.add(HintListener.class, listener);
|
||||
}
|
||||
|
||||
public void removeHintListener(HintListener listener) {
|
||||
public void removeHintListener(@NotNull HintListener listener) {
|
||||
myListenerList.remove(HintListener.class, listener);
|
||||
}
|
||||
}
|
||||
@@ -48,13 +48,13 @@ public interface Hint {
|
||||
*/
|
||||
void hide();
|
||||
|
||||
void addHintListener(HintListener listener);
|
||||
void addHintListener(@NotNull HintListener listener);
|
||||
|
||||
void removeHintListener(HintListener listener);
|
||||
void removeHintListener(@NotNull HintListener listener);
|
||||
|
||||
void pack();
|
||||
|
||||
void setLocation(RelativePoint point);
|
||||
void setLocation(@NotNull RelativePoint point);
|
||||
|
||||
/**
|
||||
* Pack and set location
|
||||
|
||||
@@ -110,6 +110,7 @@ public class LightweightHint extends UserDataHolderBase implements Hint {
|
||||
* are in <code>parentComponent</code> coordinate system. Note that the component
|
||||
* appears on 250 layer.
|
||||
*/
|
||||
@Override
|
||||
public void show(@NotNull final JComponent parentComponent,
|
||||
final int x,
|
||||
final int y,
|
||||
@@ -129,29 +130,33 @@ public class LightweightHint extends UserDataHolderBase implements Hint {
|
||||
myComponent.validate();
|
||||
|
||||
if (!myForceShowAsPopup &&
|
||||
(myForceLightweightPopup || fitsLayeredPane(layeredPane, myComponent, new RelativePoint(parentComponent, new Point(x, y)), hintHint))) {
|
||||
(myForceLightweightPopup ||
|
||||
fitsLayeredPane(layeredPane, myComponent, new RelativePoint(parentComponent, new Point(x, y)), hintHint))) {
|
||||
beforeShow();
|
||||
final Dimension preferredSize = myComponent.getPreferredSize();
|
||||
|
||||
|
||||
if (hintHint.isAwtTooltip()) {
|
||||
IdeTooltip tooltip = new IdeTooltip(hintHint.getOriginalComponent(), hintHint.getOriginalPoint(), myComponent, hintHint, myComponent) {
|
||||
@Override
|
||||
protected boolean canAutohideOn(TooltipEvent event) {
|
||||
if (event.getInputEvent() instanceof MouseEvent) {
|
||||
return !(hintHint.isContentActive() && event.isIsEventInsideBalloon());
|
||||
} else if (event.getAction() != null) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
IdeTooltip tooltip =
|
||||
new IdeTooltip(hintHint.getOriginalComponent(), hintHint.getOriginalPoint(), myComponent, hintHint, myComponent) {
|
||||
@Override
|
||||
protected boolean canAutohideOn(TooltipEvent event) {
|
||||
if (event.getInputEvent() instanceof MouseEvent) {
|
||||
return !(hintHint.isContentActive() && event.isIsEventInsideBalloon());
|
||||
}
|
||||
else if (event.getAction() != null) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onHidden() {
|
||||
fireHintHidden();
|
||||
TooltipController.getInstance().resetCurrent();
|
||||
}
|
||||
@Override
|
||||
protected void onHidden() {
|
||||
fireHintHidden();
|
||||
TooltipController.getInstance().resetCurrent();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeDismissedOnTimeout() {
|
||||
@@ -170,7 +175,8 @@ public class LightweightHint extends UserDataHolderBase implements Hint {
|
||||
.setHint(true);
|
||||
myComponent.validate();
|
||||
myCurrentIdeTooltip = IdeTooltipManager.getInstance().show(tooltip, hintHint.isShowImmediately());
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
final Point layeredPanePoint = SwingUtilities.convertPoint(parentComponent, x, y, layeredPane);
|
||||
myComponent.setBounds(layeredPanePoint.x, layeredPanePoint.y, preferredSize.width, preferredSize.height);
|
||||
layeredPane.add(myComponent, JLayeredPane.POPUP_LAYER);
|
||||
@@ -218,8 +224,9 @@ public class LightweightHint extends UserDataHolderBase implements Hint {
|
||||
myPopup.show(new RelativePoint(myParentComponent, new Point(actualPoint.x, actualPoint.y)));
|
||||
}
|
||||
}
|
||||
|
||||
protected void onPopupCancel() {}
|
||||
|
||||
protected void onPopupCancel() {
|
||||
}
|
||||
|
||||
private void fixActualPoint(Point actualPoint) {
|
||||
if (!isAwtTooltip()) return;
|
||||
@@ -263,11 +270,13 @@ public class LightweightHint extends UserDataHolderBase implements Hint {
|
||||
if (pos == Balloon.Position.above || pos == Balloon.Position.below) {
|
||||
boolean heightFit = target.y - size.height - pointer > 0 || target.y + size.height + pointer < paneSize.height;
|
||||
return heightFit && size.width + pointer < paneSize.width;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
boolean widthFit = target.x - size.width - pointer > 0 || target.x + size.width + pointer < paneSize.width;
|
||||
return widthFit && size.height + pointer < paneSize.height;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
final Rectangle lpRect = new Rectangle(pane.getLocationOnScreen().x, pane.getLocationOnScreen().y, pane.getWidth(), pane.getHeight());
|
||||
Rectangle componentRect = new Rectangle(desiredLocation.getScreenPoint().x,
|
||||
desiredLocation.getScreenPoint().y,
|
||||
@@ -291,12 +300,15 @@ public class LightweightHint extends UserDataHolderBase implements Hint {
|
||||
return myComponent.getBounds();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
if (myIsRealPopup) {
|
||||
return myPopup != null && myPopup.isVisible();
|
||||
} else if (myCurrentIdeTooltip != null) {
|
||||
}
|
||||
else if (myCurrentIdeTooltip != null) {
|
||||
return myComponent.isShowing() || IdeTooltipManager.getInstance().isQueuedToShow(myCurrentIdeTooltip);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return myComponent.isShowing();
|
||||
}
|
||||
}
|
||||
@@ -305,6 +317,7 @@ public class LightweightHint extends UserDataHolderBase implements Hint {
|
||||
return myIsRealPopup | myForceShowAsPopup;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hide() {
|
||||
hide(false);
|
||||
}
|
||||
@@ -314,7 +327,8 @@ public class LightweightHint extends UserDataHolderBase implements Hint {
|
||||
if (myIsRealPopup) {
|
||||
if (ok) {
|
||||
myPopup.closeOk(null);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
myPopup.cancel();
|
||||
}
|
||||
myPopup = null;
|
||||
@@ -324,7 +338,8 @@ public class LightweightHint extends UserDataHolderBase implements Hint {
|
||||
IdeTooltip tooltip = myCurrentIdeTooltip;
|
||||
myCurrentIdeTooltip = null;
|
||||
tooltip.hide();
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
final JRootPane rootPane = myComponent.getRootPane();
|
||||
if (rootPane != null) {
|
||||
final Rectangle bounds = myComponent.getBounds();
|
||||
@@ -375,11 +390,13 @@ public class LightweightHint extends UserDataHolderBase implements Hint {
|
||||
return myComponent;
|
||||
}
|
||||
|
||||
public final void addHintListener(final HintListener listener) {
|
||||
@Override
|
||||
public final void addHintListener(@NotNull final HintListener listener) {
|
||||
myListenerList.add(HintListener.class, listener);
|
||||
}
|
||||
|
||||
public final void removeHintListener(final HintListener listener) {
|
||||
@Override
|
||||
public final void removeHintListener(@NotNull final HintListener listener) {
|
||||
myListenerList.remove(HintListener.class, listener);
|
||||
}
|
||||
|
||||
@@ -388,13 +405,14 @@ public class LightweightHint extends UserDataHolderBase implements Hint {
|
||||
if (isRealPopup()) {
|
||||
location = myPopup.getLocationOnScreen();
|
||||
SwingUtilities.convertPointFromScreen(location, c);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if (myCurrentIdeTooltip != null) {
|
||||
Point tipPoint = myCurrentIdeTooltip.getPoint();
|
||||
Component tipComponent = myCurrentIdeTooltip.getComponent();
|
||||
return SwingUtilities.convertPoint(tipComponent, tipPoint, c);
|
||||
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
location = SwingUtilities.convertPoint(
|
||||
myComponent.getParent(),
|
||||
myComponent.getLocation(),
|
||||
@@ -407,10 +425,11 @@ public class LightweightHint extends UserDataHolderBase implements Hint {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLocation(RelativePoint point) {
|
||||
public void setLocation(@NotNull RelativePoint point) {
|
||||
if (isRealPopup()) {
|
||||
myPopup.setLocation(point.getScreenPoint());
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if (myCurrentIdeTooltip != null) {
|
||||
Point screenPoint = point.getScreenPoint();
|
||||
if (!screenPoint.equals(new RelativePoint(myCurrentIdeTooltip.getComponent(), myCurrentIdeTooltip.getPoint()).getScreenPoint())) {
|
||||
@@ -418,7 +437,8 @@ public class LightweightHint extends UserDataHolderBase implements Hint {
|
||||
myCurrentIdeTooltip.setComponent(point.getComponent());
|
||||
IdeTooltipManager.getInstance().show(myCurrentIdeTooltip, true, false);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
Point targetPoint = point.getPoint(myComponent.getParent());
|
||||
myComponent.setLocation(targetPoint);
|
||||
|
||||
@@ -431,11 +451,13 @@ public class LightweightHint extends UserDataHolderBase implements Hint {
|
||||
public void setSize(Dimension size) {
|
||||
if (myIsRealPopup) {
|
||||
myPopup.setSize(size);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
//todo kirillk
|
||||
if (isAwtTooltip()) {
|
||||
return;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
myComponent.setSize(size);
|
||||
|
||||
myComponent.revalidate();
|
||||
@@ -458,14 +480,17 @@ public class LightweightHint extends UserDataHolderBase implements Hint {
|
||||
if (myIsRealPopup) {
|
||||
Window wnd = SwingUtilities.getWindowAncestor(myComponent);
|
||||
return wnd.getBounds().contains(target.getScreenPoint());
|
||||
} else if (myCurrentIdeTooltip != null) {
|
||||
}
|
||||
else if (myCurrentIdeTooltip != null) {
|
||||
return myCurrentIdeTooltip.isInside(target);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return new Rectangle(myComponent.getLocationOnScreen(), myComponent.getSize()).contains(target.getScreenPoint());
|
||||
}
|
||||
}
|
||||
|
||||
private final class MyEscListener implements ActionListener {
|
||||
@Override
|
||||
public final void actionPerformed(final ActionEvent e) {
|
||||
hide();
|
||||
}
|
||||
@@ -477,7 +502,7 @@ public class LightweightHint extends UserDataHolderBase implements Hint {
|
||||
}
|
||||
|
||||
public boolean canControlAutoHide() {
|
||||
return myCurrentIdeTooltip != null && myCurrentIdeTooltip.getTipComponent().isShowing() ;
|
||||
return myCurrentIdeTooltip != null && myCurrentIdeTooltip.getTipComponent().isShowing();
|
||||
}
|
||||
|
||||
public IdeTooltip getCurrentIdeTooltip() {
|
||||
|
||||
@@ -16,40 +16,43 @@
|
||||
package com.intellij.util.ui.update;
|
||||
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public interface ComparableObject {
|
||||
|
||||
Object[] NONE = ArrayUtil.EMPTY_OBJECT_ARRAY;
|
||||
|
||||
@NotNull
|
||||
Object[] getEqualityObjects();
|
||||
|
||||
class Impl implements ComparableObject {
|
||||
|
||||
private Object[] myObjects;
|
||||
private final Object[] myObjects;
|
||||
|
||||
public Impl() {
|
||||
this(NONE);
|
||||
}
|
||||
|
||||
public Impl(Object object) {
|
||||
public Impl(@NotNull Object object) {
|
||||
this(new Object[] {object});
|
||||
}
|
||||
|
||||
public Impl(Object[] objects) {
|
||||
public Impl(@NotNull Object[] objects) {
|
||||
myObjects = objects;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Object[] getEqualityObjects() {
|
||||
return myObjects;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean equals(Object obj) {
|
||||
return ComparableObjectCheck.equals(this, obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int hashCode() {
|
||||
return ComparableObjectCheck.hashCode(this, super.hashCode());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -178,6 +178,7 @@ public class BaseDomElementNode extends AbstractDomElementNode {
|
||||
return consolidated;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Object[] getEqualityObjects() {
|
||||
return new Object[]{myDomElement};
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import com.intellij.util.xml.highlighting.DomElementAnnotationsManager;
|
||||
import com.intellij.util.xml.highlighting.DomElementProblemDescriptor;
|
||||
import com.intellij.util.xml.highlighting.DomElementsProblemsHolder;
|
||||
import com.intellij.util.xml.reflect.DomCollectionChildDescription;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.util.ArrayList;
|
||||
@@ -60,6 +61,7 @@ public class DomElementsGroupNode extends AbstractDomElementNode {
|
||||
return simpleNodes.toArray(new SimpleNode[simpleNodes.size()]);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Object[] getEqualityObjects() {
|
||||
return new Object[]{myParentElement, myChildrenTagName};
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.intellij.ui.treeStructure.SimpleNode;
|
||||
import com.intellij.util.xml.GenericDomValue;
|
||||
import com.intellij.util.xml.DomElement;
|
||||
import com.intellij.ui.SimpleTextAttributes;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class GenericValueNode extends AbstractDomElementNode {
|
||||
protected GenericDomValue myModelElement;
|
||||
@@ -66,6 +67,7 @@ public class GenericValueNode extends AbstractDomElementNode {
|
||||
return NO_CHILDREN;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Object[] getEqualityObjects() {
|
||||
return new Object[]{myModelElement};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user