Author: dmaliarevich
Date: 2010-10-07 11:14:16 -0400 (Thu, 07 Oct 2010)
New Revision: 25566
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/handlers/I18Handler.java
Log:
https://jira.jboss.org/browse/JBIDE-7060 , selection check was updated.
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/handlers/I18Handler.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/handlers/I18Handler.java 2010-10-07
15:04:34 UTC (rev 25565)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/handlers/I18Handler.java 2010-10-07
15:14:16 UTC (rev 25566)
@@ -27,6 +27,7 @@
import org.eclipse.ui.menus.UIElement;
import org.eclipse.ui.texteditor.ITextEditor;
import org.jboss.tools.jst.jsp.i18n.ExternalizeStringsDialog;
+import org.jboss.tools.jst.jsp.i18n.ExternalizeStringsUtils;
import org.jboss.tools.jst.jsp.i18n.ExternalizeStringsWizard;
import org.w3c.dom.Attr;
@@ -65,9 +66,7 @@
private static boolean getExternalizeStringsCommandEnabled(ISelection selection) {
boolean enabled=false;
String stringToUpdate = ""; //$NON-NLS-1$
- if ((selection instanceof TextSelection)
- && (selection instanceof IStructuredSelection)
- && (((IStructuredSelection) selection).size() == 1)) {
+ if (ExternalizeStringsUtils.isSelectionCorrect(selection)) {
String text = ""; //$NON-NLS-1$
TextSelection textSelection = null;
IStructuredSelection structuredSelection = (IStructuredSelection) selection;