JBoss Tools SVN: r42837 - branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-08-02 09:02:52 -0400 (Thu, 02 Aug 2012)
New Revision: 42837
Modified:
branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml
Log:
Added default type of internal browser
Modified: branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml
===================================================================
--- branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml 2012-08-02 12:50:…
[View More]26 UTC (rev 42836)
+++ branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml 2012-08-02 13:02:52 UTC (rev 42837)
@@ -20,7 +20,7 @@
<jbosstools.test.jboss-portlet-bridge.home>${requirement.build.root}</jbosstools.test.jboss-portlet-bridge.home>
<configurations.dir>resources/project_config_files</configurations.dir>
<additionalSystemProperties></additionalSystemProperties>
- <systemProperties>-Dorg.eclipse.swt.browser.XULRunnerPath=/usr/bin/xulrunner ${additionalSystemProperties} -Djbosstools.test.jboss-gatein.home=${jbosstools.test.jboss-gatein.home} -Djbosstools.test.jboss-seam-2.2.home=${jbosstools.test.jboss-seam-2.2.home} -Djbosstools.test.jboss-portal.home=${jbosstools.test.jboss-portal.home} -Djbosstools.test.jboss-seam-2.0.home=${jbosstools.test.jboss-seam-2.0.home} -Djbosstools.test.jboss-portlet-bridge.home=${jbosstools.test.jboss-portlet-bridge.home} -Dtest.configurations.dir=${configurations.dir} -Dorg.eclipse.swtbot.screenshots.dir=${project.build.directory}/screenshots</systemProperties>
+ <systemProperties>org.eclipse.swt.browser.DefaultType=webkit -Dorg.eclipse.swt.browser.XULRunnerPath=/usr/bin/xulrunner ${additionalSystemProperties} -Djbosstools.test.jboss-gatein.home=${jbosstools.test.jboss-gatein.home} -Djbosstools.test.jboss-seam-2.2.home=${jbosstools.test.jboss-seam-2.2.home} -Djbosstools.test.jboss-portal.home=${jbosstools.test.jboss-portal.home} -Djbosstools.test.jboss-seam-2.0.home=${jbosstools.test.jboss-seam-2.0.home} -Djbosstools.test.jboss-portlet-bridge.home=${jbosstools.test.jboss-portlet-bridge.home} -Dtest.configurations.dir=${configurations.dir} -Dorg.eclipse.swtbot.screenshots.dir=${project.build.directory}/screenshots</systemProperties>
<test.class>org.jboss.tools.portlet.ui.bot.test.AllTestsSuite</test.class>
</properties>
[View Less]
12 years, 5 months
JBoss Tools SVN: r42836 - branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-08-02 08:50:26 -0400 (Thu, 02 Aug 2012)
New Revision: 42836
Modified:
branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml
Log:
Set xulrunner
Modified: branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml
===================================================================
--- branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml 2012-08-02 11:57:27 UTC (rev 42835)
+++ …
[View More]branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/pom.xml 2012-08-02 12:50:26 UTC (rev 42836)
@@ -20,7 +20,7 @@
<jbosstools.test.jboss-portlet-bridge.home>${requirement.build.root}</jbosstools.test.jboss-portlet-bridge.home>
<configurations.dir>resources/project_config_files</configurations.dir>
<additionalSystemProperties></additionalSystemProperties>
- <systemProperties>${additionalSystemProperties} -Djbosstools.test.jboss-gatein.home=${jbosstools.test.jboss-gatein.home} -Djbosstools.test.jboss-seam-2.2.home=${jbosstools.test.jboss-seam-2.2.home} -Djbosstools.test.jboss-portal.home=${jbosstools.test.jboss-portal.home} -Djbosstools.test.jboss-seam-2.0.home=${jbosstools.test.jboss-seam-2.0.home} -Djbosstools.test.jboss-portlet-bridge.home=${jbosstools.test.jboss-portlet-bridge.home} -Dtest.configurations.dir=${configurations.dir} -Dorg.eclipse.swtbot.screenshots.dir=${project.build.directory}/screenshots</systemProperties>
+ <systemProperties>-Dorg.eclipse.swt.browser.XULRunnerPath=/usr/bin/xulrunner ${additionalSystemProperties} -Djbosstools.test.jboss-gatein.home=${jbosstools.test.jboss-gatein.home} -Djbosstools.test.jboss-seam-2.2.home=${jbosstools.test.jboss-seam-2.2.home} -Djbosstools.test.jboss-portal.home=${jbosstools.test.jboss-portal.home} -Djbosstools.test.jboss-seam-2.0.home=${jbosstools.test.jboss-seam-2.0.home} -Djbosstools.test.jboss-portlet-bridge.home=${jbosstools.test.jboss-portlet-bridge.home} -Dtest.configurations.dir=${configurations.dir} -Dorg.eclipse.swtbot.screenshots.dir=${project.build.directory}/screenshots</systemProperties>
<test.class>org.jboss.tools.portlet.ui.bot.test.AllTestsSuite</test.class>
</properties>
[View Less]
12 years, 5 months
JBoss Tools SVN: r42835 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-08-02 07:57:27 -0400 (Thu, 02 Aug 2012)
New Revision: 42835
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/PollThread.java
Log:
JBIDE-12398 bug in pollthread
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/PollThread.java
===================================================================
--- trunk/as/plugins/org.jboss.…
[View More]ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/PollThread.java 2012-08-02 11:38:49 UTC (rev 42834)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/PollThread.java 2012-08-02 11:57:27 UTC (rev 42835)
@@ -227,9 +227,9 @@
protected void alertListener(boolean currentState) {
if (currentState != expectedState) {
- listener.stateNotAsserted(currentState, expectedState);
+ listener.stateNotAsserted(expectedState, currentState);
} else {
- listener.stateAsserted(currentState, expectedState);
+ listener.stateAsserted(expectedState, currentState);
}
}
[View Less]
12 years, 5 months
JBoss Tools SVN: r42834 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2012-08-02 07:38:49 -0400 (Thu, 02 Aug 2012)
New Revision: 42834
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTUtilExt.java
Log:
Added method waitForButtonIsFound().
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTUtilExt.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/…
[View More]ext/SWTUtilExt.java 2012-08-02 11:25:51 UTC (rev 42833)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTUtilExt.java 2012-08-02 11:38:49 UTC (rev 42834)
@@ -1077,4 +1077,37 @@
},
timeout);
}
+ /**
+ * Waits until toolbarButton with mnemonicText is found with timeout
+ * @param text
+ * @param timeout
+ */
+ public void waitForButtonIsFound (final String text, final long timeout) {
+ bot.waitUntil(new ICondition() {
+
+ @Override
+ public boolean test() throws Exception {
+ boolean buttonIsFound = false;
+ try {
+ bot.button(text);
+ buttonIsFound = true;
+ }
+ catch (WidgetNotFoundException wnfe){
+ buttonIsFound = false;
+ }
+ return buttonIsFound;
+ }
+
+ @Override
+ public void init(SWTBot bot) {
+ }
+
+ @Override
+ public String getFailureMessage() {
+ return "Button with text " + text +
+ " was not available " + timeout + " miliseconds";
+ }
+ },
+ timeout);
+ }
}
\ No newline at end of file
[View Less]
12 years, 5 months
JBoss Tools SVN: r42833 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor: util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2012-08-02 07:25:51 -0400 (Thu, 02 Aug 2012)
New Revision: 42833
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/VpeColorSelector.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
Log:
https://issues.jboss.org/browse/JBIDE-12395 - default value is loaded automatically from the PreferencesStore.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/…
[View More]preferences/VpeColorSelector.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/VpeColorSelector.java 2012-08-02 10:57:34 UTC (rev 42832)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/VpeColorSelector.java 2012-08-02 11:25:51 UTC (rev 42833)
@@ -25,7 +25,6 @@
colorText = new Text(parent, SWT.NONE);
colorText.setEditable(false);
colorText.setTextLimit(9);
- colorText.setText(VpeStyleUtil.rgbToString(getColorValue()));
}
@Override
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2012-08-02 10:57:34 UTC (rev 42832)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2012-08-02 11:25:51 UTC (rev 42833)
@@ -994,7 +994,7 @@
+ Integer.toHexString(rgb.blue);
colorStr = colorStr.toUpperCase();
} else {
- VpePlugin.getDefault().logError("Cannot convert RGB color to string, because it is null"); //$NON-NLS-1$
+ VpePlugin.getDefault().logWarning("VpeStyleUtil.rgbToString(RGB rgb) -> Cannot convert RGB color to string, because it is null"); //$NON-NLS-1$
}
return colorStr;
}
[View Less]
12 years, 5 months
JBoss Tools SVN: r42832 - trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/util.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2012-08-02 06:57:34 -0400 (Thu, 02 Aug 2012)
New Revision: 42832
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/util/ManifestUtil.java
Log:
https://issues.jboss.org/browse/JBIDE-12383 : BrowserSim: NPE and program exit when opening About menu from standalone BrowserSim
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/util/ManifestUtil.java
===================================…
[View More]================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/util/ManifestUtil.java 2012-08-01 17:40:28 UTC (rev 42831)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/util/ManifestUtil.java 2012-08-02 10:57:34 UTC (rev 42832)
@@ -50,7 +50,7 @@
if (version == null) {
// If Manifest Version is not in jar
URL browserSimBaseUrl = BrowserSim.class.getClassLoader().getResource("."); //$NON-NLS-1$
- if ("file".equals(browserSimBaseUrl.getProtocol())) { //$NON-NLS-1$
+ if (browserSimBaseUrl != null && "file".equals(browserSimBaseUrl.getProtocol())) { //$NON-NLS-1$
File binDir = new File(browserSimBaseUrl.getFile());
File browsersimDir = binDir.getParentFile();
File manifestFile = new File(browsersimDir, JarFile.MANIFEST_NAME);
[View Less]
12 years, 5 months
JBoss Tools SVN: r42831 - in trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test: jsf2/refactor and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2012-08-01 13:40:28 -0400 (Wed, 01 Aug 2012)
New Revision: 42831
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3148and4441Test.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3577Test.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3579Test.java
trunk/jsf/…
[View More]tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3920Test.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE4391Test.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2AttributeRenameTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/OpenOnTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/templates/SetTemplateForUnknownTagTest.java
Log:
Fixes for JBT 3.4.0.M1
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3148and4441Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3148and4441Test.java 2012-08-01 14:40:01 UTC (rev 42830)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3148and4441Test.java 2012-08-01 17:40:28 UTC (rev 42831)
@@ -6,6 +6,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.jboss.tools.jsf.ui.bot.test.JSFAutoTestCase;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
import org.jboss.tools.ui.bot.test.WidgetVariables;
public class JBIDE3148and4441Test extends JSFAutoTestCase{
@@ -37,7 +38,7 @@
eclipseEditor.insertText("cssclass{\r\tcolor:red;\r\t" + //$NON-NLS-1$
"background-color:green;\r}"); //$NON-NLS-1$
eclipseEditor.save();
- eclipseEditor.contextMenu("Open CSS Dialog").click(); //$NON-NLS-1$
+ ContextMenuHelper.clickContextMenu(eclipseEditor, "Open CSS Dialog"); //$NON-NLS-1$
//Test edit attrs of the first Class
bot.shell("CSS Class").activate(); //$NON-NLS-1$
bot.comboBoxWithLabel("Style class:").setSelection(CSS_CLASS_NAME); //$NON-NLS-1$
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3577Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3577Test.java 2012-08-01 14:40:01 UTC (rev 42830)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3577Test.java 2012-08-01 17:40:28 UTC (rev 42831)
@@ -6,6 +6,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.jboss.tools.jsf.ui.bot.test.JSFAutoTestCase;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
import org.jboss.tools.ui.bot.test.WidgetVariables;
public class JBIDE3577Test extends JSFAutoTestCase{
@@ -35,10 +36,8 @@
eclipseEditor.insertText("cssclass{\r\tcolor:red;\r\t" + //$NON-NLS-1$
"background-color:green;\r}"); //$NON-NLS-1$
eclipseEditor.save();
- eclipseEditor.contextMenu("Open CSS Dialog").click(); //$NON-NLS-1$
-
+ ContextMenuHelper.clickContextMenu(eclipseEditor, "Open CSS Dialog"); //$NON-NLS-1$
//Test Clear all attributes
-
bot.shell("CSS Class").activate(); //$NON-NLS-1$
bot.comboBoxWithLabel("Style class:").setSelection(CSS_CLASS_NAME); //$NON-NLS-1$
bot.tabItem("Preview").activate(); //$NON-NLS-1$
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3579Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3579Test.java 2012-08-01 14:40:01 UTC (rev 42830)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3579Test.java 2012-08-01 17:40:28 UTC (rev 42831)
@@ -6,6 +6,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.jboss.tools.jsf.ui.bot.test.JSFAutoTestCase;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
import org.jboss.tools.ui.bot.test.WidgetVariables;
public class JBIDE3579Test extends JSFAutoTestCase{
@@ -35,10 +36,8 @@
eclipseEditor.insertText("cssclass{\r\tcolor:red;\r\t" + //$NON-NLS-1$
"background-color:green;\r}"); //$NON-NLS-1$
eclipseEditor.save();
- eclipseEditor.contextMenu("Open CSS Dialog").click(); //$NON-NLS-1$
-
+ ContextMenuHelper.clickContextMenu(eclipseEditor, "Open CSS Dialog"); //$NON-NLS-1$
//Test Create new CSS class
-
bot.shell("CSS Class").activate(); //$NON-NLS-1$
bot.button("Add CSS Class").click(); //$NON-NLS-1$
bot.shell("Enter New CSS Class Name").activate(); //$NON-NLS-1$
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3920Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3920Test.java 2012-08-01 14:40:01 UTC (rev 42830)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3920Test.java 2012-08-01 17:40:28 UTC (rev 42831)
@@ -6,6 +6,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.jboss.tools.jsf.ui.bot.test.JSFAutoTestCase;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
import org.jboss.tools.ui.bot.test.WidgetVariables;
public class JBIDE3920Test extends JSFAutoTestCase{
@@ -31,7 +32,7 @@
eclipseEditor.setFocus();
eclipseEditor.insertText(CSS_CLASS_NAME+"{"); //$NON-NLS-1$
eclipseEditor.save();
- eclipseEditor.contextMenu("Open CSS Dialog").click(); //$NON-NLS-1$
+ ContextMenuHelper.clickContextMenu(eclipseEditor, "Open CSS Dialog"); //$NON-NLS-1$
bot.shell("CSS Class").activate(); //$NON-NLS-1$
bot.tabItem("Text/Font").activate(); //$NON-NLS-1$
bot.comboBoxWithLabel("Font Style:").setSelection("italic"); //$NON-NLS-1$ //$NON-NLS-2$
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE4391Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE4391Test.java 2012-08-01 14:40:01 UTC (rev 42830)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE4391Test.java 2012-08-01 17:40:28 UTC (rev 42831)
@@ -6,6 +6,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.jboss.tools.jsf.ui.bot.test.JSFAutoTestCase;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
import org.jboss.tools.ui.bot.test.WidgetVariables;
public class JBIDE4391Test extends JSFAutoTestCase{
@@ -34,8 +35,7 @@
eclipseEditor.insertText("cssclass{\r\tcolor:red;\r\t" + //$NON-NLS-1$
"background-color:green;\r}"); //$NON-NLS-1$
eclipseEditor.save();
- eclipseEditor.contextMenu("Open CSS Dialog").click(); //$NON-NLS-1$
-
+ ContextMenuHelper.clickContextMenu(eclipseEditor, "Open CSS Dialog"); //$NON-NLS-1$
//Test incorrect attribute
bot.shell("CSS Class").activate(); //$NON-NLS-1$
bot.comboBoxWithLabel("Style class:").setSelection(CSS_CLASS_NAME); //$NON-NLS-1$
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2AttributeRenameTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2AttributeRenameTest.java 2012-08-01 14:40:01 UTC (rev 42830)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/jsf2/refactor/JSF2AttributeRenameTest.java 2012-08-01 17:40:28 UTC (rev 42831)
@@ -21,6 +21,10 @@
SWTBotEclipseEditor editor = bot
.editorByTitle("echo.xhtml").toTextEditor(); //$NON-NLS-1$
editor.selectRange(9, 29, 1);
+ // for Eclipse Juno focus has to be moved out and back from editor
+ packageExplorer.show();
+ packageExplorer.bot().tree().setFocus();
+ editor.setFocus();
bot.menu("Refactor").menu("Rename").click(); //$NON-NLS-1$ //$NON-NLS-2$
bot.shell("Rename Composite Attribute").activate(); //$NON-NLS-1$
bot.textWithLabel("New name:").setText("echo1"); //$NON-NLS-1$ //$NON-NLS-2$
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/OpenOnTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/OpenOnTest.java 2012-08-01 14:40:01 UTC (rev 42830)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/OpenOnTest.java 2012-08-01 17:40:28 UTC (rev 42831)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007-2011 Red Hat, Inc.
+ * Copyright (c) 2007-2012 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,
@@ -18,6 +18,7 @@
import org.jboss.tools.ui.bot.ext.SWTBotExt;
import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
import org.jboss.tools.ui.bot.ext.helper.OpenOnHelper;
import org.jboss.tools.ui.bot.ext.parts.SWTBotEditorExt;
@@ -159,10 +160,12 @@
SWTBotEditor compositeComponentEditor = OpenOnHelper.checkOpenOnFileIsOpened(
SWTTestExt.bot, JSF2_TEST_PAGE, "<ez:input ", 5,
0, 0, expectedOpenedFileName);
+ util.waitForAll(Timing.time3S());
// Check open on for cc.attrs.submitlabel
compositeComponentEditor = OpenOnHelper.checkOpenOnFileIsOpened(
SWTTestExt.bot, expectedOpenedFileName, "value=\"#{cc.attrs.submitlabel}\"", 20,
0, 0, expectedOpenedFileName);
+ util.waitForAll(Timing.time3S());
String selectedText = compositeComponentEditor.toTextEditor().getSelection();
String expectedSelectedText = "<composite:attribute name=\"submitlabel\"/>";
assertTrue("Selected text in editor has to be " + expectedSelectedText
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/templates/SetTemplateForUnknownTagTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/templates/SetTemplateForUnknownTagTest.java 2012-08-01 14:40:01 UTC (rev 42830)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/templates/SetTemplateForUnknownTagTest.java 2012-08-01 17:40:28 UTC (rev 42831)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2012 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.templates;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
@@ -22,6 +32,7 @@
setEditorText(getEditor().getText());
getEditor().navigateTo(13, 0);
getEditor().insertText("<h:unknowntag></h:unknowntag>");//$NON-NLS-1$
+ getEditor().save();
getEditor().navigateTo(13,5);
setUpTemplate();
editTemplate();
[View Less]
12 years, 5 months
JBoss Tools SVN: r42830 - trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2012-08-01 10:40:01 -0400 (Wed, 01 Aug 2012)
New Revision: 42830
Modified:
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java
Log:
JBIDE-10738 As-you-type EL validation
Java Model Exception appearance is fixed
Modified: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java
============================================…
[View More]=======================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java 2012-08-01 11:58:02 UTC (rev 42829)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java 2012-08-01 14:40:01 UTC (rev 42830)
@@ -451,6 +451,7 @@
int position = fStartRegionToProcess;
try {
+ unit = unit.getWorkingCopy(null);
IJavaElement element = null;
while (position >= 0 && (element = unit.getElementAt(position--)) == null)
;
@@ -513,6 +514,12 @@
}
} catch (JavaModelException e) {
LogHelper.logError(CommonValidationPlugin.getDefault(), e);
+ } finally {
+ try {
+ unit.discardWorkingCopy();
+ } catch (JavaModelException e) {
+ LogHelper.logError(CommonValidationPlugin.getDefault(), e);
+ }
}
return atLeastOneElementIsProcessed ? result : true;
[View Less]
12 years, 5 months
JBoss Tools SVN: r42829 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2012-08-01 07:58:02 -0400 (Wed, 01 Aug 2012)
New Revision: 42829
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java
Log:
Remove activating of Workbench shell from method runProjectOnServer()
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.…
[View More]ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java 2012-08-01 09:52:33 UTC (rev 42828)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java 2012-08-01 11:58:02 UTC (rev 42829)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Copyright (c) 2007-2012 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,
@@ -310,8 +310,6 @@
*/
public static void runProjectOnServer(SWTWorkbenchBot bot, String projectName){
- bot.shells()[0].activate();
-
SWTBotTree packageExplorerTree = eclipse.showView(ViewType.PACKAGE_EXPLORER).tree();
packageExplorerTree.setFocus();
[View Less]
12 years, 5 months
JBoss Tools SVN: r42828 - in trunk/ws: tests/org.jboss.tools.ws.jaxrs.core.test/projects/org.jboss.tools.ws.jaxrs.tests.sampleproject/src/main/java/org/jboss/tools/ws/jaxrs/sample/domain and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-08-01 05:52:33 -0400 (Wed, 01 Aug 2012)
New Revision: 42828
Added:
trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/projects/org.jboss.tools.ws.jaxrs.tests.sampleproject/src/main/java/org/jboss/tools/ws/jaxrs/sample/domain/package-info.java
Modified:
trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedProcessor.java
trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/…
[View More]ws/jaxrs/core/WorkbenchUtils.java
trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelBuilderTestCase.java
Log:
More testing on JBIDE-12095
JAX-RS facet in JBoss Tools chokes on package-info.java
Modified: trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedProcessor.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedProcessor.java 2012-08-01 09:51:49 UTC (rev 42827)
+++ trunk/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedProcessor.java 2012-08-01 09:52:33 UTC (rev 42828)
@@ -113,7 +113,6 @@
}
switch (deltaKind) {
case ADDED:
- //if(element.exists()) { // needed to prevent exception for edge cases such as 'package-info.java' that holds some shadow 'A' type..
switch (elementType) {
case JAVA_PROJECT:
return processAddition(element, metamodel, progressMonitor);
Added: trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/projects/org.jboss.tools.ws.jaxrs.tests.sampleproject/src/main/java/org/jboss/tools/ws/jaxrs/sample/domain/package-info.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/projects/org.jboss.tools.ws.jaxrs.tests.sampleproject/src/main/java/org/jboss/tools/ws/jaxrs/sample/domain/package-info.java (rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/projects/org.jboss.tools.ws.jaxrs.tests.sampleproject/src/main/java/org/jboss/tools/ws/jaxrs/sample/domain/package-info.java 2012-08-01 09:52:33 UTC (rev 42828)
@@ -0,0 +1 @@
+package org.jboss.tools.ws.jaxrs.sample.domain;
\ No newline at end of file
Property changes on: trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/projects/org.jboss.tools.ws.jaxrs.tests.sampleproject/src/main/java/org/jboss/tools/ws/jaxrs/sample/domain/package-info.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/WorkbenchUtils.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/WorkbenchUtils.java 2012-08-01 09:51:49 UTC (rev 42827)
+++ trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/WorkbenchUtils.java 2012-08-01 09:52:33 UTC (rev 42828)
@@ -893,6 +893,7 @@
return folder.findMember(fileName);
}
+
/**
* Replaces the content of the given resource with the given stream.
*
@@ -901,6 +902,37 @@
* @throws CoreException
* @throws IOException
*/
+ public static void replaceContent(IResource resource, InputStream stream) throws CoreException, IOException {
+ final IProject project = resource.getProject();
+ final IFile file = project.getFile(resource.getProjectRelativePath());
+ if (file.exists()) {
+ file.delete(true, new NullProgressMonitor());
+ }
+ file.create(stream, true, null);
+ LOGGER.debug("Content:");
+ final InputStream contents = file.getContents();
+ final char[] buffer = new char[0x10000];
+ StringBuilder out = new StringBuilder();
+ Reader in = new InputStreamReader(contents, "UTF-8");
+ int read;
+ do {
+ read = in.read(buffer, 0, buffer.length);
+ if (read > 0) {
+ out.append(buffer, 0, read);
+ }
+ } while (read >= 0);
+ LOGGER.debug(out.toString());
+ }
+
+
+ /**
+ * Replaces the content of the given resource with the given stream.
+ *
+ * @param webxmlResource
+ * @param stream
+ * @throws CoreException
+ * @throws IOException
+ */
public static void replaceContent(IResource resource, InputStream stream, boolean useWorkingCopy) throws CoreException, IOException {
final IProject project = resource.getProject();
final IFile file = project.getFile(resource.getProjectRelativePath());
@@ -908,8 +940,6 @@
IBuffer buffer = ((IOpenable) unit).getBuffer();
buffer.setContents(IOUtils.toString(stream));
saveAndClose(unit);
-
-
}
/**
@@ -936,7 +966,7 @@
InputStream stream = FileLocator.openStream(bundle, new Path("resources").append(webxmlReplacementName), false);
assertThat(stream, notNullValue());
if (webxmlResource != null) {
- replaceContent(webxmlResource, stream, false);
+ replaceContent(webxmlResource, stream);
return webxmlResource;
} else {
return createFileFromStream(webInfFolder, "web.xml", stream);
Modified: trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelBuilderTestCase.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelBuilderTestCase.java 2012-08-01 09:51:49 UTC (rev 42827)
+++ trunk/ws/tests/org.jboss.tools.ws.jaxrs.core.test/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JaxrsMetamodelBuilderTestCase.java 2012-08-01 09:52:33 UTC (rev 42828)
@@ -10,12 +10,17 @@
******************************************************************************/
package org.jboss.tools.ws.jaxrs.core.internal.metamodel.builder;
-import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.nullValue;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
+import java.io.IOException;
+
+import org.apache.commons.io.IOUtils;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
@@ -156,5 +161,33 @@
assertThat(metamodel.getAllEndpoints().size(), equalTo(16));
}
+ @Test
+ public void shouldDoNothingWhenPackageInfoAdded() throws CoreException, IOException {
+ // pre-conditions
+ IFolder folder = javaProject.getProject().getFolder("src/main/java/org/jboss/tools/ws/jaxrs/sample/services");
+ // operation
+ WorkbenchUtils.createFileFromStream(folder, "package-info.java",
+ IOUtils.toInputStream("package org.jboss.tools.ws.jaxrs.sample.services;"));
+ // explicitly trigger the project build
+ javaProject.getProject().build(IncrementalProjectBuilder.AUTO_BUILD, null);
+ // verifications: no exception should have been thrown
+ }
+
+ @Test
+ public void shouldDoNothingWhenPackageInfoChanged() throws CoreException, IOException {
+ // pre-conditions
+ JBossJaxrsCorePlugin.getDefault().registerListeners();
+ IFile pkgInfoFile = javaProject.getProject().getFile("src/main/java/org/jboss/tools/ws/jaxrs/sample/services/package-info.java");
+ pkgInfoFile.create(IOUtils.toInputStream(""), true, new NullProgressMonitor());
+ // operation
+ WorkbenchUtils.replaceContent(pkgInfoFile, IOUtils.toInputStream("package org.jboss.tools.ws.jaxrs.sample;"), true);
+ WorkbenchUtils.replaceContent(pkgInfoFile, IOUtils.toInputStream("package org.jboss.tools.ws.jaxrs.sample.services;"), true);
+ // explicitly trigger the project build
+ //javaProject.getProject().build(IncrementalProjectBuilder.AUTO_BUILD, null);
+ // verifications: no exception should have been thrown
+
+ }
+
+
}
[View Less]
12 years, 5 months