JBoss Tools SVN: r26052 - in trunk/deltacloud/plugins: org.jboss.tools.deltacloud.ui and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-26 05:51:09 -0400 (Tue, 26 Oct 2010)
New Revision: 26052
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
Log:
[JBIDE-7402] cleanup: updated changelog
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-10-26 09:49:17 UTC (rev 26051)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-10-26 09:51:09 UTC (rev 26052)
@@ -1,3 +1,8 @@
+2010-10-26 André Dietisheim <adietish(a)redhat.com>
+
+ * src/org/jboss/tools/deltacloud/core/DeltaCloud.java (testConnection):
+ [JBIDE-7407] now returns <code>false</code> if listing instances fails with a DeltaCloudClientException
+
2010-10-25 Jeff Johnston <jjohnstn(a)redhat.com>
* src/org/jboss/tools/deltacloud/core/DeltaCloud.java: Move cloud type constants
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-10-26 09:49:17 UTC (rev 26051)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-10-26 09:51:09 UTC (rev 26052)
@@ -1,3 +1,15 @@
+2010-10-26 André Dietisheim <adietish(a)redhat.com>
+
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java (addPages):
+ [JBIDE-7402] added MalformedURLException handling.
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java (bindCloudType):
+ [JBIDE-7402] bound type label to converter state.
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionModel.java
+ (getDeltaCloudType): [JBIDE-7402] added setup of type at instantiation time
+ (CloudConnectionModel): [JBIDE-7402] radded setup of type at instantiation time
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/Url2DeltaCloudTypeConverter.java:
+ [JBIDE-7402] renamed to reflect involved types better.
+
2010-10-25 Jeff Johnston <jjohnstn(a)redhat.com>
[JBIDE-7408]
14 years, 2 months
JBoss Tools SVN: r26051 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-26 05:49:17 -0400 (Tue, 26 Oct 2010)
New Revision: 26051
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties
Log:
[JBIDE-7402] cleanup: internationalized messages
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties 2010-10-26 09:47:27 UTC (rev 26050)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties 2010-10-26 09:49:17 UTC (rev 26051)
@@ -15,6 +15,8 @@
NewCloudConnectionTest.failure=Connection Test failed
EditCloudConnection.name=Edit Cloud Connection
+EditCloudConnectionError.title=Error Editing Cloud Connection
+EditCloudConnectionError.message=Could not open connection wizard
Url.label=URL:
Name.label=Name:
14 years, 2 months
JBoss Tools SVN: r26050 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-26 05:47:27 -0400 (Tue, 26 Oct 2010)
New Revision: 26050
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java
Log:
[JBIDE-7402] cleanup: internationalized messages
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-10-26 09:46:52 UTC (rev 26049)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-10-26 09:47:27 UTC (rev 26050)
@@ -62,6 +62,7 @@
public class CloudConnectionPage extends WizardPage {
private static final int CLOUDTYPE_CHECK_DELAY = 500;
+
private static final String DESCRIPTION = "NewCloudConnection.desc"; //$NON-NLS-1$
private static final String TITLE = "NewCloudConnection.title"; //$NON-NLS-1$
private static final String URL_LABEL = "Url.label"; //$NON-NLS-1$
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java 2010-10-26 09:46:52 UTC (rev 26049)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java 2010-10-26 09:47:27 UTC (rev 26050)
@@ -47,11 +47,12 @@
mainPage = new CloudConnectionPage(WizardMessages.getString(MAINPAGE_NAME),
cloud.getName(), cloud.getURL(), cloud.getUsername(), password,
cloud.getType(), this);
+ addPage(mainPage);
} catch (MalformedURLException e) {
Status status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, e.getMessage(), e);
- ErrorDialog.openError(getShell(), "Error", "Could not open connection wizard", status);
+ ErrorDialog.openError(getShell(), WizardMessages.getString("EditCloudConnectionError.title"),
+ WizardMessages.getString("EditCloudConnectionError.message"), status);
}
- addPage(mainPage);
}
private String getPassword() {
14 years, 2 months
JBoss Tools SVN: r26049 - in trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test: smoke and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: jlukas(a)redhat.com
Date: 2010-10-26 05:46:52 -0400 (Tue, 26 Oct 2010)
New Revision: 26049
Modified:
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/StrutsAllBotTests.java
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke/AddRemoveStrutsCapabilities.java
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke/CreateNewStrutsProjectTest.java
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke/RunStrutsProjectOnServer.java
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/tutorial/TutorialTest.java
trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/utils/WizardBot.java
Log:
making struts bot tests up-to-date
Modified: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/StrutsAllBotTests.java
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/StrutsAllBotTests.java 2010-10-26 09:21:14 UTC (rev 26048)
+++ trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/StrutsAllBotTests.java 2010-10-26 09:46:52 UTC (rev 26049)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Copyright (c) 2007-2010 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,
@@ -10,54 +10,44 @@
******************************************************************************/
package org.jboss.tools.struts.ui.bot.test;
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
-import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import java.util.logging.Logger;
+
import org.jboss.tools.struts.ui.bot.test.smoke.AddRemoveStrutsCapabilities;
import org.jboss.tools.struts.ui.bot.test.smoke.CreateNewStrutsProjectTest;
import org.jboss.tools.struts.ui.bot.test.smoke.ImportStrutsProjectTest;
import org.jboss.tools.struts.ui.bot.test.smoke.RenameStrutsConfigXmlFile;
import org.jboss.tools.struts.ui.bot.test.smoke.RenameTldFile;
import org.jboss.tools.struts.ui.bot.test.smoke.RunStrutsProjectOnServer;
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.jboss.tools.struts.ui.bot.test.tutorial.TutorialTest;
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
/**
*
* This is struts swtbot testcase for JBoss Tools.
*
+ * System properties:
+ * -Dswtbot.test.properties.file=$PATH
+ * -Dusage_reporting_enabled=$BOOLEAN
+ *
+ * Suite duration: aprox. 10min
+ *
* @author Vladimir Pakan
+ * @author Lukas Jungmann
*
*/
-(a)RunWith(Suite.class)
-(a)SuiteClasses({CreateNewStrutsProjectTest.class,
- RunStrutsProjectOnServer.class,
- AddRemoveStrutsCapabilities.class,
- ImportStrutsProjectTest.class,
- RenameStrutsConfigXmlFile.class,
- RenameTldFile.class
- })
-public class StrutsAllBotTests extends SWTTestExt {
- public static final String STRUTS_PROJECT_NAME = "strutsTest";
- @BeforeClass
- public static void setUpTest() {
- properties = util.loadProperties(Activator.PLUGIN_ID);
- try{
- SWTBotView welcomeView = eclipse.getBot().viewByTitle(IDELabel.View.WELCOME);
- welcomeView.close();
- } catch (WidgetNotFoundException wnfe){
- // Do nothing ignore this error
- }
-
- }
-
- @AfterClass
- public static void tearDownTest() {
- // Ready for later usage
- }
-
+(a)RunWith(RequirementAwareSuite.class)
+@SuiteClasses({
+ TutorialTest.class,
+ CreateNewStrutsProjectTest.class,
+ RunStrutsProjectOnServer.class,
+ AddRemoveStrutsCapabilities.class,
+ ImportStrutsProjectTest.class,
+ RenameStrutsConfigXmlFile.class,
+ RenameTldFile.class})
+public class StrutsAllBotTests {
+ public static final String STRUTS_PROJECT_NAME = "strutsTest";
}
\ No newline at end of file
Modified: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke/AddRemoveStrutsCapabilities.java
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke/AddRemoveStrutsCapabilities.java 2010-10-26 09:21:14 UTC (rev 26048)
+++ trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke/AddRemoveStrutsCapabilities.java 2010-10-26 09:46:52 UTC (rev 26049)
@@ -1,13 +1,13 @@
- /*******************************************************************************
- * Copyright (c) 2007-2009 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
- ******************************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007-2010 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.struts.ui.bot.test.smoke;
@@ -22,97 +22,91 @@
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.ext.types.ViewType;
import org.junit.Test;
+
/**
* Test adding and removing Struts Capabilities from/to Struts Project
+ *
* @author Vladimir Pakan
- *
+ * @author Lukas Jungmann
+ *
*/
-public class AddRemoveStrutsCapabilities extends SWTTestExt{
- private SWTJBTExt swtJbtExt = null;
- public AddRemoveStrutsCapabilities (){
- swtJbtExt = new SWTJBTExt(bot);
- }
- @Test
+public class AddRemoveStrutsCapabilities extends SWTTestExt {
+ private SWTJBTExt swtJbtExt = null;
+
+ public AddRemoveStrutsCapabilities() {
+ swtJbtExt = new SWTJBTExt(bot);
+ }
+
+ @Test
public void testAddRemoveStrutsCapabilities() {
- boolean jbdsIsRunning = SWTJBTExt.isJBDSRun(bot);
- swtJbtExt.delay();
- removeStrutsCapabilities(jbdsIsRunning);
- swtJbtExt.delay();
- addStrutsCapabilities();
+ boolean jbdsIsRunning = SWTJBTExt.isJBDSRun();
+ swtJbtExt.delay();
+ removeStrutsCapabilities(jbdsIsRunning);
+ swtJbtExt.delay();
+ addStrutsCapabilities();
}
-
- /**
- * Remove Struts Capabilities from Struts Project
- * @param jbdsIsRunning
- */
- private void removeStrutsCapabilities(boolean jbdsIsRunning) {
- swtJbtExt.removeProjectFromServers(StrutsAllBotTests.STRUTS_PROJECT_NAME);
- util.delay();
- eclipse.showView(ViewType.WEB_PROJECTS);
-
- SWTBotTree tree = bot.viewByTitle(IDELabel.View.WEB_PROJECTS).bot().tree();
-
- ContextMenuHelper.prepareTreeItemForContextMenu(tree,
- tree.getTreeItem(StrutsAllBotTests.STRUTS_PROJECT_NAME));
+ /**
+ * Remove Struts Capabilities from Struts Project
+ *
+ * @param jbdsIsRunning
+ */
+ private void removeStrutsCapabilities(boolean jbdsIsRunning) {
+ swtJbtExt.removeProjectFromServers(StrutsAllBotTests.STRUTS_PROJECT_NAME);
+ util.delay();
+ eclipse.showView(ViewType.WEB_PROJECTS);
+ SWTBotTree tree = bot.viewByTitle(IDELabel.View.WEB_PROJECTS).bot().tree();
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree,
+ tree.getTreeItem(StrutsAllBotTests.STRUTS_PROJECT_NAME));
+ new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,
+ IDELabel.Menu.WEB_PROJECT_JBT_STRUTS, false)).menu(
+ IDELabel.Menu.JBT_REMOVE_STRUTS_CAPABILITIES).click();
+ bot.shell("Confirmation").activate();
+ bot.button(IDELabel.Button.OK).click();
+ util.waitForNonIgnoredJobs(5L * 1000);
+ bot.sleep(2500);
- new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,
- IDELabel.Menu.WEB_PROJECT_JBT_STRUTS, false)).menu(
- IDELabel.Menu.JBT_REMOVE_STRUTS_CAPABILITIES).click();
+ assertTrue(
+ "Project " + StrutsAllBotTests.STRUTS_PROJECT_NAME
+ + " was not removed from Web Projects view after Struts Capabilities were removed.",
+ !SWTEclipseExt.treeContainsItemWithLabel(
+ bot.viewByTitle(IDELabel.View.WEB_PROJECTS).bot()
+ .tree(), StrutsAllBotTests.STRUTS_PROJECT_NAME));
+ }
- bot.shell("Confirmation").activate();
- bot.button(IDELabel.Button.OK).click();
+ /**
+ * Add Struts Capabilities to JSF Project
+ */
+ private void addStrutsCapabilities() {
+ swtJbtExt.removeProjectFromServers(StrutsAllBotTests.STRUTS_PROJECT_NAME);
+ SWTBotTree tree = eclipse.showView(ViewType.PACKAGE_EXPLORER).tree();
+ util.delay();
+ ContextMenuHelper.prepareTreeItemForContextMenu(tree,
+ tree.getTreeItem(StrutsAllBotTests.STRUTS_PROJECT_NAME));
- util.waitForNonIgnoredJobs(5L*1000);
-
- assertTrue(
- "Project "
- + StrutsAllBotTests.STRUTS_PROJECT_NAME
- + " was not removed from Web Projects view after Struts Capabilities were removed.",
- !SWTEclipseExt.treeContainsItemWithLabel(bot.viewByTitle(IDELabel.View.WEB_PROJECTS).bot().tree(),
- StrutsAllBotTests.STRUTS_PROJECT_NAME));
-
- }
+ try {
+ new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,
+ IDELabel.Menu.PACKAGE_EXPLORER_JBT, false)).menu(
+ IDELabel.Menu.ADD_STRUTS_CAPABILITIES).click();
+ } catch (WidgetNotFoundException wnfe) {
+ // From 3.1.0.RC1 version this menu is moved to Configure submenu
+ new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,
+ IDELabel.Menu.PACKAGE_EXPLORER_CONFIGURE, false)).menu(
+ IDELabel.Menu.ADD_STRUTS_CAPABILITIES).click();
+ }
- /**
- * Add Struts Capabilities to JSF Project
- */
- private void addStrutsCapabilities() {
+ bot.shell("Add Struts Capabilities").activate();
+ bot.button(IDELabel.Button.NEXT).click();
+ bot.button(IDELabel.Button.FINISH).click();
+ eclipse.closeOpenAssociatedPerspectiveShellIfOpened(false);
+ util.waitForNonIgnoredJobs(5L * 1000);
+ eclipse.showView(ViewType.WEB_PROJECTS);
- swtJbtExt.removeProjectFromServers(StrutsAllBotTests.STRUTS_PROJECT_NAME);
-
- SWTBotTree tree = eclipse.showView(ViewType.PACKAGE_EXPLORER).tree();
-
- util.delay();
-
- ContextMenuHelper.prepareTreeItemForContextMenu(tree,
- tree.getTreeItem(StrutsAllBotTests.STRUTS_PROJECT_NAME));
-
- try{
- new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,
- IDELabel.Menu.PACKAGE_EXPLORER_JBT, false)).menu(
- IDELabel.Menu.ADD_STRUTS_CAPABILITIES).click();
- } catch (WidgetNotFoundException wnfe){
- // From 3.1.0.RC1 version this menu is moved to Configure submenu
- new SWTBotMenu(ContextMenuHelper.getContextMenu(tree,
- IDELabel.Menu.PACKAGE_EXPLORER_CONFIGURE, false)).menu(
- IDELabel.Menu.ADD_STRUTS_CAPABILITIES).click();
- }
-
- bot.shell("Add Struts Capabilities").activate();
- bot.button(IDELabel.Button.NEXT).click();
- bot.button(IDELabel.Button.FINISH).click();
-
- eclipse.closeOpenAssociatedPerspectiveShellIfOpened(false);
-
- util.waitForNonIgnoredJobs(5L*1000);
-
- eclipse.showView(ViewType.WEB_PROJECTS);
-
- assertTrue("JSF Capabilities were not added to project "
- + StrutsAllBotTests.STRUTS_PROJECT_NAME,
- SWTEclipseExt.treeContainsItemWithLabel(bot.viewByTitle(IDELabel.View.WEB_PROJECTS).bot().tree(),
- StrutsAllBotTests.STRUTS_PROJECT_NAME));
-
- }
+ assertTrue(
+ "JSF Capabilities were not added to project "
+ + StrutsAllBotTests.STRUTS_PROJECT_NAME,
+ SWTEclipseExt.treeContainsItemWithLabel(
+ bot.viewByTitle(IDELabel.View.WEB_PROJECTS).bot()
+ .tree(), StrutsAllBotTests.STRUTS_PROJECT_NAME));
+ }
}
Modified: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke/CreateNewStrutsProjectTest.java
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke/CreateNewStrutsProjectTest.java 2010-10-26 09:21:14 UTC (rev 26048)
+++ trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke/CreateNewStrutsProjectTest.java 2010-10-26 09:46:52 UTC (rev 26049)
@@ -1,80 +1,61 @@
- /*******************************************************************************
- * Copyright (c) 2007-2009 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
- ******************************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007-2010 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.struts.ui.bot.test.smoke;
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.jboss.tools.struts.ui.bot.test.StrutsAllBotTests;
import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
-import org.jboss.tools.ui.bot.ext.SWTJBTExt;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+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.types.EntityType;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.ext.types.ViewType;
import org.junit.Test;
-import org.jboss.tools.struts.ui.bot.test.StrutsAllBotTests;
+
/**
* Test creating new Struts Project
+ *
* @author Vladimir Pakan
- *
+ * @author Lukas Jungmann
+ *
*/
-public class CreateNewStrutsProjectTest extends SWTTestExt{
-
- /**
- * Test create new Struts Project
- */
- @Test
- public void testCreateNewStrutsProject() {
- // Default server version is 4.3
- String serverGroup = IDELabel.ServerGroup.JBOSS_EAP_4_3;
- String serverType = IDELabel.ServerType.JBOSS_EAP_4_3;
-
- if (!SWTJBTExt.isServerRuntimeDefined(bot)) {
- eclipse.addServerRuntime(IDELabel.ServerRuntimeName.JBOSS_EAP_4_3,
- IDELabel.ServerGroup.JBOSS_EAP_4_3,
- IDELabel.ServerRuntimeType.JBOSS_EAP_4_3, StrutsAllBotTests
- .getProperty("JBossEap4.3Home"));
- }
- else{
- // Check version of already defined server runtime
- String serverRuntimeVersion = SWTJBTExt.getDefinedServerRuntimeVersion(bot, 0);
- if (serverRuntimeVersion != null){
- if (serverRuntimeVersion.equals("5.0")){
- serverGroup = IDELabel.ServerGroup.JBOSS_EAP_5_0;
- serverType = IDELabel.ServerType.JBOSS_EAP_5_0;
- }else if(!serverRuntimeVersion.equals("4.3")){
- throw new RuntimeException("Unsupported server runtime: " + serverRuntimeVersion);
- }
- }
- else{
- throw new RuntimeException("Unsupported server runtime: " + serverRuntimeVersion);
- }
- }
- eclipse.showView(ViewType.WEB_PROJECTS);
- eclipse.createNew(EntityType.STRUTS_PROJECT);
- bot.shell(IDELabel.Shell.NEW_STRUTS_PROJECT).activate();
- bot.textWithLabel(IDELabel.NewStrutsProjectDialog.NAME).setText(
- StrutsAllBotTests.STRUTS_PROJECT_NAME);
- bot.comboBoxWithLabel(IDELabel.NewStrutsProjectDialog.TEMPLATE)
- .setSelection(IDELabel.NewStrutsProjectDialog.TEMPLATE_KICK_START);
- bot.button(IDELabel.Button.NEXT).click();
- SWTJBTExt.addServerToServerViewOnWizardPage(bot,
- serverGroup, serverType);
- bot.sleep(1000L);
- bot.button(IDELabel.Button.NEXT).click();
- bot.button(IDELabel.Button.FINISH).click();
- eclipse.closeOpenAssociatedPerspectiveShellIfOpened(false);
+@SWTBotTestRequires(server = @Server(state = ServerState.NotRunning), perspective = "Web Development")
+public class CreateNewStrutsProjectTest extends SWTTestExt {
- assertTrue("Project " + StrutsAllBotTests.STRUTS_PROJECT_NAME
- + " was not created properly.", SWTEclipseExt
- .treeContainsItemWithLabel(bot.viewByTitle(IDELabel.View.WEB_PROJECTS)
- .bot().tree(), StrutsAllBotTests.STRUTS_PROJECT_NAME));
- }
+ /**
+ * Test create new Struts Project
+ */
+ @Test
+ public void testCreateNewStrutsProject() {
+ eclipse.createNew(EntityType.STRUTS_PROJECT);
+ bot.shell(IDELabel.Shell.NEW_STRUTS_PROJECT).activate();
+ bot.textWithLabel(IDELabel.NewStrutsProjectDialog.NAME).setText(
+ StrutsAllBotTests.STRUTS_PROJECT_NAME);
+ bot.comboBoxWithLabel(IDELabel.NewStrutsProjectDialog.TEMPLATE)
+ .setSelection(IDELabel.NewStrutsProjectDialog.TEMPLATE_KICK_START);
+ bot.button(IDELabel.Button.NEXT).click();
+ bot.sleep(1000L);
+ bot.button(IDELabel.Button.NEXT).click();
+ bot.button(IDELabel.Button.FINISH).click();
+ bot.sleep(1500);
+ SWTBot v = eclipse.showView(ViewType.PACKAGE_EXPLORER);
+ SWTBotTree tree = v.tree();
+ tree.setFocus();
+ assertTrue("Project " + StrutsAllBotTests.STRUTS_PROJECT_NAME + " was not created properly.",
+ SWTEclipseExt.treeContainsItemWithLabel(tree, StrutsAllBotTests.STRUTS_PROJECT_NAME));
+ }
+
}
Modified: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke/RunStrutsProjectOnServer.java
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke/RunStrutsProjectOnServer.java 2010-10-26 09:21:14 UTC (rev 26048)
+++ trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/smoke/RunStrutsProjectOnServer.java 2010-10-26 09:46:52 UTC (rev 26049)
@@ -1,13 +1,13 @@
- /*******************************************************************************
- * Copyright (c) 2007-2009 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
- ******************************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2007-2010 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.struts.ui.bot.test.smoke;
@@ -19,29 +19,38 @@
/**
* Test running Struts Project on Server
+ *
* @author Vladimir Pakan
- *
+ * @author Lukas Jungmann
+ *
*/
-public class RunStrutsProjectOnServer extends SWTTestExt{
- private SWTJBTExt swtJbtExt = null;
- public RunStrutsProjectOnServer (){
- swtJbtExt = new SWTJBTExt(bot);
- }
- /**
- * Test running Struts Project on Server
- */
- @Test
+public class RunStrutsProjectOnServer extends SWTTestExt {
+ private SWTJBTExt swtJbtExt = null;
+
+ public RunStrutsProjectOnServer() {
+ swtJbtExt = new SWTJBTExt(bot);
+ }
+
+ /**
+ * Test running Struts Project on Server
+ */
+ @Test
public void testRunStrutsProjectOnServer() {
- // Start Application Server
- swtJbtExt.startApplicationServer(0,150*1000L);
- swtJbtExt.runProjectOnServer(StrutsAllBotTests.STRUTS_PROJECT_NAME);
- // Check Browser Content
- String browserText = WidgetFinderHelper.browserInEditorText(bot, "KickStart: Input name",true);
- swtJbtExt.stopApplicationServer(0);
- swtJbtExt.removeProjectFromServers(StrutsAllBotTests.STRUTS_PROJECT_NAME);
- SWTJBTExt.deleteApplicationServer(bot, 0);
- assertTrue("Displayed HTML page has wrong content",
- (browserText!= null) && (browserText.indexOf("<TITLE>KickStart: Input name</TITLE>") > - 1));
- }
-
+ // Start Application Server
+ if (!configuredState.getServer().isRunning) {
+ servers.startServer(configuredState.getServer().name);
+ configuredState.getServer().isRunning = true;
+ }
+ swtJbtExt.runProjectOnServer(StrutsAllBotTests.STRUTS_PROJECT_NAME);
+ // Check Browser Content
+ String browserText = WidgetFinderHelper.browserInEditorText(bot,
+ "KickStart: Input name", true);
+ swtJbtExt.stopApplicationServer(0);
+ swtJbtExt.removeProjectFromServers(StrutsAllBotTests.STRUTS_PROJECT_NAME);
+ SWTJBTExt.deleteApplicationServer(bot, 0);
+ assertTrue("Displayed HTML page has wrong content",
+ (browserText != null)
+ && (browserText.indexOf("<TITLE>KickStart: Input name</TITLE>") > -1));
+ }
+
}
Modified: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/tutorial/TutorialTest.java
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/tutorial/TutorialTest.java 2010-10-26 09:21:14 UTC (rev 26048)
+++ trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/tutorial/TutorialTest.java 2010-10-26 09:46:52 UTC (rev 26049)
@@ -308,7 +308,7 @@
SWTBotTree tree = v.bot().tree();
final SWTBotTreeItem projectNode = tree.getTreeItem(PROJECT_NAME);
nodeContextMenu(tree, projectNode.getNode("WEB-ROOT (WebContent)"), "New", "File", "JSP...").click();
- handleWizard("index");
+ handleStandardWizard("index");
editor = bot.editorByTitle("index.jsp");
editor.show();
editorA = new SWTBotJSPMultiPageEditor(bot.editorByTitle("index.jsp").getReference(), new SWTWorkbenchBot());
@@ -501,16 +501,9 @@
}
private void handleWizard(String itemName) {
- handleWizard(itemName, null);
- }
-
- private void handleWizard(String itemName, String template) {
assert itemName != null && itemName.trim().length() > 0;
WizardBot sh = new WizardBot(bot.activeShell());
sh.setName(itemName);
- if (template != null) {
- sh.setTemplate(template);
- }
sh.finish();
}
Modified: trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/utils/WizardBot.java
===================================================================
--- trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/utils/WizardBot.java 2010-10-26 09:21:14 UTC (rev 26048)
+++ trunk/struts/tests/org.jboss.tools.struts.ui.bot.test/src/org/jboss/tools/struts/ui/bot/test/utils/WizardBot.java 2010-10-26 09:46:52 UTC (rev 26049)
@@ -24,7 +24,7 @@
}
public void setName(String name) {
- bot.textWithLabel("Name*").setText(name);
+ bot.textWithLabel("Name:*").setText(name);
}
public void setTemplate(String template) {
14 years, 2 months
JBoss Tools SVN: r26048 - in trunk/deltacloud/plugins: org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-26 05:21:14 -0400 (Tue, 26 Oct 2010)
New Revision: 26048
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
Log:
[JBIDE-7407] corrected DeltaCloud to return <code>false</code> if listing instances fails
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-10-26 09:12:32 UTC (rev 26047)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-10-26 09:21:14 UTC (rev 26048)
@@ -437,7 +437,7 @@
} catch (DeltaCloudAuthException e) {
return false;
} catch (DeltaCloudClientException e) {
- return true;
+ return false;
}
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-10-26 09:12:32 UTC (rev 26047)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-10-26 09:21:14 UTC (rev 26048)
@@ -135,6 +135,56 @@
}
}
+ /**
+ * A class that listens to a user click on a button that allows it to test
+ * credentials.
+ *
+ * @see CloudConnection#performTest()
+ */
+ private class CredentialsTestAdapter extends SelectionAdapter implements IValueChangeListener {
+
+ private ControlDecoration[] controlDecorations;
+
+ public CredentialsTestAdapter(ControlDecoration... controlDecorations) {
+ this.controlDecorations = controlDecorations;
+ setDecorations(false);
+ }
+
+ public void widgetSelected(SelectionEvent event) {
+ boolean success = cloudConnection.performTest();
+ setMessage(success);
+ setDecorations(!success);
+ }
+
+ private void setMessage(boolean success) {
+ if (success) {
+ CloudConnectionPage.this.setMessage(WizardMessages.getString(TEST_SUCCESSFUL));
+ } else {
+ CloudConnectionPage.this.setErrorMessage(WizardMessages.getString(TEST_FAILURE));
+ }
+ }
+
+ private void clearMessage() {
+ CloudConnectionPage.this.setMessage(""); //$NON-NLS-1$
+ }
+
+ private void setDecorations(boolean visible) {
+ for (ControlDecoration controlDecoration : controlDecorations) {
+ if (visible) {
+ controlDecoration.show();
+ } else {
+ controlDecoration.hide();
+ }
+ }
+ }
+
+ @Override
+ public void handleValueChange(ValueChangeEvent event) {
+ setDecorations(false);
+ clearMessage();
+ }
+ }
+
public CloudConnectionPage(String pageName, CloudConnection cloudConnection) {
super(pageName);
setDescription(WizardMessages.getString(DESCRIPTION));
@@ -415,48 +465,4 @@
public CloudConnectionModel getModel() {
return connectionModel;
}
-
- private class CredentialsTestAdapter extends SelectionAdapter implements IValueChangeListener {
-
- private ControlDecoration[] controlDecorations;
-
- public CredentialsTestAdapter(ControlDecoration... controlDecorations) {
- this.controlDecorations = controlDecorations;
- setDecorations(false);
- }
-
- public void widgetSelected(SelectionEvent event) {
- boolean success = cloudConnection.performTest();
- setMessage(success);
- setDecorations(!success);
- }
-
- private void setMessage(boolean success) {
- if (success) {
- CloudConnectionPage.this.setMessage(WizardMessages.getString(TEST_SUCCESSFUL));
- } else {
- CloudConnectionPage.this.setErrorMessage(WizardMessages.getString(TEST_FAILURE));
- }
- }
-
- private void clearMessage() {
- CloudConnectionPage.this.setMessage(""); //$NON-NLS-1$
- }
-
- private void setDecorations(boolean visible) {
- for (ControlDecoration controlDecoration : controlDecorations) {
- if (visible) {
- controlDecoration.show();
- } else {
- controlDecoration.hide();
- }
- }
- }
-
- @Override
- public void handleValueChange(ValueChangeEvent event) {
- setDecorations(false);
- clearMessage();
- }
- }
}
14 years, 2 months
JBoss Tools SVN: r26047 - trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2010-10-26 05:12:32 -0400 (Tue, 26 Oct 2010)
New Revision: 26047
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/JSF2ComponentsValidatorTest.java
Log:
Junit test has bee fixed JBIDE-6685
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/JSF2ComponentsValidatorTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/JSF2ComponentsValidatorTest.java 2010-10-26 09:06:26 UTC (rev 26046)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/JSF2ComponentsValidatorTest.java 2010-10-26 09:12:32 UTC (rev 26047)
@@ -73,7 +73,7 @@
"Attribute \"anknownAttr\" is not defined for \"echo\" composite component")); //$NON-NLS-1$
assertTrue(isMarkerExist(
markers,
- "JSF 2 Resources folder \"/resources/jarPage1\" is missing in a project root directory")); //$NON-NLS-1$
+ "JSF 2 Resources folder \"/resources/jarPage1\" is missing in a project web directory")); //$NON-NLS-1$
assertTrue(isMarkerExist(markers,
"Composite component \"echo1\" was not found in a project resources directory")); //$NON-NLS-1$
}
14 years, 2 months
JBoss Tools SVN: r26046 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-26 05:06:26 -0400 (Tue, 26 Oct 2010)
New Revision: 26046
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/Url2DeltaCloudTypeConverter.java
Removed:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/UrlToCloudTypeConverter.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionModel.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java
Log:
[JBIDE-7402] implemented listener to url2DeltaCloudTypeConverter
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionModel.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionModel.java 2010-10-26 08:31:12 UTC (rev 26045)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionModel.java 2010-10-26 09:06:26 UTC (rev 26046)
@@ -10,7 +10,10 @@
******************************************************************************/
package org.jboss.tools.internal.deltacloud.ui.wizards;
+import java.net.MalformedURLException;
+
import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClient.DeltaCloudType;
import org.jboss.tools.internal.deltacloud.ui.common.databinding.ObservablePojo;
/**
@@ -34,14 +37,45 @@
private String password;
private DeltaCloudClient.DeltaCloudType cloudType;
+ private String initialName;
- public CloudConnectionModel(String name, String url, String username, String password) {
+ public CloudConnectionModel() {
+ this("", "", "", "", (DeltaCloudType) null);
+ }
+
+ public CloudConnectionModel(String name, String url, String username, String password, String cloudType) throws MalformedURLException {
+ this(name, url, username, password, getDeltaCloudType(cloudType, url));
+ }
+
+ public CloudConnectionModel(String name, String url, String username, String password) throws MalformedURLException {
+ this(name, url, username, password, getDeltaCloudTypeFromUrl(url));
+ }
+
+ public CloudConnectionModel(String name, String url, String username, String password, DeltaCloudType deltaCloudType) {
this.name = name;
+ this.initialName = name;
this.url = url;
this.username = username;
this.password = password;
+ this.cloudType = deltaCloudType;
}
+
+ private static DeltaCloudType getDeltaCloudTypeFromUrl(String url) throws MalformedURLException {
+ return new DeltaCloudClient(url, "", "").getServerType();
+ }
+ private static DeltaCloudType getDeltaCloudType(String cloudType, String url) throws MalformedURLException {
+ if (cloudType == null) {
+ return null;
+ }
+
+ try {
+ return DeltaCloudType.valueOf(cloudType);
+ } catch (IllegalArgumentException e) {
+ return getDeltaCloudTypeFromUrl(url);
+ }
+ }
+
public String getUsername() {
return username;
}
@@ -58,6 +92,10 @@
getPropertyChangeSupport().firePropertyChange(PROPERTY_PASSWORD, this.password, this.password = password);
}
+ public String getInitialName() {
+ return initialName;
+ }
+
public String getName() {
return name;
}
@@ -67,18 +105,22 @@
}
public String getUrl() {
+ System.err.println("getting url: " + url);
return url;
}
public void setUrl(String url) {
+ System.err.println("url set to: " + url);
getPropertyChangeSupport().firePropertyChange(PROPERTY_URL, this.url, this.url = url);
}
public DeltaCloudClient.DeltaCloudType getType() {
+ System.err.println("getting cloud type: " + cloudType);
return cloudType;
}
public void setType(DeltaCloudClient.DeltaCloudType cloudType) {
+ System.err.println("cloud type set to " + cloudType);
getPropertyChangeSupport().firePropertyChange(PROPERTY_TYPE, this.cloudType, this.cloudType = cloudType);
}
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-10-26 08:31:12 UTC (rev 26045)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-10-26 09:06:26 UTC (rev 26046)
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.jboss.tools.internal.deltacloud.ui.wizards;
+import java.net.MalformedURLException;
import java.net.URL;
import org.eclipse.core.databinding.Binding;
@@ -21,6 +22,7 @@
import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
import org.eclipse.core.databinding.validation.IValidator;
import org.eclipse.core.databinding.validation.ValidationStatus;
+import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.databinding.fieldassist.ControlDecorationSupport;
import org.eclipse.jface.databinding.swt.ISWTObservableValue;
@@ -46,6 +48,7 @@
import org.eclipse.ui.PlatformUI;
import org.jboss.tools.common.log.LogHelper;
import org.jboss.tools.deltacloud.core.DeltaCloudManager;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClient.DeltaCloudType;
import org.jboss.tools.deltacloud.ui.Activator;
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.CompositeValidator;
@@ -93,20 +96,60 @@
}
};
+ /**
+ * Displays the cloud type in the given label. Listens to ValueChangeEvents
+ * and sets the given label accordingly.
+ *
+ * @param typeLabel
+ * the label that shall display the delta cloud type
+ *
+ * @see IValueChangeListener
+ * @see DeltaCloudType
+ */
+ private class DeltaCloudTypeLabelAdapter implements IValueChangeListener {
+
+ private Label typeLabel;
+
+ public DeltaCloudTypeLabelAdapter(DeltaCloudType cloudType, Label typeLabel) {
+ this.typeLabel = typeLabel;
+ init(cloudType);
+ }
+
+ private void init(DeltaCloudType cloudType) {
+ setLabelText(cloudType);
+ }
+
+ @Override
+ public void handleValueChange(ValueChangeEvent event) {
+ Object newValue = event.diff.getNewValue();
+ Assert.isTrue(newValue instanceof DeltaCloudType);
+ setLabelText((DeltaCloudType) newValue);
+ }
+
+ private void setLabelText(DeltaCloudType cloudType) {
+ if (cloudType != null && cloudType != DeltaCloudType.UNKNOWN) {
+ typeLabel.setText(cloudType.toString());
+ } else {
+ typeLabel.setText("?"); // $NON-NLS-1$
+ }
+ }
+ }
+
public CloudConnectionPage(String pageName, CloudConnection cloudConnection) {
super(pageName);
setDescription(WizardMessages.getString(DESCRIPTION));
setTitle(WizardMessages.getString(TITLE));
setImageDescriptor(SWTImagesFactory.DESC_DELTA_LARGE);
- this.connectionModel = new CloudConnectionModel("", "", "", "");
+ this.connectionModel = new CloudConnectionModel();
this.cloudConnection = cloudConnection;
}
public CloudConnectionPage(String pageName, String defaultName, String defaultUrl,
String defaultUsername, String defaultPassword, String defaultType,
- CloudConnection cloudConnection) {
+ CloudConnection cloudConnection) throws MalformedURLException {
super(pageName);
- this.connectionModel = new CloudConnectionModel(defaultName, defaultUrl, defaultUsername, defaultPassword);
+ this.connectionModel = new CloudConnectionModel(defaultName, defaultUrl, defaultUsername, defaultPassword,
+ defaultType);
this.cloudConnection = cloudConnection;
setDescription(WizardMessages.getString(DESCRIPTION));
setTitle(WizardMessages.getString(TITLE));
@@ -142,15 +185,15 @@
WidgetProperties.text(SWT.Modify).observeDelayed(CLOUDTYPE_CHECK_DELAY, urlText),
BeanProperties.value(CloudConnectionModel.class, CloudConnectionModel.PROPERTY_URL)
.observe(connectionModel),
- new UpdateValueStrategy().setAfterGetValidator(new MandatoryStringValidator(
- WizardMessages.getString(MUST_ENTER_A_URL))),
+ new UpdateValueStrategy().setAfterGetValidator(
+ new MandatoryStringValidator(WizardMessages.getString(MUST_ENTER_A_URL))),
null);
// cloud type
Label typeLabel = new Label(container, SWT.NULL);
typeLabel.setText(WizardMessages.getString(CLOUDTYPE_LABEL));
Label computedTypeLabel = new Label(container, SWT.NULL);
- Binding urlBinding = bindCloudTypeLabel(dbc, urlText, computedTypeLabel);
+ Binding urlBinding = bindCloudType(dbc, urlText, computedTypeLabel);
// username
Label usernameLabel = new Label(container, SWT.NULL);
@@ -160,8 +203,8 @@
IObservableValue usernameObservable = WidgetProperties.text(SWT.Modify).observe(usernameText);
dbc.bindValue(
usernameObservable,
- BeanProperties.value(CloudConnectionModel.class, CloudConnectionModel.PROPERTY_USERNAME).observe(
- connectionModel));
+ BeanProperties.value(CloudConnectionModel.class, CloudConnectionModel.PROPERTY_USERNAME)
+ .observe(connectionModel));
// password
Label passwordLabel = new Label(container, SWT.NULL);
@@ -294,32 +337,6 @@
}
/**
- * Displays the cloud type in the given if the given binding is valid.
- *
- * @param typeLabel
- * the type label
- * @return the value change listener
- */
- private class CloudTypeAdapter implements IValueChangeListener {
-
- private Label typeLabel;
-
- public CloudTypeAdapter(Label typeLabel) {
- this.typeLabel = typeLabel;
- }
-
- @Override
- public void handleValueChange(ValueChangeEvent event) {
- IStatus status = (IStatus) event.diff.getNewValue();
- if (status.isOK()) {
- typeLabel.setText(connectionModel.getType().toString());
- } else {
- typeLabel.setText("");
- }
- }
- }
-
- /**
* Binds the given cloud type label to the given url text widget. Attaches a
* listener to the url text widget Adds a validity decorator to the url text
* widget.
@@ -333,18 +350,26 @@
* @return
* @return the binding that was created
*/
- private Binding bindCloudTypeLabel(DataBindingContext dbc, Text urlText, final Label typeLabel) {
+ private Binding bindCloudType(DataBindingContext dbc, Text urlText, final Label typeLabel) {
UpdateValueStrategy updateStrategy = new UpdateValueStrategy();
- updateStrategy.setConverter(new UrlToCloudTypeConverter());
+ Url2DeltaCloudTypeConverter urlToCloudTypeConverter = new Url2DeltaCloudTypeConverter();
+ updateStrategy.setConverter(urlToCloudTypeConverter);
updateStrategy.setBeforeSetValidator(new CloudTypeValidator());
Binding binding = dbc.bindValue(
- WidgetProperties.text(SWT.Modify).observeDelayed(100, urlText),
+ WidgetProperties.text(SWT.Modify).observe(urlText),
BeanProperties.value(CloudConnectionModel.PROPERTY_TYPE).observe(connectionModel),
updateStrategy,
new UpdateValueStrategy(UpdateValueStrategy.POLICY_NEVER));
- binding.getValidationStatus().addValueChangeListener(new CloudTypeAdapter(typeLabel));
+
+ // bind converter to delta cloud label
+ IObservableValue cloudTypeObservable = urlToCloudTypeConverter.getCloudTypeObservable();
+ DeltaCloudTypeLabelAdapter cloudTypeAdapter = new DeltaCloudTypeLabelAdapter(
+ (DeltaCloudType) cloudTypeObservable.getValue(), typeLabel);
+ cloudTypeObservable.addValueChangeListener(cloudTypeAdapter);
+
ControlDecorationSupport.create(binding, SWT.LEFT | SWT.TOP);
+
return binding;
}
@@ -369,7 +394,12 @@
@Override
public IStatus validate(Object value) {
- if (nameText.getText() != null
+ /*
+ * keeping the same name when editing
+ * must be valid
+ */
+ if (!nameText.getText().equals(connectionModel.getInitialName())
+ /* all new names must be unique */
&& DeltaCloudManager.getDefault().findCloud(nameText.getText()) != null) {
return ValidationStatus
.error(WizardMessages.getString(NAME_ALREADY_IN_USE));
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java 2010-10-26 08:31:12 UTC (rev 26045)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java 2010-10-26 09:06:26 UTC (rev 26046)
@@ -12,8 +12,11 @@
import java.net.MalformedURLException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.security.storage.ISecurePreferences;
import org.eclipse.equinox.security.storage.SecurePreferencesFactory;
+import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ui.INewWizard;
@@ -40,9 +43,14 @@
@Override
public void addPages() {
String password = getPassword();
- mainPage = new CloudConnectionPage(WizardMessages.getString(MAINPAGE_NAME),
- cloud.getName(), cloud.getURL(), cloud.getUsername(), password,
- cloud.getType(), this);
+ try {
+ mainPage = new CloudConnectionPage(WizardMessages.getString(MAINPAGE_NAME),
+ cloud.getName(), cloud.getURL(), cloud.getUsername(), password,
+ cloud.getType(), this);
+ } catch (MalformedURLException e) {
+ Status status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, e.getMessage(), e);
+ ErrorDialog.openError(getShell(), "Error", "Could not open connection wizard", status);
+ }
addPage(mainPage);
}
Copied: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/Url2DeltaCloudTypeConverter.java (from rev 26044, trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/UrlToCloudTypeConverter.java)
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/Url2DeltaCloudTypeConverter.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/Url2DeltaCloudTypeConverter.java 2010-10-26 09:06:26 UTC (rev 26046)
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.internal.deltacloud.ui.wizards;
+
+import java.net.MalformedURLException;
+
+import org.eclipse.core.databinding.conversion.IConverter;
+import org.eclipse.core.databinding.observable.value.IObservableValue;
+import org.eclipse.core.databinding.observable.value.WritableValue;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClient.DeltaCloudType;
+
+/**
+ * A class that converts an url (string) to a DeltaCloudType (enum). The state
+ * of the converter may be tracked by tracking its observable value cloudType
+ * observable.
+ *
+ * @author Andre Dietisheim
+ *
+ * @see IConverter
+ * @see IObservableValue
+ * @see #getCloudTypeObservable()
+ */
+public class Url2DeltaCloudTypeConverter implements IConverter {
+
+ IObservableValue cloudTypeObservable = new WritableValue();
+
+ @Override
+ public Object getFromType() {
+ return String.class;
+ }
+
+ @Override
+ public Object getToType() {
+ return DeltaCloudClient.DeltaCloudType.class;
+ }
+
+ @Override
+ public Object convert(Object fromObject) {
+ String deltaCloudUrl = (String) fromObject;
+ DeltaCloudType cloudType = getCloudType(deltaCloudUrl);
+ cloudTypeObservable.setValue(cloudType);
+ return cloudType;
+ }
+
+ private DeltaCloudType getCloudType(String deltaCloudUrl) {
+ try {
+ return new DeltaCloudClient(deltaCloudUrl, "", "").getServerType();
+ } catch (MalformedURLException e) {
+ return null;
+ }
+ }
+
+ public IObservableValue getCloudTypeObservable() {
+ return cloudTypeObservable;
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/Url2DeltaCloudTypeConverter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/UrlToCloudTypeConverter.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/UrlToCloudTypeConverter.java 2010-10-26 08:31:12 UTC (rev 26045)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/UrlToCloudTypeConverter.java 2010-10-26 09:06:26 UTC (rev 26046)
@@ -1,43 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.internal.deltacloud.ui.wizards;
-
-import java.net.MalformedURLException;
-
-import org.eclipse.core.databinding.conversion.IConverter;
-import org.jboss.tools.deltacloud.core.client.DeltaCloudClient;
-
-/**
- * @author Andre Dietisheim
- */
-public class UrlToCloudTypeConverter implements IConverter {
-
- @Override
- public Object getFromType() {
- return String.class;
- }
-
- @Override
- public Object getToType() {
- return DeltaCloudClient.DeltaCloudType.class;
- }
-
- @Override
- public Object convert(Object fromObject) {
- String deltaCloudUrl = (String) fromObject;
- try {
- return new DeltaCloudClient(deltaCloudUrl, "", "").getServerType();
- } catch (MalformedURLException e) {
- return null;
- }
- }
-
-}
14 years, 2 months
JBoss Tools SVN: r26045 - in trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf: web/validation/jsf2/action and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2010-10-26 04:31:12 -0400 (Tue, 26 Oct 2010)
New Revision: 26045
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages.properties
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2ResourcesFolderProposal.java
Log:
https://jira.jboss.org/browse/JBIDE-6685
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages.properties
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages.properties 2010-10-26 04:25:09 UTC (rev 26044)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/messages/messages.properties 2010-10-26 08:31:12 UTC (rev 26045)
@@ -104,8 +104,8 @@
Missing_JSF_2_Composite_Component=Composite component "{0}" was not found in a project resources directory
Missing_JSF_2_Component_Attr=Attribute "{0}" is not defined for "{1}" composite component
Create_JSF_2_Interface_Attr=Create attribute "{0}" in an interface declaration "{2}" of a composite component "{1}"
-Missing_JSF_2_Resources_Folder=JSF 2 Resources folder "{0}" is missing in a project root directory
-Create_JSF_2_Resources_Folder=Create a folder "{0}" container for JSF 2 resources for URL "{1}"
+Missing_JSF_2_Resources_Folder=JSF 2 Resources folder "{0}" is missing in a project web directory
+Create_JSF_2_Resources_Folder=Create a folder "{0}" JSF 2 resources container for URL "{1}"
Rename_JSF_2_Composite_Components=Rename JSF 2 composite components
Refactoring_JSF_2_resources=Refactoring JSF 2 resources
Refactoring_JSF_2_Rename_Action=Refactoring is not available in the current place
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2ResourcesFolderProposal.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2ResourcesFolderProposal.java 2010-10-26 04:25:09 UTC (rev 26044)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/jsf2/action/JSF2ResourcesFolderProposal.java 2010-10-26 08:31:12 UTC (rev 26045)
@@ -51,7 +51,7 @@
public String getDisplayString() {
return MessageFormat.format(JSFUIMessages.Create_JSF_2_Resources_Folder,
- JSF2ResourceUtil.calculateProjectRelativeJSF2ResourceProposal(validateResource.getProject())+componentPath,URL);
+ JSF2ResourceUtil.calculateProjectRelativeJSF2ResourceProposal(validateResource.getProject()),URL);
}
@Override
14 years, 2 months
JBoss Tools SVN: r26044 - trunk/documentation/guides/JBDS_Release_Notes/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2010-10-26 00:25:09 -0400 (Tue, 26 Oct 2010)
New Revision: 26044
Modified:
trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml
Log:
updated with new fixed issues listed
Modified: trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml
===================================================================
--- trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml 2010-10-25 22:24:34 UTC (rev 26043)
+++ trunk/documentation/guides/JBDS_Release_Notes/en-US/Fixed_Issues.xml 2010-10-26 04:25:09 UTC (rev 26044)
@@ -30,6 +30,18 @@
</para>
</formalpara>
<formalpara>
+ <title>Deltacloud</title>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6837">JBIDE-6837</ulink>: Deltacloud tooling has been added for this release.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </formalpara>
+ <formalpara>
<title>ESB</title>
<para>
<itemizedlist>
@@ -149,6 +161,16 @@
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-7021">JBIDE-7021</ulink>: Low performance issues existed for validation of web pages. Performance issues were caused by the XHTML syntax validator performing to slow if a DOCTYPE was not declared at the top of XHTML files, the <methodname>PageContextFactory.createPageContext</methodname> method created a SSE model for non-facelet pages, if a page contained Expression Language (EL) errors or warnings, a memory leak appeared in the <methodname>PageContextFactory.getSheetForTagAttribute</methodname> method by registerting <classname>ExtendedLinkElementAdapter</classname> and never releasing the memory allocated to it. These issues have been addressed in this release and the <classname>PageContextFactory</classname> class has been removed from the resource listeners since resources can be modified without changing their context in other places apart from the included validators.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6816">JBIDE-6816</ulink>: A template page for RichFaces has been added to the list of available XHTML templates.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6815">JBIDE-6815</ulink>: A template page has been added that does not incorporate Facelets.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
@@ -188,18 +210,43 @@
</itemizedlist>
</para>
</formalpara> -->
-<!-- <formalpara>
+ <formalpara>
<title>Seam</title>
<para>
<itemizedlist>
<listitem>
<para>
- <ulink url="http://jira.jboss.com/jira/browse/JBDS-">JBDS-</ulink>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6877">JBIDE-6877</ulink> and <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6875">JBIDE-6875</ulink>: When a user writes code for the Seam component that won't compile, new quick fixes are now presented through annotations. Quick fixes include the ability to quickly add a <property>Name</property> annotation to the class and delete a <property>Create</property>, <property>Unwrap</property> or <property>Observer</property> annotation from the method.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6876">JBIDE-6876</ulink>: The quick fix annotation suggestions for the <methodname>Destroy</methodname> method have been updated to remove <guimenuitem>Set Seam properties</guimenuitem> option. This option should not have been presented in this situation.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6874">JBIDE-6874</ulink>: Quick fix now offers to delete any <property>Remove</property> annotation.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6873">JBIDE-6873</ulink> and <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6871">JBIDE-6871</ulink>: For <property>Scope</property> annotation, quick fix now offers to change a component's scope.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6870">JBIDE-6870</ulink>: Quick fix now offers to create a new method with <property>Remove</property> or <property>Destroy</property> annotation. These annotations are also offered as additions to existing methods.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6869">JBIDE-6869</ulink>: Quick fix now offers to rename a component if it is a duplicate and to delete <property>Name</property> annotation.
+ </para>
+ </listitem>
</itemizedlist>
</para>
- </formalpara> -->
+ </formalpara>
<!-- <formalpara>
<title>Smooks</title>
<para>
@@ -273,6 +320,11 @@
<ulink url="http://jira.jboss.com/jira/browse/JBIDE-6981">JBIDE-6981</ulink>: Functionality has been added that provides a drop-down menu in the tag breadcrumbs that enables easy selection of any child element to the selected tag. If there are no children to be expanded, the last tag will remain highlighted.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6805">JBIDE-6805</ulink>: New templates have been added, supporting most docbook tags.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
@@ -282,9 +334,19 @@
<itemizedlist>
<listitem>
<para>
- <ulink url="http://jira.jboss.com/jira/browse/JBIDE-7106">JBIDE-7106</ulink>: Annotations have been added for JAX-RS (Java API for RESTful Web Services). This addition has been accomplished by modifying the <guilabel>Annotation Properties</guilabel> view.
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-7106">JBIDE-7106</ulink>: Annotations have been added for JAX-RS (Java API for RESTful Web Services). This addition has been accomplished by modifying the <guilabel>Annotation Properties</guilabel> view.
</para>
</listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6904">JBIDE-6904</ulink>: A new wizard is available for creating JAX-WS and JAX-RS services from annotated class files. If the classes do not exist upon creation of the services, they will be created during service creation, the same as if the user had used the <guilabel>Create a Sample Web Service</guilabel> or <guilabel>Create a Sample RESTful Web Service</guilabel> wizards.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6851">JBIDE-6851</ulink> and <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6850">JBIDE-6850</ulink>: A new feature has been added providing the ability to read Web Service Definition Language (WSDL) over HTTPS. This ensures that secured <methodname>GET</methodname> and <methodname>POST</methodname> methods are usable and will not produce a <exceptionname>com.sun.xml.internal.ws.wsdl.parser.InaccessibleWSDLException: 2 counts of InaccessibleWSDLException</exceptionname> exception.
+ </para>
+ </listitem>
</itemizedlist>
</para>
</formalpara>
@@ -312,16 +374,17 @@
</itemizedlist>
</para>
</formalpara> -->
-<!-- <formalpara>
+ <formalpara>
<title>General Issues</title>
<para>
<itemizedlist>
- <listitem>
- <para>
-
- </para>
- </listitem>
+ <!-- This issue only in release notes for JBT -->
+ <!-- <listitem>
+ <para>
+ <ulink url="http://jira.jboss.com/jira/browse/JBIDE-6836">JBIDE-6836</ulink>: Google Web Toolkit features are available for JBoss Tools through the update site as experimental.
+ </para>
+ </listitem> -->
</itemizedlist>
</para>
- </formalpara> -->
+ </formalpara>
</section>
14 years, 2 months
JBoss Tools SVN: r26043 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: src/org/jboss/tools/deltacloud/ui/views and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jjohnstn
Date: 2010-10-25 18:24:34 -0400 (Mon, 25 Oct 2010)
New Revision: 26043
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVNumericFoldingElement.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVImagesCategoryElement.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVInstancesCategoryElement.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CloudViewLabelProvider.java
Log:
2010-10-25 Jeff Johnston <jjohnstn(a)redhat.com>
[JBIDE-7408]
* src/org/jboss/tools/deltacloud/ui/views/CVNumericFoldingElement.java: New file.
* src/org/jboss/tools/deltacloud/ui/views/CloudViewLabelProvider.java (getImage): Add
check for CVNumericFoldingElement.
* src/org/jboss/tools/deltacloud/ui/views/CVImagesCategoryElement.java (addImages): New
method which adds intermediate CVNumericFoldingElement folders if necessary.
(getChildren): Use addImages method to add children.
(listChanged): Ditto.
* src/org/jboss/tools/deltacloud/ui/views/CVInstancesCategoryElement.java (addInstances): New
method which adds intermediate CVNumericFoldingElement folders if necessary.
(getChildren): Use addInstances method to add children.
(listChanged): Ditto.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-10-25 20:41:13 UTC (rev 26042)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-10-25 22:24:34 UTC (rev 26043)
@@ -1,5 +1,20 @@
2010-10-25 Jeff Johnston <jjohnstn(a)redhat.com>
+ [JBIDE-7408]
+ * src/org/jboss/tools/deltacloud/ui/views/CVNumericFoldingElement.java: New file.
+ * src/org/jboss/tools/deltacloud/ui/views/CloudViewLabelProvider.java (getImage): Add
+ check for CVNumericFoldingElement.
+ * src/org/jboss/tools/deltacloud/ui/views/CVImagesCategoryElement.java (addImages): New
+ method which adds intermediate CVNumericFoldingElement folders if necessary.
+ (getChildren): Use addImages method to add children.
+ (listChanged): Ditto.
+ * src/org/jboss/tools/deltacloud/ui/views/CVInstancesCategoryElement.java (addInstances): New
+ method which adds intermediate CVNumericFoldingElement folders if necessary.
+ (getChildren): Use addInstances method to add children.
+ (listChanged): Ditto.
+
+2010-10-25 Jeff Johnston <jjohnstn(a)redhat.com>
+
* src/org/jboss/tools/deltacloud/ui/views/InstancePropertySource.java (getPropertyValue): Use
DeltaCloud as source of cloud type constants.
* src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java (validate): Ditto.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVImagesCategoryElement.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVImagesCategoryElement.java 2010-10-25 20:41:13 UTC (rev 26042)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVImagesCategoryElement.java 2010-10-25 22:24:34 UTC (rev 26043)
@@ -39,17 +39,50 @@
super.finalize();
}
+ private void addImages(DeltaCloudImage[] images) {
+ if (images.length > CVNumericFoldingElement.FOLDING_SIZE) {
+ int min = 0;
+ int max = CVNumericFoldingElement.FOLDING_SIZE;
+ int length = images.length;
+ while (length > CVNumericFoldingElement.FOLDING_SIZE) {
+ CVNumericFoldingElement f = new CVNumericFoldingElement(null,
+ "[" + min + ".." + (max - 1) + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ addChild(f);
+ for (int i = min; i < max; ++i) {
+ DeltaCloudImage d = images[i];
+ CVImageElement element = new CVImageElement(d, d.getName());
+ f.addChild(element);
+ }
+ min += CVNumericFoldingElement.FOLDING_SIZE;
+ max += CVNumericFoldingElement.FOLDING_SIZE;
+ length -= CVNumericFoldingElement.FOLDING_SIZE;
+ }
+ if (length > 0) {
+ CVNumericFoldingElement f = new CVNumericFoldingElement(null,
+ "[" + min + ".." + (max - 1) + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ addChild(f);
+ for (int i = min; i < min + length; ++i) {
+ DeltaCloudImage d = images[i];
+ CVImageElement element = new CVImageElement(d, d.getName());
+ f.addChild(element);
+ }
+ }
+ } else {
+ for (int i = 0; i < images.length; ++i) {
+ DeltaCloudImage d = images[i];
+ CVImageElement element = new CVImageElement(d, d.getName());
+ addChild(element);
+ }
+ }
+ }
+
@Override
public Object[] getChildren() {
if (!initialized) {
DeltaCloud cloud = (DeltaCloud)getElement();
cloud.removeImageListListener(this);
DeltaCloudImage[] images = filter(cloud.getCurrImages());
- for (int i = 0; i < images.length; ++i) {
- DeltaCloudImage d = images[i];
- CVImageElement element = new CVImageElement(d, d.getName());
- addChild(element);
- }
+ addImages(images);
initialized = true;
cloud.addImageListListener(this);
}
@@ -60,11 +93,7 @@
public void listChanged(DeltaCloud cloud, DeltaCloudImage[] newImages) {
clearChildren();
DeltaCloudImage[] images = filter(newImages);
- for (int i = 0; i < images.length; ++i) {
- DeltaCloudImage d = images[i];
- CVImageElement element = new CVImageElement(d, d.getName());
- addChild(element);
- }
+ addImages(images);
initialized = true;
Display.getDefault().asyncExec(new Runnable() {
@Override
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVInstancesCategoryElement.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVInstancesCategoryElement.java 2010-10-25 20:41:13 UTC (rev 26042)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVInstancesCategoryElement.java 2010-10-25 22:24:34 UTC (rev 26043)
@@ -39,17 +39,50 @@
super.finalize();
}
+ private void addInstances(DeltaCloudInstance[] instances) {
+ if (instances.length > CVNumericFoldingElement.FOLDING_SIZE) {
+ int min = 0;
+ int max = CVNumericFoldingElement.FOLDING_SIZE;
+ int length = instances.length;
+ while (length > CVNumericFoldingElement.FOLDING_SIZE) {
+ CVNumericFoldingElement f = new CVNumericFoldingElement(null,
+ "[" + min + ".." + (max - 1) + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ addChild(f);
+ for (int i = min; i < max; ++i) {
+ DeltaCloudInstance d = instances[i];
+ CVInstanceElement element = new CVInstanceElement(d, d.getName());
+ f.addChild(element);
+ }
+ min += CVNumericFoldingElement.FOLDING_SIZE;
+ max += CVNumericFoldingElement.FOLDING_SIZE;
+ length -= CVNumericFoldingElement.FOLDING_SIZE;
+ }
+ if (length > 0) {
+ CVNumericFoldingElement f = new CVNumericFoldingElement(null,
+ "[" + min + ".." + (max - 1) + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ addChild(f);
+ for (int i = min; i < min + length; ++i) {
+ DeltaCloudInstance d = instances[i];
+ CVInstanceElement element = new CVInstanceElement(d, d.getName());
+ f.addChild(element);
+ }
+ }
+ } else {
+ for (int i = 0; i < instances.length; ++i) {
+ DeltaCloudInstance d = instances[i];
+ CVInstanceElement element = new CVInstanceElement(d, d.getName());
+ addChild(element);
+ }
+ }
+ }
+
@Override
public Object[] getChildren() {
if (!initialized) {
DeltaCloud cloud = (DeltaCloud)getElement();
cloud.removeInstanceListListener(this);
DeltaCloudInstance[] instances = filter(cloud.getCurrInstances());
- for (int i = 0; i < instances.length; ++i) {
- DeltaCloudInstance d = instances[i];
- CVInstanceElement element = new CVInstanceElement(d, d.getName());
- addChild(element);
- }
+ addInstances(instances);
initialized = true;
cloud.addInstanceListListener(this);
}
@@ -60,11 +93,7 @@
public void listChanged(DeltaCloud cloud, DeltaCloudInstance[] newInstances) {
clearChildren();
DeltaCloudInstance[] instances = filter(newInstances);
- for (int i = 0; i < instances.length; ++i) {
- DeltaCloudInstance d = instances[i];
- CVInstanceElement element = new CVInstanceElement(d, d.getName());
- addChild(element);
- }
+ addInstances(instances);
initialized = true;
Display.getDefault().asyncExec(new Runnable() {
@Override
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVNumericFoldingElement.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVNumericFoldingElement.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVNumericFoldingElement.java 2010-10-25 22:24:34 UTC (rev 26043)
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat Inc..
+ * All rights reserved. This program and the accompanying materials
+ * are 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
+ *
+ * Contributors:
+ * Red Hat Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.jboss.tools.deltacloud.ui.views;
+
+import org.eclipse.ui.views.properties.IPropertySource;
+
+public class CVNumericFoldingElement extends CloudViewElement {
+
+ public static int FOLDING_SIZE = 50;
+
+ public CVNumericFoldingElement(Object element, String name) {
+ super(element, name);
+ }
+
+ @Override
+ public Object[] getChildren() {
+ return super.getChildren();
+ }
+
+ @Override
+ public boolean hasChildren() {
+ return true;
+ }
+
+ @Override
+ public IPropertySource getPropertySource() {
+ return null;
+ }
+
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVNumericFoldingElement.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CloudViewLabelProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CloudViewLabelProvider.java 2010-10-25 20:41:13 UTC (rev 26042)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CloudViewLabelProvider.java 2010-10-25 22:24:34 UTC (rev 26043)
@@ -20,7 +20,8 @@
public Image getImage(Object element) {
if (element instanceof CVCloudElement) {
return SWTImagesFactory.get(SWTImagesFactory.IMG_CLOUD);
- } else if (element instanceof CVCategoryElement) {
+ } else if (element instanceof CVCategoryElement ||
+ element instanceof CVNumericFoldingElement) {
return SWTImagesFactory.get(SWTImagesFactory.IMG_FOLDER);
} else if (element instanceof CVInstanceElement) {
return SWTImagesFactory.get(SWTImagesFactory.IMG_INSTANCE);
14 years, 2 months