JBoss Tools SVN: r34341 - in workspace/bbrodt: bpel-examples and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2011-08-26 11:05:16 -0400 (Fri, 26 Aug 2011)
New Revision: 34341
Added:
workspace/bbrodt/bpel-examples/
workspace/bbrodt/bpel-examples/Loan_Approval.zip
workspace/bbrodt/bpel-examples/Simple_Invoke.zip
workspace/bbrodt/bpel-examples/While_Wait.zip
Log:
Testing Grid's project examples
Added: workspace/bbrodt/bpel-examples/Loan_Approval.zip
===================================================================
(Binary files differ)
Property changes on: workspace/bbrodt/bpel-examples/Loan_Approval.zip
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/bbrodt/bpel-examples/Simple_Invoke.zip
===================================================================
(Binary files differ)
Property changes on: workspace/bbrodt/bpel-examples/Simple_Invoke.zip
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/bbrodt/bpel-examples/While_Wait.zip
===================================================================
(Binary files differ)
Property changes on: workspace/bbrodt/bpel-examples/While_Wait.zip
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
14 years, 4 months
JBoss Tools SVN: r34340 - trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-08-26 11:02:57 -0400 (Fri, 26 Aug 2011)
New Revision: 34340
Modified:
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/MetaCommandTriggeredAction.java
Log:
JBIDE-9528: show only the applicable plugin/commands
Modified: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/MetaCommandTriggeredAction.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/MetaCommandTriggeredAction.java 2011-08-26 14:29:13 UTC (rev 34339)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/MetaCommandTriggeredAction.java 2011-08-26 15:02:57 UTC (rev 34340)
@@ -51,11 +51,13 @@
Map<String, List<PluginMetadata>> plugins = registry.getPlugins();
for (Entry<String, List<PluginMetadata>> entry : plugins.entrySet()) {
for (PluginMetadata pluginMeta : entry.getValue()) {
- List<CommandMetadata> commands = pluginMeta.getAllCommands();
- if (!commands.isEmpty()) {
- resultBuffer.append("p:").append(pluginMeta.getName()).append(' ');
- for (CommandMetadata commandMeta : commands) {
- resultBuffer.append("c:").append(commandMeta.getName()).append(' ');
+ if (pluginMeta.constrantsSatisfied(shell)) {
+ List<CommandMetadata> commands = pluginMeta.getAllCommands();
+ if (!commands.isEmpty()) {
+ resultBuffer.append("p:").append(pluginMeta.getName()).append(' ');
+ for (CommandMetadata commandMeta : commands) {
+ resultBuffer.append("c:").append(commandMeta.getName()).append(' ');
+ }
}
}
}
14 years, 4 months
JBoss Tools SVN: r34339 - trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/misc.
by jbosstools-commits@lists.jboss.org
Author: lzoubek(a)redhat.com
Date: 2011-08-26 10:29:13 -0400 (Fri, 26 Aug 2011)
New Revision: 34339
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/misc/GotoComponent.java
Log:
seam bot tests - small cleanup
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/misc/GotoComponent.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/misc/GotoComponent.java 2011-08-26 14:27:58 UTC (rev 34338)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/misc/GotoComponent.java 2011-08-26 14:29:13 UTC (rev 34339)
@@ -1,11 +1,7 @@
package org.jboss.tools.seam.ui.bot.test.misc;
-import static org.junit.Assert.assertTrue;
-
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTabItem;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTableItem;
-import org.eclipse.ui.part.EditorActionBarContributor;
import org.jboss.tools.seam.ui.bot.test.AbstractSeamTestBase;
import org.jboss.tools.seam.ui.bot.test.EARTests;
import org.jboss.tools.seam.ui.bot.test.TestControl;
@@ -15,7 +11,7 @@
import org.junit.experimental.categories.Category;
-public class GotoComponent {
+public class GotoComponent extends AbstractSeamTestBase {
@Test
@Category(WARTests.class)
14 years, 4 months
JBoss Tools SVN: r34338 - trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/part.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-08-26 10:27:58 -0400 (Fri, 26 Aug 2011)
New Revision: 34338
Modified:
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/part/ConsoleView.java
Log:
JBIDE-9589: Nullpointer check for Shell when calling showPage
Modified: trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/part/ConsoleView.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/part/ConsoleView.java 2011-08-26 13:14:47 UTC (rev 34337)
+++ trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/part/ConsoleView.java 2011-08-26 14:27:58 UTC (rev 34338)
@@ -105,19 +105,23 @@
@Override
public void run() {
notRunningMessage = NOT_RUNNING_MESSAGE;
- notRunningPage.setMessage(notRunningMessage);
+ if (!notRunningPage.getControl().isDisposed()) {
+ notRunningPage.setMessage(notRunningMessage);
+ }
showPage(notRunning);
}
});
}
private void showPage(final Control control) {
- getDisplay().asyncExec(new Runnable() {
- @Override
- public void run() {
- pageBook.showPage(control);
- }
- });
+ if (getSite().getShell() != null) {
+ getDisplay().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ pageBook.showPage(control);
+ }
+ });
+ }
}
private void createRunningPage() {
@@ -193,7 +197,7 @@
}
private Display getDisplay() {
- return getViewSite().getPage().getWorkbenchWindow().getShell().getDisplay();
+ return getSite().getShell().getDisplay();
}
public ForgeRuntime getRuntime() {
14 years, 4 months
JBoss Tools SVN: r34337 - trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test.
by jbosstools-commits@lists.jboss.org
Author: lzoubek(a)redhat.com
Date: 2011-08-26 09:14:47 -0400 (Fri, 26 Aug 2011)
New Revision: 34337
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/TestControl.java
Log:
seam bot tests: got rid of obsolete code
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/TestControl.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/TestControl.java 2011-08-26 13:14:04 UTC (rev 34336)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/TestControl.java 2011-08-26 13:14:47 UTC (rev 34337)
@@ -1,229 +1,9 @@
package org.jboss.tools.seam.ui.bot.test;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.List;
-import java.util.Properties;
-import java.util.Vector;
-import org.eclipse.datatools.connectivity.ConnectionProfileException;
-import org.eclipse.swtbot.swt.finder.SWTBot;
-import org.eclipse.swtbot.swt.finder.waits.Conditions;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-import org.jboss.tools.test.TestProperties;
-import org.jboss.tools.ui.bot.ext.SWTJBTExt;
-import org.jboss.tools.ui.bot.ext.SWTUtilExt;
-import org.jboss.tools.ui.bot.ext.helper.DatabaseHelper;
-import org.jboss.tools.ui.bot.ext.types.DriverEntity;
-import org.jboss.tools.ui.bot.ext.types.IDELabel;
-import org.jboss.tools.ui.bot.test.JBTSWTBotTestCase;
-import org.jboss.tools.ui.bot.test.WidgetVariables;
+public abstract class TestControl {
-public abstract class TestControl extends JBTSWTBotTestCase{
-
-/*Properties here:*/
-
- protected static Properties projectProperties;
- protected static Properties jbossEAPRuntime;
- protected static Properties seam12Settings;
- protected static Properties seam2fpSettings;
- protected static Properties seam22Settings;
-
- protected static List<Properties[]> parameters = new Vector<Properties[]>();
-
- protected SWTUtilExt util = new SWTUtilExt(bot);
-
- private static final String PROJECT_PROPERTIES = "projectProperties.properties";
- private static final String EAP_RUNTIME = "jbossEAPRuntime.properties";
- private static final String SEAM_SET_12 = "seam12Settings.properties";
- private static final String SEAM_SET_2FP = "seam2fpSettings.properties";
- private static final String SEAM_SET_22 = "seam22Settings.properties";
-
-
- public static String JBOSS_EAP_HOME;
- public static String SEAM_12_SETTINGS_HOME;
- public static String SEAM_22_SETTINGS_HOME;
- public static String SEAM_2FP_SETTINGS_HOME;
-
- static {
-
- Properties vmArgsProps = SWTUtilExt.parseEclipseVMArgs();
-
- try {
- InputStream is = TestControl.class.getResourceAsStream("/" + PROJECT_PROPERTIES);
- projectProperties = new TestProperties();
- projectProperties.load(is);
- } catch (IOException e) {
- fail("Can't load properties from " + PROJECT_PROPERTIES + " file");
- }
- catch (IllegalStateException e) {
- fail("Property file " + PROJECT_PROPERTIES + " was not found");
- }
- try {
- InputStream is = TestControl.class.getResourceAsStream("/" + EAP_RUNTIME);
- jbossEAPRuntime = new TestProperties();
- jbossEAPRuntime.load(is);
- SWTUtilExt.overrideValueFromSystemProperty(jbossEAPRuntime,"runtimePath","-Djboss.tools.test.jboss.home",vmArgsProps);
- } catch (IOException e) {
- fail("Can't load properties from " + EAP_RUNTIME + " file");
- }
- catch (IllegalStateException e) {
- fail("Property file " + EAP_RUNTIME + " was not found");
- }
- try {
- InputStream is = TestControl.class.getResourceAsStream("/" + SEAM_SET_12);
- seam12Settings = new TestProperties();
- seam12Settings.load(is);
- SWTUtilExt.overrideValueFromSystemProperty(seam12Settings,"seamRuntimePath","-Djboss.tools.test.seam.1.2.1.eap.home",vmArgsProps);
- } catch (IOException e) {
- fail("Can't load properties from " + SEAM_SET_12 + " file");
- }
- catch (IllegalStateException e) {
- fail("Property file " + SEAM_SET_12 + " was not found");
- }
- try {
- InputStream is = TestControl.class.getResourceAsStream("/" + SEAM_SET_2FP);
- seam2fpSettings = new TestProperties();
- seam2fpSettings.load(is);
- SWTUtilExt.overrideValueFromSystemProperty(seam2fpSettings,"seamRuntimePath","-Djboss.tools.test.seam.2fp.eap.home",vmArgsProps);
- } catch (IOException e) {
- fail("Can't load properties from " + SEAM_SET_2FP + " file");
- }
- catch (IllegalStateException e) {
- fail("Property file " + SEAM_SET_2FP + " was not found");
- }
- try {
- InputStream is = TestControl.class.getResourceAsStream("/" + SEAM_SET_22);
- seam22Settings = new TestProperties();
- seam22Settings.load(is);
- SWTUtilExt.overrideValueFromSystemProperty(seam22Settings,"seamRuntimePath","-Djboss.tools.test.seam.2.2.0.eap.home",vmArgsProps);
- } catch (IOException e) {
- fail("Can't load properties from " + SEAM_SET_22 + " file");
- }
- catch (IllegalStateException e) {
- fail("Property file " + SEAM_SET_22 + " was not found");
- }
- JBOSS_EAP_HOME = jbossEAPRuntime.getProperty("runtimePath");
- SEAM_12_SETTINGS_HOME = seam12Settings.getProperty("seamRuntimePath");
- SEAM_22_SETTINGS_HOME = seam22Settings.getProperty("seamRuntimePath");
- SEAM_2FP_SETTINGS_HOME = seam2fpSettings.getProperty("seamRuntimePath");
- createConnectionProfile(seam22Settings.getProperty("seamRuntimePath"),"DefaultDS");
-
- //parameters.add(new Properties[] {seam12Settings});
- parameters.add(new Properties[] {seam22Settings});
- //parameters.add(new Properties[] {seam2fpSettings});
-
- }
-/*Pre-launch operations here:*/
-
- @Override
- protected void activePerspective() {
- if (!bot.perspectiveByLabel("Seam").isActive()) {
- bot.perspectiveByLabel("Seam").activate();
- }
- }
-
-
- /*protected void setUp() throws Exception {
- super.setUp();
- bot.viewByTitle(projectProperties.getProperty("jbossServerView")).setFocus();
- SWTBot innerBot = bot.viewByTitle(projectProperties.getProperty("jbossServerView")).bot();
- SWTBotTree tree = innerBot.tree();
- try {
- tree.getTreeItem(jbossEAPRuntime.getProperty("serverName")+" [Stopped]");
- } catch (WidgetNotFoundException e) {
- createServerRuntime(jbossEAPRuntime);
- }
- }*/
-
-/*Predefined methods here:*/
-
public static String TYPE_WAR = "WAR";
public static String TYPE_EAR = "EAR";
-
-/**Creates any Seam project. */
- protected void createSeamProject(Properties runtimeSet, Properties serverType,
- String type ){
- bot.menu("File").menu("New").menu("Seam Web Project").click();
- bot.textWithLabel("Project name:").setText(runtimeSet.getProperty("testProjectName")+ type);
- bot.comboBoxInGroup("Target runtime").setSelection(serverType.getProperty("runtimeName"));
- bot.comboBoxInGroup("Target Server").setSelection(serverType.getProperty("serverName"));
- bot.comboBoxInGroup("Configuration").setSelection(runtimeSet.getProperty("configName"));
- bot.button("Next >").click();
- bot.button("Next >").click();
- bot.button("Next >").click();
- bot.button("Next >").click();
- bot.comboBoxWithLabel("Seam Runtime:").setSelection(runtimeSet.getProperty("seamRuntimeName"));
- bot.radio(type).click();
- bot.comboBoxWithLabel("Connection profile:").setSelection(projectProperties.getProperty("connName"));
- bot.button("Finish").click();
- }
-
-
-/**Deletes any Seam project. */
- protected void deleteSeamProject(Properties runtimeSet, String type){
- SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
- SWTBotTree tree = innerBot.tree();
- if ("WAR".equals(type)) {
- tree.getTreeItem(runtimeSet.getProperty("testProjectName")+ type).contextMenu("Delete").click();
- bot.button("OK").click();
- bot.sleep(1000);
- tree.getTreeItem(runtimeSet.getProperty("testProjectName")+ type+"-test").contextMenu("Delete").click();
- bot.button("OK").click();
- bot.sleep(1000);
- } else {
- tree.getTreeItem(runtimeSet.getProperty("testProjectName")+ type).contextMenu("Delete").click();
- bot.button("OK").click();
- bot.sleep(1000);
- tree.getTreeItem(runtimeSet.getProperty("testProjectName")+ type+"-ear").contextMenu("Delete").click();
- bot.button("OK").click();
- bot.sleep(1000);
- tree.getTreeItem(runtimeSet.getProperty("testProjectName")+ type+"-ejb").contextMenu("Delete").click();
- bot.button("OK").click();
- bot.sleep(1000);
- tree.getTreeItem(runtimeSet.getProperty("testProjectName")+ type+"-test").contextMenu("Delete").click();
- bot.button("OK").click();
- bot.sleep(1000);
- }
- }
-
- public static List<Properties[]> getParameters() {
- return parameters;
- }
-
- public static Properties getJbossEAPRuntime() {
- return jbossEAPRuntime;
- }
-
- public static Properties getProjectProperties() {
- return projectProperties;
- }
-
- /**
- * Creates connection profile in case it's not defined yet
- * @param pathToSeamRuntime
- * @param profileName
- */
- private static void createConnectionProfile(String pathToSeamRuntime, String profileName){
-
- StringBuilder stringBuilder = new StringBuilder();
- stringBuilder.append(pathToSeamRuntime);
- stringBuilder.append(File.separator);
- stringBuilder.append("lib");
- stringBuilder.append(File.separator);
- stringBuilder.append("hsqldb.jar");
-
- try {
- DriverEntity entity = new DriverEntity();
- entity.setDrvPath(stringBuilder.toString());
- entity.setJdbcString("jdbc:hsqldb:hsql://localhost/xdb");
- DatabaseHelper.createDriver(entity);
- } catch (ConnectionProfileException e) {
- fail("Unable to create HSQL Driver" + e);
- }
-
- }
}
14 years, 4 months
JBoss Tools SVN: r34336 - in trunk: seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: lzoubek(a)redhat.com
Date: 2011-08-26 09:14:04 -0400 (Fri, 26 Aug 2011)
New Revision: 34336
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/AbstractSeamTestBase.java
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/SeamAllBotTests.java
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateActions.java
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateForms.java
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateSeamProjects.java
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/misc/GotoComponent.java
trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/validate/ELExprValidator.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java
Log:
fixed seam ui bot tests to run with ReqAware suite + on JBDS M3 (label
changes)
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/AbstractSeamTestBase.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/AbstractSeamTestBase.java 2011-08-26 10:18:36 UTC (rev 34335)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/AbstractSeamTestBase.java 2011-08-26 13:14:04 UTC (rev 34336)
@@ -7,8 +7,18 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.Timing;
+import org.jboss.tools.ui.bot.ext.config.Annotations.DB;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Seam;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+@Require(
+ server=@Server(),
+ seam=@Seam(),
+ db=@DB(),
+ perspective="Seam 2",
+ clearProjects=false)
public abstract class AbstractSeamTestBase extends SWTTestExt {
public static final String testProjectName = "SeamPrj";
@@ -27,7 +37,7 @@
/**Creates any Seam Action, Form etc. */
public void createSeamUnit(String unitType, String type){
- bot.menu("File").menu("New").menu("Seam " +unitType).click();
+ bot.menu("File").menu("New").menu("Seam 2 " +unitType).click();
SWTBotShell shell = bot.activeShell();
bot.textWithLabel("Seam Project:").setText(testProjectName + type);
if ("Entity".equals(unitType)) {
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/SeamAllBotTests.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/SeamAllBotTests.java 2011-08-26 10:18:36 UTC (rev 34335)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/SeamAllBotTests.java 2011-08-26 13:14:04 UTC (rev 34336)
@@ -23,14 +23,11 @@
*/
@RunWith(RequirementAwareSuite.class)
-(a)ExcludeCategory(WARTests.class)
@Suite.SuiteClasses({
- //CreateServerRuntimes.class,
- //CreateSeamRuntimes.class,
CreateSeamProjects.class,
- //ReverseEngineering.class,
- //ComponentsValidator.class,
- //ELExprValidator.class,
+ ReverseEngineering.class,
+ ComponentsValidator.class,
+ ELExprValidator.class,
CreateForms.class,
CreateActions.class,
CreateConversations.class,
@@ -39,13 +36,5 @@
DeleteSeamProjects.class
})
public class SeamAllBotTests {
-
- /*
- @Parameters
- public static List<Properties[]> data() {
- return TestControl.getParameters();
-
- }
- */
}
\ No newline at end of file
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateActions.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateActions.java 2011-08-26 10:18:36 UTC (rev 34335)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateActions.java 2011-08-26 13:14:04 UTC (rev 34336)
@@ -1,6 +1,5 @@
package org.jboss.tools.seam.ui.bot.test.create;
-import java.util.Properties;
import org.jboss.tools.seam.ui.bot.test.AbstractSeamTestBase;
import org.jboss.tools.seam.ui.bot.test.EARTests;
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateForms.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateForms.java 2011-08-26 10:18:36 UTC (rev 34335)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateForms.java 2011-08-26 13:14:04 UTC (rev 34336)
@@ -1,7 +1,5 @@
package org.jboss.tools.seam.ui.bot.test.create;
-import java.util.Properties;
-
import org.jboss.tools.seam.ui.bot.test.AbstractSeamTestBase;
import org.jboss.tools.seam.ui.bot.test.EARTests;
import org.jboss.tools.seam.ui.bot.test.TestControl;
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateSeamProjects.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateSeamProjects.java 2011-08-26 10:18:36 UTC (rev 34335)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/create/CreateSeamProjects.java 2011-08-26 13:14:04 UTC (rev 34336)
@@ -2,27 +2,14 @@
import static org.eclipse.swtbot.swt.finder.waits.Conditions.shellCloses;
-import java.util.Properties;
-
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotBrowser;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.seam.ui.bot.test.AbstractSeamTestBase;
import org.jboss.tools.seam.ui.bot.test.EARTests;
import org.jboss.tools.seam.ui.bot.test.TestControl;
import org.jboss.tools.seam.ui.bot.test.WARTests;
-import org.jboss.tools.ui.bot.ext.SWTBotExt;
import org.jboss.tools.ui.bot.ext.SWTJBTExt;
-import org.jboss.tools.ui.bot.ext.SWTOpenExt;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.jboss.tools.ui.bot.ext.SWTUtilExt;
-import org.jboss.tools.ui.bot.ext.config.Annotations.DB;
-import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Seam;
-import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
-import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
import org.jboss.tools.ui.bot.ext.parts.SWTBotBrowserExt;
import org.jboss.tools.ui.bot.ext.parts.SWTBotRadioExt;
@@ -32,14 +19,11 @@
import org.junit.experimental.categories.Category;
-//@SWTBotTestRequires(server=(a)Server(state=ServerState.NotRunning),perspective="Seam",seam=@Seam())
-@Require(server=@Server,perspective="Seam",seam=@Seam(),db=@DB)
public class CreateSeamProjects extends AbstractSeamTestBase {
protected static final String VALIDATION = "Validation";
protected static final String DEPLOY_SOURCE = "Deploying datasource to server";
protected static final String REG_IN_SERVER = "Register in server";
- protected static final String CONN_PROFILE = "hsqldb18_internal";
public CreateSeamProjects() {
@@ -76,7 +60,7 @@
protected void createSeamProject(String type) {
SWTJBTBot bot = new SWTJBTBot();
- bot.menu("File").menu("New").menu("Seam Web Project").click();
+ bot.menu("File").menu("New").menu("Seam 2 Web Project").click();
bot.textWithLabel("Project name:").setText(AbstractSeamTestBase.testProjectName + type);
bot.comboBoxInGroup("Target runtime").setSelection(SWTTestExt.configuredState.getServer().name);
bot.comboBoxInGroup("Target Server").setSelection(SWTTestExt.configuredState.getServer().name);
@@ -87,9 +71,9 @@
bot.button("Next >").click();
bot.button("Next >").click();
bot.button("Next >").click();
- bot.comboBoxWithLabel("Seam Runtime:").setSelection(SWTTestExt.configuredState.getSeam().name);
+ bot.comboBoxWithLabel("Seam 2 Runtime:").setSelection(SWTTestExt.configuredState.getSeam().name);
new SWTBotRadioExt(bot.radio(type).widget).clickWithoutDeselectionEvent();
- bot.comboBoxWithLabel("Connection profile:").setSelection(CONN_PROFILE);
+ bot.comboBoxWithLabel("Connection profile:").setSelection(SWTTestExt.configuredState.getDB().name);
SWTBotShell seamPrjShell = bot.activeShell();
bot.button("Finish").click();
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/misc/GotoComponent.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/misc/GotoComponent.java 2011-08-26 10:18:36 UTC (rev 34335)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/misc/GotoComponent.java 2011-08-26 13:14:04 UTC (rev 34336)
@@ -31,7 +31,7 @@
private void testGotoComponent(String type) {
SWTJBTBot bot = new SWTJBTBot();
- bot.menu("Navigate").menu("Open Seam Component").click();
+ bot.menu("Navigate").menu("Open Seam 2 Component").click();
bot.text().setText("authenticator");
SWTBotTableItem tabItem = bot.table().getTableItem("authenticator - " + AbstractSeamTestBase.testProjectName + type +
((type == TestControl.TYPE_EAR) ? "-ejb" : ""));
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/validate/ELExprValidator.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/validate/ELExprValidator.java 2011-08-26 10:18:36 UTC (rev 34335)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.bot.test/src/org/jboss/tools/seam/ui/bot/test/validate/ELExprValidator.java 2011-08-26 13:14:04 UTC (rev 34336)
@@ -30,7 +30,7 @@
private void testELExpr(String type) {
SWTBotEclipseEditor editor = projectExplorer.openFile(testProjectName + type,
- "Web Resources : WebContent", "home.xhtml").toTextEditor();
+ "Web Resources", "home.xhtml").toTextEditor();
// add correct expression
int idx = 0;
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java 2011-08-26 10:18:36 UTC (rev 34335)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/gen/ActionItem.java 2011-08-26 13:14:04 UTC (rev 34336)
@@ -8931,7 +8931,7 @@
* represents item : JBoss Tools->Web->Seam
*/
public static final IPreference LABEL = new IPreference() {
- public String getName() { return "Seam";}
+ public String getName() { return "Seam 2";}
public List<String> getGroupPath() {
List<String> l = new Vector<String>();
l.add("JBoss Tools");
14 years, 4 months
JBoss Tools SVN: r34335 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-08-26 06:18:36 -0400 (Fri, 26 Aug 2011)
New Revision: 34335
Removed:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaQueryContainerImpl.java.tmp
Log:
Removeemp file
Deleted: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaQueryContainerImpl.java.tmp
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaQueryContainerImpl.java.tmp 2011-08-26 10:16:44 UTC (rev 34334)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaQueryContainerImpl.java.tmp 2011-08-26 10:18:36 UTC (rev 34335)
@@ -1,314 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-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.hibernate.jpt.core.internal.context.java;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Vector;
-
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jpt.common.core.utility.TextRange;
-import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.common.utility.internal.StringTools;
-import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.common.utility.internal.iterables.SubIterableWrapper;
-import org.eclipse.jpt.common.utility.internal.iterators.CompositeIterator;
-import org.eclipse.jpt.jpa.core.context.Query;
-import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
-import org.eclipse.jpt.jpa.core.context.java.JavaQuery;
-import org.eclipse.jpt.jpa.core.internal.context.ContextContainerTools;
-import org.eclipse.jpt.jpa.core.internal.jpa1.context.java.GenericJavaQueryContainer;
-import org.eclipse.jpt.jpa.core.internal.validation.DefaultJpaValidationMessages;
-import org.eclipse.jpt.jpa.core.internal.validation.JpaValidationMessages;
-import org.eclipse.jpt.jpa.core.resource.java.NestableAnnotation;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-import org.jboss.tools.hibernate.jpt.core.internal.HibernateAbstractJpaFactory;
-import org.jboss.tools.hibernate.jpt.core.internal.context.HibernateNamedNativeQuery;
-import org.jboss.tools.hibernate.jpt.core.internal.context.HibernateNamedQuery;
-import org.jboss.tools.hibernate.jpt.core.internal.resource.java.HibernateNamedNativeQueriesAnnotation;
-import org.jboss.tools.hibernate.jpt.core.internal.resource.java.HibernateNamedNativeQueryAnnotation;
-import org.jboss.tools.hibernate.jpt.core.internal.resource.java.HibernateNamedQueriesAnnotation;
-import org.jboss.tools.hibernate.jpt.core.internal.resource.java.HibernateNamedQueryAnnotation;
-
-/**
- *
- * @author Dmitry Geraskov
- *
- */
-public class HibernateJavaQueryContainerImpl extends GenericJavaQueryContainer
-implements HibernateJavaQueryContainer{
-
- protected final Vector<HibernateJavaNamedQuery> hibernateNamedQueries = new Vector<HibernateJavaNamedQuery>();
- protected HibernateNamedQueryContainerAdapter hibernateNamedQueryContainerAdapter = new HibernateNamedQueryContainerAdapter();
-
- protected final Vector<HibernateJavaNamedNativeQuery> hibernateNamedNativeQueries = new Vector<HibernateJavaNamedNativeQuery>();
- protected HibernateNamedNativeQueryContainerAdapter hibernateNamedNativeQueryContainerAdapter = new HibernateNamedNativeQueryContainerAdapter();
-
-
- public HibernateJavaQueryContainerImpl(JavaJpaContextNode parent, Owner owner) {
- super(parent, owner);
- this.initializeHibernateNamedQueries();
- this.initializeHibernateNamedNativeQueries();
- }
-
- @Override
- protected HibernateAbstractJpaFactory getJpaFactory() {
- return (HibernateAbstractJpaFactory) super.getJpaFactory();
- }
-
-
- // ********** synchronize/update **********
-
- @Override
- public void synchronizeWithResourceModel() {
- super.synchronizeWithResourceModel();
- this.syncHibernateNamedQueries();
- this.syncHibernateNamedNativeQueries();
- }
-
- @Override
- public void update() {
- super.update();
- this.updateNodes(this.getHibernateNamedQueries());
- this.updateNodes(this.getHibernateNamedNativeQueries());
- }
-
-
- // ********** hibernateNamed queries **********
-
- public ListIterator<HibernateJavaNamedQuery> hibernateNamedQueries() {
- return this.getHibernateNamedQueries().iterator();
- }
-
- protected ListIterable<HibernateJavaNamedQuery> getHibernateNamedQueries() {
- return new LiveCloneListIterable<HibernateJavaNamedQuery>(this.hibernateNamedQueries);
- }
-
- public int hibernateNamedQueriesSize() {
- return this.hibernateNamedQueries.size();
- }
-
- public HibernateNamedQuery addHibernateNamedQuery() {
- return this.addHibernateNamedQuery(this.hibernateNamedQueries.size());
- }
-
- public HibernateJavaNamedQuery addHibernateNamedQuery(int index) {
- HibernateNamedQueryAnnotation annotation = this.buildHibernateNamedQueryAnnotation(index);
- return this.addHibernateNamedQuery_(index, annotation);
- }
-
- protected HibernateNamedQueryAnnotation buildHibernateNamedQueryAnnotation(int index) {
- return (HibernateNamedQueryAnnotation) this.owner.getResourceAnnotatedElement().addAnnotation(index, HibernateNamedQueryAnnotation.ANNOTATION_NAME, HibernateNamedQueriesAnnotation.ANNOTATION_NAME);
- }
-
- public void removeHibernateNamedQuery(HibernateNamedQuery hibernateNamedQuery) {
- this.removeHibernateNamedQuery(this.hibernateNamedQueries.indexOf(hibernateNamedQuery));
- }
-
- public void removeHibernateNamedQuery(int index) {
- this.owner.getResourceAnnotatedElement().removeAnnotation(index, HibernateNamedQueryAnnotation.ANNOTATION_NAME, HibernateNamedQueriesAnnotation.ANNOTATION_NAME);
- this.removeHibernateNamedQuery_(index);
- }
-
- protected void removeHibernateNamedQuery_(int index) {
- this.removeItemFromList(index, this.hibernateNamedQueries, NAMED_QUERIES_LIST);
- }
-
- public void moveHibernateNamedQuery(int targetIndex, int sourceIndex) {
- this.owner.getResourceAnnotatedElement().moveAnnotation(targetIndex, sourceIndex, HibernateNamedQueriesAnnotation.ANNOTATION_NAME);
- this.moveItemInList(targetIndex, sourceIndex, this.hibernateNamedQueries, NAMED_QUERIES_LIST);
- }
-
- protected void initializeHibernateNamedQueries() {
- for (HibernateNamedQueryAnnotation annotation : this.getHibernateNamedQueryAnnotations()) {
- this.hibernateNamedQueries.add(this.buildHibernateNamedQuery(annotation));
- }
- }
-
- protected HibernateJavaNamedQuery buildHibernateNamedQuery(HibernateNamedQueryAnnotation hibernateNamedQueryAnnotation) {
- return this.getJpaFactory().buildHibernateJavaNamedQuery(this, hibernateNamedQueryAnnotation);
- }
-
- protected void syncHibernateNamedQueries() {
- ContextContainerTools.synchronizeWithResourceModel(this.hibernateNamedQueryContainerAdapter);
- }
-
- protected Iterable<HibernateNamedQueryAnnotation> getHibernateNamedQueryAnnotations() {
- return new SubIterableWrapper<NestableAnnotation, HibernateNamedQueryAnnotation>(
- CollectionTools.iterable(this.hibernateNamedQueryAnnotations())
- );
- }
-
- protected Iterator<NestableAnnotation> hibernateNamedQueryAnnotations() {
- return this.owner.getResourceAnnotatedElement().annotations(HibernateNamedQueryAnnotation.ANNOTATION_NAME, HibernateNamedQueriesAnnotation.ANNOTATION_NAME);
- }
-
- protected void moveHibernateNamedQuery_(int index, HibernateJavaNamedQuery hibernateNamedQuery) {
- this.moveItemInList(index, hibernateNamedQuery, this.hibernateNamedQueries, NAMED_QUERIES_LIST);
- }
-
- protected HibernateJavaNamedQuery addHibernateNamedQuery_(int index, HibernateNamedQueryAnnotation hibernateNamedQueryAnnotation) {
- HibernateJavaNamedQuery query = this.buildHibernateNamedQuery(hibernateNamedQueryAnnotation);
- this.addItemToList(index, query, this.hibernateNamedQueries, NAMED_QUERIES_LIST);
- return query;
- }
-
- protected void removeHibernateNamedQuery_(HibernateNamedQuery hibernateNamedQuery) {
- this.removeHibernateNamedQuery_(this.hibernateNamedQueries.indexOf(hibernateNamedQuery));
- }
-
- /**
- * hibernateNamed query container adapter
- */
- protected class HibernateNamedQueryContainerAdapter
- implements ContextContainerTools.Adapter<HibernateJavaNamedQuery, HibernateNamedQueryAnnotation>
- {
- public Iterable<HibernateJavaNamedQuery> getContextElements() {
- return HibernateJavaQueryContainerImpl.this.getHibernateNamedQueries();
- }
- public Iterable<HibernateNamedQueryAnnotation> getResourceElements() {
- return HibernateJavaQueryContainerImpl.this.getHibernateNamedQueryAnnotations();
- }
- public HibernateNamedQueryAnnotation getResourceElement(HibernateJavaNamedQuery contextElement) {
- return contextElement.getQueryAnnotation();
- }
- public void moveContextElement(int index, HibernateJavaNamedQuery element) {
- HibernateJavaQueryContainerImpl.this.moveHibernateNamedQuery_(index, element);
- }
- public void addContextElement(int index, HibernateNamedQueryAnnotation resourceElement) {
- HibernateJavaQueryContainerImpl.this.addHibernateNamedQuery_(index, resourceElement);
- }
- public void removeContextElement(HibernateJavaNamedQuery element) {
- HibernateJavaQueryContainerImpl.this.removeHibernateNamedQuery_(element);
- }
- }
-
-
- // ********** hibernateNamed native queries **********
-
- public ListIterator<HibernateJavaNamedNativeQuery> hibernateNamedNativeQueries() {
- return this.getHibernateNamedNativeQueries().iterator();
- }
-
- protected ListIterable<HibernateJavaNamedNativeQuery> getHibernateNamedNativeQueries() {
- return new LiveCloneListIterable<HibernateJavaNamedNativeQuery>(this.hibernateNamedNativeQueries);
- }
-
- public int hibernateNamedNativeQueriesSize() {
- return this.hibernateNamedNativeQueries.size();
- }
-
- public HibernateNamedNativeQuery addHibernateNamedNativeQuery() {
- return this.addHibernateNamedNativeQuery(this.hibernateNamedNativeQueries.size());
- }
-
- public HibernateJavaNamedNativeQuery addHibernateNamedNativeQuery(int index) {
- HibernateNamedNativeQueryAnnotation annotation = this.buildHibernateNamedNativeQueryAnnotation(index);
- return this.addHibernateNamedNativeQuery_(index, annotation);
- }
-
- protected HibernateNamedNativeQueryAnnotation buildHibernateNamedNativeQueryAnnotation(int index) {
- return (HibernateNamedNativeQueryAnnotation) this.owner.getResourceAnnotatedElement().addAnnotation(index, HibernateNamedNativeQueryAnnotation.ANNOTATION_NAME, HibernateNamedNativeQueriesAnnotation.ANNOTATION_NAME);
- }
-
- public void removeHibernateNamedNativeQuery(HibernateNamedNativeQuery hibernateNamedNativeQuery) {
- this.removeHibernateNamedNativeQuery(this.hibernateNamedNativeQueries.indexOf(hibernateNamedNativeQuery));
- }
-
- public void removeHibernateNamedNativeQuery(int index) {
- this.owner.getResourceAnnotatedElement().removeAnnotation(index, HibernateNamedNativeQueryAnnotation.ANNOTATION_NAME, HibernateNamedNativeQueriesAnnotation.ANNOTATION_NAME);
- this.removeHibernateNamedNativeQuery_(index);
- }
-
- protected void removeHibernateNamedNativeQuery_(int index) {
- this.removeItemFromList(index, this.hibernateNamedNativeQueries, NAMED_NATIVE_QUERIES_LIST);
- }
-
- public void moveHibernateNamedNativeQuery(int targetIndex, int sourceIndex) {
- this.owner.getResourceAnnotatedElement().moveAnnotation(targetIndex, sourceIndex, HibernateNamedNativeQueriesAnnotation.ANNOTATION_NAME);
- this.moveItemInList(targetIndex, sourceIndex, this.hibernateNamedNativeQueries, NAMED_NATIVE_QUERIES_LIST);
- }
-
- protected void initializeHibernateNamedNativeQueries() {
- for (HibernateNamedNativeQueryAnnotation annotation : this.getHibernateNamedNativeQueryAnnotations()) {
- this.hibernateNamedNativeQueries.add(this.buildHibernateNamedNativeQuery(annotation));
- }
- }
-
- protected HibernateJavaNamedNativeQuery buildHibernateNamedNativeQuery(HibernateNamedNativeQueryAnnotation hibernateNamedNativeQueryAnnotation) {
- return this.getJpaFactory().buildHibernateJavaNamedNativeQuery(this, hibernateNamedNativeQueryAnnotation);
- }
-
- protected void syncHibernateNamedNativeQueries() {
- ContextContainerTools.synchronizeWithResourceModel(this.hibernateNamedNativeQueryContainerAdapter);
- }
-
- protected Iterable<HibernateNamedNativeQueryAnnotation> getHibernateNamedNativeQueryAnnotations() {
- return new SubIterableWrapper<NestableAnnotation, HibernateNamedNativeQueryAnnotation>(
- CollectionTools.iterable(this.hibernateNamedNativeQueryAnnotations())
- );
- }
-
- protected Iterator<NestableAnnotation> hibernateNamedNativeQueryAnnotations() {
- return this.owner.getResourceAnnotatedElement().annotations(HibernateNamedNativeQueryAnnotation.ANNOTATION_NAME, HibernateNamedNativeQueriesAnnotation.ANNOTATION_NAME);
- }
-
- protected void moveHibernateNamedNativeQuery_(int index, HibernateJavaNamedNativeQuery hibernateNamedNativeQuery) {
- this.moveItemInList(index, hibernateNamedNativeQuery, this.hibernateNamedNativeQueries, NAMED_NATIVE_QUERIES_LIST);
- }
-
- protected HibernateJavaNamedNativeQuery addHibernateNamedNativeQuery_(int index, HibernateNamedNativeQueryAnnotation hibernateNamedNativeQueryAnnotation) {
- HibernateJavaNamedNativeQuery query = this.buildHibernateNamedNativeQuery(hibernateNamedNativeQueryAnnotation);
- this.addItemToList(index, query, this.hibernateNamedNativeQueries, NAMED_NATIVE_QUERIES_LIST);
- return query;
- }
-
- protected void removeHibernateNamedNativeQuery_(HibernateNamedNativeQuery hibernateNamedNativeQuery) {
- this.removeHibernateNamedNativeQuery_(this.hibernateNamedNativeQueries.indexOf(hibernateNamedNativeQuery));
- }
-
- /**
- * hibernateNamed native query container adapter
- */
- protected class HibernateNamedNativeQueryContainerAdapter
- implements ContextContainerTools.Adapter<HibernateJavaNamedNativeQuery, HibernateNamedNativeQueryAnnotation>
- {
- public Iterable<HibernateJavaNamedNativeQuery> getContextElements() {
- return HibernateJavaQueryContainerImpl.this.getHibernateNamedNativeQueries();
- }
- public Iterable<HibernateNamedNativeQueryAnnotation> getResourceElements() {
- return HibernateJavaQueryContainerImpl.this.getHibernateNamedNativeQueryAnnotations();
- }
- public HibernateNamedNativeQueryAnnotation getResourceElement(HibernateJavaNamedNativeQuery contextElement) {
- return contextElement.getQueryAnnotation();
- }
- public void moveContextElement(int index, HibernateJavaNamedNativeQuery element) {
- HibernateJavaQueryContainerImpl.this.moveHibernateNamedNativeQuery_(index, element);
- }
- public void addContextElement(int index, HibernateNamedNativeQueryAnnotation resourceElement) {
- HibernateJavaQueryContainerImpl.this.addHibernateNamedNativeQuery_(index, resourceElement);
- }
- public void removeContextElement(HibernateJavaNamedNativeQuery element) {
- HibernateJavaQueryContainerImpl.this.removeHibernateNamedNativeQuery_(element);
- }
- }
-
- @Override
- @SuppressWarnings("unchecked")
- public Iterator<JavaQuery> queries() {
- return new CompositeIterator<JavaQuery>(queries(), this.hibernateNamedNativeQueries(), this.hibernateNamedQueries());
- }
-
-}
14 years, 4 months
JBoss Tools SVN: r34334 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context: java and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-08-26 06:16:44 -0400 (Fri, 26 Aug 2011)
New Revision: 34334
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.properties
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaTypeDef.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaTypeDefImpl.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JpaUtil.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/TypeImpl.java
Log:
https://issues.jboss.org/browse/JBIDE-9485
Updated validation of TypeDef and Type annotations
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.properties 2011-08-26 06:35:25 UTC (rev 34333)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.properties 2011-08-26 10:16:44 UTC (rev 34334)
@@ -7,7 +7,8 @@
UNRESOLVED_FOREIGN_KEY_NAME = Foreign key \"{0}\" not found in the table \"{1}\".
CC_NOT_EXISTS= Console configuration \"{0}\" does not exist.
TYPE_CANT_BE_EMPTY=Type could not be empty.
-USER_TYPE_INTERFACE = Type class \"{0}\" should implement interface \"org.hibernate.usertype.UserType\".
+USER_TYPE_INTERFACE = Type class \"{0}\" should implement one of interfaces \"org.hibernate.type.Type\",\
+ \"org.hibernate.usertype.UserType\", \"org.hibernate.usertype.CompositeUserType\", \"org.hibernate.usertype.UserCollectionType\".
TYPE_CLASS_NOT_FOUND = Type class \"{0}\" could not be found.
NAME_CANT_BE_EMPTY = Name could not be empty.
TYPE_DEF_DUPLICATE_NAME=Duplicate type definition named \"{0}\" defined in this persistence unit
\ No newline at end of file
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaTypeDef.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaTypeDef.java 2011-08-26 06:35:25 UTC (rev 34333)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaTypeDef.java 2011-08-26 10:16:44 UTC (rev 34334)
@@ -23,7 +23,17 @@
public interface JavaTypeDef extends JavaJpaContextNode, ParametrizedElement {
String USER_TYPE_INTERFACE = "org.hibernate.usertype.UserType";
+ String TYPE_INTERFACE = "org.hibernate.type.Type";
+ String COMPOSITE_USER_TYPE_INTERFACE = "org.hibernate.usertype.CompositeUserType";
+ String USER_COLLECTION_USER_TYPE_INTERFACE = "org.hibernate.usertype.UserCollectionType";
+ String[] POSSIBLE_INTERFACES = new String[]{
+ TYPE_INTERFACE,
+ USER_TYPE_INTERFACE,
+ COMPOSITE_USER_TYPE_INTERFACE,
+ USER_COLLECTION_USER_TYPE_INTERFACE
+ };
+
String getName();
void setName(String name);
String NAME_PROPERTY = "name"; //$NON-NLS-1$
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaTypeDefImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaTypeDefImpl.java 2011-08-26 06:35:25 UTC (rev 34333)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaTypeDefImpl.java 2011-08-26 10:16:44 UTC (rev 34334)
@@ -23,7 +23,6 @@
import org.eclipse.jpt.common.utility.internal.StringTools;
import org.eclipse.jpt.common.utility.internal.iterables.ListIterable;
import org.eclipse.jpt.common.utility.internal.iterables.LiveCloneListIterable;
-import org.eclipse.jpt.common.utility.internal.iterators.CloneListIterator;
import org.eclipse.jpt.jpa.core.context.java.JavaJpaContextNode;
import org.eclipse.jpt.jpa.core.internal.context.ContextContainerTools;
import org.eclipse.jpt.jpa.core.internal.context.java.AbstractJavaJpaContextNode;
@@ -33,7 +32,6 @@
import org.jboss.tools.hibernate.jpt.core.internal.context.HibernatePersistenceUnit;
import org.jboss.tools.hibernate.jpt.core.internal.context.Messages;
import org.jboss.tools.hibernate.jpt.core.internal.context.Parameter;
-import org.jboss.tools.hibernate.jpt.core.internal.context.java.JavaTypeDefImpl.ParameterContainerAdapter;
import org.jboss.tools.hibernate.jpt.core.internal.resource.java.ParameterAnnotation;
import org.jboss.tools.hibernate.jpt.core.internal.resource.java.TypeDefAnnotation;
import org.jboss.tools.hibernate.jpt.core.internal.validation.HibernateJpaValidationMessage;
@@ -295,7 +293,8 @@
messages.add(HibernateJpaValidationMessage.buildMessage(
IMessage.HIGH_SEVERITY,TYPE_CLASS_NOT_FOUND, new String[]{typeClass}, this, this.getTypeClassTextRange(astRoot)));
} else {
- if (!JpaUtil.isTypeImplementsInterface(getJpaProject().getJavaProject(), lwType, USER_TYPE_INTERFACE)){
+ if (!JpaUtil.isTypeImplementsOneOfInterfaces(getJpaProject().getJavaProject(), lwType,
+ JavaTypeDef.POSSIBLE_INTERFACES)){
messages.add(HibernateJpaValidationMessage.buildMessage(
IMessage.HIGH_SEVERITY,IMPLEMENT_USER_TYPE_INTERFACE, new String[]{typeClass}, this, this.getTypeClassTextRange(astRoot)));
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JpaUtil.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JpaUtil.java 2011-08-26 06:35:25 UTC (rev 34333)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JpaUtil.java 2011-08-26 10:16:44 UTC (rev 34334)
@@ -63,5 +63,14 @@
}
return false;
}
+
+ public static boolean isTypeImplementsOneOfInterfaces(IJavaProject javaProject, IType type, String... interfacesName) throws JavaModelException{
+ for (String interfaceName : interfacesName) {
+ if (isTypeImplementsInterface(javaProject, type, interfaceName)){
+ return true;
+ }
+ }
+ return false;
+ }
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/TypeImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/TypeImpl.java 2011-08-26 06:35:25 UTC (rev 34333)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/TypeImpl.java 2011-08-26 10:16:44 UTC (rev 34334)
@@ -148,7 +148,8 @@
messages.add(HibernateJpaValidationMessage.buildMessage(
IMessage.HIGH_SEVERITY,TYPE_CLASS_NOT_FOUND, new String[]{type}, this, range));
} else {
- if (!JpaUtil.isTypeImplementsInterface(getJpaProject().getJavaProject(), lwType, JavaTypeDef.USER_TYPE_INTERFACE)){
+ if (!JpaUtil.isTypeImplementsOneOfInterfaces(getJpaProject().getJavaProject(), lwType,
+ JavaTypeDef.POSSIBLE_INTERFACES)){
messages.add(HibernateJpaValidationMessage.buildMessage(
IMessage.HIGH_SEVERITY,IMPLEMENT_USER_TYPE_INTERFACE, new String[]{type}, this, range));
}
14 years, 4 months
JBoss Tools SVN: r34333 - in trunk: jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2011-08-26 02:35:25 -0400 (Fri, 26 Aug 2011)
New Revision: 34333
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAutoTestCase.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/JBIDE4391Test.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/OpenOnTest.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/SWTJBTExt.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java
Log:
Changes for MacOS
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAutoTestCase.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAutoTestCase.java 2011-08-26 03:02:04 UTC (rev 34332)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/JSFAutoTestCase.java 2011-08-26 06:35:25 UTC (rev 34333)
@@ -103,5 +103,13 @@
}
return builder.toString();
}
+ /**
+ * Returns CSS Editor text striped from spaces, tabs CR and EOL
+ * @param editorText
+ * @return String
+ */
+ protected static String stripCSSText(String editorText){
+ return editorText.replaceAll("\n", "").replaceAll("\t", "").replaceAll("\r", "").replaceAll(" ", "");
+ }
}
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 2011-08-26 03:02:04 UTC (rev 34332)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE3577Test.java 2011-08-26 06:35:25 UTC (rev 34333)
@@ -47,7 +47,8 @@
bot.button("Clear").click(); //$NON-NLS-1$
bot.button("Apply").click(); //$NON-NLS-1$
bot.button("OK").click(); //$NON-NLS-1$
- assertEquals("cssclass{\r\t\r}@CHARSET \"UTF-8\";", bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor().getText()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals(JSFAutoTestCase.stripCSSText("cssclass{\r\t\r}@CHARSET \"UTF-8\";"),
+ JSFAutoTestCase.stripCSSText(bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor().getText())); //$NON-NLS-1$ //$NON-NLS-2$
bot.editorByTitle(CSS_FILE_NAME+".css").close(); //$NON-NLS-1$
}
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 2011-08-26 03:02:04 UTC (rev 34332)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/cssdialog/jbide/JBIDE4391Test.java 2011-08-26 06:35:25 UTC (rev 34333)
@@ -47,8 +47,8 @@
bot.comboBoxWithLabel("Text Decoration:").setText(";;;;"); //$NON-NLS-1$ //$NON-NLS-2$
bot.comboBoxWithLabel("Font Weight:").setSelection("bold"); //$NON-NLS-1$ //$NON-NLS-2$
bot.button("Cancel").click(); //$NON-NLS-1$
- assertEquals("cssclass{\r\tcolor:red;\r\t" + //$NON-NLS-1$
- "background-color:green;\r}@CHARSET \"UTF-8\";", bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor().getText()); //$NON-NLS-1$ //$NON-NLS-2$
+ assertEquals(JSFAutoTestCase.stripCSSText("cssclass{\r\tcolor:red;\r\t" + "background-color:green;\r}@CHARSET \"UTF-8\";"),
+ JSFAutoTestCase.stripCSSText(bot.editorByTitle(CSS_FILE_NAME+".css").toTextEditor().getText())); //$NON-NLS-1$ //$NON-NLS-2$
bot.editorByTitle(CSS_FILE_NAME+".css").close(); //$NON-NLS-1$
}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java 2011-08-26 03:02:04 UTC (rev 34332)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java 2011-08-26 06:35:25 UTC (rev 34333)
@@ -174,6 +174,7 @@
*/
public void testCodeCompletionOfCompositeComponent(){
eclipse.closeAllEditors();
+ createJSF2Project(JSF2_TEST_PROJECT_NAME);
openPage(JSF2_TEST_PAGE, JSF2_TEST_PROJECT_NAME);
compositeComponentContainerEditor = SWTTestExt.bot.swtBotEditorExtByTitle(FACELETS_TEST_PAGE);
origCompositeComponentContainerEditorText = compositeComponentContainerEditor.getText();
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 2011-08-26 03:02:04 UTC (rev 34332)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/OpenOnTest.java 2011-08-26 06:35:25 UTC (rev 34333)
@@ -126,11 +126,6 @@
openedEditor = OpenOnHelper.checkOpenOnFileIsOpened(
SWTTestExt.bot, facesConfigTitle, "<property-class>java.lang.String</property-class>", 18,
0, 0, expectedOpenedFileName);
- selectedTextInSourceEditor = openedEditor.toTextEditor().getSelection();
- expectedSelectedTextInEditor = "String";
- assertTrue("Selected text in editor has to be " + expectedSelectedTextInEditor +
- " but is " + selectedTextInSourceEditor,
- selectedTextInSourceEditor.equalsIgnoreCase(expectedSelectedTextInEditor));
openedEditor.close();
// Check open on for URI /pages/inputUserName.jsp within <from-view-id> tag
expectedOpenedFileName = "inputUserName.jsp";
@@ -152,6 +147,7 @@
*/
public void testOpenOnForCompositeComponent() {
eclipse.closeAllEditors();
+ createJSF2Project(JSF2_TEST_PROJECT_NAME);
openPage(JSF2_TEST_PAGE,JSF2_TEST_PROJECT_NAME);
// Check open on for <ez:input
String expectedOpenedFileName = "input.xhtml";
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-08-26 03:02:04 UTC (rev 34332)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2011-08-26 06:35:25 UTC (rev 34333)
@@ -791,9 +791,12 @@
bot.comboBox(0).setSelection(jreToUse);
}
open.finish(bot.activeShell().bot());
- open.finish(wiz, IDELabel.Button.OK);
+ }
+ else{
+ log.info("Server Runtime: " + runtime.getName() +
+ " already exists.\nNo Server Runtime were added.");
}
-
+ open.finish(wiz, IDELabel.Button.OK);
}
public void removeServerRuntime(String runtimeName) {
log.info("Removing Server Runtime: " + runtimeName );
@@ -831,13 +834,18 @@
log.info("Adding Java Virtual Machine: " + vmName + "\nHome: " + jreHome);
SWTBot pref = open
.preferenceOpen(ActionItem.Preference.JavaInstalledJREs.LABEL);
- pref.button(IDELabel.Button.ADD).click();
- bot.shell("Add JRE").activate();
- SWTBot add = bot.shell("Add JRE").bot();
- add.button(IDELabel.Button.NEXT).click();
- add.text(0).setText(jreHome);
- add.text(1).setText(vmName);
- open.finish(add);
+ if (!pref.table().containsItem(vmName)){
+ pref.button(IDELabel.Button.ADD).click();
+ bot.shell("Add JRE").activate();
+ SWTBot add = bot.shell("Add JRE").bot();
+ add.button(IDELabel.Button.NEXT).click();
+ add.text(0).setText(jreHome);
+ add.text(1).setText(vmName);
+ open.finish(add);
+ }
+ else{
+ log.info("Java Virtual Machine: " + vmName + " already exists\nNo JVM were added");
+ }
open.finish(pref,IDELabel.Button.OK);
}
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.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java 2011-08-26 03:02:04 UTC (rev 34332)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java 2011-08-26 06:35:25 UTC (rev 34333)
@@ -544,10 +544,9 @@
int iStartIndex = 0;
int iRow = 0;
if (editorText != null && editorText.length() > 0 && editorText.contains(textToSelect)){
- String[] editorLines = editorText.split("\n");
int iOccurenceIndex = 0;
- while (!found && iRow < editorLines.length){
- String lineText = editorLines[iRow];
+ while (!found && iRow < editor.getLineCount()){
+ String lineText = editor.getTextOnLine(iRow);
iStartIndex = 0;
while (!found && lineText.contains(textToSelect)){
if (iOccurenceIndex == textToSelectIndex){
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java 2011-08-26 03:02:04 UTC (rev 34332)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java 2011-08-26 06:35:25 UTC (rev 34333)
@@ -4,11 +4,15 @@
import java.io.File;
import java.io.IOException;
+import java.io.InputStream;
import java.util.Arrays;
import java.util.List;
+import java.util.Properties;
import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
@@ -18,6 +22,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.test.TestProperties;
import org.jboss.tools.ui.bot.ext.SWTBotExt;
import org.jboss.tools.ui.bot.ext.SWTJBTExt;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
@@ -51,7 +56,9 @@
perspective="Web Development"
)
public abstract class VPEAutoTestCase extends JBTSWTBotTestCase {
-
+
+ protected static Properties projectProperties;
+ protected static String PROJECT_PROPERTIES = "projectProperties.properties";
protected static final String TEST_PAGE = "inputUserName.jsp"; //$NON-NLS-1$
protected static final String FACELETS_TEST_PAGE = "inputname.xhtml"; //$NON-NLS-1$
protected static String JSF2_TEST_PAGE = "inputname.xhtml"; //$NON-NLS-1$
@@ -59,7 +66,50 @@
protected final static String JBT_TEST_PROJECT_NAME = "JBIDETestProject"; //$NON-NLS-1$
protected final static String FACELETS_TEST_PROJECT_NAME = "FaceletsTestProject"; //$NON-NLS-1$
protected final static String JSF2_TEST_PROJECT_NAME = "JSF2TestProject"; //$NON-NLS-1$
+ protected final static String JBOSS_AS_FOR_JSF2_HOME;
+ protected final static String JBOSS_AS_FOR_JSF2_SERVER_GROUP;
+ protected final static String JBOSS_AS_FOR_JSF2_SERVER_TYPE;
+ protected final static String JBOSS_AS_FOR_JSF2_SERVER_RUNTIME_TYPE;
+ static {
+ try {
+ InputStream inputStream = VPEAutoTestCase.class
+ .getResourceAsStream("/" + PROJECT_PROPERTIES); //$NON-NLS-1$
+ projectProperties = new TestProperties();
+ projectProperties.load(inputStream);
+ inputStream.close();
+ } catch (IOException e) {
+ IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID,
+ "Can't load properties from " + PROJECT_PROPERTIES + " file", e); //$NON-NLS-1$ //$NON-NLS-2$
+ Activator.getDefault().getLog().log(status);
+ e.printStackTrace();
+ } catch (IllegalStateException e) {
+ IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID,
+ "Property file " + PROJECT_PROPERTIES + " was not found", e); //$NON-NLS-1$ //$NON-NLS-2$
+ Activator.getDefault().getLog().log(status);
+ e.printStackTrace();
+ }
+ // Setup JSF2 project related properties
+ if (projectProperties.containsKey("JBossASForJSF2")) {
+ JBOSS_AS_FOR_JSF2_HOME = projectProperties.getProperty("JBossASForJSF2");
+ String version = projectProperties.getProperty("JBossASForJSF2Version",
+ "6.0");
+ if (version.equals("6.0")) {
+ JBOSS_AS_FOR_JSF2_SERVER_GROUP = IDELabel.ServerGroup.JBOSS_AS_6_0;
+ JBOSS_AS_FOR_JSF2_SERVER_RUNTIME_TYPE = IDELabel.ServerRuntimeType.JBOSS_AS_6_0;
+ JBOSS_AS_FOR_JSF2_SERVER_TYPE = IDELabel.ServerType.JBOSS_AS_6_0;
+ } else {
+ throw new RuntimeException(
+ "Unsupported version of JBoss AS runtime for JSF2 [version="
+ + version + "location='" + JBOSS_AS_FOR_JSF2_HOME
+ + "' specified.");
+ }
+ }
+ else{
+ throw new RuntimeException("Runtime for JSF2 is not specified");
+ }
+ }
+
/**
* @see #clearWorkbench()
* @see #createJSFProject(String)
@@ -575,30 +625,56 @@
* @param jsf2ProjectName
* - name of created project
*/
- protected void createJSF2Project(String jsf2ProjectName) {
- SWTBot wiz = open
- .newObject(ActionItem.NewObject.JBossToolsWebJSFJSFProject.LABEL);
- wiz.textWithLabel(IDELabel.NewJsfProjectDialog.PROJECT_NAME_LABEL)
- .setText(jsf2ProjectName);
- wiz.comboBoxWithLabel(
- IDELabel.NewJsfProjectDialog.JSF_ENVIRONMENT_LABEL)
- .setSelection("JSF 2.0");//$NON-NLS-1$
- wiz.comboBoxWithLabel(IDELabel.NewJsfProjectDialog.TEMPLATE_LABEL)
- .setSelection("JSFKickStartWithoutLibs");//$NON-NLS-1$
- wiz.button(IDELabel.Button.NEXT).click();
- wiz.comboBoxWithLabel("Runtime:*").setSelection(
- SWTTestExt.configuredState.getServer().name);
- delay();
- bot.button(IDELabel.Button.FINISH).click();
- try {
- bot.button(IDELabel.Button.YES).click();
- openErrorLog();
- openPackageExplorer();
- } catch (WidgetNotFoundException e) {
- }
+ protected void createJSF2Project(String jsf2ProjectName) {
+ SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
+ SWTBotTree tree = innerBot.tree();
+ try {
+ tree.getTreeItem(JSF2_TEST_PROJECT_NAME);
+ } catch (WidgetNotFoundException wnfe) {
+ SWTBot wiz = open
+ .newObject(ActionItem.NewObject.JBossToolsWebJSFJSFProject.LABEL);
+ wiz.textWithLabel(IDELabel.NewJsfProjectDialog.PROJECT_NAME_LABEL)
+ .setText(jsf2ProjectName);
+ wiz.comboBoxWithLabel(IDELabel.NewJsfProjectDialog.JSF_ENVIRONMENT_LABEL)
+ .setSelection("JSF 2.0");//$NON-NLS-1$
+ wiz.comboBoxWithLabel(IDELabel.NewJsfProjectDialog.TEMPLATE_LABEL)
+ .setSelection("JSFKickStartWithoutLibs");//$NON-NLS-1$
+ wiz.button(IDELabel.Button.NEXT).click();
+ try {
+ wiz.comboBoxWithLabel(IDELabel.NewJsfProjectDialog.RUNTIME_LABEL)
+ .setSelection(JBOSS_AS_FOR_JSF2_SERVER_RUNTIME_TYPE);
+ delay();
+ wiz.button(IDELabel.Button.FINISH).click();
+ try {
+ wiz.button(IDELabel.Button.YES).click();
+ openErrorLog();
+ openPackageExplorer();
+ } catch (WidgetNotFoundException wnfe1) {
+ }
+ } catch (Exception e) {
+ bot.button(0).click();
+ SWTBotTree innerTree = wiz.tree();
+ delay();
+ innerTree.expandNode(JBOSS_AS_FOR_JSF2_SERVER_GROUP).select(
+ JBOSS_AS_FOR_JSF2_SERVER_RUNTIME_TYPE);
+ delay();
+ wiz.button(IDELabel.Button.NEXT).click();
+ wiz.textWithLabel(IDELabel.NewJsfProjectDialog.HOME_DIRECTORY_LABEL)
+ .setText(JBOSS_AS_FOR_JSF2_HOME);
+ wiz.button(IDELabel.Button.FINISH).click();
+ delay();
+ wiz.button(IDELabel.Button.FINISH).click();
+ try {
+ wiz.button(IDELabel.Button.YES).click();
+ openErrorLog();
+ openPackageExplorer();
+ } catch (WidgetNotFoundException e2) {
+ }
+ }
+ waitForBlockingJobsAcomplished(60 * 1000L, BUILDING_WS);
+ setException(null);
+ }
- waitForBlockingJobsAcomplished(60 * 1000L, BUILDING_WS);
- setException(null);
- }
+ }
}
14 years, 4 months
JBoss Tools SVN: r34332 - branches/jbosstools-3.2.x/documentation/guides/JBDS_Release_Notes/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-08-25 23:02:04 -0400 (Thu, 25 Aug 2011)
New Revision: 34332
Modified:
branches/jbosstools-3.2.x/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml
Log:
updated with new fixed issues for jbds 4.1.1
Modified: branches/jbosstools-3.2.x/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml
===================================================================
--- branches/jbosstools-3.2.x/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml 2011-08-25 23:11:07 UTC (rev 34331)
+++ branches/jbosstools-3.2.x/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml 2011-08-26 03:02:04 UTC (rev 34332)
@@ -12,24 +12,24 @@
<itemizedlist>
<listitem>
<para>
- <ulink url="http://jira.jboss.com/jira/browse/JBDS-1610">JBDS-1610</ulink>: BPEL tooling is now supported as an additional tool for JBoss Developer Studio. Many bug fixes and enhancements have been applied to it in order to bring it from a technology preview to a supported component.
+ <ulink url="http://jira.jboss.com/jira/browse/JBDS-1806">JBDS-1806</ulink>: Validation within the BPEL editor would not show malformed XML and unknown extensions as errors. This would cause code to fail without prior warning. In this release these issues are correctly flagged as validation errors in the BPEL editor, allowing for prior warning before publishing the code.
</para>
</listitem>
</itemizedlist>
</para>
- </formalpara>
- <formalpara>
+ </formalpara>
+<!-- <formalpara>
<title>Contexts and Dependency Injection (CDI)</title>
<para>
<itemizedlist>
<listitem>
<para>
- <ulink url="http://jira.jboss.com/jira/browse/JBIDE-3126">JBIDE-3126</ulink>: Validation for the serializablity of injected beans into passive-scoped beans has been added. This ensures that if a bean belongs to <property>@SessionScoped</property>, <property>@ConversationScope</property> or any <property>@NormalScope(passivating=true)</property> and it is not stateful (<property>@Stateful</property>), the bean is checked to see if it implements <classname>java.io.Serializible</classname>. If it does not implement the Serializible class, then it is marked as an error.
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-0000">JBIDE-0000</ulink>:
</para>
</listitem>
</itemizedlist>
</para>
- </formalpara>
+ </formalpara> -->
<!-- Deltacloud is only shipped with JBoss.org -->
<!--
<formalpara>
@@ -181,18 +181,18 @@
</itemizedlist>
</para>
</formalpara> -->
- <!--<formalpara>
+ <formalpara>
<title>Seam</title>
<para>
<itemizedlist>
<listitem>
<para>
- <ulink url="http://jira.jboss.com/jira/browse/JBIDE-0000">JBIDE-0000</ulink>:
+ <ulink url="http://jira.jboss.com/jira/browse/JBDS-1818">JBDS-1818</ulink>: Drools libraries were upgraded in Enterprise Application Platform 5.1.1 and the Seam tooling did not take this into account. As a result, the Seam Project wizard needed to be updated to replace the JAR <filename>core.jar</filename> to be <filename>ecj.jar</filename> in the project classpath. This update has been applied in this release and allows the Seam Project wizard to use Drools libraries correctly.
</para>
</listitem>
</itemizedlist>
</para>
- </formalpara> -->
+ </formalpara>
<!--<formalpara>
<title>Smooks</title>
<para>
14 years, 4 months