JBoss Tools SVN: r38829 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext.
by jbosstools-commits@lists.jboss.org
Author: jgargula
Date: 2012-02-16 11:19:04 -0500 (Thu, 16 Feb 2012)
New Revision: 38829
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTBotExt.java
Log:
Added methods for waiting for specific number of shells.
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTBotExt.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTBotExt.java 2012-02-16 15:58:22 UTC (rev 38828)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTBotExt.java 2012-02-16 16:19:04 UTC (rev 38829)
@@ -240,14 +240,8 @@
}
final int SLEEP_TIME = Timing.time2S();
- final int ATTEMPTS_TIMEOUT;
+ final int ATTEMPTS_TIMEOUT = getAttemptsTimeout((maxTimeout < 0 ? 30 : maxTimeout), SLEEP_TIME);
- if (maxTimeout < 0) {
- ATTEMPTS_TIMEOUT = 15;
- } else {
- ATTEMPTS_TIMEOUT = (int)Math.ceil((double)(maxTimeout * 1000) / (double)SLEEP_TIME);
- }
-
for (int i = 0; i <= ATTEMPTS_TIMEOUT; i++) {
for (SWTBotShell shell : shells()) {
if (shellTitle.equals(shell.getText())) {
@@ -263,6 +257,62 @@
}
/**
+ * Waits until there is desired number of shells.
+ * It is useful sometimes when you cannot address exactly
+ * what you are waiting for but you know that the right situation
+ * is when there is <code>desiredNumberOfSheels</code> of shells.
+ * For example you are waiting for closing of some dialog so there are
+ * two shells and after closing this dialog there is one desired shell.
+ *
+ * @param desiredNumberOfShells Number of desired shells.
+ * @param maxTimeout Maximum time to wait in seconds. If this value is negative,
+ * default timeout is used (30 seconds).
+ * @return Shells which exists after timeout or after achieving desired
+ * number of shells.
+ */
+ public SWTBotShell[] waitForNumberOfShells(final int desiredNumberOfShells, final int maxTimeout) {
+ final int SLEEP_TIME = Timing.time2S();
+ final int ATTEMPTS_TIMEOUT = getAttemptsTimeout((maxTimeout < 0 ? 30 : maxTimeout), SLEEP_TIME);
+
+ for (int i = 0; i < ATTEMPTS_TIMEOUT; i++) {
+ if (shells().length != desiredNumberOfShells) {
+ sleep(SLEEP_TIME);
+ } else {
+ break;
+ }
+ }
+
+ return shells();
+ }
+
+ /**
+ * Waits until there is desired number of shells which exist
+ * with default timeout (30 seconds).
+ *
+ * @param desiredNumberOfShells
+ * @return Shells which exists after timeout or after achieving desired
+ * number of shells.
+ */
+ public SWTBotShell[] waitForNumberOfShells(final int desiredNumberOfShells) {
+ return waitForNumberOfShells(desiredNumberOfShells, -1);
+ }
+
+ /**
+ * If you need a loop in which some condition is tested and you want to know
+ * how many loops should be done before timeout, give to this method <code>maxTimeout</code>
+ * in seconds and desired delay between loops and this method returns number of loops
+ * that should be done.
+ *
+ * @param maxTimeout Maximum waiting time in seconds.
+ * @param sleepTime Waiting time in milliseconds between attempts.
+ * @return Number of attempts which is approximately equals to <code>maxTimeout</code>
+ * with <code>sleepTime</code> in each loop.
+ */
+ private int getAttemptsTimeout(final int maxTimeout, final int sleepTime) {
+ return ((int)Math.ceil((double)(maxTimeout * 1000) / (double)sleepTime));
+ }
+
+ /**
* Returns current displayed checkboxes.
* There are included disabled checkboxes as well
* therefore it is necessary to check their states before use of them.
12 years, 7 months
JBoss Tools SVN: r38828 - trunk/forge/plugins/org.jboss.tools.forge.runtime/META-INF.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2012-02-16 10:58:22 -0500 (Thu, 16 Feb 2012)
New Revision: 38828
Modified:
trunk/forge/plugins/org.jboss.tools.forge.runtime/META-INF/MANIFEST.MF
Log:
fix compilation problem - take 4
Modified: trunk/forge/plugins/org.jboss.tools.forge.runtime/META-INF/MANIFEST.MF
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime/META-INF/MANIFEST.MF 2012-02-16 15:51:46 UTC (rev 38827)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime/META-INF/MANIFEST.MF 2012-02-16 15:58:22 UTC (rev 38828)
@@ -15,4 +15,7 @@
org.jboss.forge.shell.command,
org.jboss.forge.shell.events,
org.jboss.forge.shell.spi
+Bundle-ClassPath: modules/javax/inject/api/main/javax.inject-1.jar,
+ modules/javax/enterprise/api/main/cdi-api-1.0-SP4.jar,
+ modules/org/jboss/forge/shell/api/main/forge-shell-api-1.0.0.CR2.jar
12 years, 7 months
JBoss Tools SVN: r38827 - in trunk/forge: plugins/org.jboss.tools.forge.runtime/META-INF and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2012-02-16 10:51:46 -0500 (Thu, 16 Feb 2012)
New Revision: 38827
Modified:
trunk/forge/features/org.jboss.tools.forge.feature/feature.xml
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/META-INF/MANIFEST.MF
trunk/forge/plugins/org.jboss.tools.forge.runtime/META-INF/MANIFEST.MF
Log:
fix compilation problem - take 3
Modified: trunk/forge/features/org.jboss.tools.forge.feature/feature.xml
===================================================================
--- trunk/forge/features/org.jboss.tools.forge.feature/feature.xml 2012-02-16 15:48:14 UTC (rev 38826)
+++ trunk/forge/features/org.jboss.tools.forge.feature/feature.xml 2012-02-16 15:51:46 UTC (rev 38827)
@@ -29,7 +29,8 @@
id="org.jboss.tools.forge.runtime"
download-size="0"
install-size="0"
- version="0.0.0"/>
+ version="0.0.0"
+ unpack="false"/>
<plugin
id="org.jboss.tools.forge.core"
@@ -42,6 +43,7 @@
id="org.jboss.tools.forge.runtime.ext"
download-size="0"
install-size="0"
- version="0.0.0"/>
+ version="0.0.0"
+ unpack="false"/>
</feature>
Modified: trunk/forge/plugins/org.jboss.tools.forge.runtime/META-INF/MANIFEST.MF
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime/META-INF/MANIFEST.MF 2012-02-16 15:48:14 UTC (rev 38826)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime/META-INF/MANIFEST.MF 2012-02-16 15:51:46 UTC (rev 38827)
@@ -4,9 +4,6 @@
Bundle-SymbolicName: org.jboss.tools.forge.runtime
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ClassPath: modules/javax/inject/api/main/javax.inject-1.jar,
- modules/javax/enterprise/api/main/cdi-api-1.0-SP4.jar,
- modules/org/jboss/forge/shell/api/main/forge-shell-api-1.0.0-SNAPSHOT.jar
Bundle-Vendor: JBoss by Red Hat
Eclipse-BundleShape: dir
Export-Package: javax.enterprise.event,
Modified: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/META-INF/MANIFEST.MF
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/META-INF/MANIFEST.MF 2012-02-16 15:48:14 UTC (rev 38826)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/META-INF/MANIFEST.MF 2012-02-16 15:51:46 UTC (rev 38827)
@@ -4,5 +4,6 @@
Bundle-SymbolicName: org.jboss.tools.forge.runtime.ext
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Eclipse-BundleShape: dir
Bundle-Vendor: JBoss by Red Hat
Bundle-ClassPath: bin/
12 years, 7 months
JBoss Tools SVN: r38826 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-02-16 10:48:14 -0500 (Thu, 16 Feb 2012)
New Revision: 38826
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
Log:
[JBIDE-10910] properly checking if existing applications are loaded by using a flag
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-02-16 15:38:34 UTC (rev 38825)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-02-16 15:48:14 UTC (rev 38826)
@@ -660,8 +660,10 @@
public void run() {
loadOpenshiftResources(dbc);
enableApplicationWidgets(pageModel.isUseExistingApplication());
+ // this is needed because of weird issues with UI not
+ // reacting to model changes while wizard runnable is
+ // run. We force another update
dbc.updateModels();
- dbc.updateTargets();
}
});
}
12 years, 7 months
JBoss Tools SVN: r38825 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-02-16 10:38:34 -0500 (Thu, 16 Feb 2012)
New Revision: 38825
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java
Log:
[JBIDE-10910] properly checking if existing applications are loaded by using a flag
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-02-16 15:01:08 UTC (rev 38824)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-02-16 15:38:34 UTC (rev 38825)
@@ -11,7 +11,6 @@
package org.jboss.tools.openshift.express.internal.ui.wizard;
import java.util.Collection;
-import java.util.List;
import java.util.Set;
import org.eclipse.core.databinding.DataBindingContext;
@@ -174,14 +173,12 @@
.align(SWT.LEFT, SWT.CENTER).hint(100, SWT.DEFAULT).span(1, 1).grab(false, false)
.applyTo(browseAppsButton);
// observe the list of application, get notified once they have been
- // loaded
- final IObservableValue existingAppsObservable =
- BeanProperties.value(
- ApplicationConfigurationWizardPageModel.PROPERTY_EXISTING_APPLICATIONS).observe(pageModel);
-
+ IObservableValue existingApplicationsLoaded =
+ BeanProperties.value(ApplicationConfigurationWizardPageModel.PROPERTY_EXISTING_APPLICATIONS_LOADED)
+ .observe(pageModel);
final ApplicationToSelectNameValidator existingAppValidator =
new ApplicationToSelectNameValidator(
- useExistingAppBtnSelection, existingAppNameTextObservable, existingAppsObservable);
+ useExistingAppBtnSelection, existingAppNameTextObservable, existingApplicationsLoaded);
dbc.addValidationStatusProvider(existingAppValidator);
ControlDecorationSupport.create(
existingAppValidator, SWT.LEFT | SWT.TOP, null, new CustomControlDecorationUpdater(false));
@@ -202,7 +199,7 @@
}
private SelectionListener onBrowseApps() {
- return new SelectionListener() {
+ return new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -222,10 +219,6 @@
}
}
}
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- }
};
}
@@ -240,8 +233,8 @@
WidgetProperties.selection().observe(useExistingAppBtn);
useExistingApplication.addValueChangeListener(
- onUseExistingApplication(newAppConfigurationGroup, existingAppNameText,
- browseAppsButton));
+ onUseExistingApplication(
+ newAppConfigurationGroup, existingAppNameText, browseAppsButton));
this.newAppNameLabel = new Label(newAppConfigurationGroup, SWT.NONE);
newAppNameLabel.setText("Name:");
@@ -325,6 +318,15 @@
.span(2, 1).align(SWT.FILL, SWT.FILL).grab(true, true).applyTo(spacer);
}
+ /**
+ * Trieggered when the user checks "use existing application". It will
+ * enable/disable the application widgets and reset existing values.
+ *
+ * @param applicationConfigurationGroup
+ * @param applicationNameText
+ * @param applicationBrowseButton
+ * @return
+ */
private IValueChangeListener onUseExistingApplication(final Group
applicationConfigurationGroup,
final Text applicationNameText, final Button applicationBrowseButton) {
@@ -341,15 +343,6 @@
enableApplicationWidgets(useExisting);
}
}
-
- private void resetExistingApplication() {
- try {
- pageModel.resetExistingApplication();
- } catch (OpenShiftException e) {
- OpenShiftUIActivator.log(e);
- }
-
- }
};
}
@@ -365,9 +358,9 @@
private void enableApplicationWidgets(final Boolean useExisting) {
existingAppNameText.setEnabled(useExisting);
browseAppsButton.setEnabled(useExisting);
-
+
UIUtils.doForAllChildren(new IWidgetVisitor() {
-
+
@Override
public void visit(Control control) {
control.setEnabled(!useExisting);
@@ -375,6 +368,14 @@
}, newAppConfigurationGroup);
}
+ private void resetExistingApplication() {
+ try {
+ pageModel.resetExistingApplication();
+ } catch (OpenShiftException e) {
+ OpenShiftUIActivator.log(e);
+ }
+ }
+
private void fillCartridgesCombo(DataBindingContext dbc, Combo cartridgesCombo) {
dbc.bindList(WidgetProperties.items().observe(cartridgesCombo),
BeanProperties.list(ApplicationConfigurationWizardPageModel.PROPERTY_CARTRIDGES).observe(pageModel),
@@ -659,6 +660,8 @@
public void run() {
loadOpenshiftResources(dbc);
enableApplicationWidgets(pageModel.isUseExistingApplication());
+ dbc.updateModels();
+ dbc.updateTargets();
}
});
}
@@ -717,37 +720,40 @@
private final IObservableValue useExistingAppBtnbservable;
private final IObservableValue existingAppNameTextObservable;
- private final IObservableValue existingAppsObservable;
+ private final IObservableValue existingApplicationsLoadedObservable;
public ApplicationToSelectNameValidator(IObservableValue useExistingAppBtnbservable,
- IObservableValue existingAppNameTextObservable, IObservableValue existingAppsObservable) {
+ IObservableValue existingAppNameTextObservable, IObservableValue existingApplicationsLoadedObservable) {
this.useExistingAppBtnbservable = useExistingAppBtnbservable;
this.existingAppNameTextObservable = existingAppNameTextObservable;
- this.existingAppsObservable = existingAppsObservable;
+ this.existingApplicationsLoadedObservable = existingApplicationsLoadedObservable;
}
@Override
protected IStatus validate() {
final boolean useExistingApp = (Boolean) useExistingAppBtnbservable.getValue();
final String appName = (String) existingAppNameTextObservable.getValue();
- @SuppressWarnings("unchecked")
- final List<IApplication> existingApps = (List<IApplication>) existingAppsObservable.getValue();
+ final Boolean existingApplicationsLoaded = (Boolean) existingApplicationsLoadedObservable.getValue();
+
if (!useExistingApp) {
return ValidationStatus.ok();
}
- if (existingApps != null && appName != null && !appName.isEmpty()) {
- for (IApplication application : pageModel.getExistingApplications()) {
- if (application.getName().equalsIgnoreCase(appName)) {
- return ValidationStatus.ok();
- }
+ if (StringUtils.isEmpty(appName)) {
+ return ValidationStatus.cancel("Please select an existing OpenShift application");
+ }
+
+ if (existingApplicationsLoaded != null
+ && !existingApplicationsLoaded) {
+ return ValidationStatus.cancel("Existing applications are not loaded yet.");
+ } else {
+ if (!pageModel.hasApplication(appName)) {
+ return ValidationStatus.error(NLS.bind("The application \"{0}\" does not exist.", appName));
}
- return new Status(IStatus.ERROR, OpenShiftUIActivator.PLUGIN_ID,
- "The application '" + appName + "' does not exist.");
}
- return new Status(IStatus.CANCEL, OpenShiftUIActivator.PLUGIN_ID,
- "Select an existing OpenShift application.");
+ return ValidationStatus.ok();
+
}
@Override
@@ -778,19 +784,19 @@
return ValidationStatus.ok();
}
if (applicationName.isEmpty()) {
- return OpenShiftUIActivator.createCancelStatus(
+ return ValidationStatus.cancel(
"Select an alphanumerical name and a type for the application to create.");
}
if (!StringUtils.isAlphaNumeric(applicationName)) {
- return OpenShiftUIActivator.createErrorStatus(
+ return ValidationStatus.error(
"The name may only contain letters and numbers.");
}
if (pageModel.isExistingApplication(applicationName)) {
- return OpenShiftUIActivator.createErrorStatus(
+ return ValidationStatus.error(
"An application with the same name already exists on OpenShift.");
}
if (isExistingProject(applicationName)) {
- return OpenShiftUIActivator.createErrorStatus(
+ return ValidationStatus.error(
NLS.bind("A project {0} already exists in the workspace.", applicationName));
}
return ValidationStatus.ok();
@@ -840,6 +846,5 @@
targets.add(selectedCartridgeObservable);
return targets;
}
-
}
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java 2012-02-16 15:01:08 UTC (rev 38824)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPageModel.java 2012-02-16 15:38:34 UTC (rev 38825)
@@ -42,6 +42,7 @@
public static final String PROPERTY_SELECTED_CARTRIDGE = "selectedCartridge";
public static final String PROPERTY_APPLICATION_NAME = "applicationName";
public static final String PROPERTY_EXISTING_APPLICATIONS = "existingApplications";
+ public static final String PROPERTY_EXISTING_APPLICATIONS_LOADED = "existingApplicationsLoaded";
private final OpenShiftExpressApplicationWizardModel wizardModel;
@@ -51,6 +52,7 @@
private List<ICartridge> cartridges = new ArrayList<ICartridge>();
private List<IEmbeddableCartridge> embeddableCartridges = new ArrayList<IEmbeddableCartridge>();
private String existingApplicationName;
+ private boolean existingApplicationsLoaded = false;;
public ApplicationConfigurationWizardPageModel(OpenShiftExpressApplicationWizardModel wizardModel)
throws OpenShiftException {
@@ -127,13 +129,20 @@
IUser user = getUser();
if (user != null) {
setExistingApplications(user.getApplications());
+ setExistingApplicationsLoaded(true);
}
}
- public List<IApplication> getExistingApplications() {
- return existingApplications;
+ public void setExistingApplicationsLoaded(boolean loaded) {
+ firePropertyChange(PROPERTY_EXISTING_APPLICATIONS_LOADED
+ , this.existingApplicationsLoaded
+ , this.existingApplicationsLoaded = loaded);
}
+ public boolean isExistingApplicationsLoaded() {
+ return existingApplicationsLoaded;
+ }
+
public boolean isExistingApplication(String applicationName) {
for (IApplication application : getExistingApplications()) {
if (application.getName().equalsIgnoreCase(applicationName)) {
@@ -153,6 +162,10 @@
, this.existingApplications = existingApplications);
}
+ public List<IApplication> getExistingApplications() {
+ return existingApplications;
+ }
+
public void loadCartridges() throws OpenShiftException {
setCartridges(getUser().getCartridges());
refreshSelectedCartridge();
@@ -267,6 +280,16 @@
}
}
+ public boolean hasApplication(String applicationName) {
+ try {
+ return getUser().hasApplication(applicationName);
+ } catch (OpenShiftException e) {
+ OpenShiftUIActivator.log(
+ OpenShiftUIActivator.createErrorStatus("Could not get application by name", e));
+ return false;
+ }
+ }
+
public IApplication getApplication() {
return wizardModel.getApplication();
}
12 years, 7 months
JBoss Tools SVN: r38824 - in trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim: resources/config and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2012-02-16 10:01:08 -0500 (Thu, 16 Feb 2012)
New Revision: 38824
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DevicesList.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DevicesListStorage.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/resources/config/devices.cfg
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/EditDeviceDialog.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/ManageDevicesDialog.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/Messages.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/messages.properties
Log:
https://issues.jboss.org/browse/JBIDE-10431 : browsersim should be sexy
- added persistence for the "Use Skins" option
- added skin selection in the Add/Edit Device dialog
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DevicesList.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DevicesList.java 2012-02-16 14:55:06 UTC (rev 38823)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DevicesList.java 2012-02-16 15:01:08 UTC (rev 38824)
@@ -21,11 +21,12 @@
public class DevicesList extends Observable {
private List<Device> devices;
private int selectedDeviceIndex;
- private boolean useSkins = true;
+ private boolean useSkins;
- public DevicesList(List<Device> devices, int selectedDeviceIndex) {
+ public DevicesList(List<Device> devices, int selectedDeviceIndex, boolean useSkins) {
this.devices = devices;
this.selectedDeviceIndex = selectedDeviceIndex;
+ this.useSkins = useSkins;
}
public List<Device> getDevices() {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DevicesListStorage.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DevicesListStorage.java 2012-02-16 14:55:06 UTC (rev 38823)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/model/DevicesListStorage.java 2012-02-16 15:01:08 UTC (rev 38824)
@@ -33,7 +33,7 @@
private static final String DEFAULT_PREFERENCES_RESOURCE = "config/devices.cfg";
private static final String USER_PREFERENCES_FOLDER = "org.jboss.tools.vpe.browsersim";
private static final String USER_PREFERENCES_FILE = "devices.cfg";
- private static final int CURRENT_CONFIG_VERSION = 2;
+ private static final int CURRENT_CONFIG_VERSION = 3;
public static void saveUserDefinedDevicesList(DevicesList devicesList) {
File configFolder = new File(USER_PREFERENCES_FOLDER);
@@ -74,7 +74,7 @@
Device device = new Device("Default", 1024, 768, null, null);
List<Device> devices = new ArrayList<Device>();
devices.add(device);
- devicesList = new DevicesList(devices, 0);
+ devicesList = new DevicesList(devices, 0, true);
}
return devicesList;
@@ -85,6 +85,7 @@
writer.write("ConfigVersion=" + String.valueOf(CURRENT_CONFIG_VERSION) + "\n");
writer.write("SelectedDeviceIndex=" + String.valueOf(devicesList.getSelectedDeviceIndex()) + "\n");
+ writer.write("UseSkins=" + String.valueOf(devicesList.getUseSkins()) + "\n");
for (Device device : devicesList.getDevices()) {
writer.write( encode(device.getName() ));
@@ -116,6 +117,7 @@
List<Device> devices = null;
int selectedDeviceIndex = 0;
+ boolean useSkins = true;
try {
String nextLine;
@@ -137,6 +139,14 @@
}
}
+ if ((nextLine = reader.readLine()) != null) {
+ Pattern pattern = Pattern.compile("UseSkins=(true|false)");
+ Matcher matcher = pattern.matcher(nextLine);
+ if (matcher.matches()) {
+ useSkins = Boolean.parseBoolean(matcher.group(1));
+ }
+ }
+
Pattern devicePattern = Pattern.compile("^(.*)\\t(\\-?[0-9]+)\\t(\\-?[0-9]+)\\t(.+)?\\t(.+)?$");
devices = new ArrayList<Device>();
@@ -164,7 +174,7 @@
if (devices == null || devices.size() <= selectedDeviceIndex) {
return null;
} else {
- return new DevicesList(devices, selectedDeviceIndex);
+ return new DevicesList(devices, selectedDeviceIndex, useSkins);
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/resources/config/devices.cfg
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/resources/config/devices.cfg 2012-02-16 14:55:06 UTC (rev 38823)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/resources/config/devices.cfg 2012-02-16 15:01:08 UTC (rev 38824)
@@ -1,5 +1,6 @@
-ConfigVersion=2
+ConfigVersion=3
SelectedDeviceIndex=2
+UseSkins=true
Desktop (Default User-Agent) 1024 768
Apple iPad 2 768 1024 Mozilla/5.0 (iPad; U; CPU OS 4_3_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8G4 Safari/6533.18.5 Apple iPhone 3
Apple iPhone 3 320 480 Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7 Apple iPhone 3
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/EditDeviceDialog.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/EditDeviceDialog.java 2012-02-16 14:55:06 UTC (rev 38823)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/EditDeviceDialog.java 2012-02-16 15:01:08 UTC (rev 38824)
@@ -10,6 +10,12 @@
******************************************************************************/
package org.jboss.tools.vpe.browsersim.ui;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent;
@@ -21,6 +27,7 @@
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Dialog;
import org.eclipse.swt.widgets.Display;
@@ -28,6 +35,7 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.jboss.tools.vpe.browsersim.model.Device;
+import org.jboss.tools.vpe.browsersim.model.SkinMap;
/**
* @author Yahor Radtsevich (yradtsevich)
@@ -43,6 +51,8 @@
private Button checkButtonWidth;
private Button checkButtonHeight;
private Button checkButtonUserAgent;
+ private Combo comboSkin;
+ private List<String> skinIds;
/**
* Create the dialog.
@@ -134,6 +144,23 @@
attachCheckBoxToText(checkButtonUserAgent, textUserAgent);
+ Label labelSkin = new Label(shell, SWT.NONE);
+ labelSkin.setText(Messages.EditDeviceDialog_SKIN);
+
+ comboSkin = new Combo (shell, SWT.READ_ONLY);
+ comboSkin.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
+
+ skinIds = new ArrayList<String>(SkinMap.getInstance().getSkinIds());
+ Collections.sort(skinIds, new Comparator<String>() {
+ @Override
+ public int compare(String o1, String o2) {
+ return o1.toLowerCase().compareTo(o2.toLowerCase());
+ }
+ });
+ skinIds.add(0, Messages.EditDeviceDialog_NONE);
+ comboSkin.setItems(skinIds.toArray(new String[0]));
+ comboSkin.setText(initialDevice.getSkinId() == null ? Messages.EditDeviceDialog_NONE : initialDevice.getSkinId());
+
Composite composite = new Composite(shell, SWT.NONE);
composite.setLayout(new FillLayout(SWT.HORIZONTAL));
composite.setLayoutData(new GridData(SWT.RIGHT, SWT.BOTTOM, true, true, 2, 1));
@@ -146,7 +173,7 @@
checkButtonWidth.getSelection() ? Integer.valueOf("0" + textWidth.getText()) : Device.DEFAULT_SIZE,
checkButtonHeight.getSelection() ? Integer.valueOf("0" + textHeight.getText()) : Device.DEFAULT_SIZE,
checkButtonUserAgent.getSelection() ? textUserAgent.getText() : null,
- null);
+ comboSkin.getSelectionIndex() == 0 ? null : skinIds.get(comboSkin.getSelectionIndex()));
shell.close();
}
});
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/ManageDevicesDialog.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/ManageDevicesDialog.java 2012-02-16 14:55:06 UTC (rev 38823)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/ManageDevicesDialog.java 2012-02-16 15:01:08 UTC (rev 38824)
@@ -79,7 +79,7 @@
*/
private void createContents() {
shell = new Shell(getParent(), getStyle());
- shell.setSize(450, 300);
+ shell.setSize(650, 450);
shell.setText(getText());
shell.setLayout(new GridLayout(2, false));
@@ -109,6 +109,10 @@
tableColumnUseragent.setWidth(100);
tableColumnUseragent.setText(Messages.ManageDevicesDialog_USER_AGENT);
+ TableColumn tableColumnSkin = new TableColumn(table, SWT.NONE);
+ tableColumnSkin.setWidth(100);
+ tableColumnSkin.setText(Messages.ManageDevicesDialog_SKIN);
+
Composite compositeControls = new Composite(shell, SWT.NONE);
compositeControls.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false, 1, 1));
compositeControls.setLayout(new FillLayout(SWT.VERTICAL));
@@ -188,7 +192,7 @@
shell.setDefaultButton(buttonOk);
buttonOk.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
- resultDevicesList = new DevicesList(devices, selectedDeviceIndex);
+ resultDevicesList = new DevicesList(devices, selectedDeviceIndex, oldDevicesList.getUseSkins());
shell.close();
}
});
@@ -214,7 +218,8 @@
device.getName(),
device.getWidth() == Device.DEFAULT_SIZE ? Messages.ManageDevicesDialog_DEFAULT : String.valueOf(device.getWidth()),
device.getHeight() == Device.DEFAULT_SIZE ? Messages.ManageDevicesDialog_DEFAULT : String.valueOf(device.getHeight()),
- device.getUserAgent() == null ? Messages.ManageDevicesDialog_DEFAULT : device.getUserAgent()
+ device.getUserAgent() == null ? Messages.ManageDevicesDialog_DEFAULT : device.getUserAgent(),
+ device.getSkinId() == null ? Messages.ManageDevicesDialog_NONE : device.getSkinId()
});
}
table.setSelection(selectedDeviceIndex);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/Messages.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/Messages.java 2012-02-16 14:55:06 UTC (rev 38823)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/Messages.java 2012-02-16 15:01:08 UTC (rev 38824)
@@ -34,7 +34,9 @@
public static String EditDeviceDialog_HEIGHT;
public static String EditDeviceDialog_MANAGE_DEVICES;
public static String EditDeviceDialog_NAME;
+ public static String EditDeviceDialog_NONE;
public static String EditDeviceDialog_OK;
+ public static String EditDeviceDialog_SKIN;
public static String EditDeviceDialog_USER_AGENT;
public static String EditDeviceDialog_WIDTH;
public static String ManageDevicesDialog_ADD;
@@ -44,11 +46,13 @@
public static String ManageDevicesDialog_EDIT;
public static String ManageDevicesDialog_HEIGHT;
public static String ManageDevicesDialog_NAME;
+ public static String ManageDevicesDialog_NONE;
public static String ManageDevicesDialog_NEW_DEVICE;
public static String ManageDevicesDialog_NEW_USER_AGENT;
public static String ManageDevicesDialog_OK;
public static String ManageDevicesDialog_REMOVE;
public static String ManageDevicesDialog_REVERT_ALL;
+ public static String ManageDevicesDialog_SKIN;
public static String ManageDevicesDialog_LOAD_DEFAULTS;
public static String ManageDevicesDialog_USER_AGENT;
public static String ManageDevicesDialog_WIDTH;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/messages.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/messages.properties 2012-02-16 14:55:06 UTC (rev 38823)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/messages.properties 2012-02-16 15:01:08 UTC (rev 38824)
@@ -15,7 +15,9 @@
EditDeviceDialog_HEIGHT=Height:
EditDeviceDialog_MANAGE_DEVICES=Manage Devices
EditDeviceDialog_NAME=Name:
+EditDeviceDialog_NONE=None
EditDeviceDialog_OK=OK
+EditDeviceDialog_SKIN=Skin:
EditDeviceDialog_USER_AGENT=User-Agent:
EditDeviceDialog_WIDTH=Width:
ManageDevicesDialog_ADD=Add
@@ -25,11 +27,13 @@
ManageDevicesDialog_EDIT=Edit
ManageDevicesDialog_HEIGHT=Height
ManageDevicesDialog_NAME=Name
+ManageDevicesDialog_NONE=None
ManageDevicesDialog_NEW_DEVICE=New Device
ManageDevicesDialog_NEW_USER_AGENT=New User-Agent
ManageDevicesDialog_OK=OK
ManageDevicesDialog_REMOVE=Remove
ManageDevicesDialog_REVERT_ALL=Revert All
+ManageDevicesDialog_SKIN=Skin
ManageDevicesDialog_LOAD_DEFAULTS=Load Defaults
ManageDevicesDialog_USER_AGENT=User-Agent
ManageDevicesDialog_WIDTH=Width
12 years, 7 months
JBoss Tools SVN: r38823 - in trunk/forge/plugins/org.jboss.tools.forge.runtime.ext: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2012-02-16 09:55:06 -0500 (Thu, 16 Feb 2012)
New Revision: 38823
Modified:
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/.classpath
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/META-INF/MANIFEST.MF
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/build.properties
Log:
fix compilation problem - take 2
Modified: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/.classpath
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/.classpath 2012-02-16 14:26:10 UTC (rev 38822)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/.classpath 2012-02-16 14:55:06 UTC (rev 38823)
@@ -3,6 +3,5 @@
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry combineaccessrules="false" kind="src" path="/org.jboss.tools.forge.runtime"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/META-INF/MANIFEST.MF
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/META-INF/MANIFEST.MF 2012-02-16 14:26:10 UTC (rev 38822)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/META-INF/MANIFEST.MF 2012-02-16 14:55:06 UTC (rev 38823)
@@ -5,5 +5,4 @@
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: JBoss by Red Hat
-Require-Bundle: org.jboss.tools.forge.runtime;bundle-version="1.0.0"
Bundle-ClassPath: bin/
Modified: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/build.properties
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/build.properties 2012-02-16 14:26:10 UTC (rev 38822)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/build.properties 2012-02-16 14:55:06 UTC (rev 38823)
@@ -4,3 +4,4 @@
jars.compile.order = bin/
source.bin/ = src/
output.bin/ = bin/
+additional.bundles = org.jboss.tools.forge.runtime
12 years, 7 months
JBoss Tools SVN: r38822 - trunk/cdi/tests/org.jboss.tools.cdi.bot.test.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-02-16 09:26:10 -0500 (Thu, 16 Feb 2012)
New Revision: 38822
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml
Log:
Increased timeout for executing cdi bot tests with maven to 3 hours
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml 2012-02-16 13:34:07 UTC (rev 38821)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml 2012-02-16 14:26:10 UTC (rev 38822)
@@ -25,8 +25,8 @@
<testClass>${test.suite.class}</testClass>
<useUIThread>false</useUIThread>
<skip>${swtbot.test.skip}</skip>
- <!-- Kill swt bot test take more than 90 minutes (5400 seconds) to finish -->
- <forkedProcessTimeoutInSeconds>5400</forkedProcessTimeoutInSeconds>
+ <!-- Kill swt bot test take more than 3 hours minutes (10800 seconds) to finish -->
+ <forkedProcessTimeoutInSeconds>10800</forkedProcessTimeoutInSeconds>
<dependencies combine.children="append">
<dependency>
<type>p2-installable-unit</type>
12 years, 7 months
JBoss Tools SVN: r38821 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2012-02-16 08:34:07 -0500 (Thu, 16 Feb 2012)
New Revision: 38821
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/BasicWorkbenchAdapter.java
Log:
https://issues.jboss.org/browse/JBIDE-10524
Do not add children if monitor is cancelled
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/BasicWorkbenchAdapter.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/BasicWorkbenchAdapter.java 2012-02-16 13:14:33 UTC (rev 38820)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/BasicWorkbenchAdapter.java 2012-02-16 13:34:07 UTC (rev 38821)
@@ -103,7 +103,10 @@
public void fetchDeferredChildren(Object object,
IElementCollector collector, IProgressMonitor monitor) {
try {
- collector.add(getChildren(object, monitor), monitor);
+ Object[] children = getChildren(object, monitor);
+ if (!monitor.isCanceled()){
+ collector.add(children, monitor);
+ }
collector.done();
} catch(Exception e) {
handleError(collector,object, e);
12 years, 7 months
JBoss Tools SVN: r38820 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-02-16 08:14:33 -0500 (Thu, 16 Feb 2012)
New Revision: 38820
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java
Log:
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java 2012-02-16 12:57:52 UTC (rev 38819)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/CredentialsWizardPageModel.java 2012-02-16 13:14:33 UTC (rev 38820)
@@ -101,7 +101,7 @@
password = store.getPassword();
setRememberPassword(!StringUtils.isEmpty(password));
} catch (SecurePasswordStoreException e) {
- Logger.error("Failed to retrieve OpenShift user's password from Secured Store", e);
+ Logger.error("Could not retrieve user password from Secured Store", e);
}
}
return password;
12 years, 7 months