JBoss Tools SVN: r39307 - trunk/build/aggregate/bottests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke.
by jbosstools-commits@lists.jboss.org
Author: jgargula
Date: 2012-03-06 11:33:43 -0500 (Tue, 06 Mar 2012)
New Revision: 39307
Modified:
trunk/build/aggregate/bottests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/DroolsViewsTest.java
Log:
Improved waiting for debugging before running tests.
Modified: trunk/build/aggregate/bottests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/DroolsViewsTest.java
===================================================================
--- trunk/build/aggregate/bottests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/DroolsViewsTest.java 2012-03-06 16:32:00 UTC (rev 39306)
+++ trunk/build/aggregate/bottests-site/tests/org.jboss.tools.drools.ui.bot.test/src/org/jboss/tools/drools/ui/bot/test/smoke/DroolsViewsTest.java 2012-03-06 16:33:43 UTC (rev 39307)
@@ -65,7 +65,9 @@
}
}
- bot.sleep(Timing.time2S());
+ while (eclipse.isDebugging() && !eclipse.isSuspendedAtBreakpoint()) {
+ bot.sleep(Timing.time2S());
+ }
isFirstTimeRun = false;
}
12 years, 10 months
JBoss Tools SVN: r39306 - in branches/jbosstools-3.3.0.Beta1/vpe/plugins: org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2012-03-06 11:32:00 -0500 (Tue, 06 Mar 2012)
New Revision: 39306
Modified:
branches/jbosstools-3.3.0.Beta1/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/PlatformUtil.java
branches/jbosstools-3.3.0.Beta1/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java
Log:
https://issues.jboss.org/browse/JBIDE-11048 : BrowserSim: wrong application name in the Mac OS X menu-bar: 'SWT' instead of 'BrowserSim'
Modified: branches/jbosstools-3.3.0.Beta1/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java 2012-03-06 16:26:18 UTC (rev 39305)
+++ branches/jbosstools-3.3.0.Beta1/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java 2012-03-06 16:32:00 UTC (rev 39306)
@@ -44,6 +44,7 @@
import org.eclipse.swt.widgets.Monitor;
import org.eclipse.swt.widgets.Shell;
import org.jboss.tools.vpe.browsersim.browser.BrowserSimBrowser;
+import org.jboss.tools.vpe.browsersim.browser.PlatformUtil;
import org.jboss.tools.vpe.browsersim.browser.WebKitBrowserFactory;
import org.jboss.tools.vpe.browsersim.model.Device;
import org.jboss.tools.vpe.browsersim.model.DeviceOrientation;
@@ -67,6 +68,10 @@
private ControlHandler controlHandler;
public static void main(String[] args) {
+ if (PlatformUtil.OS_MACOSX.equals(PlatformUtil.getOs())) {
+ // set application name for Mac OS X menu-bar https://issues.jboss.org/browse/JBIDE-11048
+ System.setProperty("com.apple.mrj.application.apple.menu.about.name", Messages.BrowserSim_BROWSER_SIM);//$NON-NLS-1$
+ }
String homeUrl;
if (args.length > 0) {
String lastArg = args[args.length - 1];
Modified: branches/jbosstools-3.3.0.Beta1/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/PlatformUtil.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/PlatformUtil.java 2012-03-06 16:26:18 UTC (rev 39305)
+++ branches/jbosstools-3.3.0.Beta1/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/PlatformUtil.java 2012-03-06 16:32:00 UTC (rev 39306)
@@ -17,13 +17,14 @@
*/
public class PlatformUtil {
+ public static final String OS_MACOSX = "macosx";
public static final String CURRENT_PLATFORM;
static {
String os = getOs();
String ws = getWs();
String arch = getArch();
- if ("macosx".equals(os) && "x86".equals(arch)) {
+ if (OS_MACOSX.equals(os) && "x86".equals(arch)) {
CURRENT_PLATFORM = ws + '.' + os; // special case for MacOSX x86 (its SWT bundle has name org.eclipse.swt.cocoa.macosx)
} else {
CURRENT_PLATFORM = ws + '.' + os + '.' + arch;
@@ -45,13 +46,13 @@
/*
* Copy of org.eclipse.swt.internal.Library.os()
*/
- private static String getOs() {
+ public static String getOs() {
String osName = System.getProperty("os.name"); //$NON-NLS-1$
if (osName.equals ("Linux")) return "linux"; //$NON-NLS-1$ $NON-NLS-2$
if (osName.equals ("AIX")) return "aix"; //$NON-NLS-1$ $NON-NLS-2$
if (osName.equals ("Solaris") || osName.equals ("SunOS")) return "solaris"; //$NON-NLS-1$ $NON-NLS-2$ $NON-NLS-3$
if (osName.equals ("HP-UX")) return "hpux"; //$NON-NLS-1$ $NON-NLS-2$
- if (osName.equals ("Mac OS X")) return "macosx"; //$NON-NLS-1$ $NON-NLS-2$
+ if (osName.equals ("Mac OS X")) return OS_MACOSX; //$NON-NLS-1$ $NON-NLS-2$
if (osName.startsWith ("Win")) return "win32"; //$NON-NLS-1$ $NON-NLS-2$
return osName;
}
12 years, 10 months
JBoss Tools SVN: r39305 - in trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot: helper and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rhopp
Date: 2012-03-06 11:26:18 -0500 (Tue, 06 Mar 2012)
New Revision: 39305
Modified:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CentralAllBotTests.java
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsTest.java
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/DocumentationSectionTest.java
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/helper/WithDataMatcher.java
Log:
Changes needed to run on JBT 3.3.0.Beta1
Modified: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CentralAllBotTests.java
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CentralAllBotTests.java 2012-03-06 16:23:01 UTC (rev 39304)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CentralAllBotTests.java 2012-03-06 16:26:18 UTC (rev 39305)
@@ -7,9 +7,9 @@
@RunWith(RequirementAwareSuite.class)
@SuiteClasses({
//BaseFunctionalityTest.class,
- //CreateProjectsTest.class
+ CreateProjectsTest.class
//DocumentationSectionTest.class
- EmptyTestForHudson.class
+ //EmptyTestForHudson.class
})
public class CentralAllBotTests {
Modified: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsTest.java
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsTest.java 2012-03-06 16:23:01 UTC (rev 39304)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsTest.java 2012-03-06 16:26:18 UTC (rev 39305)
@@ -15,11 +15,12 @@
import org.jboss.tools.ui.bot.ext.parts.SWTBotBrowserExt;
import org.jboss.tools.ui.bot.ext.parts.SWTBotTwistie;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.jboss.tools.ui.bot.ext.wizards.SWTBotWizard;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
-//@Require(server=(a)org.jboss.tools.ui.bot.ext.config.Annotations.Server(type=ServerType.JbossAS))
+@Require(server=(a)org.jboss.tools.ui.bot.ext.config.Annotations.Server(type=ServerType.JbossAS))
public class CreateProjectsTest extends SWTTestExt{
private static final String JBOSS_INSTALL_PATH = "/tmp/jbossAS";
@@ -45,49 +46,50 @@
assertTrue("New Dynamic Web Project should have appeared", bot.shell(IDELabel.JBossCentralEditor.NEW_DYNAMIC_WEB_PROJECT).isActive());
bot.activeShell().close();
//Openshift app
+ log.info(bot.activeShell().getText());
bot.hyperlink(IDELabel.JBossCentralEditor.OPENSHIFT_APP).click();
bot.waitForShell(IDELabel.JBossCentralEditor.OPENSHIFT_APP_WIZARD);
//assertTrue("New Dynamic Web Project should have appeared", bot.shell(IDELabel.JBossCentralEditor.OPENSHIFT_APP_WIZARD).isActive());
bot.activeShell().close();
//check Project example and detection of server
- /*formsBot.formTextWithText(IDELabel.JBossCentralEditor.JAVA_EE_WEB_PROJECT).click();
- SWTBotShell projectExampleShell = bot.waitForShell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE);
- assertTrue("Project Example window should have appeared", bot.shell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE).isActive());
- try{
- bot.clickButton("Install");
- SWTBotShell shell = bot.waitForShell(IDELabel.Menu.PREFERENCES);
- if (shell == null){
- fail("Preferences shell should have appeared");
- }
- bot.activeShell().close();
- }catch(WidgetNotFoundException wnfex){
- fail("Missing Install button");
- }
- try{
- projectExampleShell.activate();
- bot.clickButton("Download and Install...");
- }catch(WidgetNotFoundException wnfex){
- fail("Missing \"Download and Install\" button");
- }
+// formsBot.formTextWithText(IDELabel.JBossCentralEditor.JAVA_EE_WEB_PROJECT).click();
+// //bot.hyperlink(IDELabel.JBossCentralEditor.JAVA_EE_WEB_PROJECT).click();
+// SWTBotShell projectExampleShell = bot.waitForShell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE);
+// assertTrue("Project Example window should have appeared", bot.shell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE).isActive());
+// try{
+// bot.clickButton("Install");
+// SWTBotShell shell = bot.waitForShell(IDELabel.Menu.PREFERENCES);
+// if (shell == null){
+// fail("Preferences shell should have appeared");
+// }
+// bot.activeShell().close();
+// }catch(WidgetNotFoundException wnfex){
+// fail("Missing Install button");
+// }
+// try{
+// projectExampleShell.activate();
+// bot.clickButton("Download and Install...");
+// }catch(WidgetNotFoundException wnfex){
+// fail("Missing \"Download and Install\" button");
+// }
+//
+// //create direcotry where will be JBossAS downloaded
+// if(!createDirectory(JBOSS_INSTALL_PATH)){
+// fail("Unable to create direcory for JBoss - \""+JBOSS_INSTALL_PATH+"\"");
+// }
+//
+// bot.textWithLabel("Install folder:").setText(JBOSS_INSTALL_PATH);
+// bot.textWithLabel("Download folder:").setText("/tmp");
+// bot.clickButton("OK");
+// bot.waitForShell("Progress Information");
+// util.waitForNonIgnoredJobs(Long.MAX_VALUE);
+// //bot.waitUntil(Conditions.shellCloses(bot.activeShell()), Long.MAX_VALUE, TIME_5S);
+// projectExampleShell.close();
- //create direcotry where will be JBossAS downloaded
- if(!createDirectory(JBOSS_INSTALL_PATH)){
- fail("Unable to create direcory for JBoss - \""+JBOSS_INSTALL_PATH+"\"");
- }
-
- bot.textWithLabel("Install folder:").setText(JBOSS_INSTALL_PATH);
- bot.textWithLabel("Download folder:").setText("/tmp");
- bot.clickButton("OK");
- bot.waitForShell("Progress Information");
- bot.sleep(TIME_1S);
- util.waitForNonIgnoredJobs(Long.MAX_VALUE);
- //bot.waitUntil(Conditions.shellCloses(bot.activeShell()), Long.MAX_VALUE, TIME_5S);
- projectExampleShell.close();
- bot.sleep(TIME_1S);*/
-
//server should be added.. check again
- formsBot.formTextWithText(IDELabel.JBossCentralEditor.JAVA_EE_WEB_PROJECT).click();
+ //formsBot.formTextWithText(IDELabel.JBossCentralEditor.JAVA_EE_WEB_PROJECT).click();
+ bot.hyperlink(IDELabel.JBossCentralEditor.JAVA_EE_WEB_PROJECT).click();
SWTBotShell projectExampleShell = bot.waitForShell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE);
assertTrue("Project Example window should have appeared", bot.shell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE).isActive());
try{
@@ -96,28 +98,25 @@
}catch(WidgetNotFoundException wnfex){
//ok
}
- try{
- projectExampleShell.activate();
- bot.clickButton("Download and Install...");
- fail("Button \"Download and Install...\" should not be enabled, because all requirements should have been met");
- }catch(WidgetNotFoundException wnfex){
- //ok
- }
+ projectExampleShell.activate();
+ assertFalse("Button \"Download and Install...\" should not be enabled, because all requirements should have been met, condition", bot.button("Download and Install...").isEnabled());
+// bot.clickButton("Download and Install...");
+// fail("Button \"Download and Install...\" should not be enabled, because all requirements should have been met");
projectExampleShell.close();
//check the rest of project examples
- checkCreateProject(formsBot, IDELabel.JBossCentralEditor.JAVA_EE_WEB_PROJECT, IDELabel.JBossCentralEditor.NEW_JBOSS_PROJECT);
- checkCreateProject(formsBot, IDELabel.JBossCentralEditor.JAVA_EE_PROJECT, IDELabel.JBossCentralEditor.NEW_JBOSS_PROJECT);
- checkCreateProject(formsBot, IDELabel.JBossCentralEditor.HTML5_PROJECT, IDELabel.JBossCentralEditor.NEW_JBOSS_PROJECT);
- checkCreateProject(formsBot, IDELabel.JBossCentralEditor.SPRING_MVC_PROJECT, IDELabel.JBossCentralEditor.NEW_JBOSS_PROJECT);
- checkCreateProject(formsBot, IDELabel.JBossCentralEditor.RICHFACES_PROJECT, IDELabel.JBossCentralEditor.NEW_JBOSS_PROJECT);
+ checkCreateProject(IDELabel.JBossCentralEditor.JAVA_EE_WEB_PROJECT);
+ checkCreateProject(IDELabel.JBossCentralEditor.JAVA_EE_PROJECT);
+ checkCreateProject(IDELabel.JBossCentralEditor.HTML5_PROJECT);
+ checkCreateProject(IDELabel.JBossCentralEditor.SPRING_MVC_PROJECT);
+ checkCreateProject(IDELabel.JBossCentralEditor.RICHFACES_PROJECT);
bot.toolbarDropDownButtonWithTooltip("New").click();
bot.waitForShell("New");
assertTrue("Shell \"New\" should have appeared", bot.shell("New").isActive());
bot.activeShell().close();
}
- //@Test
+ @Test
public void projectExamplesSectionTest(){
SWTBotTwistie twistieBot = bot.twistieByLabel("JBoss Quickstarts");
while (!twistieBot.isExpanded()){
@@ -127,7 +126,12 @@
twistieBot.toggle();
}*/
SWTFormsBotExt formsBot = SWTBotFactory.getFormsBot();
- formsBot.formTextWithText("Helloworld").click();
+ checkExample(formsBot, "Helloworld");
+ checkExample(formsBot, "Numberguess");
+ checkExample(formsBot, "Login");
+ checkExample(formsBot, "Kitchensink");
+ checkExample(formsBot, "HTML5");
+ /*formsBot.formTextWithText("Helloworld").click();
bot.clickButton("Start");
bot.waitWhile(new NonSystemJobRunsCondition(), TaskDuration.NORMAL.getTimeout());
formsBot.formTextWithText("Numberguess").click();
@@ -139,7 +143,7 @@
bot.waitWhile(new NonSystemJobRunsCondition(),TaskDuration.NORMAL.getTimeout());
formsBot.formTextWithText("Kitchensink").click();
bot.clickButton("Start");
- bot.waitWhile(new NonSystemJobRunsCondition(), TaskDuration.NORMAL.getTimeout());
+ bot.waitWhile(new NonSystemJobRunsCondition(), TaskDuration.NORMAL.getTimeout());*/
}
private void waitForAWhile(){
@@ -168,13 +172,30 @@
return( path.delete() );
}
- private void checkCreateProject(SWTFormsBotExt formsBot, String formText, String wizzardShellText){
+ private void checkExample(SWTFormsBotExt formsBot, String formText){
formsBot.formTextWithText(formText).click();
bot.waitForShell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE);
- assertTrue("Project Example window should have appeared", bot.shell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE).isActive());
- bot.button("Start").click();
- bot.waitForShell(wizzardShellText);
- assertTrue(wizzardShellText+" should have appeared", bot.shell(wizzardShellText).isActive());
+ SWTBotWizard wizard = new SWTBotWizard(bot.shell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE).widget);
+ wizard.next();
+ wizard.finishWithWait();
bot.activeShell().close();
}
+
+ private void checkCreateProject(String formText){
+ //formsBot.formTextWithText(formText).click();
+ bot.hyperlink(formText).click();
+ bot.waitForShell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE);
+ SWTBotWizard wizard = new SWTBotWizard(bot.shell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE).widget);
+ wizard.next();
+ wizard.finishWithWait();
+ bot.activeShell().close();
+ if (bot.activeEditor().getTitle().equalsIgnoreCase("cheat sheets")){
+ bot.activeEditor().close();
+ }
+// assertTrue("Project Example window should have appeared", bot.shell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE).isActive());
+// bot.button("Start").click();
+// bot.waitForShell(wizzardShellText);
+// assertTrue(wizzardShellText+" should have appeared", bot.shell(wizzardShellText).isActive());
+// bot.activeShell().close();
+ }
}
Modified: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/DocumentationSectionTest.java
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/DocumentationSectionTest.java 2012-03-06 16:23:01 UTC (rev 39304)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/DocumentationSectionTest.java 2012-03-06 16:26:18 UTC (rev 39305)
@@ -1,5 +1,8 @@
package org.jboss.tools.central.test.ui.bot;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
import org.jboss.tools.ui.bot.ext.SWTTestExt;
import org.jboss.tools.ui.bot.ext.condition.BrowserIsLoaded;
import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
@@ -26,7 +29,6 @@
testHyperlinkToBrowser("Wiki");
testHyperlinkToBrowser("Screencasts");
testHyperlinkToBrowser("Issue Tracker");
- bot.sleep(TIME_10S);
}
private void testHyperlinkToBrowser(String hyperlinkText){
@@ -34,7 +36,11 @@
SWTBotBrowserExt browser = bot.browserExt();
bot.waitUntil(new BrowserIsLoaded(browser), TaskDuration.LONG.getTimeout());
assertFalse("JBoss Central sould not be active editor right now", bot.activeEditor().getTitle().equals("JBoss Central"));
+ //And also can't be empty page
System.out.println(browser.getText());
+ Pattern pattern = Pattern.compile(".*<body></body>.*", Pattern.DOTALL);
+ Matcher matcher = pattern.matcher(browser.getText());
+ assertFalse("Page cannot be empty", matcher.matches());
bot.activeEditor().close();
}
Modified: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/helper/WithDataMatcher.java
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/helper/WithDataMatcher.java 2012-03-06 16:23:01 UTC (rev 39304)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/helper/WithDataMatcher.java 2012-03-06 16:26:18 UTC (rev 39305)
@@ -1,4 +1,4 @@
-package org.jboss.tools.central.test.ui.bot.helper;
+/*package org.jboss.tools.central.test.ui.bot.helper;
import org.eclipse.swt.widgets.Widget;
import org.eclipse.swtbot.swt.finder.matchers.AbstractMatcher;
@@ -9,7 +9,7 @@
/*public WithDataMatcher(String key, String value, ) {
}*/
-
+ /*
//@Override
public void describeTo(Description description) {
description.appendText("testDescription");
@@ -23,3 +23,4 @@
}
}
+*/
\ No newline at end of file
12 years, 10 months
JBoss Tools SVN: r39304 - in trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext: condition and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: rhopp
Date: 2012-03-06 11:23:01 -0500 (Tue, 06 Mar 2012)
New Revision: 39304
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTFormsBotExt.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/condition/BrowserIsLoaded.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotFormTextExt.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotTwistie.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
Log:
Just a bunch of minor updates.
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTFormsBotExt.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTFormsBotExt.java 2012-03-06 15:05:16 UTC (rev 39303)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTFormsBotExt.java 2012-03-06 16:23:01 UTC (rev 39304)
@@ -57,7 +57,7 @@
}catch(WidgetNotFoundException ex){
throw new WidgetNotFoundException("Could not find widget of type FormText", ex);
}catch(IndexOutOfBoundsException ex){
- throw new ArrayIndexOutOfBoundsException("There is widget Form Text with such a index");
+ throw new ArrayIndexOutOfBoundsException("There is no widget Form Text with text: "+text+" and index: "+index);
}
}
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/condition/BrowserIsLoaded.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/condition/BrowserIsLoaded.java 2012-03-06 15:05:16 UTC (rev 39303)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/condition/BrowserIsLoaded.java 2012-03-06 16:23:01 UTC (rev 39304)
@@ -2,6 +2,8 @@
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
+import org.eclipse.swtbot.swt.finder.results.VoidResult;
import org.eclipse.swtbot.swt.finder.waits.ICondition;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.jboss.tools.ui.bot.ext.parts.SWTBotBrowserExt;
@@ -20,7 +22,7 @@
private SWTBotBrowserExt browser;
public BrowserIsLoaded(SWTBotBrowserExt browser){
- super();
+ browser.addProgressListenerToBrowser();
this.browser = browser;
}
@@ -38,7 +40,6 @@
@Override
public void init(SWTBot bot) {
- browser.addProgressListenerToBrowser();
this.bot = bot;
}
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotFormTextExt.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotFormTextExt.java 2012-03-06 15:05:16 UTC (rev 39303)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotFormTextExt.java 2012-03-06 16:23:01 UTC (rev 39304)
@@ -36,10 +36,9 @@
}
public AbstractSWTBotControl<FormText> click() {
- Event e = createEvent();
- e.text = getText();
- notify(SWT.MouseDown, e);
- return click(true);
+ setFocus();
+ keyboard().typeCharacter('\r');
+ return this;
}
public String selectedLinkText() {
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotTwistie.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotTwistie.java 2012-03-06 15:05:16 UTC (rev 39303)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotTwistie.java 2012-03-06 16:23:01 UTC (rev 39304)
@@ -8,6 +8,7 @@
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.results.BoolResult;
import org.eclipse.swtbot.swt.finder.results.StringResult;
+import org.eclipse.swtbot.swt.finder.results.VoidResult;
import org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBotControl;
import org.eclipse.ui.forms.widgets.Twistie;
import org.hamcrest.SelfDescribing;
@@ -50,8 +51,15 @@
* Toggles twistie (expands its section)
*/
public AbstractSWTBotControl<Twistie> toggle() {
- setFocus();
- keyboard().typeCharacter('\r');
+ syncExec(new VoidResult() {
+
+ @Override
+ public void run() {
+ clickXY(widget.getBounds().x+3, widget.getBounds().y+3);
+ }
+ });
+ /*setFocus();
+ keyboard().typeCharacter('\r');*/
return this;
}
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2012-03-06 15:05:16 UTC (rev 39303)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2012-03-06 16:23:01 UTC (rev 39304)
@@ -825,11 +825,11 @@
public static final String JAVA_EE_WEB_PROJECT = "Java EE Web Project";
public static final String HTML5_PROJECT = "HTML5 Project";
public static final String RICHFACES_PROJECT = "RichFaces Project";
- public static final String OPENSHIFT_APP = "OpenShift Express Application";
+ public static final String OPENSHIFT_APP = "OpenShift Application";
public static final String JAVA_EE_PROJECT = "Java EE Project";
public static final String SPRING_MVC_PROJECT = "Spring MVC Project";
public static final String NEW_DYNAMIC_WEB_PROJECT = "New Dynamic Web Project";
- public static final String PROJECT_EXAMPLE = "Project Example";
+ public static final String PROJECT_EXAMPLE = "New Project Example";
public static final String NEW_JBOSS_PROJECT = "New JBoss Project";
public static final String OPENSHIFT_APP_WIZARD = "New OpenShift Express Application";
}
12 years, 10 months
JBoss Tools SVN: r39303 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2012-03-06 10:05:16 -0500 (Tue, 06 Mar 2012)
New Revision: 39303
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ErrorLogView.java
Log:
ErrorLog bot ext delete method added
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ErrorLogView.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ErrorLogView.java 2012-03-06 14:48:49 UTC (rev 39302)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ErrorLogView.java 2012-03-06 15:05:16 UTC (rev 39303)
@@ -1,6 +1,8 @@
package org.jboss.tools.ui.bot.ext.view;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.swt.finder.waits.Conditions;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
@@ -13,6 +15,9 @@
*/
public class ErrorLogView extends ViewBase {
+ /**
+ * logs all error log messages into a logger
+ */
public void logMessages() {
SWTBotTreeItem[] items = getView().bot().tree().getAllItems();
for (SWTBotTreeItem i : items)
@@ -29,16 +34,38 @@
log.info(item.getText());
}
+ /**
+ * clear error log (temporarily)
+ */
public void clear() {
ContextMenuHelper.clickContextMenu(getView().bot().tree(),
"Clear Log Viewer");
+
+ log.info("Error log cleared");
}
+
+ /**
+ * deletes error log permanently
+ */
+ public void delete() {
+ ContextMenuHelper.clickContextMenu(getView().bot().tree(),
+ "Delete Log");
+
+ SWTBotShell shell = bot.shell("Confirm Delete").activate();
+ shell.bot().button("OK").click();
+ bot.waitUntil(Conditions.shellCloses(shell));
+ log.info("Error log content deleted");
+ }
private SWTBotView getView() {
SWTBotView view = open.viewOpen(ActionItem.View.GeneralErrorLog.LABEL);
return view;
}
+ /**
+ *
+ * @return all item count in the error log tree
+ */
public int getRecordCount() {
int count = getView().bot().tree().getAllItems().length;
return count;
12 years, 10 months
JBoss Tools SVN: r39302 - workspace.
by jbosstools-commits@lists.jboss.org
Author: mickael_istria
Date: 2012-03-06 09:48:49 -0500 (Tue, 06 Mar 2012)
New Revision: 39302
Added:
workspace/mistria/
Log:
12 years, 10 months
JBoss Tools SVN: r39301 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2012-03-06 08:48:49 -0500 (Tue, 06 Mar 2012)
New Revision: 39301
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ErrorLogView.java
Log:
ErrorLogView bot ext added
Added: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ErrorLogView.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ErrorLogView.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ErrorLogView.java 2012-03-06 13:48:49 UTC (rev 39301)
@@ -0,0 +1,47 @@
+package org.jboss.tools.ui.bot.ext.view;
+
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+
+/**
+ * Error Log view SWTBot Extensions
+ *
+ * @author jpeterka
+ *
+ */
+public class ErrorLogView extends ViewBase {
+
+ public void logMessages() {
+ SWTBotTreeItem[] items = getView().bot().tree().getAllItems();
+ for (SWTBotTreeItem i : items)
+ passTree(i);
+ }
+
+ private void passTree(SWTBotTreeItem item) {
+ int i = 0;
+ item.expand();
+ while (!item.getNodes().isEmpty() && i < item.getNodes().size()) {
+ passTree(item.getNode(i));
+ i++;
+ }
+ log.info(item.getText());
+ }
+
+ public void clear() {
+ ContextMenuHelper.clickContextMenu(getView().bot().tree(),
+ "Clear Log Viewer");
+ }
+
+ private SWTBotView getView() {
+ SWTBotView view = open.viewOpen(ActionItem.View.GeneralErrorLog.LABEL);
+ return view;
+ }
+
+ public int getRecordCount() {
+ int count = getView().bot().tree().getAllItems().length;
+ return count;
+ }
+
+}
Property changes on: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ErrorLogView.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
12 years, 10 months
JBoss Tools SVN: r39300 - in trunk/documentation/whatsnew/forge: images and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2012-03-06 06:08:22 -0500 (Tue, 06 Mar 2012)
New Revision: 39300
Added:
trunk/documentation/whatsnew/forge/forge-news-3.3.0.Beta1.html
trunk/documentation/whatsnew/forge/images/3.3.0.Beta1/
trunk/documentation/whatsnew/forge/images/3.3.0.Beta1/about.png
trunk/documentation/whatsnew/forge/images/3.3.0.Beta1/cd.png
trunk/documentation/whatsnew/forge/images/3.3.0.Beta1/link_with_editor.png
trunk/documentation/whatsnew/forge/images/3.3.0.Beta1/startup.png
Log:
JBIDE-11030: Forge Component N&N for 3.3.0.Beta1
Added: trunk/documentation/whatsnew/forge/forge-news-3.3.0.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/forge/forge-news-3.3.0.Beta1.html (rev 0)
+++ trunk/documentation/whatsnew/forge/forge-news-3.3.0.Beta1.html 2012-03-06 11:08:22 UTC (rev 39300)
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Language" content="en-us" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<link rel="stylesheet" href="../whatsnew.css"/>
+<title>Forge Tools 3.3.0.Beta1 What's New</title>
+<script type="text/javascript">
+
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-17645367-5']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+
+</script></head>
+<body>
+<h1>Forge Tools 3.3.0.Beta1 What's New</h1>
+
+ <p align="right"><a href="../index.html">< Main Index</a> <a
+ href="">Other Tools ></a></p>
+
+
+<table border="0" cellpadding="10" cellspacing="0" width="80%">
+
+ <tr>
+ <td colspan="2">
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="right"><a name="itemname3" id="itemname3"></a><b>New Embedded Forge Runtime</b></td>
+ <td valign="top">
+ <p>The embedded runtime is now Forge 1.0.0.Final!</p>
+ <p><img src="images/3.3.0.Beta1/about.png" /></p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="right"><a name="itemname3" id="itemname3"></a><b>Link with Editor</b></td>
+ <td valign="top">
+ <p>The Forge console now contains a toolbar button called 'Link with Editor'. This button, much
+ like the analogous button on the different explorer windows make sure that the selection of an
+ open editor cause Forge to 'pick-up' the contents of this editor. </p>
+ <p><img src="images/3.3.0.Beta1/link_with_editor.png"/></p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="right"><a name="itemname3" id="itemname3"></a><b>Support for the 'cd' command</b></td>
+ <td valign="top">
+ <p>Issuing a 'cd' will select the current resources in the open navigator view. If the resource is not
+ in the workspace and the Remote Systems Explorer View is open, it will be selected in this last view.
+ This is similar to the behaviour of the 'pick-up' command, except that the resources are not opened in
+ an editor.</p>
+ <p><img src="images/3.3.0.Beta1/cd.png" /></p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="right"><a name="itemname3" id="itemname3"></a><b>Automatic Startup of Forge</b></td>
+ <td valign="top">
+ <p>Forge offers now the possibility of an automatic startup at Eclipse startup time. This property
+ is controlled by a preference with which users can enable/disable the behaviour.</p>
+ <p><img src="images/3.3.0.Beta1/startup.png" /></p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="right"><a name="itemname3" id="itemname3"></a><b>'Usability Improvements'</b></td>
+ <td valign="top">
+ <p>A number of improvements have been implemented. Such as there are:</p>
+ <ul>
+ <li>the 'Show In->Forge Console' functionality offers to start Forge when it is not yet running.</li>
+ <li>path issues with 'Show In->Forge Console' on Windows have been tackled.</li>
+ <li>the Forge runtime and its console have been decoupled. This allows to close the console while Forge is running. Reopening the console view gets you back where you were.</li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr/>
+ </td>
+ </tr>
+</table>
+
+</body>
+
+</html>
+
+
Property changes on: trunk/documentation/whatsnew/forge/forge-news-3.3.0.Beta1.html
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/documentation/whatsnew/forge/images/3.3.0.Beta1/about.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/forge/images/3.3.0.Beta1/about.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/forge/images/3.3.0.Beta1/cd.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/forge/images/3.3.0.Beta1/cd.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/forge/images/3.3.0.Beta1/link_with_editor.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/forge/images/3.3.0.Beta1/link_with_editor.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/forge/images/3.3.0.Beta1/startup.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/forge/images/3.3.0.Beta1/startup.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
12 years, 10 months
JBoss Tools SVN: r39299 - branches/jbosstools-3.3.0.Beta1/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-03-06 05:02:05 -0500 (Tue, 06 Mar 2012)
New Revision: 39299
Modified:
branches/jbosstools-3.3.0.Beta1/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsResourceMethod.java
Log:
Fixed JBIDE-11068
Applied patch, again...
Modified: branches/jbosstools-3.3.0.Beta1/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsResourceMethod.java
===================================================================
--- branches/jbosstools-3.3.0.Beta1/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsResourceMethod.java 2012-03-06 08:39:50 UTC (rev 39298)
+++ branches/jbosstools-3.3.0.Beta1/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsResourceMethod.java 2012-03-06 10:02:05 UTC (rev 39299)
@@ -60,8 +60,8 @@
private final static List<String> CONTEXT_TYPE_NAMES = new ArrayList<String>(
Arrays.asList("javax.ws.rs.core.HttpHeaders",
"javax.ws.rs.core.UriInfo", "javax.ws.rs.core.Request",
- "javax.servlet.HttpServletRequest",
- "javax.servlet.HttpServletResponse",
+ "javax.servlet.http.HttpServletRequest",
+ "javax.servlet.http.HttpServletResponse",
"javax.servlet.ServletConfig",
"javax.servlet.ServletContext",
"javax.ws.rs.core.SecurityContext"));
12 years, 10 months
JBoss Tools SVN: r39298 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-03-06 03:39:50 -0500 (Tue, 06 Mar 2012)
New Revision: 39298
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ExpressConsoleView.java
Log:
added class header and cleaned code
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ExpressConsoleView.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ExpressConsoleView.java 2012-03-06 05:49:37 UTC (rev 39297)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/console/ExpressConsoleView.java 2012-03-06 08:39:50 UTC (rev 39298)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.openshift.express.internal.ui.console;
import org.eclipse.swt.widgets.Composite;
@@ -6,6 +16,7 @@
import org.eclipse.ui.navigator.CommonViewer;
import org.jboss.tools.openshift.express.internal.core.console.IUserModelListener;
import org.jboss.tools.openshift.express.internal.core.console.UserModel;
+import org.jboss.tools.openshift.express.internal.ui.utils.DisposeUtils;
import com.openshift.express.client.IUser;
@@ -13,36 +24,37 @@
protected Object getInitialInput() {
return UserModel.getDefault();
}
+
protected CommonViewer createCommonViewer(Composite aParent) {
CommonViewer v = super.createCommonViewer(aParent);
UserModel.getDefault().addListener(this);
return v;
}
+
public void dispose() {
UserModel.getDefault().removeListener(this);
super.dispose();
}
-
+
public void refreshViewer() {
- Display.getDefault().asyncExec(new Runnable() {
+ Display.getDefault().asyncExec(new Runnable() {
public void run() {
- getCommonViewer().refresh();
+ if (!DisposeUtils.isDisposed(getCommonViewer())) {
+ getCommonViewer().refresh();
+ }
}
});
}
+
public void userAdded(IUser user) {
- if( getCommonViewer() != null && !getCommonViewer().getTree().isDisposed()) {
- refreshViewer();
- }
+ refreshViewer();
}
+
public void userRemoved(IUser user) {
- if( getCommonViewer() != null && !getCommonViewer().getTree().isDisposed()) {
- refreshViewer();
- }
+ refreshViewer();
}
+
public void userChanged(IUser user) {
- if( getCommonViewer() != null && !getCommonViewer().getTree().isDisposed()) {
- refreshViewer();
- }
+ refreshViewer();
}
}
12 years, 10 months