JBoss Tools SVN: r44590 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-10-18 19:11:56 -0400 (Thu, 18 Oct 2012)
New Revision: 44590
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/DefinitionContext.java
Log:
JBIDE-12896
https://issues.jboss.org/browse/JBIDE-12896
Synchronized iteration over map entries in DefinitionContext.copy(boolean).
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/DefinitionContext.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/DefinitionContext.java 2012-10-18 22:28:28 UTC (rev 44589)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/DefinitionContext.java 2012-10-18 23:11:56 UTC (rev 44590)
@@ -85,52 +85,54 @@
ecopy.setRootContext(copy);
copy.extensions.add(ecopy);
}
- if(!clean) {
- copy.types.addAll(types);
- for (String qn: typeDefinitions.keySet()) {
- TypeDefinition d = typeDefinitions.get(qn);
- if(d.exists()) {
- copy.typeDefinitions.put(qn, d);
- } else {
- copy.types.remove(qn);
+ if(!clean) {
+ synchronized(this) {
+ copy.types.addAll(types);
+ for (String qn: typeDefinitions.keySet()) {
+ TypeDefinition d = typeDefinitions.get(qn);
+ if(d.exists()) {
+ copy.typeDefinitions.put(qn, d);
+ } else {
+ copy.types.remove(qn);
+ }
}
- }
- for (String qn: annotations.keySet()) {
- AnnotationDefinition d = annotations.get(qn);
- if(d.exists()) {
- copy.annotations.put(qn, d);
+ for (String qn: annotations.keySet()) {
+ AnnotationDefinition d = annotations.get(qn);
+ if(d.exists()) {
+ copy.annotations.put(qn, d);
+ }
}
- }
- copy.vetoedTypes.addAll(vetoedTypes);
+ copy.vetoedTypes.addAll(vetoedTypes);
- copy.packages.addAll(packages);
- for (String qn: packageDefinitions.keySet()) {
- PackageDefinition d = packageDefinitions.get(qn);
- if(d.exists()) {
- copy.packageDefinitions.put(qn, d);
- } else {
- packages.remove(qn);
+ copy.packages.addAll(packages);
+ for (String qn: packageDefinitions.keySet()) {
+ PackageDefinition d = packageDefinitions.get(qn);
+ if(d.exists()) {
+ copy.packageDefinitions.put(qn, d);
+ } else {
+ packages.remove(qn);
+ }
}
- }
- for (IPath p: resources.keySet()) {
- Set<String> set = resources.get(p);
- if(set != null) {
- Set<String> s1 = new HashSet<String>();
- s1.addAll(set);
- copy.resources.put(p, s1);
+ for (IPath p: resources.keySet()) {
+ Set<String> set = resources.get(p);
+ if(set != null) {
+ Set<String> s1 = new HashSet<String>();
+ s1.addAll(set);
+ copy.resources.put(p, s1);
+ }
}
- }
- for (IPath p: childPaths.keySet()) {
- Set<IPath> set = childPaths.get(p);
- if(set != null) {
- Set<IPath> s1 = new HashSet<IPath>();
- s1.addAll(set);
- copy.childPaths.put(p, s1);
+ for (IPath p: childPaths.keySet()) {
+ Set<IPath> set = childPaths.get(p);
+ if(set != null) {
+ Set<IPath> s1 = new HashSet<IPath>();
+ s1.addAll(set);
+ copy.childPaths.put(p, s1);
+ }
}
+ copy.beanXMLs.putAll(beanXMLs);
+ copy.dependencies = dependencies;
}
- copy.beanXMLs.putAll(beanXMLs);
- copy.dependencies = dependencies;
}
return copy;
12 years, 2 months
JBoss Tools SVN: r44589 - in trunk/forge/plugins/org.jboss.tools.forge.runtime: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2012-10-18 18:28:28 -0400 (Thu, 18 Oct 2012)
New Revision: 44589
Modified:
trunk/forge/plugins/org.jboss.tools.forge.runtime/
trunk/forge/plugins/org.jboss.tools.forge.runtime/.classpath
trunk/forge/plugins/org.jboss.tools.forge.runtime/META-INF/MANIFEST.MF
trunk/forge/plugins/org.jboss.tools.forge.runtime/build.properties
trunk/forge/plugins/org.jboss.tools.forge.runtime/pom.xml
Log:
JBIDE-12904: Update Forge Embedded Runtime to 1.1.1.Final
Property changes on: trunk/forge/plugins/org.jboss.tools.forge.runtime
___________________________________________________________________
Modified: svn:ignore
- forge-distribution-1.0.3.Final
target
forge-distribution-1.0.4.Final
forge-distribution-1.0.5.Final
forge-distribution-1.0.6.Final
+ forge-distribution-1.0.3.Final
target
forge-distribution-1.0.4.Final
forge-distribution-1.0.5.Final
forge-distribution-1.0.6.Final
forge-distribution-1.1.1.Final
Modified: trunk/forge/plugins/org.jboss.tools.forge.runtime/.classpath
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime/.classpath 2012-10-18 20:39:27 UTC (rev 44588)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime/.classpath 2012-10-18 22:28:28 UTC (rev 44589)
@@ -3,8 +3,8 @@
<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 exported="true" kind="lib" path="forge-distribution-1.0.6.Final/modules/javax/inject/api/main/javax.inject-1.jar"/>
- <classpathentry exported="true" kind="lib" path="forge-distribution-1.0.6.Final/modules/javax/enterprise/api/main/cdi-api-1.0-SP4.jar"/>
- <classpathentry exported="true" kind="lib" path="forge-distribution-1.0.6.Final/modules/org/jboss/forge/shell/api/main/forge-shell-api-1.0.6.Final.jar"/>
+ <classpathentry exported="true" kind="lib" path="forge-distribution-1.1.1.Final/modules/javax/inject/api/main/javax.inject-1.jar"/>
+ <classpathentry exported="true" kind="lib" path="forge-distribution-1.1.1.Final/modules/javax/enterprise/api/main/cdi-api-1.0-SP4.jar"/>
+ <classpathentry exported="true" kind="lib" path="forge-distribution-1.1.1.Final/modules/org/jboss/forge/shell/api/main/forge-shell-api-1.1.1.Final.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
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-10-18 20:39:27 UTC (rev 44588)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime/META-INF/MANIFEST.MF 2012-10-18 22:28:28 UTC (rev 44589)
@@ -16,6 +16,6 @@
org.jboss.forge.shell.command,
org.jboss.forge.shell.events,
org.jboss.forge.shell.spi
-Bundle-ClassPath: forge-distribution-1.0.6.Final/modules/javax/inject/api/main/javax.inject-1.jar,
- forge-distribution-1.0.6.Final/modules/javax/enterprise/api/main/cdi-api-1.0-SP4.jar,
- forge-distribution-1.0.6.Final/modules/org/jboss/forge/shell/api/main/forge-shell-api-1.0.6.Final.jar
+Bundle-ClassPath: forge-distribution-1.1.1.Final/modules/javax/inject/api/main/javax.inject-1.jar,
+ forge-distribution-1.1.1.Final/modules/javax/enterprise/api/main/cdi-api-1.0-SP4.jar,
+ forge-distribution-1.1.1.Final/modules/org/jboss/forge/shell/api/main/forge-shell-api-1.1.1.Final.jar
Modified: trunk/forge/plugins/org.jboss.tools.forge.runtime/build.properties
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime/build.properties 2012-10-18 20:39:27 UTC (rev 44588)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime/build.properties 2012-10-18 22:28:28 UTC (rev 44589)
@@ -1,5 +1,5 @@
bin.includes = META-INF/,\
- forge-distribution-1.0.6.Final/,\
+ forge-distribution-1.1.1.Final/,\
plugin.properties
src.includes = *
jars.compile.order = .
Modified: trunk/forge/plugins/org.jboss.tools.forge.runtime/pom.xml
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime/pom.xml 2012-10-18 20:39:27 UTC (rev 44588)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime/pom.xml 2012-10-18 22:28:28 UTC (rev 44589)
@@ -28,7 +28,7 @@
<artifactItem>
<groupId>org.jboss.forge</groupId>
<artifactId>forge-distribution</artifactId>
- <version>1.0.6.Final</version>
+ <version>1.1.1.Final</version>
<type>zip</type>
</artifactItem>
</artifactItems>
12 years, 2 months
JBoss Tools SVN: r44588 - trunk/forge.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2012-10-18 16:39:27 -0400 (Thu, 18 Oct 2012)
New Revision: 44588
Removed:
trunk/forge/.settings/
Log:
remove .settings
12 years, 2 months
JBoss Tools SVN: r44587 - trunk/jsf/tests/org.jboss.tools.jsf.ui.test/META-INF.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-10-18 14:33:26 -0400 (Thu, 18 Oct 2012)
New Revision: 44587
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/META-INF/MANIFEST.MF
Log:
fixed jsf.ui.test dependency list
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/META-INF/MANIFEST.MF 2012-10-18 18:27:55 UTC (rev 44586)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/META-INF/MANIFEST.MF 2012-10-18 18:33:26 UTC (rev 44587)
@@ -41,6 +41,6 @@
org.eclipse.jdt.ui,
org.jboss.tools.common.ui,
org.jboss.tools.common.gef,
- org.jboss.tools.jsf.base.test;bundle-version="3.3.0"
+ org.jboss.tools.jsf.base.test
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
12 years, 2 months
JBoss Tools SVN: r44586 - trunk/central/site.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-10-18 14:27:55 -0400 (Thu, 18 Oct 2012)
New Revision: 44586
Modified:
trunk/central/site/category.xml
trunk/central/site/pom.xml
Log:
in order to be able to publish the discovery feature from the central site to the jbt aggregate site (then hide it) it needs to be exposed/visible on the central site - revert changes for JBIDE-12389
Modified: trunk/central/site/category.xml
===================================================================
--- trunk/central/site/category.xml 2012-10-18 17:33:26 UTC (rev 44585)
+++ trunk/central/site/category.xml 2012-10-18 18:27:55 UTC (rev 44586)
@@ -15,7 +15,8 @@
</feature>
<feature url="features/org.jboss.tools.central.discovery.feature_0.0.0.jar" id="org.jboss.tools.central.discovery.feature" version="0.0.0">
</feature>
- <!-- JBIDE-12389 to hide central.discovery plugin and feature, exclude source feature too <feature url="features/org.jboss.tools.central.discovery.feature.source_0.0.0.jar" id="org.jboss.tools.central.discovery.feature.source" version="0.0.0"/> -->
+ <feature url="features/org.jboss.tools.central.discovery.feature.source_0.0.0.jar" id="org.jboss.tools.central.discovery.feature.source" version="0.0.0">
+ </feature>
<feature id="org.jboss.tools.central.themes.feature" version="0.0.0"/>
<feature id="org.jboss.tools.central.themes.feature.source" version="0.0.0"/>
Modified: trunk/central/site/pom.xml
===================================================================
--- trunk/central/site/pom.xml 2012-10-18 17:33:26 UTC (rev 44585)
+++ trunk/central/site/pom.xml 2012-10-18 18:27:55 UTC (rev 44586)
@@ -19,71 +19,6 @@
<build>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>${maven.antrun.plugin.version}</version>
- <executions>
- <execution>
- <id>install</id>
- <phase>install</phase>
- <configuration>
- <quiet>true</quiet>
- <tasks>
- <!-- called AFTER generating update site + zip to add in extra content -->
- <ant antfile="build.xml" target="basic.build" dir="../../build/aggregate">
- <property name="output.dir" value="${basedir}" />
- <property name="inputRepo"
- value="${jbosstools-nightly-staging-composite}" />
- <property name="update.site.name" value="JBoss Tools - Central"/>
- <property name="JBT_VERSION" value="${JBT_VERSION}" />
- <property name="BUILD_ALIAS" value="${BUILD_ALIAS}" />
- </ant>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>commons-net</groupId>
- <artifactId>commons-net</artifactId>
- <version>1.4.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant</artifactId>
- <version>1.7.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant-nodeps</artifactId>
- <version>1.7.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant-trax</artifactId>
- <version>1.7.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant-commons-net</artifactId>
- <version>1.7.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant-apache-regexp</artifactId>
- <version>1.7.1</version>
- </dependency>
- <dependency>
- <groupId>ant-contrib</groupId>
- <artifactId>ant-contrib</artifactId>
- <version>1.0b3</version>
- </dependency>
- </dependencies>
- </plugin>
- <plugin>
<groupId>org.jboss.tools.tycho-plugins</groupId>
<artifactId>repository-utils</artifactId>
<version>0.0.1-SNAPSHOT</version>
12 years, 2 months
JBoss Tools SVN: r44585 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/connection.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-10-18 13:33:26 -0400 (Thu, 18 Oct 2012)
New Revision: 44585
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/connection/ConnectionWizardPage.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/connection/ConnectionWizardPageModel.java
Log:
[JBIDE-12898] various fixes, switching from in-binding validation to multivalidator-validation (which does not prevent non-valid values to make it to model)
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/connection/ConnectionWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/connection/ConnectionWizardPage.java 2012-10-18 16:53:43 UTC (rev 44584)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/connection/ConnectionWizardPage.java 2012-10-18 17:33:26 UTC (rev 44585)
@@ -14,7 +14,10 @@
import org.eclipse.core.databinding.Binding;
import org.eclipse.core.databinding.DataBindingContext;
+import org.eclipse.core.databinding.ValidationStatusProvider;
import org.eclipse.core.databinding.beans.BeanProperties;
+import org.eclipse.core.databinding.observable.list.IObservableList;
+import org.eclipse.core.databinding.observable.list.WritableList;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.core.databinding.observable.value.IValueChangeListener;
import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
@@ -54,7 +57,6 @@
import org.jboss.tools.openshift.express.internal.core.connection.Connection;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.OpenshiftUIMessages;
-import org.jboss.tools.openshift.express.internal.ui.databinding.HostNameValidator;
import org.jboss.tools.openshift.express.internal.ui.databinding.RequiredControlDecorationUpdater;
import org.jboss.tools.openshift.express.internal.ui.databinding.RequiredStringValidator;
import org.jboss.tools.openshift.express.internal.ui.databinding.TrimmingStringConverter;
@@ -243,7 +245,7 @@
Combo serversCombo = new Combo(connectionWidgets, SWT.BORDER);
Binding serverBinding = ValueBindingBuilder
.bind(WidgetProperties.text().observe(serversCombo))
- .validatingAfterGet(new HostNameValidator())
+ .validatingAfterGet(new RequiredStringValidator("server"))
.to(BeanProperties.value(ConnectionWizardPageModel.PROPERTY_SERVER).observe(pageModel))
.in(dbc);
ControlDecorationSupport
@@ -273,14 +275,17 @@
rhLoginText = new Text(connectionWidgets, SWT.BORDER);
GridDataFactory.fillDefaults()
.align(SWT.FILL, SWT.CENTER).grab(true, false).span(1, 1).applyTo(rhLoginText);
- Binding usernameBinding = ValueBindingBuilder
- .bind(WidgetProperties.text(SWT.Modify).observe(rhLoginText))
- .converting(new TrimmingStringConverter())
- .validatingAfterGet(new RequiredStringValidator("username"))
+ IObservableValue usernameObservable = WidgetProperties.text(SWT.Modify).observe(rhLoginText);
+ ValueBindingBuilder
+ .bind(usernameObservable)
+ .converting(new TrimmingStringConverter())
.to(BeanProperties.value(ConnectionWizardPageModel.PROPERTY_USERNAME).observe(pageModel))
.in(dbc);
+ ValidationStatusProvider usernameValidation = new RequiredStringValidationProvider(usernameObservable,
+ "username");
+ dbc.addValidationStatusProvider(usernameValidation);
ControlDecorationSupport
- .create(usernameBinding, SWT.LEFT | SWT.TOP, null, new RequiredControlDecorationUpdater());
+ .create(usernameValidation, SWT.LEFT | SWT.TOP, null, new RequiredControlDecorationUpdater());
// password
Label passwordLabel = new Label(connectionWidgets, SWT.NONE);
@@ -290,13 +295,16 @@
passwordText = new Text(connectionWidgets, SWT.BORDER | SWT.PASSWORD);
GridDataFactory.fillDefaults()
.align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(passwordText);
- Binding passwordBinding = ValueBindingBuilder
- .bind(WidgetProperties.text(SWT.Modify).observe(passwordText))
- .validatingAfterGet(new RequiredStringValidator("password"))
+ IObservableValue passwordObservable = WidgetProperties.text(SWT.Modify).observe(passwordText);
+ ValueBindingBuilder
+ .bind(passwordObservable)
.to(BeanProperties.value(ConnectionWizardPageModel.PROPERTY_PASSWORD).observe(pageModel))
.in(dbc);
+ ValidationStatusProvider passwordValidation =
+ new RequiredStringValidationProvider(passwordObservable, "password");
+ dbc.addValidationStatusProvider(passwordValidation);
ControlDecorationSupport
- .create(passwordBinding, SWT.LEFT | SWT.TOP, null, new RequiredControlDecorationUpdater());
+ .create(passwordValidation, SWT.LEFT | SWT.TOP, null, new RequiredControlDecorationUpdater());
Button rememberPasswordCheckBox = new Button(connectionWidgets, SWT.CHECK);
rememberPasswordCheckBox.setText(OpenshiftUIMessages.OpenshiftWizardSavePassword);
@@ -312,7 +320,6 @@
final CredentialsValidator credentialsValidator =
new CredentialsValidator(credentialsStatusObservable);
dbc.addValidationStatusProvider(credentialsValidator);
- ControlDecorationSupport.create(credentialsValidator, SWT.LEFT | SWT.TOP);
return connectionWidgets;
}
@@ -385,7 +392,38 @@
}
}
- public Connection getConnection() {
+ class RequiredStringValidationProvider extends MultiValidator {
+
+ private IObservableValue observableValue;
+ private String name;
+
+ public RequiredStringValidationProvider(IObservableValue value, String name) {
+ this.observableValue = value;
+ this.name = name;
+ }
+
+ @Override
+ protected IStatus validate() {
+ if (!(observableValue.getValue() instanceof String)) {
+ return ValidationStatus.cancel("You have to provide a " + name);
+ }
+ String string = (String) observableValue.getValue();
+ if (string.isEmpty()) {
+ return ValidationStatus.cancel("You have to provide a " + name);
+ }
+ return ValidationStatus.ok();
+ }
+
+ @Override
+ public IObservableList getTargets() {
+ IObservableList targets = new WritableList();
+ targets.add(observableValue);
+ return targets;
+ }
+
+ }
+
+ public Connection getConnection() {
return pageModel.getConnection();
}
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/connection/ConnectionWizardPageModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/connection/ConnectionWizardPageModel.java 2012-10-18 16:53:43 UTC (rev 44584)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/connection/ConnectionWizardPageModel.java 2012-10-18 17:33:26 UTC (rev 44585)
@@ -20,6 +20,7 @@
import org.eclipse.osgi.util.NLS;
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
import org.jboss.tools.openshift.express.internal.core.connection.Connection;
+import org.jboss.tools.openshift.express.internal.core.connection.ConnectionUtils;
import org.jboss.tools.openshift.express.internal.core.connection.ConnectionsModel;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.utils.CollectionUtils;
@@ -27,6 +28,7 @@
import org.jboss.tools.openshift.express.internal.ui.wizard.IConnectionAwareModel;
import com.openshift.client.IUser;
+import com.openshift.client.InvalidCredentialsOpenShiftException;
import com.openshift.client.NotFoundOpenShiftException;
import com.openshift.client.OpenShiftException;
import com.openshift.client.OpenShiftTimeoutException;
@@ -61,7 +63,7 @@
Connection wizardModelConnection = wizardModel.getConnection();
this.selectedConnection = getSelectedConnection(wizardModelConnection);
this.isCreateNewConnection = getIsCreateNewConnection(selectedConnection);
- this.editedConnection = createConnection(wizardModelConnection);
+ this.editedConnection = createConnection(selectedConnection);
this.servers = getServers(editedConnection);
}
@@ -71,7 +73,12 @@
private Connection getSelectedConnection(Connection wizardModelConnection) {
if (wizardModelConnection == null) {
- return new NewConnectionMarker();
+ Connection recentConnection = ConnectionsModel.getDefault().getRecentConnection();
+ if (recentConnection != null) {
+ return recentConnection;
+ } else {
+ return new NewConnectionMarker();
+ }
} else {
return wizardModelConnection;
}
@@ -114,6 +121,7 @@
private void setEditedConnection(Connection connection) {
Connection oldValue = editedConnection;
this.editedConnection = connection;
+ resetValid();
firePropertyChange(PROPERTY_SERVER, oldValue.getHost(), this.editedConnection.getHost());
firePropertyChange(PROPERTY_USERNAME, oldValue.getUsername(), this.editedConnection.getUsername());
firePropertyChange(PROPERTY_PASSWORD, oldValue.getPassword(), this.editedConnection.getPassword());
@@ -137,8 +145,9 @@
if (this.isDefaultServer != isDefaultServer) {
firePropertyChange(PROPERTY_USE_DEFAULTSERVER,
this.isDefaultServer, this.isDefaultServer = isDefaultServer);
+ resetValid();
if (isDefaultServer) {
- setServer(editedConnection.getHost());
+ setServer(ConnectionUtils.getDefaultHostUrl());
}
resetValid();
}
@@ -235,6 +244,9 @@
} catch (OpenShiftTimeoutException e) {
status = OpenShiftUIActivator.createErrorStatus(NLS.bind(
"Could not reach server at {0}. Connection timeouted.", editedConnection.getHost()));
+ } catch (InvalidCredentialsOpenShiftException e) {
+ status = OpenShiftUIActivator.createErrorStatus(NLS.bind(
+ "The credentials for user {0} are not valid", editedConnection.getUsername()));
} catch (OpenShiftException e) {
status = OpenShiftUIActivator.createErrorStatus(NLS.bind(
"The credentials for user {0} are not valid", editedConnection.getUsername()));
12 years, 2 months
JBoss Tools SVN: r44584 - branches/jbosstools-4.0.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/connection.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-10-18 12:53:43 -0400 (Thu, 18 Oct 2012)
New Revision: 44584
Modified:
branches/jbosstools-4.0.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/connection/ConnectionWizardPage.java
branches/jbosstools-4.0.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/connection/ConnectionWizardPageModel.java
Log:
[JBIDE-12898] various fixes, switching from in-binding validation to multivalidator-validation (which does not prevent non-valid values to make it to model)
Modified: branches/jbosstools-4.0.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/connection/ConnectionWizardPage.java
===================================================================
--- branches/jbosstools-4.0.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/connection/ConnectionWizardPage.java 2012-10-18 16:43:58 UTC (rev 44583)
+++ branches/jbosstools-4.0.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/connection/ConnectionWizardPage.java 2012-10-18 16:53:43 UTC (rev 44584)
@@ -14,7 +14,10 @@
import org.eclipse.core.databinding.Binding;
import org.eclipse.core.databinding.DataBindingContext;
+import org.eclipse.core.databinding.ValidationStatusProvider;
import org.eclipse.core.databinding.beans.BeanProperties;
+import org.eclipse.core.databinding.observable.list.IObservableList;
+import org.eclipse.core.databinding.observable.list.WritableList;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.core.databinding.observable.value.IValueChangeListener;
import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
@@ -54,7 +57,6 @@
import org.jboss.tools.openshift.express.internal.core.connection.Connection;
import org.jboss.tools.openshift.express.internal.ui.OpenShiftUIActivator;
import org.jboss.tools.openshift.express.internal.ui.OpenshiftUIMessages;
-import org.jboss.tools.openshift.express.internal.ui.databinding.HostNameValidator;
import org.jboss.tools.openshift.express.internal.ui.databinding.RequiredControlDecorationUpdater;
import org.jboss.tools.openshift.express.internal.ui.databinding.RequiredStringValidator;
import org.jboss.tools.openshift.express.internal.ui.databinding.TrimmingStringConverter;
@@ -243,7 +245,7 @@
Combo serversCombo = new Combo(connectionWidgets, SWT.BORDER);
Binding serverBinding = ValueBindingBuilder
.bind(WidgetProperties.text().observe(serversCombo))
- .validatingAfterGet(new HostNameValidator())
+ .validatingAfterGet(new RequiredStringValidator("server"))
.to(BeanProperties.value(ConnectionWizardPageModel.PROPERTY_SERVER).observe(pageModel))
.in(dbc);
ControlDecorationSupport
@@ -273,14 +275,17 @@
rhLoginText = new Text(connectionWidgets, SWT.BORDER);
GridDataFactory.fillDefaults()
.align(SWT.FILL, SWT.CENTER).grab(true, false).span(1, 1).applyTo(rhLoginText);
- Binding usernameBinding = ValueBindingBuilder
- .bind(WidgetProperties.text(SWT.Modify).observe(rhLoginText))
+ IObservableValue usernameObservable = WidgetProperties.text(SWT.Modify).observe(rhLoginText);
+ ValueBindingBuilder
+ .bind(usernameObservable)
.converting(new TrimmingStringConverter())
- .validatingAfterGet(new RequiredStringValidator("username"))
.to(BeanProperties.value(ConnectionWizardPageModel.PROPERTY_USERNAME).observe(pageModel))
.in(dbc);
+ ValidationStatusProvider usernameValidation = new RequiredStringValidationProvider(usernameObservable,
+ "username");
+ dbc.addValidationStatusProvider(usernameValidation);
ControlDecorationSupport
- .create(usernameBinding, SWT.LEFT | SWT.TOP, null, new RequiredControlDecorationUpdater());
+ .create(usernameValidation, SWT.LEFT | SWT.TOP, null, new RequiredControlDecorationUpdater());
// password
Label passwordLabel = new Label(connectionWidgets, SWT.NONE);
@@ -290,13 +295,16 @@
passwordText = new Text(connectionWidgets, SWT.BORDER | SWT.PASSWORD);
GridDataFactory.fillDefaults()
.align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(passwordText);
- Binding passwordBinding = ValueBindingBuilder
- .bind(WidgetProperties.text(SWT.Modify).observe(passwordText))
- .validatingAfterGet(new RequiredStringValidator("password"))
+ IObservableValue passwordObservable = WidgetProperties.text(SWT.Modify).observe(passwordText);
+ ValueBindingBuilder
+ .bind(passwordObservable)
.to(BeanProperties.value(ConnectionWizardPageModel.PROPERTY_PASSWORD).observe(pageModel))
.in(dbc);
+ ValidationStatusProvider passwordValidation =
+ new RequiredStringValidationProvider(passwordObservable,"password");
+ dbc.addValidationStatusProvider(passwordValidation);
ControlDecorationSupport
- .create(passwordBinding, SWT.LEFT | SWT.TOP, null, new RequiredControlDecorationUpdater());
+ .create(passwordValidation, SWT.LEFT | SWT.TOP, null, new RequiredControlDecorationUpdater());
Button rememberPasswordCheckBox = new Button(connectionWidgets, SWT.CHECK);
rememberPasswordCheckBox.setText(OpenshiftUIMessages.OpenshiftWizardSavePassword);
@@ -312,7 +320,6 @@
final CredentialsValidator credentialsValidator =
new CredentialsValidator(credentialsStatusObservable);
dbc.addValidationStatusProvider(credentialsValidator);
- ControlDecorationSupport.create(credentialsValidator, SWT.LEFT | SWT.TOP);
return connectionWidgets;
}
@@ -385,6 +392,37 @@
}
}
+ class RequiredStringValidationProvider extends MultiValidator {
+
+ private IObservableValue observableValue;
+ private String name;
+
+ public RequiredStringValidationProvider(IObservableValue value, String name) {
+ this.observableValue = value;
+ this.name = name;
+ }
+
+ @Override
+ protected IStatus validate() {
+ if (!(observableValue.getValue() instanceof String)) {
+ return ValidationStatus.cancel("You have to provide a " + name);
+ }
+ String string = (String) observableValue.getValue();
+ if (string.isEmpty()) {
+ return ValidationStatus.cancel("You have to provide a " + name);
+ }
+ return ValidationStatus.ok();
+ }
+
+ @Override
+ public IObservableList getTargets() {
+ IObservableList targets = new WritableList();
+ targets.add(observableValue);
+ return targets;
+ }
+
+ }
+
public Connection getConnection() {
return pageModel.getConnection();
}
Modified: branches/jbosstools-4.0.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/connection/ConnectionWizardPageModel.java
===================================================================
--- branches/jbosstools-4.0.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/connection/ConnectionWizardPageModel.java 2012-10-18 16:43:58 UTC (rev 44583)
+++ branches/jbosstools-4.0.0.Beta1/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/connection/ConnectionWizardPageModel.java 2012-10-18 16:53:43 UTC (rev 44584)
@@ -27,6 +27,7 @@
import org.jboss.tools.openshift.express.internal.ui.wizard.IConnectionAwareModel;
import com.openshift.client.IUser;
+import com.openshift.client.InvalidCredentialsOpenShiftException;
import com.openshift.client.NotFoundOpenShiftException;
import com.openshift.client.OpenShiftException;
import com.openshift.client.OpenShiftTimeoutException;
@@ -61,7 +62,7 @@
Connection wizardModelConnection = wizardModel.getConnection();
this.selectedConnection = getSelectedConnection(wizardModelConnection);
this.isCreateNewConnection = getIsCreateNewConnection(selectedConnection);
- this.editedConnection = createConnection(wizardModelConnection);
+ this.editedConnection = createConnection(selectedConnection);
this.servers = getServers(editedConnection);
}
@@ -71,7 +72,12 @@
private Connection getSelectedConnection(Connection wizardModelConnection) {
if (wizardModelConnection == null) {
- return new NewConnectionMarker();
+ Connection recentConnection = ConnectionsModel.getDefault().getRecentConnection();
+ if (recentConnection != null) {
+ return recentConnection;
+ } else {
+ return new NewConnectionMarker();
+ }
} else {
return wizardModelConnection;
}
@@ -116,6 +122,7 @@
private void setEditedConnection(Connection connection) {
Connection oldValue = editedConnection;
this.editedConnection = connection;
+ resetValid();
firePropertyChange(PROPERTY_SERVER, oldValue.getHost(), this.editedConnection.getHost());
firePropertyChange(PROPERTY_USERNAME, oldValue.getUsername(), this.editedConnection.getUsername());
firePropertyChange(PROPERTY_PASSWORD, oldValue.getPassword(), this.editedConnection.getPassword());
@@ -139,10 +146,10 @@
if (this.isDefaultServer != isDefaultServer) {
firePropertyChange(PROPERTY_USE_DEFAULTSERVER,
this.isDefaultServer, this.isDefaultServer = isDefaultServer);
+ resetValid();
if (isDefaultServer) {
- setServer(editedConnection.getHost());
+ setServer(new Connection().getHost());
}
- resetValid();
}
}
@@ -237,9 +244,12 @@
} catch (OpenShiftTimeoutException e) {
status = OpenShiftUIActivator.createErrorStatus(NLS.bind(
"Could not reach server at {0}. Connection timeouted.", editedConnection.getHost()));
+ } catch (InvalidCredentialsOpenShiftException e) {
+ status = OpenShiftUIActivator.createErrorStatus(NLS.bind(
+ "The credentials for user {0} are not valid", editedConnection.getUsername()));
} catch (OpenShiftException e) {
status = OpenShiftUIActivator.createErrorStatus(NLS.bind(
- "The credentials for user {0} are not valid", editedConnection.getUsername()));
+ "Could not check user credentials: {0}", e.getMessage()));
}
}
} catch (NotFoundOpenShiftException e) {
12 years, 2 months
JBoss Tools SVN: r44583 - branches/jbosstools-4.0.0.Beta1/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-10-18 12:43:58 -0400 (Thu, 18 Oct 2012)
New Revision: 44583
Modified:
branches/jbosstools-4.0.0.Beta1/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java
Log:
JBIDE-12716 - Remove button does not work properly
Modified: branches/jbosstools-4.0.0.Beta1/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java
===================================================================
--- branches/jbosstools-4.0.0.Beta1/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java 2012-10-18 16:42:17 UTC (rev 44582)
+++ branches/jbosstools-4.0.0.Beta1/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java 2012-10-18 16:43:58 UTC (rev 44583)
@@ -420,6 +420,8 @@
newRuntimePaths[i++] = path;
}
runtimePaths = newRuntimePaths;
+ RuntimeUIActivator.getDefault().getModel().setRuntimePaths(runtimePaths);
+ RuntimeUIActivator.getDefault().saveRuntimePreferences();
runtimePathViewer.setInput(runtimePaths);
configureSearch();
runtimePathViewer.refresh();
@@ -457,6 +459,8 @@
runtimePath = runtimePathClone;
l.add(runtimePath);
runtimePaths = (RuntimePath[]) l.toArray(new RuntimePath[l.size()]);
+ RuntimeUIActivator.getDefault().getModel().setRuntimePaths(runtimePaths);
+ RuntimeUIActivator.getDefault().saveRuntimePreferences();
configureSearch();
runtimePathViewer.refresh();
}
12 years, 2 months
JBoss Tools SVN: r44582 - trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-10-18 12:42:17 -0400 (Thu, 18 Oct 2012)
New Revision: 44582
Modified:
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java
Log:
JBIDE-12716 - Remove button does not work properly
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java 2012-10-18 16:08:53 UTC (rev 44581)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java 2012-10-18 16:42:17 UTC (rev 44582)
@@ -420,6 +420,8 @@
newRuntimePaths[i++] = path;
}
runtimePaths = newRuntimePaths;
+ RuntimeUIActivator.getDefault().getModel().setRuntimePaths(runtimePaths);
+ RuntimeUIActivator.getDefault().saveRuntimePreferences();
runtimePathViewer.setInput(runtimePaths);
configureSearch();
runtimePathViewer.refresh();
@@ -457,6 +459,8 @@
runtimePath = runtimePathClone;
l.add(runtimePath);
runtimePaths = (RuntimePath[]) l.toArray(new RuntimePath[l.size()]);
+ RuntimeUIActivator.getDefault().getModel().setRuntimePaths(runtimePaths);
+ RuntimeUIActivator.getDefault().saveRuntimePreferences();
configureSearch();
runtimePathViewer.refresh();
}
12 years, 2 months
JBoss Tools SVN: r44581 - branches/jbosstools-4.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2012-10-18 12:08:53 -0400 (Thu, 18 Oct 2012)
New Revision: 44581
Modified:
branches/jbosstools-4.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/CocoaUIEnhancer.java
Log:
https://issues.jboss.org/browse/JBIDE-12829 : BrowserSim disappearing (see video)
Modified: branches/jbosstools-4.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/CocoaUIEnhancer.java
===================================================================
--- branches/jbosstools-4.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/CocoaUIEnhancer.java 2012-10-18 14:46:13 UTC (rev 44580)
+++ branches/jbosstools-4.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/CocoaUIEnhancer.java 2012-10-18 16:08:53 UTC (rev 44581)
@@ -89,8 +89,14 @@
// Connect the given IAction objects to the actionProce method.
//
Object target = new Object() {
- @SuppressWarnings( "unused" )
- int actionProc( int id, int sel, int arg0 ) {
+ /** 32-bit version of the callback*/
+ @SuppressWarnings( "unused" )
+ int actionProc(int id, int sel, int arg0) {
+ return (int) actionProc((long) id, (long) sel, (long) arg0);
+ }
+
+ /** 64-bit version of the callback*/
+ long actionProc(long id, long sel, long arg0) {
if ( sel == sel_aboutMenuItemSelected_ ) {
aboutAction.run();
} else if ( sel == sel_preferencesMenuItemSelected_ ) {
12 years, 2 months