From 2acdc06da958e724578d560a7c870292e1ae25f6 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Wed, 6 Apr 2011 17:38:07 +0200 Subject: [PATCH 01/22] diagnostics related to PY-3275 --- .../codeInsight/intention/impl/IntentionListStep.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/IntentionListStep.java b/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/IntentionListStep.java index 340edb756560..c0c44849337e 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/IntentionListStep.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/IntentionListStep.java @@ -27,6 +27,7 @@ import com.intellij.codeInsight.intention.impl.config.IntentionActionWrapper; import com.intellij.codeInsight.intention.impl.config.IntentionManagerSettings; import com.intellij.codeInspection.ex.QuickFixWrapper; import com.intellij.openapi.application.ApplicationManager; +import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.popup.*; @@ -47,6 +48,8 @@ import java.util.*; * @author cdr */ class IntentionListStep implements ListPopupStep, SpeedSearchFilter { + private static final Logger LOG = Logger.getInstance("#com.intellij.codeInsight.intention.impl.IntentionListStep"); + private final Set myCachedIntentions = new THashSet(ACTION_TEXT_AND_CLASS_EQUALS); private final Set myCachedErrorFixes = new THashSet(ACTION_TEXT_AND_CLASS_EQUALS); private final Set myCachedInspectionFixes = new THashSet(ACTION_TEXT_AND_CLASS_EQUALS); @@ -311,7 +314,11 @@ class IntentionListStep implements ListPopupStep @NotNull public String getTextFor(final IntentionActionWithTextCaching action) { - return action.getAction().getText(); + final String text = action.getAction().getText(); + if (text.startsWith("")) { + LOG.info("IntentionAction.getText() returned HTML: action=" + action + " text=" + text); + } + return text; } public Icon getIconFor(final IntentionActionWithTextCaching value) { From 1395f318e8b1fc73b6860b5c1a77b4f66fbe9735 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Wed, 6 Apr 2011 19:54:04 +0400 Subject: [PATCH 02/22] productivity for hor scrolling --- .../openapi/keymap/impl/IdeMouseEventDispatcher.java | 2 ++ .../src/messages/FeatureStatisticsBundle.properties | 1 + .../src/tips/HorizontalScrolling.html | 9 +++++++++ resources/src/ProductivityFeaturesRegistry.xml | 7 +++++++ 4 files changed, 19 insertions(+) create mode 100644 platform/platform-resources-en/src/tips/HorizontalScrolling.html diff --git a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/IdeMouseEventDispatcher.java b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/IdeMouseEventDispatcher.java index 02ba4200c9a1..8626acdb780c 100644 --- a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/IdeMouseEventDispatcher.java +++ b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/IdeMouseEventDispatcher.java @@ -15,6 +15,7 @@ */ package com.intellij.openapi.keymap.impl; +import com.intellij.featureStatistics.FeatureUsageTracker; import com.intellij.ide.DataManager; import com.intellij.openapi.actionSystem.*; import com.intellij.openapi.actionSystem.ex.ActionManagerEx; @@ -187,6 +188,7 @@ public final class IdeMouseEventDispatcher { } private static boolean doHorizontalScrolling(Component c, MouseWheelEvent me) { + FeatureUsageTracker.getInstance().triggerFeatureUsed("ui.horizontal.scrolling"); final JScrollBar scrollBar = findHorizontalScrollBar(c); if (scrollBar != null) { scrollBar.setValue(scrollBar.getValue() + getScrollAmount(c, me, scrollBar)); diff --git a/platform/platform-resources-en/src/messages/FeatureStatisticsBundle.properties b/platform/platform-resources-en/src/messages/FeatureStatisticsBundle.properties index cb008d728f92..36f379cc0036 100644 --- a/platform/platform-resources-en/src/messages/FeatureStatisticsBundle.properties +++ b/platform/platform-resources-en/src/messages/FeatureStatisticsBundle.properties @@ -77,6 +77,7 @@ refactoring.rename=Rename refactoring.copyClass=Copy Class refactoring ui.tree.speedsearch=Speed search in trees ui.scheme.quickswitch=Quick switch scheme +ui.horizontal.scrolling=Horizontal Scrolling # suppress inspection "UnusedProperty" ui.recentchanges=Recent changes diff --git a/platform/platform-resources-en/src/tips/HorizontalScrolling.html b/platform/platform-resources-en/src/tips/HorizontalScrolling.html new file mode 100644 index 000000000000..44e1340f7e42 --- /dev/null +++ b/platform/platform-resources-en/src/tips/HorizontalScrolling.html @@ -0,0 +1,9 @@ + + + + + + +
Enable Horizontal Scrolling with mouse wheel by holding SHIFT button
+ + \ No newline at end of file diff --git a/resources/src/ProductivityFeaturesRegistry.xml b/resources/src/ProductivityFeaturesRegistry.xml index aee5801c3a1c..7662364d87a1 100644 --- a/resources/src/ProductivityFeaturesRegistry.xml +++ b/resources/src/ProductivityFeaturesRegistry.xml @@ -414,6 +414,13 @@ successive-show="5" min-usage-count="1" /> +