Author: vpakan(a)redhat.com
Date: 2011-12-09 10:44:10 -0500 (Fri, 09 Dec 2011)
New Revision: 37172
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/CreateJSF2CompositeComponentMenuTest.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAllBotTests.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/Assertions.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/FileHelper.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/GlobalELVariablesTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ExternalizeStringsDialogTest.java
Log:
Fixes for MacOs.
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAllBotTests.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAllBotTests.java 2011-12-09
15:34:27 UTC (rev 37171)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAllBotTests.java 2011-12-09
15:44:10 UTC (rev 37172)
@@ -6,6 +6,7 @@
import org.jboss.tools.jsf.ui.bot.test.cssdialog.jbide.JBIDE3579Test;
import org.jboss.tools.jsf.ui.bot.test.cssdialog.jbide.JBIDE3920Test;
import org.jboss.tools.jsf.ui.bot.test.cssdialog.jbide.JBIDE4391Test;
+import org.jboss.tools.jsf.ui.bot.test.jsf2.CreateJSF2CompositeComponentMenuTest;
import org.jboss.tools.jsf.ui.bot.test.jsf2.refactor.JSF2AttributeRenameTest;
import org.jboss.tools.jsf.ui.bot.test.jsf2.refactor.JSF2MoveParticipantTest;
import org.jboss.tools.jsf.ui.bot.test.jsf2.refactor.JSF2RenameParticipantTest;
@@ -54,7 +55,8 @@
MarkersTest.class,
WebXmlEditorTest.class,
CreateNewTemplateFromJSFProject.class,
- PropertiesEditorTest.class
+ PropertiesEditorTest.class,
+ CreateJSF2CompositeComponentMenuTest.class
})
public class JSFAllBotTests{
}
\ No newline at end of file
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/CreateJSF2CompositeComponentMenuTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/CreateJSF2CompositeComponentMenuTest.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/CreateJSF2CompositeComponentMenuTest.java 2011-12-09
15:44:10 UTC (rev 37172)
@@ -0,0 +1,111 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.ui.bot.test.jsf2;
+
+import org.eclipse.core.commands.NotEnabledException;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
+import org.jboss.tools.jsf.ui.bot.test.JSFAutoTestCase;
+import org.jboss.tools.ui.bot.ext.Assertions;
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
+import org.jboss.tools.ui.bot.ext.SWTJBTExt;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.Timing;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+import org.jboss.tools.ui.bot.ext.helper.FileHelper;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
+/** Tests Functionality of Create JSF2 Composite Component Menu Item of Context Menu
+ * @author Vladimir Pakan
+ *
+ */
+public class CreateJSF2CompositeComponentMenuTest extends JSFAutoTestCase{
+ private static final String CC_NAME_SPACE = "ccNameSpace";
+ private static final String CC_NAME = "ccName";
+ private static final String CC_FILE_NAME = CC_NAME + ".xhtml";
+ private SWTBotEditor jsf2editor = null;
+ private String originalContent = null;
+ /**
+ * Test if menu is working correctly
+ */
+ public void testMenuFunctionality(){
+ eclipse.closeAllEditors();
+ createJSF2Project(JSF2_TEST_PROJECT_NAME);
+ openPage(JSF2_TEST_PAGE, JSF2_TEST_PROJECT_NAME);
+ jsf2editor = SWTTestExt.bot.swtBotEditorExtByTitle(JSF2_TEST_PAGE);
+ originalContent = jsf2editor.toTextEditor().getText();
+ SWTJBTExt.selectTextInSourcePane(new SWTBotExt(),
+ JSF2_TEST_PAGE,
+ "<ui:define ",
+ 0,
+ 0,
+ 0);
+ jsf2editor.toTextEditor().insertText("\n");
+ ContextMenuHelper.clickContextMenu(jsf2editor, IDELabel.Menu.CREATE_JSF2_COMPOSITE);
+ bot.shell(IDELabel.Shell.CREATING_COMPOSITE_COMPONENT).activate();
+ bot.text().setText(CC_NAME_SPACE + ":" + CC_NAME);
+ bot.button(IDELabel.Button.OK).click();
+ bot.sleep(Timing.time2S());
+ jsf2editor.save();
+ bot.sleep(Timing.time2S());
+ final String activeEditorTitle = bot.activeEditor().getTitle();
+ assertTrue(activeEditorTitle.equals(CC_FILE_NAME));
+ Assertions.assertFileExistsInWorkspace(CC_FILE_NAME,
JSF2_TEST_PROJECT_NAME,"WebContent","resources",CC_NAME_SPACE);
+ final String editorText = jsf2editor.toTextEditor().getText();
+ Assertions.assertSourceEditorContains(editorText.replaceAll(" ",
""),
+ "<" + CreateJSF2CompositeComponentMenuTest.CC_NAME_SPACE +
":" + CreateJSF2CompositeComponentMenuTest.CC_NAME + ">" +
+ "</" + CreateJSF2CompositeComponentMenuTest.CC_NAME_SPACE +
":" + CreateJSF2CompositeComponentMenuTest.CC_NAME + ">",
+ JSF2_TEST_PROJECT_NAME);
+ Assertions.assertSourceEditorContains(editorText,
+ "xmlns:" + CreateJSF2CompositeComponentMenuTest.CC_NAME_SPACE +
+ "=\"http://java.sun.com/jsf/composite/" +
CreateJSF2CompositeComponentMenuTest.CC_NAME_SPACE + "\"",
+ JSF2_TEST_PROJECT_NAME);
+ }
+ /**
+ * Tests if Menu is Not present for JSF project version 1.2
+ */
+ public void testMenuNotPresentForJSF12Project(){
+ // Test default JSF 1.2 Project
+ openPage(VPEAutoTestCase.TEST_PAGE,VPEAutoTestCase.JBT_TEST_PROJECT_NAME);
+ try{
+
ContextMenuHelper.clickContextMenu(SWTTestExt.bot.swtBotEditorExtByTitle(VPEAutoTestCase.TEST_PAGE),
+ IDELabel.Menu.CREATE_JSF2_COMPOSITE);
+ assertTrue("Menu Item has to be disabled but is not" , false);
+ } catch (RuntimeException re){
+ if (!(re.getCause() instanceof NotEnabledException)){
+ throw re;
+ }
+ }
+ // Test JSF 1.2 Project with Facelets
+
openPage(VPEAutoTestCase.FACELETS_TEST_PAGE,VPEAutoTestCase.FACELETS_TEST_PROJECT_NAME);
+ try{
+
ContextMenuHelper.clickContextMenu(SWTTestExt.bot.swtBotEditorExtByTitle(VPEAutoTestCase.FACELETS_TEST_PAGE),
+ IDELabel.Menu.CREATE_JSF2_COMPOSITE);
+ assertTrue("Menu Item has to be disabled but is not" , false);
+ } catch (RuntimeException re){
+ if (!(re.getCause() instanceof NotEnabledException)){
+ throw re;
+ }
+ }
+ }
+ @Override
+ public void tearDown() throws Exception {
+ if (jsf2editor != null) {
+ jsf2editor.toTextEditor().setText(originalContent);
+ jsf2editor.saveAndClose();
+ bot.sleep(Timing.time1S());
+ }
+ if (FileHelper.isExistingFileWithinWorkspace(CC_NAME_SPACE,
JSF2_TEST_PROJECT_NAME,"WebContent","resources")){
+
eclipse.deleteFile(JSF2_TEST_PROJECT_NAME,"WebContent","resources",CC_NAME_SPACE);
+ }
+ super.tearDown();
+ }
+}
+
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/CreateJSF2CompositeComponentMenuTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/Assertions.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/Assertions.java 2011-12-09
15:34:27 UTC (rev 37171)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/Assertions.java 2011-12-09
15:44:10 UTC (rev 37172)
@@ -4,10 +4,9 @@
import java.util.Arrays;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-import org.jboss.tools.ui.bot.ext.helper.MarkerHelper;
+import org.jboss.tools.ui.bot.ext.helper.FileHelper;
public class Assertions {
/**
@@ -35,7 +34,7 @@
*/
public static void assertFileExistsInWorkspace (String fileName , String...
pathWithinWorkspace){
assertTrue("File " + fileName + " does not exist.",
- isExistingFileWithinWorkspace (fileName, pathWithinWorkspace));
+ FileHelper.isExistingFileWithinWorkspace (fileName, pathWithinWorkspace));
}
/**
* Asserts that given file does not exists
@@ -44,20 +43,8 @@
*/
public static void assertFileNotExistsInWorkspace (String fileName , String...
pathWithinWorkspace){
assertTrue("File " + fileName + " does exist but it has to be
deleted.",
- !isExistingFileWithinWorkspace (fileName, pathWithinWorkspace));
+ !FileHelper.isExistingFileWithinWorkspace (fileName, pathWithinWorkspace));
}
- /**
- * Returns true when specified file exists on the path within workspace
- * @param fileName
- * @param pathWithinWorkspace
- * @return
- */
- private static boolean isExistingFileWithinWorkspace(String fileName , String...
pathWithinWorkspace){
- return ResourcesPlugin
- .getWorkspace()
- .getRoot()
- .findMember(MarkerHelper.getPathToResource(fileName, pathWithinWorkspace)) !=
null;
- }
/**
* Asserts if sourceEditorText of file with fileName contains textToContain
* @param sourceEditorText
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2011-12-09
15:34:27 UTC (rev 37171)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2011-12-09
15:44:10 UTC (rev 37172)
@@ -315,6 +315,16 @@
public SWTBotEditor openFile(String projectName, String... path) {
return SWTEclipseExt.openFile(bot, projectName, path);
}
+
+ /**
+ * Delete File in Package Explorer
+ *
+ * @param projectName
+ * @param path
+ */
+ public void deleteFile(String projectName, String... path) {
+ SWTEclipseExt.deleteFile(bot, projectName, path);
+ }
// ------------------------------------------------------------
// Navigation related
@@ -1493,4 +1503,36 @@
bot.button(IDELabel.Button.OK).click();
util.waitForNonIgnoredJobs();
}
+
+ /**
+ * Deletes file from Package Explorer static version
+ * @param bot
+ * @param path
+ * @return SWTBotEditor
+ */
+ public static void deleteFile(SWTBotExt bot, String projectName, String... path) {
+ SWTBot viewBot = bot.viewByTitle(IDELabel.View.PACKAGE_EXPLORER).bot();
+ bot.viewByTitle(IDELabel.View.PACKAGE_EXPLORER).show();
+ bot.viewByTitle(IDELabel.View.PACKAGE_EXPLORER).setFocus();
+ SWTBotTree tree = viewBot.tree();
+ SWTBotTreeItem item = tree.expandNode(projectName);
+ StringBuilder builder = new StringBuilder(projectName);
+
+ // Go through path
+ for (String nodeName : path) {
+ item = item.expandNode(nodeName);
+ builder.append("/" + nodeName);
+ }
+
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree, item);
+ new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,
+ IDELabel.Menu.DELETE, false)).click();
+
+ bot.shell(IDELabel.Shell.CONFIRM_DELETE).activate();
+ bot.button(IDELabel.Button.OK).click();
+ new SWTUtilExt(bot).waitForNonIgnoredJobs();
+
+ log.info("File Deleted: " + builder.toString());
+
+ }
}
\ No newline at end of file
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java 2011-12-09
15:34:27 UTC (rev 37171)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContextMenuHelper.java 2011-12-09
15:44:10 UTC (rev 37172)
@@ -21,11 +21,13 @@
import java.util.Vector;
import org.apache.log4j.Logger;
+import org.eclipse.core.commands.NotEnabledException;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Decorations;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
@@ -268,15 +270,20 @@
throw new WidgetNotFoundException("Could not find menu: "
+ Arrays.asList(texts));
}
+ // hide on MacOs
+ if (SWTJBTExt.isRunningOnMacOs()) {
+ KeyboardHelper.typeKeyCodeUsingAWT(KeyEvent.VK_ESCAPE);
+ }
// click
click(menuItem);
- // hide
- UIThreadRunnable.syncExec(new VoidResult() {
- public void run() {
- hide(menuItem.getParent());
- }
- });
-
+ // hide on other systems
+ if (!SWTJBTExt.isRunningOnMacOs()) {
+ UIThreadRunnable.syncExec(new VoidResult() {
+ public void run() {
+ hide(menuItem.getParent());
+ }
+ });
+ }
}
/**
@@ -361,13 +368,25 @@
event.widget = menuItem;
event.display = menuItem.getDisplay();
event.type = SWT.Selection;
-
- UIThreadRunnable.asyncExec(menuItem.getDisplay(), new VoidResult() {
- public void run() {
- log.info("Click on menu item: " + menuItem.getText());
- menuItem.notifyListeners(SWT.Selection, event);
+
+ final boolean isEnabled = UIThreadRunnable.syncExec(new Result<Boolean>() {
+ public Boolean run() {
+ return menuItem.getEnabled();
}
});
+
+ if (isEnabled){
+ UIThreadRunnable.asyncExec(menuItem.getDisplay(), new VoidResult() {
+ public void run() {
+ log.info("Click on menu item: " + menuItem.getText());
+ menuItem.notifyListeners(SWT.Selection, event);
+ }
+ });
+ }
+ else{
+ throw new RuntimeException(new NotEnabledException("Menu item is not
enabled"));
+ }
+
}
/**
@@ -383,13 +402,21 @@
return UIThreadRunnable.syncExec(new WidgetResult<Menu>() {
public Menu run() {
Menu result = null;
- Composite parent = tree.getParent();
- while (!(parent instanceof Decorations)) {
- parent = parent.getParent();
+ Object menusHolder = null;
+ if (SWTJBTExt.isRunningOnMacOs()){
+ menusHolder = tree.getDisplay();
}
+ else{
+ Composite parent = (Composite)tree.getParent();
+ while (!(parent instanceof Decorations)){
+ parent = parent.getParent();
+ }
+ menusHolder = parent;
+ }
+
try {
- Menu[] menus = ReflectionsHelper.getPrivateFieldValue(
- Decorations.class, "menus", parent, Menu[].class);
+ Menu[] menus =
ReflectionsHelper.getPrivateFieldValue(SWTJBTExt.isRunningOnMacOs() ? Display.class :
Decorations.class,
+ "menus", menusHolder, Menu[].class);
if (menus != null) {
MenuItem topMenuItem = null;
int index = menus.length - 1;
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/FileHelper.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/FileHelper.java 2011-12-09
15:34:27 UTC (rev 37171)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/FileHelper.java 2011-12-09
15:44:10 UTC (rev 37172)
@@ -24,6 +24,7 @@
import java.util.zip.ZipFile;
import org.apache.log4j.Logger;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotText;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
@@ -120,7 +121,18 @@
propertiesBot.button(IDELabel.Button.OK).click();
return projectLocation;
}
-
+ /**
+ * Returns true when specified file exists on the path within workspace
+ * @param fileName
+ * @param pathWithinWorkspace
+ * @return
+ */
+ public static boolean isExistingFileWithinWorkspace(String fileName , String...
pathWithinWorkspace){
+ return ResourcesPlugin
+ .getWorkspace()
+ .getRoot()
+ .findMember(MarkerHelper.getPathToResource(fileName, pathWithinWorkspace)) !=
null;
+ }
public static void unzipArchive(File archive, File outputDir)
throws Exception {
log.info("Unzipping " + archive.getCanonicalPath() + " to "
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/GlobalELVariablesTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/GlobalELVariablesTest.java 2011-12-09
15:34:27 UTC (rev 37171)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/GlobalELVariablesTest.java 2011-12-09
15:44:10 UTC (rev 37172)
@@ -30,9 +30,8 @@
}
public void testGlobalELVariables() throws Throwable{
- bot.menu(IDELabel.Menu.WINDOW).menu(IDELabel.Menu.PREFERENCES).click();
- bot.shell(IDELabel.Shell.PREFERENCES).activate();
- SWTBotTree preferenceTree = this.bot.tree();
+ open.preferenceOpen(ActionItem.Preference.JBossTools.LABEL);
+ SWTBotTree preferenceTree = this.bot.tree();
preferenceTree
.expandNode(IDELabel.PreferencesDialog.JBOSS_TOOLS)
.expandNode(IDELabel.PreferencesDialog.JBOSS_TOOLS_WEB)
@@ -87,7 +86,7 @@
@Override
public void tearDown() throws Exception {
- bot.menu(IDELabel.Menu.WINDOW).menu(IDELabel.Menu.PREFERENCES).click();
+ open.preferenceOpen(ActionItem.Preference.JBossTools.LABEL);
SWTBotTree preferenceTree = this.bot.tree();
preferenceTree.expandNode(IDELabel.PreferencesDialog.JBOSS_TOOLS)
.expandNode(IDELabel.PreferencesDialog.JBOSS_TOOLS_WEB)
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ExternalizeStringsDialogTest.java
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ExternalizeStringsDialogTest.java 2011-12-09
15:34:27 UTC (rev 37171)
+++
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/wizard/ExternalizeStringsDialogTest.java 2011-12-09
15:44:10 UTC (rev 37172)
@@ -33,7 +33,7 @@
public class ExternalizeStringsDialogTest extends VPEAutoTestCase {
private final String ENABLED_TEST_TEXT = "<html>Externalize
Text</html>"; //$NON-NLS-1$
- private final String TOOL_TIP = (SWTJBTExt.isRunningOnMacOs() ? "Externalize
Strings... (⌘7)" : "Externalize selected string... (Ctrl+7)");
//$NON-NLS-1$
+ private final String TOOL_TIP = (SWTJBTExt.isRunningOnMacOs() ? "Externalize
selected string... (⌘7)" : "Externalize selected string... (Ctrl+7)");
//$NON-NLS-1$
private final String FOLDER_TEXT_LABEL = "Enter or select the parent folder:";
//$NON-NLS-1$
private final String INCORRECT_TABLE_VALUE = "Table value is incorrect";
//$NON-NLS-1$
private final String TOOLBAR_ICON_ENABLED = "Toolbar button should be
enabled"; //$NON-NLS-1$