JBoss Tools SVN: r27448 - in trunk/deltacloud/plugins: org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-14 10:23:25 -0500 (Tue, 14 Dec 2010)
New Revision: 27448
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/AddressList.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Instance.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/InstancePropertySource.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java
Log:
[JBIDE-7889]
* DeltaCloudClientImpl#updateInstance: now also sets pulic_adresses and private_adresses when updating instances
* DeltaCloud#replaceInstance: removed code that replaced instances in the local cache.
* DeltaCloudInstance#setInstance: I now set a new instance to the DeltaCloudInstance (DeltaCloudInstance#setInstance)
* InstancePropertySource#getKey: added #setInstance to be able to refresh instances
* NewInstanceWizard#WatchCreateJob#run: removed DeltaCloud#replaceInstance since DeltaCloud now handles this
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-12-14 14:36:21 UTC (rev 27447)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-12-14 15:23:25 UTC (rev 27448)
@@ -1,5 +1,12 @@
2010-12-14 André Dietisheim <adietish(a)redhat.com>
+ * src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java (updateInstance):
+ [JBIDE-7889] now also set pulic_adresses and private_adresses when updating instances
+ * src/org/jboss/tools/deltacloud/core/DeltaCloud.java (refreshInstance):
+ [JBIDE-7889] removed code that replaced instances in the local cache.
+ I now set a new instance to the DeltaCloudInstance (DeltaCloudInstance#setInstance)
+ * src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java (setInstance):
+ [JBIDE-7889] added #setInstance to be able to refresh instances
* src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java (toString):
[JBIDE-7889] added #toString to facilitate debuggin
* src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java (getActions):
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-12-14 14:36:21 UTC (rev 27447)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-12-14 15:23:25 UTC (rev 27448)
@@ -103,8 +103,8 @@
this.type = type;
boolean nameChanged = updateName(name);
- boolean connectionPropertiesChanged = updateConnectionProperties(url, username, password);
-
+ boolean connectionPropertiesChanged = updateConnectionProperties(url, username, password);
+
if (nameChanged || connectionPropertiesChanged) {
this.passwordStore.update(new DeltaCloudPasswordStorageKey(name, username), password);
}
@@ -114,7 +114,7 @@
loadChildren();
}
}
-
+
private boolean updateName(String name) {
if (equals(this.name, name)) {
return false;
@@ -123,7 +123,7 @@
setName(name);
return true;
}
-
+
private boolean updateConnectionProperties(String url, String username, String password)
throws DeltaCloudException {
boolean changed = false;
@@ -321,7 +321,8 @@
return waitForState(instanceId, differsFromPending, pm);
}
- public DeltaCloudInstance waitForState(String instanceId, final DeltaCloudInstance.State expectedState, IProgressMonitor pm)
+ public DeltaCloudInstance waitForState(String instanceId, final DeltaCloudInstance.State expectedState,
+ IProgressMonitor pm)
throws InterruptedException, DeltaCloudException {
IInstanceStateMatcher stateMatcher = new IInstanceStateMatcher() {
@@ -343,7 +344,7 @@
return instance;
}
Thread.sleep(400);
- instance = refreshInstance(instance.getId());
+ instance = refreshInstance(instance);
}
}
return instance;
@@ -469,55 +470,25 @@
}
}
- /**
- * Replaces the current instance with the given one. The instanceRepo are
- * matched against identical id
- *
- * @param instance
- * the instance that shall replace the current one
- */
- public void replaceInstance(DeltaCloudInstance instance) {
- String instanceId = instance.getId();
- if (instance != null) {
- replaceInstance(instance, instanceRepo.getById(instanceId));
- }
- }
-
- public DeltaCloudInstance refreshInstance(String instanceId) throws DeltaCloudException {
- DeltaCloudInstance deltaCloudInstance = null;
+ private DeltaCloudInstance refreshInstance(DeltaCloudInstance deltaCloudInstance) throws DeltaCloudException {
try {
- Instance instance = client.listInstances(instanceId);
- deltaCloudInstance = new DeltaCloudInstance(this, instance);
- DeltaCloudInstance currentInstance = instanceRepo.getById(instanceId);
- // FIXME: remove STATE_BOGUS state when server fixes state
- // problems
- if (!(deltaCloudInstance.getState().equals(DeltaCloudInstance.State.BOGUS))
- && !(currentInstance.getState().equals(deltaCloudInstance.getState()))) {
- replaceInstance(deltaCloudInstance, currentInstance);
- }
+ Instance newInstance = client.listInstances(deltaCloudInstance.getId());
+ deltaCloudInstance.setInstance(newInstance);
+ return deltaCloudInstance;
} catch (DeltaCloudClientException e) {
- // TODO: is this correct?
- e.printStackTrace();
- // will get here when a pending instance is being checked
+ // TODO : internationalize strings
+ throw new DeltaCloudException(MessageFormat.format("Coud not refresh instance \"{0}\"",
+ deltaCloudInstance.getId()), e);
}
- return deltaCloudInstance;
}
- private void replaceInstance(DeltaCloudInstance deltaCloudInstance, DeltaCloudInstance currentInstance) {
- DeltaCloudInstancesRepository repo = getInstancesRepository();
- DeltaCloudInstance[] instances = repo.get();
- repo.remove(currentInstance);
- repo.add(deltaCloudInstance);
- // TODO: remove notification with all instanceRepo, replace by
- // notifying the changed instance
- firePropertyChange(PROP_INSTANCES, instances, repo.get());
- }
-
- public boolean performInstanceAction(String instanceId, DeltaCloudInstance.Action action) throws DeltaCloudException {
+ public boolean performInstanceAction(String instanceId, DeltaCloudInstance.Action action)
+ throws DeltaCloudException {
return performInstanceAction(instanceRepo.getById(instanceId), action);
}
- protected boolean performInstanceAction(DeltaCloudInstance instance, DeltaCloudInstance.Action action) throws DeltaCloudException {
+ protected boolean performInstanceAction(DeltaCloudInstance instance, DeltaCloudInstance.Action action)
+ throws DeltaCloudException {
try {
if (instance == null) {
return false;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java 2010-12-14 14:36:21 UTC (rev 27447)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java 2010-12-14 15:23:25 UTC (rev 27448)
@@ -155,6 +155,10 @@
public boolean isRunning() {
return instance.isRunning();
}
+
+ protected void setInstance(Instance instance) {
+ this.instance = instance;
+ }
public String getHostName() {
List<String> hostNames = getHostNames();
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/AddressList.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/AddressList.java 2010-12-14 14:36:21 UTC (rev 27447)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/AddressList.java 2010-12-14 15:23:25 UTC (rev 27448)
@@ -17,28 +17,33 @@
/**
* @author Martyn Taylor
+ * @author André Dietisheim
*/
@XmlType
public class AddressList
{
private static final long serialVersionUID = 1L;
-
- private AddressList()
+
+ @XmlElement
+ @XmlList
+ private List<String> addresses;
+
+ protected AddressList()
{
}
- @XmlElement
- @XmlList
- private List<String> address;
-
- @SuppressWarnings("unused")
- private void setAddress(List<String> address)
+ protected AddressList(List<String> addresses)
{
- this.address = address;
+ setAddress(addresses);
}
+ protected void setAddress(List<String> addresses)
+ {
+ this.addresses = addresses;
+ }
+
public List<String> getAddress()
{
- return address;
+ return addresses;
}
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java 2010-12-14 14:36:21 UTC (rev 27447)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java 2010-12-14 15:23:25 UTC (rev 27448)
@@ -25,6 +25,8 @@
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import javax.xml.bind.JAXB;
import javax.xml.parsers.DocumentBuilder;
@@ -79,6 +81,8 @@
private static final String DOCUMENT_ELEMENT_DRIVER = "driver";
private static final String DOCUMENT_ELEMENT_API = "api";
+ private static final Pattern ELEMENT_TEXTVALUE_REGEX = Pattern.compile("[^\n\t ]+[^\n]+");
+
public static Logger logger = Logger.getLogger(DeltaCloudClientImpl.class);
public static enum DeltaCloudServerType {
@@ -290,6 +294,7 @@
@Override
public Instance listInstances(String instanceId) throws DeltaCloudClientException {
+// return JAXB.unmarshal(new StringReader(sendRequest(new ListInstanceRequest(baseUrl, instanceId))), Instance.class);
return buildInstance(sendRequest(new ListInstanceRequest(baseUrl, instanceId)));
}
@@ -351,7 +356,7 @@
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document document = db.parse(new InputSource(new StringReader(xml)));
- List<String> keyText = getElementText(document, PEM_FILE_SUFFIX); //$NON-NLS-1$
+ List<String> keyText = getElementTextValues(document, PEM_FILE_SUFFIX); //$NON-NLS-1$
return keyText;
}
@@ -381,10 +386,11 @@
instance.setProfileId(getIdFromHref(getAttributeValues(document, "hardware_profile", "href").get(0))); //$NON-NLS-1$ //$NON-NLS-2$
getProfileProperties(instance, getPropertyNodes(document, "hardware_profile")); //$NON-NLS-1$
instance.setRealmId(getIdFromHref(getAttributeValues(document, "realm", "href").get(0))); //$NON-NLS-1$ //$NON-NLS-2$
- instance.setState(getElementText(document, "state").get(0)); //$NON-NLS-1$
+ instance.setState(getElementTextValues(document, "state").get(0)); //$NON-NLS-1$
getAuthentication(document, instance);
instance.setActions(createInstanceActions(instance, document));
-
+ instance.setPublicAddresses(new AddressList(getElementTextValues(document, "public_addresses")));
+ instance.setPrivateAddresses(new AddressList(getElementTextValues(document, "private_addresses")));
return instance;
} catch (DeltaCloudClientException e) {
throw e;
@@ -396,8 +402,7 @@
private Instance buildInstance(String xml) throws DeltaCloudClientException {
Instance instance = JAXB.unmarshal(new StringReader(xml), Instance.class);
- updateInstance(xml, instance);
- return instance;
+ return updateInstance(xml, instance);
}
private List<InstanceAction> createInstanceActions(final Instance instance, Document document)
@@ -500,11 +505,16 @@
return values;
}
- private List<String> getElementText(Document document, String elementName) {
+ private List<String> getElementTextValues(Document document, String elementName) {
NodeList elements = document.getElementsByTagName(elementName);
ArrayList<String> values = new ArrayList<String>();
for (int i = 0; i < elements.getLength(); i++) {
- values.add(elements.item(i).getTextContent());
+ String textValue = elements.item(i).getTextContent();
+ Matcher matcher = ELEMENT_TEXTVALUE_REGEX.matcher(textValue);
+ if (matcher.find()) {
+ String group = matcher.group();
+ values.add(group);
+ }
}
return values;
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Instance.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Instance.java 2010-12-14 14:36:21 UTC (rev 27447)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/Instance.java 2010-12-14 15:23:25 UTC (rev 27448)
@@ -115,13 +115,11 @@
return keyname;
}
- @SuppressWarnings("unused")
- private void setPrivateAddresses(AddressList privateAddresses) {
+ protected void setPrivateAddresses(AddressList privateAddresses) {
this.privateAddresses = privateAddresses;
}
- @SuppressWarnings("unused")
- private void setPublicAddresses(AddressList publicAddresses) {
+ protected void setPublicAddresses(AddressList publicAddresses) {
this.publicAddresses = publicAddresses;
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-14 14:36:21 UTC (rev 27447)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-14 15:23:25 UTC (rev 27448)
@@ -1,5 +1,9 @@
2010-12-14 André Dietisheim <adietish(a)redhat.com>
+ * src/org/jboss/tools/deltacloud/ui/views/cloud/property/InstancePropertySource.java (getKey):
+ [JBIDE-7789] removed DeltaCloud#replaceInstance code since DeltaCloud now handles this
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java (WatchCreateJob.run):
+ [JBIDE-7789] removed DeltaCloud#replaceInstance since DeltaCloud now handles this
* src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java (WatchCreateJob):
[JBIDE-7594] switched WatchCreateJob to InstanceStateJob to have consistent blocking with all other jobs
* src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java (asyncGetProfiles):
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/InstancePropertySource.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/InstancePropertySource.java 2010-12-14 14:36:21 UTC (rev 27447)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/InstancePropertySource.java 2010-12-14 15:23:25 UTC (rev 27448)
@@ -12,14 +12,11 @@
import java.util.List;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.views.properties.IPropertyDescriptor;
import org.eclipse.ui.views.properties.IPropertySource;
import org.eclipse.ui.views.properties.PropertyDescriptor;
import org.jboss.tools.deltacloud.core.DeltaCloud;
-import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
-import org.jboss.tools.deltacloud.ui.ErrorUtils;
import org.jboss.tools.deltacloud.ui.views.CVMessages;
import org.jboss.tools.deltacloud.ui.views.cloud.InstanceItem;
import org.jboss.tools.internal.deltacloud.ui.utils.CloudViewElementUtils;
@@ -133,23 +130,29 @@
// it will be complete for future requests until a refresh gets the
// entire list again.
String key = null;
- try {
- key = instance.getKey();
- if (!cloud.getType().equals(DeltaCloud.MOCK_TYPE)) {
- if (instance.getState().equals(DeltaCloudInstance.State.RUNNING) && (key == null || key.length() == 0)) {
- instance = cloud.refreshInstance(instance.getId());
- if (instance != null) {
- key = instance.getKey();
- if (key != null && key.length() > 0)
- cloud.replaceInstance(instance);
- }
- }
- }
- } catch (DeltaCloudException e) {
- ErrorUtils.handleError(
- "Error", "Could not get key for instance " + instance.getName(),
- e, Display.getDefault().getActiveShell());
- }
+ // TODO: very weird stuff here. Why should we check for the server to be
+ // a mock and then refresh the instance? investigate what are the
+ // consequences of uncommenting this stuff here
+ // try {
+ key = instance.getKey();
+ // if (!cloud.getType().equals(DeltaCloud.MOCK_TYPE)) {
+ // if (instance.getState().equals(DeltaCloudInstance.State.RUNNING) &&
+ // (key == null || key.length() == 0)) {
+ // instance = cloud.refreshInstance(instance.getId());
+ // consequences
+ //
+ // if (instance != null) {
+ // key = instance.getKey();
+ // if (key != null && key.length() > 0)
+ // cloud.replaceInstance(instance);
+ // }
+ // }
+ // }
+ // } catch (DeltaCloudException e) {
+ // ErrorUtils.handleError(
+ // "Error", "Could not get key for instance " + instance.getName(),
+ // e, Display.getDefault().getActiveShell());
+ // }
return key;
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java 2010-12-14 14:36:21 UTC (rev 27447)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard.java 2010-12-14 15:23:25 UTC (rev 27448)
@@ -106,7 +106,7 @@
} catch (Exception e) {
// do nothing
} finally {
- cloud.replaceInstance(instance);
+// cloud.replaceInstance(instance);
cloud.removeInstanceJob(instanceId, this);
System.out.println(instance.getHostName());
pm.done();
14 years, 1 month
JBoss Tools SVN: r27447 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/jmx.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-12-14 09:36:21 -0500 (Tue, 14 Dec 2010)
New Revision: 27447
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/jmx/JBossServerConnectionProvider.java
Log:
JBIDE-7850 - seems to happen if jmx is not installed
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/jmx/JBossServerConnectionProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/jmx/JBossServerConnectionProvider.java 2010-12-14 14:30:34 UTC (rev 27446)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/jmx/JBossServerConnectionProvider.java 2010-12-14 14:36:21 UTC (rev 27447)
@@ -46,9 +46,9 @@
// If the connection doesn't exist, make a new one
public static void run(IServer s, IJMXRunnable r) throws JMXException {
JBossServerConnection c = getConnection(s);
- if( c == null )
- c = getConnection(s);
- c.run(r);
+ if( c != null )
+ // JMX is not installed here
+ c.run(r);
}
14 years, 1 month
JBoss Tools SVN: r27446 - trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-12-14 09:30:34 -0500 (Tue, 14 Dec 2010)
New Revision: 27446
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages/FilesetInfoWizardPage.java
Log:
JBIDE-7788 - filesets ui change
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages/FilesetInfoWizardPage.java
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages/FilesetInfoWizardPage.java 2010-12-14 14:09:32 UTC (rev 27445)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/wizards/pages/FilesetInfoWizardPage.java 2010-12-14 14:30:34 UTC (rev 27446)
@@ -94,7 +94,7 @@
}
public void createControl (Composite parent) {
- mainComposite = new Composite(parent, SWT.NONE);
+ mainComposite = new Composite(parent, SWT.BORDER);
mainComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
mainComposite.setLayout(new FormLayout());
@@ -104,18 +104,20 @@
restrainerData.left = new FormAttachment(0,5);
restrainerData.top = new FormAttachment(0,5);
restrainerData.bottom = new FormAttachment(100,-5);
- restrainerData.right = new FormAttachment(0,600);
+ restrainerData.right = new FormAttachment(100,-5);
restrainer.setLayoutData(restrainerData);
Group info = createInfoGroup(restrainer);
createPreviewGroup(restrainer, info);
- mainComposite.layout();
- fillDefaults();
- addListeners();
- changePreview();
-
- includesText.setFocus();
-
+ //mainComposite.layout();
+ Display.getDefault().asyncExec(new Runnable(){
+ public void run() {
+ fillDefaults();
+ addListeners();
+ changePreview();
+ includesText.setFocus();
+ }
+ });
setControl(mainComposite);
}
@@ -211,9 +213,9 @@
excludesText = new Text(infoGroup, SWT.BORDER);
excludesImage.setLayoutData(createFormData(0,0,null,0,0,0,null,0));
excludesTextLabel.setLayoutData(createFormData(0,0,null,0,excludesImage,5,null,0));
-
excludesKey.setLayoutData(createFormData(includesText,5,null,0,null,5,0,100));
excludesText.setLayoutData(createFormData(includesText,5,100,-5,excludesKey,10,100,-5));
+
// customize widgets
destinationKey.setText(ArchivesUIMessages.FilesetInfoWizardPage_destination_label);
14 years, 1 month
JBoss Tools SVN: r27445 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-14 09:09:32 -0500 (Tue, 14 Dec 2010)
New Revision: 27445
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF
Log:
readded versions to required bundles
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF 2010-12-14 12:35:55 UTC (rev 27444)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF 2010-12-14 14:09:32 UTC (rev 27445)
@@ -6,20 +6,20 @@
Bundle-Activator: org.jboss.tools.deltacloud.ui.Activator
Bundle-Vendor: %Bundle-Vendor
Bundle-Localization: plugin
-Require-Bundle: org.jboss.tools.common,
- org.eclipse.ui,
- org.eclipse.equinox.security,
- org.eclipse.core.runtime,
- org.eclipse.ui.views,
- org.eclipse.ui.views.properties.tabbed,
- org.jboss.tools.deltacloud.core,
- org.eclipse.rse.core,
- org.eclipse.jface.databinding,
- org.eclipse.core.databinding,
- org.eclipse.core.databinding.observable,
- org.eclipse.core.databinding.property,
- org.eclipse.core.databinding.beans,
- org.eclipse.core.expressions
+Require-Bundle: org.jboss.tools.common;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.ui;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.equinox.security;bundle-version="[1.0.100,2.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
+ org.eclipse.ui.views;bundle-version="[3.4.1,4.0.0)",
+ org.eclipse.ui.views.properties.tabbed;bundle-version="[3.5.0,4.0.0)",
+ org.jboss.tools.deltacloud.core;bundle-version="[0.0.1,1.0.0]",
+ org.eclipse.rse.core;bundle-version="[3.1.1,4.0.0)",
+ org.eclipse.jface.databinding;bundle-version="[1.4.0,2.0.0)",
+ org.eclipse.core.databinding;bundle-version="[1.3.100,2.0.0)",
+ org.eclipse.core.databinding.observable;bundle-version="[1.3.0,2.0.0)",
+ org.eclipse.core.databinding.property;bundle-version="[1.3.0,2.0.0)",
+ org.eclipse.core.databinding.beans;bundle-version="[1.2.100,2.0.0)",
+ org.eclipse.core.expressions;bundle-version="[3.4.200,4.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.deltacloud.ui,
14 years, 1 month
JBoss Tools SVN: r27444 - in trunk/cdi/plugins/org.jboss.tools.cdi.ui: icons/wizard and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-12-14 07:35:55 -0500 (Tue, 14 Dec 2010)
New Revision: 27444
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/wizard/WeldWizBan.gif
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/cdi16.png
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUiImages.java
Log:
https://issues.jboss.org/browse/JBIDE-7891
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/cdi16.png
===================================================================
(Binary files differ)
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/wizard/WeldWizBan.gif
===================================================================
(Binary files differ)
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/icons/wizard/WeldWizBan.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUiImages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUiImages.java 2010-12-14 12:04:16 UTC (rev 27443)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUiImages.java 2010-12-14 12:35:55 UTC (rev 27444)
@@ -33,7 +33,7 @@
public static final Image CDI_BEAN_IMAGE = getImage("search/cdi_bean.gif"); //$NON-NLS-1$
public static final Image WELD_IMAGE = getImage("search/weld_icon_16x.gif"); //$NON-NLS-1$
- public static final String WELD_WIZARD_IMAGE_PATH = "wizard/weld_icon_64x.gif"; //$NON-NLS-1$
+ public static final String WELD_WIZARD_IMAGE_PATH = "wizard/WeldWizBan.gif"; //$NON-NLS-1$
public static Image getImage(String key) {
return INSTANCE.createImageDescriptor(key).createImage();
14 years, 1 month
JBoss Tools SVN: r27443 - trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-12-14 07:04:16 -0500 (Tue, 14 Dec 2010)
New Revision: 27443
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewAnnotationLiteralWizardPage.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewBeansXMLCreationWizard.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewDecoratorWizardPage.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewInterceptorWizardPage.java
Log:
https://issues.jboss.org/browse/JBIDE-7875 Added icons to CDI wizards
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewAnnotationLiteralWizardPage.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewAnnotationLiteralWizardPage.java 2010-12-14 11:55:56 UTC (rev 27442)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewAnnotationLiteralWizardPage.java 2010-12-14 12:04:16 UTC (rev 27443)
@@ -53,6 +53,7 @@
import org.jboss.tools.cdi.core.ICDIProject;
import org.jboss.tools.cdi.core.IQualifier;
import org.jboss.tools.cdi.ui.CDIUIMessages;
+import org.jboss.tools.cdi.ui.CDIUiImages;
import org.jboss.tools.common.java.generation.JavaBeanGenerator;
import org.jboss.tools.common.ui.widget.editor.ButtonFieldEditor;
import org.jboss.tools.common.ui.widget.editor.ButtonFieldEditor.ButtonPressedAction;
@@ -75,6 +76,7 @@
public NewAnnotationLiteralWizardPage() {
setTitle(CDIUIMessages.NEW_ANNOTATION_LITERAL_WIZARD_PAGE_NAME);
setDescription(CDIUIMessages.NEW_ANNOTATION_LITERAL_WIZARD_DESCRIPTION);
+ setImageDescriptor(CDIUiImages.getImageDescriptor(CDIUiImages.WELD_WIZARD_IMAGE_PATH));
}
public void init(IStructuredSelection selection) {
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewBeansXMLCreationWizard.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewBeansXMLCreationWizard.java 2010-12-14 11:55:56 UTC (rev 27442)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewBeansXMLCreationWizard.java 2010-12-14 12:04:16 UTC (rev 27443)
@@ -40,6 +40,7 @@
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
import org.jboss.tools.cdi.ui.CDIUIMessages;
import org.jboss.tools.cdi.ui.CDIUIPlugin;
+import org.jboss.tools.cdi.ui.CDIUiImages;
import org.jboss.tools.common.model.filesystems.impl.FileAnyImpl;
import org.jboss.tools.common.model.options.PreferenceModelUtilities;
import org.jboss.tools.common.model.project.ProjectHome;
@@ -70,7 +71,8 @@
mainPage = new WizardNewBeansXMLFileCreationPage("newFilePage1", getSelection());//$NON-NLS-1$
mainPage.setTitle(CDIUIMessages.NEW_BEANS_XML_WIZARD_PAGE_NAME);
mainPage.setDescription(CDIUIMessages.NEW_BEANS_XML_WIZARD_DESCRIPTION);
-
+ mainPage.setImageDescriptor(CDIUiImages.getImageDescriptor(CDIUiImages.WELD_WIZARD_IMAGE_PATH));
+
mainPage.setFileName("beans.xml");
addPage(mainPage);
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewDecoratorWizardPage.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewDecoratorWizardPage.java 2010-12-14 11:55:56 UTC (rev 27442)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewDecoratorWizardPage.java 2010-12-14 12:04:16 UTC (rev 27443)
@@ -50,6 +50,7 @@
import org.jboss.tools.cdi.core.CDIConstants;
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.ui.CDIUIMessages;
+import org.jboss.tools.cdi.ui.CDIUiImages;
import org.jboss.tools.common.java.generation.JavaBeanGenerator;
import org.jboss.tools.common.ui.widget.editor.CompositeEditor;
import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
@@ -70,6 +71,7 @@
public NewDecoratorWizardPage() {
setTitle(CDIUIMessages.NEW_DECORATOR_WIZARD_PAGE_NAME);
setDescription(CDIUIMessages.NEW_DECORATOR_WIZARD_DESCRIPTION);
+ setImageDescriptor(CDIUiImages.getImageDescriptor(CDIUiImages.WELD_WIZARD_IMAGE_PATH));
}
public void init(IStructuredSelection selection) {
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewInterceptorWizardPage.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewInterceptorWizardPage.java 2010-12-14 11:55:56 UTC (rev 27442)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/wizard/NewInterceptorWizardPage.java 2010-12-14 12:04:16 UTC (rev 27443)
@@ -62,6 +62,7 @@
import org.jboss.tools.cdi.core.ICDIAnnotation;
import org.jboss.tools.cdi.core.ICDIProject;
import org.jboss.tools.cdi.ui.CDIUIMessages;
+import org.jboss.tools.cdi.ui.CDIUiImages;
import org.jboss.tools.common.java.generation.JavaBeanGenerator;
import org.jboss.tools.common.ui.widget.editor.CompositeEditor;
import org.jboss.tools.common.ui.widget.editor.IFieldEditor;
@@ -85,6 +86,7 @@
public NewInterceptorWizardPage() {
setTitle(CDIUIMessages.NEW_INTERCEPTOR_WIZARD_PAGE_NAME);
setDescription(CDIUIMessages.NEW_INTERCEPTOR_WIZARD_DESCRIPTION);
+ setImageDescriptor(CDIUiImages.getImageDescriptor(CDIUiImages.WELD_WIZARD_IMAGE_PATH));
}
public void init(IStructuredSelection selection) {
14 years, 1 month
JBoss Tools SVN: r27442 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core: src/org/jboss/tools/deltacloud/core and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-14 06:55:56 -0500 (Tue, 14 Dec 2010)
New Revision: 27442
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java
Log:
[JBIDE-7889]
* added DeltaCloudInstance#toString to facilitate debugging
* changed DeltaCloudInstance#getActions to return DeltaCloudInstance#Action (and not strings)
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-12-14 10:55:49 UTC (rev 27441)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-12-14 11:55:56 UTC (rev 27442)
@@ -1,5 +1,9 @@
2010-12-14 André Dietisheim <adietish(a)redhat.com>
+ * src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java (toString):
+ [JBIDE-7889] added #toString to facilitate debuggin
+ * src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java (getActions):
+ [JBIDE-7889] changed #getActions to return DeltaCloudInstance#Action (and not strings)
* src/org/jboss/tools/deltacloud/core/job/InstanceSchedulingRule.java:
* src/org/jboss/tools/deltacloud/core/job/InstanceStateJob.java:
* src/org/jboss/tools/deltacloud/core/job/InstanceActionJob.java:
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java 2010-12-14 10:55:49 UTC (rev 27441)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java 2010-12-14 11:55:56 UTC (rev 27442)
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.jboss.tools.deltacloud.core;
+import java.util.ArrayList;
import java.util.List;
import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
@@ -107,8 +108,12 @@
return instance.getKey();
}
- public List<String> getActions() {
- return instance.getActionNames();
+ public List<Action> getActions() {
+ List<Action> actions = new ArrayList<Action>();
+ for (InstanceAction action : instance.getActions()) {
+ actions.add(Action.valueOf(action.getName()));
+ }
+ return actions;
}
public String getProfileId() {
@@ -168,4 +173,33 @@
}
return client.performInstanceAction(instanceAction);
}
+
+ @Override
+ public String toString() {
+ StringBuilder builder = new StringBuilder("DeltaCloudInstance");
+ builder.append(" [");
+ appendActions(builder);
+ builder.append("id: ").append(getId())
+ .append("givenName: ").append(givenName)
+ .append("name: ").append(getName())
+ .append("hostName: ").append(getHostName())
+ .append("imageId: ").append(getImageId())
+ .append("key: ").append(getKey())
+ .append("ownerId: ").append(getOwnerId())
+ .append("profileId: ").append(getProfileId())
+ .append("realmId: ").append(getRealmId())
+ .append("state: ").append(getState());
+ builder.append("]");
+ return builder.toString();
+ }
+
+ private StringBuilder appendActions(StringBuilder builder) {
+ builder.append(" actions: [");
+ for (Action action : getActions()) {
+ builder.append("action: ")
+ .append(action.getName());
+ }
+ builder.append("] ");
+ return builder;
+ }
}
14 years, 1 month
JBoss Tools SVN: r27441 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-14 05:55:49 -0500 (Tue, 14 Dec 2010)
New Revision: 27441
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java
Log:
[JBIDE-7889] cleanup, fixing bug with hostname
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java 2010-12-14 10:49:41 UTC (rev 27440)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java 2010-12-14 10:55:49 UTC (rev 27441)
@@ -153,9 +153,11 @@
public String getHostName() {
List<String> hostNames = getHostNames();
- if (hostNames != null && hostNames.size() > 0)
- return hostNames.get(0);
- return null;
+ String hostName = null;
+ if (hostNames != null && hostNames.size() >= 1) {
+ hostName = hostNames.get(0);
+ }
+ return hostName;
}
protected boolean performInstanceAction(Action action, InternalDeltaCloudClient client)
14 years, 1 month
JBoss Tools SVN: r27440 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-14 05:49:41 -0500 (Tue, 14 Dec 2010)
New Revision: 27440
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/RSEandASWizardPage.java
Log:
[JBIDE-7889] added copyright header and authors
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/RSEandASWizardPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/RSEandASWizardPage.java 2010-12-14 10:46:37 UTC (rev 27439)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/RSEandASWizardPage.java 2010-12-14 10:49:41 UTC (rev 27440)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat Inc..
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat Incorporated - initial API and implementation
+ *******************************************************************************/
package org.jboss.tools.deltacloud.integration.wizard;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -28,6 +38,9 @@
import org.osgi.service.prefs.BackingStoreException;
import org.osgi.service.prefs.Preferences;
+/**
+ * @author Rob Stryker
+ */
public class RSEandASWizardPage extends WizardPage implements INewInstanceWizardPage {
private Button createRSE;
14 years, 1 month
JBoss Tools SVN: r27439 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/META-INF.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-14 05:46:37 -0500 (Tue, 14 Dec 2010)
New Revision: 27439
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/META-INF/MANIFEST.MF
Log:
[JBIDE-7889] expose deltacloud classes to integration plugin
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/META-INF/MANIFEST.MF 2010-12-14 10:37:54 UTC (rev 27438)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/META-INF/MANIFEST.MF 2010-12-14 10:46:37 UTC (rev 27439)
@@ -10,7 +10,7 @@
org.eclipse.equinox.security;bundle-version="[1.0.100,2.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
-Export-Package: org.jboss.tools.deltacloud.core;x-friends:="org.jboss.tools.deltacloud.ui,org.jboss.tools.deltacloud.test",
+Export-Package: org.jboss.tools.deltacloud.core;x-friends:="org.jboss.tools.deltacloud.ui,org.jboss.tools.deltacloud.test,org.jboss.tools.deltacloud.integration",
org.jboss.tools.deltacloud.core.client;x-friends:="org.jboss.tools.deltacloud.test,org.jboss.tools.deltacloud.ui",
org.jboss.tools.deltacloud.core.client.request;x-friends:="org.jboss.tools.deltacloud.test",
org.jboss.tools.deltacloud.core.job,
14 years, 1 month