From 52374777ccced74189e7cfa591244569854506f0 Mon Sep 17 00:00:00 2001 From: Bas Leijdekkers Date: Mon, 9 Feb 2015 16:48:18 +0100 Subject: [PATCH 1/6] SSR: operator assignment is also read access --- .../matcher/predicates/ReadPredicate.java | 24 ++++++++++--------- .../StructuralSearchTest.java | 23 ++++++++++++++---- 2 files changed, 32 insertions(+), 15 deletions(-) diff --git a/java/structuralsearch-java/src/com/intellij/structuralsearch/impl/matcher/predicates/ReadPredicate.java b/java/structuralsearch-java/src/com/intellij/structuralsearch/impl/matcher/predicates/ReadPredicate.java index ce25b998ba9b..a5967d5ca661 100644 --- a/java/structuralsearch-java/src/com/intellij/structuralsearch/impl/matcher/predicates/ReadPredicate.java +++ b/java/structuralsearch-java/src/com/intellij/structuralsearch/impl/matcher/predicates/ReadPredicate.java @@ -10,19 +10,21 @@ import com.intellij.structuralsearch.impl.matcher.MatchUtils; */ public final class ReadPredicate extends MatchPredicate { public boolean match(PsiElement patternNode, PsiElement matchedNode, MatchContext context) { + PsiElement parent = matchedNode.getParent(); if (matchedNode instanceof PsiIdentifier) { - matchedNode = matchedNode.getParent(); + matchedNode = parent; + parent = matchedNode.getParent(); } - if (matchedNode instanceof PsiReferenceExpression && - ( !(matchedNode.getParent() instanceof PsiMethodCallExpression) && - ( !(matchedNode.getParent() instanceof PsiAssignmentExpression) || - ((PsiAssignmentExpression)matchedNode.getParent()).getLExpression() != matchedNode - ) - ) && - MatchUtils.getReferencedElement(matchedNode) instanceof PsiVariable - ) { - return true; + if (!(matchedNode instanceof PsiReferenceExpression) || parent instanceof PsiMethodCallExpression) { + return false; } - return false; + if (parent instanceof PsiAssignmentExpression) { + final PsiAssignmentExpression assignmentExpression = (PsiAssignmentExpression)parent; + if (assignmentExpression.getLExpression() == matchedNode && + assignmentExpression.getOperationTokenType() == JavaTokenType.EQ) { + return false; + } + } + return MatchUtils.getReferencedElement(matchedNode) instanceof PsiVariable; } } diff --git a/platform/structuralsearch/testSource/com/intellij/structuralsearch/StructuralSearchTest.java b/platform/structuralsearch/testSource/com/intellij/structuralsearch/StructuralSearchTest.java index 6398627faff1..23250d8fe2fe 100644 --- a/platform/structuralsearch/testSource/com/intellij/structuralsearch/StructuralSearchTest.java +++ b/platform/structuralsearch/testSource/com/intellij/structuralsearch/StructuralSearchTest.java @@ -1233,6 +1233,21 @@ public class StructuralSearchTest extends StructuralSearchTestCase { "find sym finds declaration", 2, findMatchesCount(s133_2, s134, true) ); + final String in = "class C {" + + " {" + + " int i = 0;" + + " i += 1;" + + " i = 3;" + + " int j = i;" + + " i();" + + " }" + + " void i() {}" + + "}"; + final String pattern1 = "'_:[read]"; + assertEquals("Find reads of symbol (including operator assignment)", 2, findMatchesCount(in, pattern1)); + + final String pattern2 = "'_:[write && regex( i )]"; + assertEquals("Find writes of symbol", 3, findMatchesCount(in, pattern2)); } public void testSearchGenerics() { @@ -1900,14 +1915,14 @@ public class StructuralSearchTest extends StructuralSearchTestCase { assertEquals( "fields of class read", - findMatchesCount(s117,s118_2), - 2 + 2, + findMatchesCount(s117,s118_2) ); assertEquals( "fields of class written", - findMatchesCount(s117,s118_3), - 2 + 2, + findMatchesCount(s117,s118_3) ); final String s119 = "try { a.b(); } catch(IOException e) { c(); } catch(Exception ex) { d(); }"; From 26d3c9a5ed03b087349908aa686940dfeae5d4ea Mon Sep 17 00:00:00 2001 From: Denis Fokin Date: Mon, 9 Feb 2015 20:25:34 +0400 Subject: [PATCH 2/6] IDEA-136173 I can not see the line I just deleted, I'm shown a green rectangle instead. --- .../hint/EditorFragmentComponent.java | 118 ++++++++---------- 1 file changed, 49 insertions(+), 69 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/codeInsight/hint/EditorFragmentComponent.java b/platform/platform-impl/src/com/intellij/codeInsight/hint/EditorFragmentComponent.java index 88a1d744aeaa..1f8715dc3681 100644 --- a/platform/platform-impl/src/com/intellij/codeInsight/hint/EditorFragmentComponent.java +++ b/platform/platform-impl/src/com/intellij/codeInsight/hint/EditorFragmentComponent.java @@ -51,101 +51,81 @@ public class EditorFragmentComponent extends JPanel { } } - private void doInit(final EditorEx editor, int startLine, int endLine, final boolean showFolding, final boolean showGutter) { - + private void doInit(EditorEx editor, int startLine, int endLine, boolean showFolding, boolean showGutter) { Document doc = editor.getDocument(); final int endOffset = endLine < doc.getLineCount() ? doc.getLineEndOffset(endLine) : doc.getTextLength(); final int textImageWidth = Math.min(editor.getMaxWidthInRange(doc.getLineStartOffset(startLine), endOffset), ScreenUtil .getScreenRectangle(1, 1).width); LOG.assertTrue(textImageWidth > 0, "TextWidth: "+textImageWidth+"; startLine:" + startLine + "; endLine:" + endLine + ";"); - final FoldingModelEx foldingModel = editor.getFoldingModel(); - final boolean isFoldingEnabled = foldingModel.isFoldingEnabled(); + FoldingModelEx foldingModel = editor.getFoldingModel(); + boolean isFoldingEnabled = foldingModel.isFoldingEnabled(); if (!showFolding) { foldingModel.setFoldingEnabled(false); } Point p1 = editor.logicalPositionToXY(new LogicalPosition(startLine, 0)); Point p2 = editor.logicalPositionToXY(new LogicalPosition(Math.max(endLine, startLine + 1), 0)); - final int y1 = p1.y; + int y1 = p1.y; int y2 = p2.y; final int textImageHeight = y2 - y1 == 0 ? editor.getLineHeight() : y2 - y1; LOG.assertTrue(textImageHeight > 0, "Height: " + textImageHeight + "; startLine:" + startLine + "; endLine:" + endLine + "; p1:" + p1 + "; p2:" + p2); - final int savedScrollOffset = editor.getScrollingModel().getHorizontalScrollOffset(); + int savedScrollOffset = editor.getScrollingModel().getHorizontalScrollOffset(); if (savedScrollOffset > 0) { editor.getScrollingModel().scrollHorizontally(0); } + final BufferedImage textImage = UIUtil.createImage(textImageWidth, textImageHeight, BufferedImage.TYPE_INT_RGB); + Graphics textGraphics = textImage.getGraphics(); + UISettings.setupAntialiasing(textGraphics); + + final JComponent rowHeader; + final BufferedImage markersImage; + final int markersImageWidth; + + if (showGutter) { + rowHeader = editor.getGutterComponentEx(); + markersImageWidth = Math.max(1, rowHeader.getWidth()); + + markersImage = UIUtil.createImage(markersImageWidth, textImageHeight, BufferedImage.TYPE_INT_RGB); + Graphics markerGraphics = markersImage.getGraphics(); + UISettings.setupAntialiasing(markerGraphics); + + markerGraphics.translate(0, -y1); + markerGraphics.setClip(0, y1, rowHeader.getWidth(), textImageHeight); + markerGraphics.setColor(getBackgroundColor(editor)); + markerGraphics.fillRect(0, y1, rowHeader.getWidth(), textImageHeight); + rowHeader.paint(markerGraphics); + } + else { + markersImageWidth = 0; + rowHeader = null; + markersImage = null; + } + + textGraphics.translate(0, -y1); + textGraphics.setClip(0, y1, textImageWidth, textImageHeight); + final boolean wasVisible = editor.setCaretVisible(false); + editor.getContentComponent().paint(textGraphics); + if (wasVisible) { + editor.setCaretVisible(true); + } + + if (!showFolding) { + foldingModel.setFoldingEnabled(isFoldingEnabled); + } + + if (savedScrollOffset > 0) { + editor.getScrollingModel().scrollHorizontally(savedScrollOffset); + } + JComponent component = new JComponent() { - - private Graphics2D componentGraphics; - private JComponent rowHeader; - private BufferedImage markersImage; - private int markersImageWidth; - private BufferedImage textImage; - - private void updateImages() { - - if ((getGraphics()).equals(componentGraphics)) { - return; - } - - componentGraphics = (Graphics2D)getGraphics(); - - textImage = UIUtil.createImageForGraphics(componentGraphics, - textImageWidth, textImageHeight, BufferedImage.TYPE_INT_RGB); - Graphics textGraphics = textImage.getGraphics(); - UISettings.setupAntialiasing(textGraphics); - - if (showGutter) { - rowHeader = editor.getGutterComponentEx(); - markersImageWidth = Math.max(1, rowHeader.getWidth()); - - markersImage = UIUtil.createImageForGraphics(componentGraphics, markersImageWidth, textImageHeight, BufferedImage.TYPE_INT_RGB); - Graphics markerGraphics = markersImage.getGraphics(); - UISettings.setupAntialiasing(markerGraphics); - - markerGraphics.translate(0, -y1); - markerGraphics.setClip(0, y1, rowHeader.getWidth(), textImageHeight); - markerGraphics.setColor(getBackgroundColor(editor)); - markerGraphics.fillRect(0, y1, rowHeader.getWidth(), textImageHeight); - rowHeader.paint(markerGraphics); - } - else { - markersImageWidth = 0; - rowHeader = null; - markersImage = null; - } - - textGraphics.translate(0, -y1); - textGraphics.setClip(0, y1, textImageWidth, textImageHeight); - final boolean wasVisible = editor.setCaretVisible(false); - editor.getContentComponent().paint(textGraphics); - if (wasVisible) { - editor.setCaretVisible(true); - } - - if (!showFolding) { - foldingModel.setFoldingEnabled(isFoldingEnabled); - } - - if (savedScrollOffset > 0) { - editor.getScrollingModel().scrollHorizontally(savedScrollOffset); - } - } - @Override public Dimension getPreferredSize() { return new Dimension(textImageWidth + markersImageWidth, textImageHeight); } - @Override - public void addNotify() { - super.addNotify(); - updateImages(); - } - @Override protected void paintComponent(Graphics graphics) { if (markersImage != null) { From ac7a31b2f0174b958192155b4adaf28945be96ec Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Mon, 9 Feb 2015 18:40:15 +0300 Subject: [PATCH 3/6] diff: TODO --- .../com/intellij/openapi/vcs/changes/CacheChangeProcessor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/CacheChangeProcessor.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/CacheChangeProcessor.java index f44497106063..2ca16f2325e1 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/CacheChangeProcessor.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/CacheChangeProcessor.java @@ -122,7 +122,7 @@ public abstract class CacheChangeProcessor extends DiffRequestProcessor { ChangeListManager.getInstance(myProject).invokeAfterUpdate(new Runnable() { @Override public void run() { - refresh(); + refresh(); // TODO: this could cause diff init in 'hide' state } }, InvokeAfterUpdateMode.BACKGROUND_CANCELLABLE, "", ModalityState.current()); return new LoadingDiffRequest(ChangeDiffRequestProducer.getRequestTitle(change)); From 645873cc00335056984c82c01dc47966250e58a0 Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Mon, 9 Feb 2015 19:25:03 +0300 Subject: [PATCH 4/6] diff: new icons --- .../diff/tools/simple/SimpleDiffChange.java | 7 ++- .../diff/tools/simple/SimpleDiffViewer.java | 14 ++--- .../src/com/intellij/diff/util/DiffIcons.java | 53 ------------------ platform/icons/src/diff/arrowLeftDown.png | Bin 0 -> 124 bytes platform/icons/src/diff/arrowLeftDown@2x.png | Bin 0 -> 152 bytes platform/icons/src/diff/arrowRight.png | Bin 0 -> 170 bytes platform/icons/src/diff/arrowRight@2x.png | Bin 0 -> 293 bytes platform/icons/src/diff/arrowRightDown.png | Bin 0 -> 129 bytes platform/icons/src/diff/arrowRightDown@2x.png | Bin 0 -> 158 bytes .../openapi/diff/actions/MergeOperations.java | 2 +- .../util/src/com/intellij/icons/AllIcons.java | 3 + 11 files changed, 15 insertions(+), 64 deletions(-) delete mode 100644 platform/diff-impl/src/com/intellij/diff/util/DiffIcons.java create mode 100644 platform/icons/src/diff/arrowLeftDown.png create mode 100644 platform/icons/src/diff/arrowLeftDown@2x.png create mode 100644 platform/icons/src/diff/arrowRight.png create mode 100644 platform/icons/src/diff/arrowRight@2x.png create mode 100644 platform/icons/src/diff/arrowRightDown.png create mode 100644 platform/icons/src/diff/arrowRightDown@2x.png diff --git a/platform/diff-impl/src/com/intellij/diff/tools/simple/SimpleDiffChange.java b/platform/diff-impl/src/com/intellij/diff/tools/simple/SimpleDiffChange.java index 4b91729c3733..6565f9b60af6 100644 --- a/platform/diff-impl/src/com/intellij/diff/tools/simple/SimpleDiffChange.java +++ b/platform/diff-impl/src/com/intellij/diff/tools/simple/SimpleDiffChange.java @@ -18,6 +18,7 @@ package com.intellij.diff.tools.simple; import com.intellij.diff.fragments.DiffFragment; import com.intellij.diff.fragments.LineFragment; import com.intellij.diff.util.*; +import com.intellij.icons.AllIcons; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.editor.Document; @@ -318,7 +319,7 @@ public class SimpleDiffChange { @Nullable private GutterIconRenderer createApplyRenderer(@NotNull final Side side) { - return createIconRenderer(side, DiffIcons.getReplaceIcon(Side.RIGHT), new Runnable() { + return createIconRenderer(side, AllIcons.Diff.Arrow, new Runnable() { @Override public void run() { replaceChange(side); @@ -328,7 +329,7 @@ public class SimpleDiffChange { @Nullable private GutterIconRenderer createAppendRenderer(@NotNull final Side side) { - return createIconRenderer(side, DiffIcons.getAppendIcon(Side.RIGHT), new Runnable() { + return createIconRenderer(side, AllIcons.Diff.ArrowLeftDown, new Runnable() { @Override public void run() { appendChange(side); @@ -338,7 +339,7 @@ public class SimpleDiffChange { @Nullable private GutterIconRenderer createRevertRenderer(@NotNull final Side side) { - return createIconRenderer(side.other(), DiffIcons.getRevertIcon(Side.RIGHT), new Runnable() { + return createIconRenderer(side.other(), AllIcons.Diff.Remove, new Runnable() { @Override public void run() { replaceChange(side.other()); diff --git a/platform/diff-impl/src/com/intellij/diff/tools/simple/SimpleDiffViewer.java b/platform/diff-impl/src/com/intellij/diff/tools/simple/SimpleDiffViewer.java index 0b0c191a393f..860745320afb 100644 --- a/platform/diff-impl/src/com/intellij/diff/tools/simple/SimpleDiffViewer.java +++ b/platform/diff-impl/src/com/intellij/diff/tools/simple/SimpleDiffViewer.java @@ -32,11 +32,11 @@ import com.intellij.diff.tools.util.FoldingModelSupport.SimpleFoldingModel; import com.intellij.diff.tools.util.base.HighlightPolicy; import com.intellij.diff.tools.util.twoside.TwosideTextDiffViewer; import com.intellij.diff.util.DiffDividerDrawUtil; -import com.intellij.diff.util.DiffIcons; import com.intellij.diff.util.DiffUserDataKeysEx.ScrollToPolicy; import com.intellij.diff.util.DiffUtil; import com.intellij.diff.util.DiffUtil.DocumentData; import com.intellij.diff.util.Side; +import com.intellij.icons.AllIcons; import com.intellij.ide.IdeEventQueue; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; @@ -663,13 +663,13 @@ public class SimpleDiffViewer extends TwosideTextDiffViewer { private class ReplaceSelectedChangesAction extends ApplySelectedChangesActionBase { public ReplaceSelectedChangesAction() { - super("Replace", null, DiffIcons.getReplaceIcon(null), true); + super("Replace", null, AllIcons.Diff.Arrow, true); } @NotNull @Override protected Icon getIcon(@NotNull Side side) { - return DiffIcons.getReplaceIcon(side); + return side.isLeft() ? AllIcons.Diff.Arrow : AllIcons.Diff.ArrowRight; } @Override @@ -682,13 +682,13 @@ public class SimpleDiffViewer extends TwosideTextDiffViewer { private class AppendSelectedChangesAction extends ApplySelectedChangesActionBase { public AppendSelectedChangesAction() { - super("Insert", null, DiffIcons.getAppendIcon(null), true); + super("Insert", null, AllIcons.Diff.ArrowLeftDown, true); } @NotNull @Override protected Icon getIcon(@NotNull Side side) { - return DiffIcons.getAppendIcon(side); + return side.isLeft() ? AllIcons.Diff.ArrowLeftDown : AllIcons.Diff.ArrowRightDown; } @Override @@ -701,13 +701,13 @@ public class SimpleDiffViewer extends TwosideTextDiffViewer { private class RevertSelectedChangesAction extends ApplySelectedChangesActionBase { public RevertSelectedChangesAction() { - super("Revert", null, DiffIcons.getRevertIcon(null), false); + super("Revert", null, AllIcons.Diff.Remove, false); } @NotNull @Override protected Icon getIcon(@NotNull Side side) { - return DiffIcons.getRevertIcon(side); + return AllIcons.Diff.Remove; } @Override diff --git a/platform/diff-impl/src/com/intellij/diff/util/DiffIcons.java b/platform/diff-impl/src/com/intellij/diff/util/DiffIcons.java deleted file mode 100644 index 1fea0e06add1..000000000000 --- a/platform/diff-impl/src/com/intellij/diff/util/DiffIcons.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2000-2015 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.diff.util; - -import com.intellij.icons.AllIcons; -import com.intellij.util.IconUtil; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import javax.swing.*; - -public class DiffIcons { - public final static Icon REPLACE_LEFT = IconUtil.flip(AllIcons.Diff.Arrow, true); - public final static Icon REPLACE_RIGHT = AllIcons.Diff.Arrow; - - // TODO: different icon - public final static Icon APPEND_LEFT = IconUtil.flip(AllIcons.Diff.Arrow, true); - public final static Icon APPEND_RIGHT = AllIcons.Diff.Arrow; - - public final static Icon REVERT_LEFT = AllIcons.Diff.Remove; - public final static Icon REVERT_RIGHT = AllIcons.Diff.Remove; - - @NotNull - public static Icon getReplaceIcon(@Nullable Side side) { - if (side == null) side = Side.LEFT; - return side.selectN(REPLACE_LEFT, REPLACE_RIGHT); - } - - @NotNull - public static Icon getAppendIcon(@Nullable Side side) { - if (side == null) side = Side.LEFT; - return side.selectN(APPEND_LEFT, APPEND_RIGHT); - } - - @NotNull - public static Icon getRevertIcon(@Nullable Side side) { - if (side == null) side = Side.LEFT; - return side.selectN(REVERT_LEFT, REVERT_RIGHT); - } -} diff --git a/platform/icons/src/diff/arrowLeftDown.png b/platform/icons/src/diff/arrowLeftDown.png new file mode 100644 index 0000000000000000000000000000000000000000..e01b1b4206bdd5644f66687b0fa71ce91d6edbba GIT binary patch literal 124 zcmeAS@N?(olHy`uVBq!ia0vp^+#t-s1|(OmDOUqh&YmugAr-fhfBgS%?;IK`YP60$ zDc;1;Anm}SANGb_S35#`a!ehM{?`ocX)M${*7ka%=CRI;qREG|Zipmrl{%b~WXRCS W`lc%|NtF|59D}E;pUXO@geCywdnv*I literal 0 HcmV?d00001 diff --git a/platform/icons/src/diff/arrowLeftDown@2x.png b/platform/icons/src/diff/arrowLeftDown@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..39397c4c65c8d0f66c5850ef79f902d68f80e0fd GIT binary patch literal 152 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4f@t!V@Ar-gYUNq!8puppN@lMYi z?dglni#cC~Ep=hl?|7JhEn0`+i1FqXmsaWiy|HH!OV9FCO@$9KEvo9J`tHTEJw705 zF}XfOVng}HgtG_s-(vUMf4<@OZ=Hzt53e#l@P4*E(iGzN>p9RW22WQ%mvv4FO#qYU BJ&FJT literal 0 HcmV?d00001 diff --git a/platform/icons/src/diff/arrowRight.png b/platform/icons/src/diff/arrowRight.png new file mode 100644 index 0000000000000000000000000000000000000000..f7d76849a23ac3b8a63e42d506c65a94ed91a720 GIT binary patch literal 170 zcmeAS@N?(olHy`uVBq!ia0vp^+#t-s1|(OmDOUqhg`O^sAr-fhfBgS%&%9B>CnPlV zFH4fXLRv#oiCxztKZSo>N45oc0@+D!3UN$FqSjWp4p*8?uEtHSH718L|^zR@$gNr*tvTVhi69cFi6L7HuQa3 R^blw{gQu&X%Q~loCICa*KNtW2 literal 0 HcmV?d00001 diff --git a/platform/icons/src/diff/arrowRight@2x.png b/platform/icons/src/diff/arrowRight@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..299b7d315bc2209f87406e67f7b397183a982523 GIT binary patch literal 293 zcmV+=0owkFP)vC+=ndYzRG49o8RNg#s7t3Lk| zX6H|oF-G-)>OEL%ZHO1KAXEUPe~ATKp2RE?oYJGgYi7O@Q_qC-Xz+m8GV__3FcZ?F z!IlwmWabkwW=5n(gO&S=3o{>Fph!;zEB81LX5JA)iH?FTbGKfNdE@4s)Fr`|CGlqF z9O+$yS4i(NiUN$Hkc`4U&YhX|fyWE#ZPu*>>sCtE%`ZR&3Q|c5;#al?m9C|g&Y9^J rI5J58{n=~|c?J%B*6Psz%|Gu0M!qI14Q-~y00000NkvXXu0mjfJM?{K literal 0 HcmV?d00001 diff --git a/platform/icons/src/diff/arrowRightDown.png b/platform/icons/src/diff/arrowRightDown.png new file mode 100644 index 0000000000000000000000000000000000000000..7f005f1d68fc586a5474049832fb4ff7e610ea5f GIT binary patch literal 129 zcmeAS@N?(olHy`uVBq!ia0vp^+#t-s1|(OmDOUqh9-c0aAr-fhSFBoOG8)o)g_Dndc c&=kSL;Pv87S4-F57ND67p00i_>zopr06Ky$)c^nh literal 0 HcmV?d00001 diff --git a/platform/icons/src/diff/arrowRightDown@2x.png b/platform/icons/src/diff/arrowRightDown@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..d116ce1447dd8d82b53ceac1d68e30e7e5cb6d0b GIT binary patch literal 158 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4fsh%#5Ar-gYUUuXD4)&Ud8LZ^fsfV0rbk^|kK65=Uq{_2h~<_( zCRI@NM4dKO Date: Mon, 9 Feb 2015 19:33:19 +0300 Subject: [PATCH 5/6] diff: do not show backgroundable for minor refresh --- .../com/intellij/openapi/vcs/changes/CacheChangeProcessor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/CacheChangeProcessor.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/CacheChangeProcessor.java index 2ca16f2325e1..05398a8edfba 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/CacheChangeProcessor.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/CacheChangeProcessor.java @@ -124,7 +124,7 @@ public abstract class CacheChangeProcessor extends DiffRequestProcessor { public void run() { refresh(); // TODO: this could cause diff init in 'hide' state } - }, InvokeAfterUpdateMode.BACKGROUND_CANCELLABLE, "", ModalityState.current()); + }, InvokeAfterUpdateMode.SILENT, "", ModalityState.current()); return new LoadingDiffRequest(ChangeDiffRequestProducer.getRequestTitle(change)); } From 139ed96d390a97c670fcfed2cca8963d5df1d69b Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Mon, 9 Feb 2015 19:47:51 +0300 Subject: [PATCH 6/6] diff: show hand over gutter apply icon --- .../src/com/intellij/diff/tools/simple/SimpleDiffChange.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/diff-impl/src/com/intellij/diff/tools/simple/SimpleDiffChange.java b/platform/diff-impl/src/com/intellij/diff/tools/simple/SimpleDiffChange.java index 6565f9b60af6..3a0337f09a91 100644 --- a/platform/diff-impl/src/com/intellij/diff/tools/simple/SimpleDiffChange.java +++ b/platform/diff-impl/src/com/intellij/diff/tools/simple/SimpleDiffChange.java @@ -358,6 +358,8 @@ public class SimpleDiffChange { return icon; } + public boolean isNavigateAction() { return true; } + @Nullable @Override public AnAction getClickAction() {