diff options
Diffstat (limited to 'plugins/xpath/xpath-view/src')
3 files changed, 9 insertions, 11 deletions
diff --git a/plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/ShowXPathAction.java b/plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/ShowXPathAction.java index 8423fe767e1a..748a7063b200 100644 --- a/plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/ShowXPathAction.java +++ b/plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/ShowXPathAction.java @@ -51,7 +51,7 @@ public class ShowXPathAction extends XPathAction { super.update(event); final Presentation presentation = event.getPresentation(); - if (ActionPlaces.MAIN_MENU.equals(event.getPlace()) && presentation.getText().startsWith("Show ")) { + if (ActionPlaces.isMainMenuOrActionSearch(event.getPlace()) && presentation.getText().startsWith("Show ")) { final String text = presentation.getText().substring("Show ".length()); presentation.setText(Character.toUpperCase(text.charAt(0)) + text.substring(1)); } diff --git a/plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/XPathAction.java b/plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/XPathAction.java index 20e3597c8f2f..734ec9efe9a4 100644 --- a/plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/XPathAction.java +++ b/plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/XPathAction.java @@ -41,10 +41,11 @@ public abstract class XPathAction extends AnAction { // provide icon for toolbar if (ActionPlaces.MAIN_TOOLBAR.equals(event.getPlace())) { updateToolbar(event); - } else if (ActionPlaces.MAIN_MENU.equals(event.getPlace())) { - updateMainMenu(event); - } else if (ActionPlaces.EDITOR_POPUP.equals(event.getPlace())) { - presentation.setVisible(presentation.isEnabled()); + } else if (ActionPlaces.isMainMenuOrActionSearch(event.getPlace())) { + updateMainMenu(event); + } + else if (ActionPlaces.EDITOR_POPUP.equals(event.getPlace())) { + presentation.setVisible(presentation.isEnabled()); } } diff --git a/plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/search/SearchScope.java b/plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/search/SearchScope.java index 775d90280d07..4c42e86f5f58 100644 --- a/plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/search/SearchScope.java +++ b/plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/search/SearchScope.java @@ -22,10 +22,7 @@ import com.intellij.openapi.roots.ContentIterator; import com.intellij.openapi.roots.ModuleRootManager; import com.intellij.openapi.roots.OrderEnumerator; import com.intellij.openapi.roots.ProjectRootManager; -import com.intellij.openapi.util.Condition; -import com.intellij.openapi.util.InvalidDataException; -import com.intellij.openapi.util.JDOMExternalizable; -import com.intellij.openapi.util.WriteExternalException; +import com.intellij.openapi.util.*; import com.intellij.openapi.vfs.LocalFileSystem; import com.intellij.openapi.vfs.VfsUtilCore; import com.intellij.openapi.vfs.VirtualFile; @@ -189,12 +186,12 @@ public class SearchScope implements JDOMExternalizable { switch (getScopeType()) { case PROJECT: //noinspection unchecked - ProjectRootManager.getInstance(project).getFileIndex().iterateContent(new MyFileIterator(processor, Condition.TRUE)); + ProjectRootManager.getInstance(project).getFileIndex().iterateContent(new MyFileIterator(processor, Conditions.<VirtualFile>alwaysTrue())); break; case MODULE: final Module module = ModuleManager.getInstance(project).findModuleByName(getModuleName()); //noinspection unchecked - ModuleRootManager.getInstance(module).getFileIndex().iterateContent(new MyFileIterator(processor, Condition.TRUE)); + ModuleRootManager.getInstance(module).getFileIndex().iterateContent(new MyFileIterator(processor, Conditions.<VirtualFile>alwaysTrue())); break; case DIRECTORY: final String dirName = getPath(); |