JBoss Tools SVN: r27699 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-22 17:05:46 -0500 (Wed, 22 Dec 2010)
New Revision: 27699
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/AbstractCloudJob.java
Log:
added exception to status that is created on failre
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/AbstractCloudJob.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/AbstractCloudJob.java 2010-12-22 21:54:16 UTC (rev 27698)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/job/AbstractCloudJob.java 2010-12-22 22:05:46 UTC (rev 27699)
@@ -47,7 +47,7 @@
} catch (Exception e) {
// TODO: internationalize strings
return StatusFactory.getInstance(IStatus.ERROR, Activator.PLUGIN_ID,
- MessageFormat.format("Could not {0}", getName()));
+ MessageFormat.format("Could not {0}", getName()), e);
} finally {
monitor.done();
Job.getJobManager().endRule(rule);
14 years
JBoss Tools SVN: r27698 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-22 16:54:16 -0500 (Wed, 22 Dec 2010)
New Revision: 27698
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/KeyUnmarshaller.java
Log:
[JBIDE-7864] set reference to key in keyAction
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/KeyUnmarshaller.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/KeyUnmarshaller.java 2010-12-22 21:00:07 UTC (rev 27697)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/unmarshal/KeyUnmarshaller.java 2010-12-22 21:54:16 UTC (rev 27698)
@@ -39,7 +39,7 @@
key.setState(getFirstElementText("state", element));
key.setFingerprint(getFirstElementText("fingerprint", element));
key.setPem(trimPem(getPem(element))); //$NON-NLS-1$
- key.setActions(getKeyActions(element));
+ key.setActions(getKeyActions(element, key));
}
return key;
}
@@ -73,7 +73,7 @@
}
- private List<KeyAction> getKeyActions(Element keyElement) throws DeltaCloudClientException {
+ private List<KeyAction> getKeyActions(Element keyElement, Key key) throws DeltaCloudClientException {
if (keyElement == null) {
return null;
}
@@ -83,6 +83,7 @@
Node linkNode = nodeList.item(i);
KeyAction keyAction = createKeyAction(linkNode);
if (keyAction != null) {
+ keyAction.setKey(key);
actions.add(keyAction);
}
}
14 years
JBoss Tools SVN: r27697 - trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-12-22 16:00:07 -0500 (Wed, 22 Dec 2010)
New Revision: 27697
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectFix.java
Log:
JBIDE-7973 Fixing requirement of 'Missing WTP Runtime' cannot be fixed using 'Search for runtime'
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectFix.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectFix.java 2010-12-22 20:49:53 UTC (rev 27696)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/model/ProjectFix.java 2010-12-22 21:00:07 UTC (rev 27697)
@@ -89,14 +89,14 @@
public void fix() {
if (SEAM_RUNTIME.equals(type)) {
Shell shell = getShell();
- PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(shell,SEAM_PREFERENCES_ID, new String[] {SEAM_PREFERENCES_ID},null);
+ PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(shell,SEAM_PREFERENCES_ID, null ,null);
if (dialog != null) {
dialog.open();
}
}
if (WTP_RUNTIME.equals(type)) {
Shell shell = getShell();
- PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(shell,WTP_PREFERENCES_ID, new String[] {SEAM_PREFERENCES_ID},null);
+ PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(shell,WTP_PREFERENCES_ID, null ,null);
if (dialog != null) {
dialog.open();
}
14 years
JBoss Tools SVN: r27696 - trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-12-22 15:49:53 -0500 (Wed, 22 Dec 2010)
New Revision: 27696
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizard.java
Log:
JBIDE-7972 Quick fix dialog is not shown
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizard.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizard.java 2010-12-22 20:40:55 UTC (rev 27695)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizard.java 2010-12-22 20:49:53 UTC (rev 27696)
@@ -223,7 +223,7 @@
};
workspaceJob.setUser(true);
- final boolean showQuickFix = page.showQuickFix() && projects != null && projects.size() > 0;
+ final boolean showQuickFix = page.showQuickFix();
if (showQuickFix) {
workspaceJob.addJobChangeListener(new IJobChangeListener() {
@@ -246,7 +246,7 @@
} catch (InterruptedException e) {
return;
}
- if (showQuickFix) {
+ if (showQuickFix && projects != null && projects.size() > 0) {
try {
Thread.sleep(100);
} catch (InterruptedException e) {
14 years
JBoss Tools SVN: r27695 - trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-12-22 15:40:55 -0500 (Wed, 22 Dec 2010)
New Revision: 27695
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java
Log:
JBIDE-7970 PE Dialog does not show 'All' sites in 'Site' combo
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java 2010-12-22 20:32:48 UTC (rev 27694)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizardPage.java 2010-12-22 20:40:55 UTC (rev 27695)
@@ -123,8 +123,6 @@
siteCombo = new Combo(siteComposite,SWT.READ_ONLY);
siteCombo.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false));
- siteCombo.setText(ProjectExamplesActivator.ALL_SITES);
-
new Label(composite,SWT.NONE).setText(Messages.NewProjectExamplesWizardPage_Projects);
final ProjectExamplesPatternFilter filter = new ProjectExamplesPatternFilter();
@@ -306,6 +304,7 @@
configureSizeAndLocation();
refresh(viewer, false);
+ siteCombo.setText(ProjectExamplesActivator.ALL_SITES);
}
private void configureSizeAndLocation() {
14 years
JBoss Tools SVN: r27694 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: src/org/jboss/tools/deltacloud/ui/views/cloudelements and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-22 15:32:48 -0500 (Wed, 22 Dec 2010)
New Revision: 27694
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementTableView.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementViewLabelAndContentProvider.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/ImageViewLabelAndContentProvider.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/InstanceViewLabelAndContentProvider.java
Log:
[JBIDE-7959] now null is accepted to clear table view (needed when disconnecting last cloud), now handling case where current cloud is being removed
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-22 19:31:11 UTC (rev 27693)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-22 20:32:48 UTC (rev 27694)
@@ -1,5 +1,13 @@
2010-12-22 adietisheim <adietisheim@adietisheim-thinkpad>
+ * src/org/jboss/tools/deltacloud/ui/views/cloudelements/InstanceViewLabelAndContentProvider.java (asyncAddCloudElements):
+ * src/org/jboss/tools/deltacloud/ui/views/cloudelements/ImageViewLabelAndContentProvider.java (asyncAddCloudElements):
+ * src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementViewLabelAndContentProvider.java (inputChanged):
+ * src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementTableView.java
+ (setViewerInput):
+ (cloudsChanged):
+ [JBIDE-7959] now null is accepted to clear table view (needed when disconnecting last cloud)
+ [JBIDE-7959] now handling case where current cloud is being removed
* src/org/jboss/tools/deltacloud/ui/views/cloudelements/InstanceView.java (addPropertyChangeListener):
[JBIDE-7959] added guard to avoid NPE when adding property change listener to current cloud
* src/org/jboss/tools/internal/deltacloud/ui/wizards/ProfilePage.java
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementTableView.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementTableView.java 2010-12-22 19:31:11 UTC (rev 27693)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementTableView.java 2010-12-22 20:32:48 UTC (rev 27694)
@@ -80,7 +80,7 @@
private TextPreferenceValue lastSelectedCloudPref;
private Composite container;
- private ModifyListener cloudCloudModifyListener = new ModifyListener() {
+ private ModifyListener currentCloudModifyListener = new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
@@ -114,7 +114,8 @@
// only
DeltaCloud cloud = UIUtils.getFirstAdaptedElement(selection, DeltaCloud.class);
if (isNewCloud(cloud)) {
- currentCloudSelector.select(getCloudIndex(cloud, getClouds()));
+ int index = getCloudIndex(cloud, getClouds());
+ currentCloudSelector.select(index);
}
}
};
@@ -240,9 +241,7 @@
protected abstract ITableContentAndLabelProvider getContentAndLabelProvider();
private void setViewerInput(DeltaCloud cloud) {
- if (currentCloud != null) {
- viewer.setInput(currentCloud);
- }
+ viewer.setInput(cloud);
}
/**
@@ -273,7 +272,9 @@
private int getCloudIndex(String cloudName, DeltaCloud[] clouds) {
int index = 0;
- if (cloudName != null && clouds.length > 0) {
+ if (cloudName != null
+ && cloudName.length() > 0
+ && clouds.length > 0) {
for (int i = 0; i < clouds.length; i++) {
DeltaCloud cloud = clouds[i];
if (cloudName != null && cloudName.equals(cloud.getName())) {
@@ -322,7 +323,7 @@
currentCloudSelectorLabel.setText(CVMessages.getString(CLOUD_SELECTOR_LABEL));
this.currentCloudSelector = new Combo(parent, SWT.BORDER | SWT.READ_ONLY);
- currentCloudSelector.addModifyListener(cloudCloudModifyListener);
+ currentCloudSelector.addModifyListener(currentCloudModifyListener);
// Following is a kludge so that on Linux the Combo is read-only but
// has a white background.
currentCloudSelector.addVerifyListener(new VerifyListener() {
@@ -341,10 +342,10 @@
protected abstract String getViewID();
private void initCloudSelector(String cloudNameToSelect, Combo cloudSelector, DeltaCloud[] clouds) {
- if (clouds.length > 0
- && cloudNameToSelect != null && cloudNameToSelect.length() > 0) {
- cloudSelector.setItems(toCloudNames(clouds));
- cloudSelector.select(getCloudIndex(cloudNameToSelect, clouds));
+ if (clouds.length > 0) {
+ setCloudSelectorItems(toCloudNames(clouds), cloudSelector);
+ int index = getCloudIndex(cloudNameToSelect, clouds);
+ cloudSelector.select(index);
}
}
@@ -361,29 +362,26 @@
int index = getCloudIndex(cloud, clouds);
if (index >= 0) {
int selectionIndex = currentCloudSelector.getSelectionIndex();
- currentCloudSelector.removeModifyListener(cloudCloudModifyListener);
+ currentCloudSelector.removeModifyListener(currentCloudModifyListener);
currentCloudSelector.setItem(index, cloud.getName());
currentCloudSelector.select(selectionIndex);
- currentCloudSelector.addModifyListener(cloudCloudModifyListener);
+ currentCloudSelector.addModifyListener(currentCloudModifyListener);
}
container.layout(true, true);
}
public void cloudsChanged(int type, DeltaCloud cloud) {
+ DeltaCloud[] clouds = getClouds();
switch (type) {
- case IDeltaCloudManagerListener.ADD_EVENT:
- addPropertyChangeListener(cloud);
- break;
case IDeltaCloudManagerListener.REMOVE_EVENT:
- removePropertyChangeListener(cloud);
+ onCloudRemoved(cloud, clouds);
break;
+ default:
}
-
- DeltaCloud[] clouds = getClouds();
- int index = getCloudIndex(currentCloud, getClouds());
+
+ int index = getCloudIndex(currentCloud, clouds);
String[] cloudNames = toCloudNames(clouds);
setCloudSelectorItems(cloudNames, currentCloudSelector);
- this.currentCloud = getCloud(index, clouds);
if (cloudNames.length > 0) {
currentCloudSelector.setText(cloudNames[index]);
@@ -395,6 +393,13 @@
container.layout(true, true);
}
+ private void onCloudRemoved(DeltaCloud cloud, DeltaCloud[] clouds) {
+ if (cloud == currentCloud) {
+ removePropertyChangeListener(cloud);
+ this.currentCloud = getCloud(0, clouds);
+ }
+ }
+
protected void addPropertyChangeListener(DeltaCloud cloud) {
if (cloud != null) {
cloud.addPropertyChangeListener(DeltaCloud.PROP_NAME, this);
@@ -418,9 +423,9 @@
}
private void setCloudSelectorItems(String[] cloudNames, Combo cloudSelector) {
- cloudSelector.removeModifyListener(cloudCloudModifyListener);
+ cloudSelector.removeModifyListener(currentCloudModifyListener);
cloudSelector.setItems(cloudNames);
- cloudSelector.addModifyListener(cloudCloudModifyListener);
+ cloudSelector.addModifyListener(currentCloudModifyListener);
}
/**
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementViewLabelAndContentProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementViewLabelAndContentProvider.java 2010-12-22 19:31:11 UTC (rev 27693)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementViewLabelAndContentProvider.java 2010-12-22 20:32:48 UTC (rev 27694)
@@ -36,16 +36,17 @@
private DeltaCloud currentCloud;
private ICloudElementFilter<CLOUDELEMENT> localFilter;
private TableViewer viewer;
-
+
@Override
public Object[] getElements(Object input) {
/*
* items are added in asynchronous manner.
*
* @see #inputChanged
+ *
* @see #asyncAddCloudElements
*/
- return new Object[]{};
+ return new Object[] {};
}
public void setFilter(ICloudElementFilter<CLOUDELEMENT> filter) {
@@ -54,7 +55,7 @@
@Override
public void inputChanged(final Viewer viewer, Object oldInput, Object newInput) {
- if (!(newInput instanceof DeltaCloud)) {
+ if (!(newInput instanceof DeltaCloud || newInput != null)) {
return;
}
Assert.isLegal(viewer instanceof TableViewer);
@@ -64,7 +65,7 @@
addPropertyChangeListener(currentCloud);
asyncAddCloudElements(currentCloud);
}
-
+
protected void updateCloudElements(CLOUDELEMENT[] elements, DeltaCloud cloud) {
if (isCurrentCloud(cloud)) {
addToViewer(elements);
@@ -83,7 +84,7 @@
@Override
public void run() {
try {
- viewer.refresh();
+ clearTableViewer();
Object[] elements = filter(getFilter(currentCloud), cloudElements);
viewer.add(elements);
} catch (DeltaCloudException e) {
@@ -128,6 +129,10 @@
}
}
+ protected void clearTableViewer() {
+ viewer.refresh();
+ }
+
protected abstract ICloudElementFilter<CLOUDELEMENT> getCloudFilter(DeltaCloud cloud);
protected abstract void asyncAddCloudElements(DeltaCloud cloud);
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/ImageViewLabelAndContentProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/ImageViewLabelAndContentProvider.java 2010-12-22 19:31:11 UTC (rev 27693)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/ImageViewLabelAndContentProvider.java 2010-12-22 20:32:48 UTC (rev 27694)
@@ -100,15 +100,19 @@
@Override
protected void asyncAddCloudElements(final DeltaCloud cloud) {
+ if (cloud == null) {
+ clearTableViewer();
+ return;
+ }
new AbstractCloudElementJob(
MessageFormat.format("Get images from cloud {0}", cloud.getName()), cloud, CLOUDELEMENT.IMAGES) {
@Override
protected IStatus doRun(IProgressMonitor monitor) throws DeltaCloudException {
try {
- addToViewer(cloud.getImages());;
+ addToViewer(cloud.getImages());
return Status.OK_STATUS;
- } catch(DeltaCloudException e) {
+ } catch (DeltaCloudException e) {
throw e;
}
}
@@ -123,12 +127,12 @@
updateCloudElements(images, cloud);
}
}
-
+
@Override
public void addPropertyChangeListener(DeltaCloud cloud) {
cloud.addPropertyChangeListener(DeltaCloud.PROP_IMAGES, this);
}
-
+
protected DeltaCloudImage[] getCloudElements(DeltaCloud cloud) throws DeltaCloudException {
return cloud.getImages();
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/InstanceViewLabelAndContentProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/InstanceViewLabelAndContentProvider.java 2010-12-22 19:31:11 UTC (rev 27693)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/InstanceViewLabelAndContentProvider.java 2010-12-22 20:32:48 UTC (rev 27694)
@@ -125,6 +125,10 @@
@Override
protected void asyncAddCloudElements(final DeltaCloud cloud) {
+ if (cloud == null) {
+ clearTableViewer();
+ return;
+ }
new AbstractCloudElementJob(
MessageFormat.format("Get instances from cloud {0}", cloud.getName()), cloud, CLOUDELEMENT.INSTANCES) {
@@ -132,7 +136,6 @@
protected IStatus doRun(IProgressMonitor monitor) throws DeltaCloudException {
try {
addToViewer(cloud.getInstances());
- ;
return Status.OK_STATUS;
} catch (DeltaCloudException e) {
throw e;
14 years
JBoss Tools SVN: r27693 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: src/org/jboss/tools/deltacloud/ui/views/cloudelements and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-22 14:31:11 -0500 (Wed, 22 Dec 2010)
New Revision: 27693
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/InstanceView.java
Log:
[JBIDE-7959] added guard to avoid NPE when adding property change listener to current cloud
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-22 19:22:43 UTC (rev 27692)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-22 19:31:11 UTC (rev 27693)
@@ -1,5 +1,7 @@
2010-12-22 adietisheim <adietisheim@adietisheim-thinkpad>
+ * src/org/jboss/tools/deltacloud/ui/views/cloudelements/InstanceView.java (addPropertyChangeListener):
+ [JBIDE-7959] added guard to avoid NPE when adding property change listener to current cloud
* src/org/jboss/tools/internal/deltacloud/ui/wizards/ProfilePage.java
(setCPU):
(setMemody):
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/InstanceView.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/InstanceView.java 2010-12-22 19:22:43 UTC (rev 27692)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/InstanceView.java 2010-12-22 19:31:11 UTC (rev 27693)
@@ -39,7 +39,7 @@
protected ITableContentAndLabelProvider getContentAndLabelProvider() {
return new InstanceViewLabelAndContentProvider();
}
-
+
@Override
protected void refreshToolbarCommandStates() {
IEvaluationService evaluationService = (IEvaluationService) PlatformUI.getWorkbench().getService(
@@ -49,10 +49,12 @@
evaluationService.requestEvaluation("org.jboss.tools.deltacloud.ui.commands.canReboot");
evaluationService.requestEvaluation("org.jboss.tools.deltacloud.ui.commands.canDestroy");
}
-
+
@Override
protected void addPropertyChangeListener(DeltaCloud cloud) {
- super.addPropertyChangeListener(cloud);
- cloud.addPropertyChangeListener(DeltaCloud.PROP_INSTANCES, this);
+ if (cloud != null) {
+ super.addPropertyChangeListener(cloud);
+ cloud.addPropertyChangeListener(DeltaCloud.PROP_INSTANCES, this);
+ }
}
}
14 years
JBoss Tools SVN: r27692 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/.settings.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-22 14:22:43 -0500 (Wed, 22 Dec 2010)
New Revision: 27692
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/.settings/
Log:
[JBIDE-7984] need to create a documentbuilder on each new parsing to avoid threads using the same builder.
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/.settings
___________________________________________________________________
Name: svn:ignore
- org.jboss.ide.eclipse.as.core.prefs
+ org.jboss.ide.eclipse.as.core.prefs
org.eclipse.jdt.ui.prefs
14 years
JBoss Tools SVN: r27691 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-22 14:22:27 -0500 (Wed, 22 Dec 2010)
New Revision: 27691
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
Log:
[JBIDE-7984]
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2010-12-22 19:21:52 UTC (rev 27690)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2010-12-22 19:22:27 UTC (rev 27691)
@@ -250,7 +250,17 @@
}
private void bindRealmCombo(final Combo realmCombo, DataBindingContext dbc) {
- dbc.bindValue(
+ // realm combo enablement
+ IObservableList realmsObservable = BeanProperties.list(NewInstanceModel.PROPERTY_REALMS).observe(model);
+ DataBindingUtils.addChangeListener(new IChangeListener() {
+
+ @Override
+ public void handleChange(ChangeEvent event) {
+ realmCombo.setEnabled(areRealmsAvailable());
+ }
+ }, realmsObservable, container);
+
+ Binding selectedRealmBinding = dbc.bindValue(
WidgetProperties.singleSelectionIndex().observe(realmCombo),
BeanProperties.value(NewInstanceModel.class, NewInstanceModel.PROPERTY_SELECTED_REALM_INDEX)
.observe(model),
@@ -296,22 +306,24 @@
}
}
));
+ ControlDecorationSupport.create(selectedRealmBinding, SWT.LEFT | SWT.TOP);
+ }
- // realm combo enablement
- IObservableList realmsObservable = BeanProperties.list(NewInstanceModel.PROPERTY_REALMS).observe(model);
- DataBindingUtils.addChangeListener(new IChangeListener() {
+ private void bindProfileCombo(final Combo profileCombo, DataBindingContext dbc) {
+ // bind combo enablement
+ IObservableList filteredProfilesObservable =
+ BeanProperties.list(NewInstanceModel.PROPERTY_FILTERED_PROFILES).observe(model);
+ DataBindingUtils.addChangeListener(
+ new IChangeListener() {
- @Override
- public void handleChange(ChangeEvent event) {
- realmCombo.setEnabled(areRealmsAvailable());
- }
- }, realmsObservable, container);
+ @Override
+ public void handleChange(ChangeEvent event) {
+ profileCombo.setEnabled(areProfilesAvailable());
+ }
+ }, filteredProfilesObservable, container);
- }
-
- private void bindProfileCombo(final Combo profileCombo, DataBindingContext dbc) {
// bind selected combo item
- dbc.bindValue(
+ Binding selectedProfileBinding = dbc.bindValue(
WidgetProperties.singleSelectionIndex().observe(profileCombo),
BeanProperties.value(NewInstanceModel.class, NewInstanceModel.PROPERTY_SELECTED_PROFILE_INDEX).observe(
model),
@@ -355,30 +367,23 @@
}
}
));
- // bind combo enablement
- IObservableList filteredProfilesObservable =
- BeanProperties.list(NewInstanceModel.PROPERTY_FILTERED_PROFILES).observe(model);
- DataBindingUtils.addChangeListener(
- new IChangeListener() {
-
- @Override
- public void handleChange(ChangeEvent event) {
- profileCombo.setEnabled(areProfilesAvailable());
- }
- }, filteredProfilesObservable, container);
+ ControlDecorationSupport.create(selectedProfileBinding, SWT.LEFT | SWT.TOP);
}
private boolean isValidComboIndex(Object index) {
return index != null
- && (index instanceof Integer && ((Integer) index) >= 0);
+ && index instanceof Integer
+ && ((Integer) index) > 0;
}
private boolean areProfilesAvailable() {
- return model.getFilteredProfiles().size() > 0;
+ return model.getFilteredProfiles() != null
+ && model.getFilteredProfiles().size() > 0;
}
private boolean areRealmsAvailable() {
- return model.getRealms().size() > 0;
+ return model.getRealms() != null
+ && model.getRealms().size() > 0;
}
private void bindProfilePages(Combo hardwareCombo, final Map<String, ProfilePage> profilePages,
14 years
JBoss Tools SVN: r27690 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-22 14:21:52 -0500 (Wed, 22 Dec 2010)
New Revision: 27690
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
Log:
[JBIDE-7981] need to create a documentbuilder on each new parsing to avoid threads using the same builder.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-12-22 19:21:36 UTC (rev 27689)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-12-22 19:21:52 UTC (rev 27690)
@@ -1,5 +1,7 @@
2010-12-22 adietisheim <adietisheim@adietisheim-thinkpad>
+ * src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java (DeltaCloudClientImpl):
+ [JBIDE-7981] need to create a documentbuilder on each new parsing to avoid threads using the same builder.
* src/org/jboss/tools/deltacloud/core/FieldMatcher.java (FieldMatcher):
[JBIDE-7981] set filter to filter in case insensitive manner
14 years