diff --git a/platform/platform-impl/src/com/intellij/notification/impl/NotificationSearchableOptionContributor.java b/platform/platform-impl/src/com/intellij/notification/impl/NotificationSearchableOptionContributor.java
new file mode 100644
index 000000000000..b08890a14d61
--- /dev/null
+++ b/platform/platform-impl/src/com/intellij/notification/impl/NotificationSearchableOptionContributor.java
@@ -0,0 +1,32 @@
+/*
+ * 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.notification.impl;
+
+import com.intellij.ide.ui.search.SearchableOptionContributor;
+import com.intellij.ide.ui.search.SearchableOptionProcessor;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * @author peter
+ */
+public class NotificationSearchableOptionContributor extends SearchableOptionContributor {
+ @Override
+ public void processOptions(@NotNull SearchableOptionProcessor processor) {
+ for (NotificationSettings settings : NotificationsConfigurationImpl.getInstanceImpl().getAllSettings()) {
+ processor.addOptions(settings.getGroupId(), null, settings.getGroupId() + " notifications", NotificationsConfigurable.ID, NotificationsConfigurable.DISPLAY_NAME, true);
+ }
+ }
+}
diff --git a/platform/platform-impl/src/com/intellij/notification/impl/NotificationsConfigurable.java b/platform/platform-impl/src/com/intellij/notification/impl/NotificationsConfigurable.java
index 17f6f42cb4df..99871d163225 100644
--- a/platform/platform-impl/src/com/intellij/notification/impl/NotificationsConfigurable.java
+++ b/platform/platform-impl/src/com/intellij/notification/impl/NotificationsConfigurable.java
@@ -30,6 +30,7 @@ import javax.swing.*;
*/
public class NotificationsConfigurable implements Configurable, SearchableConfigurable, Configurable.NoScroll {
public static final String DISPLAY_NAME = "Notifications";
+ static final String ID = "reference.settings.ide.settings.notifications";
private NotificationsConfigurablePanel myComponent;
@Override
@@ -41,7 +42,7 @@ public class NotificationsConfigurable implements Configurable, SearchableConfig
@Override
@NotNull
public String getHelpTopic() {
- return "reference.settings.ide.settings.notifications";
+ return ID;
}
@Override
@@ -82,6 +83,11 @@ public class NotificationsConfigurable implements Configurable, SearchableConfig
@Override
public Runnable enableSearch(final String option) {
- return null;
+ return new Runnable() {
+ @Override
+ public void run() {
+ myComponent.selectGroup(option);
+ }
+ };
}
}
diff --git a/platform/platform-impl/src/com/intellij/notification/impl/ui/NotificationsConfigurablePanel.java b/platform/platform-impl/src/com/intellij/notification/impl/ui/NotificationsConfigurablePanel.java
index 7931606053e5..1706376cc8e0 100644
--- a/platform/platform-impl/src/com/intellij/notification/impl/ui/NotificationsConfigurablePanel.java
+++ b/platform/platform-impl/src/com/intellij/notification/impl/ui/NotificationsConfigurablePanel.java
@@ -23,6 +23,8 @@ import com.intellij.openapi.ui.ComboBoxTableRenderer;
import com.intellij.openapi.ui.StripeTable;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.ui.*;
+import com.intellij.ui.speedSearch.SpeedSearchSupply;
+import com.intellij.util.ObjectUtils;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
@@ -427,4 +429,8 @@ public class NotificationsConfigurablePanel extends JPanel implements Disposable
return result;
}
}
+
+ public void selectGroup(String searchQuery) {
+ ObjectUtils.assertNotNull(SpeedSearchSupply.getSupply(myTable, true)).findAndSelectElement(searchQuery);
+ }
}
diff --git a/platform/platform-resources/src/META-INF/PlatformExtensions.xml b/platform/platform-resources/src/META-INF/PlatformExtensions.xml
index d383db2838f0..5bd41b391f08 100644
--- a/platform/platform-resources/src/META-INF/PlatformExtensions.xml
+++ b/platform/platform-resources/src/META-INF/PlatformExtensions.xml
@@ -241,6 +241,7 @@
displayName="Notifications"
id="reference.settings.ide.settings.notifications"
provider="com.intellij.notification.impl.NotificationsConfigurableProvider"/>
+