JBoss Tools SVN: r27176 - trunk/download.jboss.org/jbosstools/requirements/helios.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-12-04 15:26:12 -0500 (Sat, 04 Dec 2010)
New Revision: 27176
Modified:
trunk/download.jboss.org/jbosstools/requirements/helios/README.txt
trunk/download.jboss.org/jbosstools/requirements/helios/index.html
Log:
switch to cocoa-x86_64 from carbon; add updated spring-ide 2.5.1
Modified: trunk/download.jboss.org/jbosstools/requirements/helios/README.txt
===================================================================
--- trunk/download.jboss.org/jbosstools/requirements/helios/README.txt 2010-12-04 11:28:21 UTC (rev 27175)
+++ trunk/download.jboss.org/jbosstools/requirements/helios/README.txt 2010-12-04 20:26:12 UTC (rev 27176)
@@ -82,3 +82,20 @@
ssh nickb(a)build.eclipse.org "cd /home/data/httpd/download.eclipse.org/tools/buckminster/updates-3.6; zip -9r ~/downloads/athena/repos/buckminster-repo-1.3.1.r11579_e36.zip * -x \*.gz"
scp nickb@build.eclipse.org:~/downloads/athena/repos/b3.agg*.zip .
scp nickb@build.eclipse.org:~/downloads/athena/repos/buckminster*.zip .
+
+Spring IDE 2.5
+# NOTE: as of 2.5.1, creating the runnable zip using repo2runnable fails. So, instead of ant script, do this:
+# 1. launch clean Eclipse 3.6.1 Classic or JEE (eg., in ~/eclipse/36clean)
+# 2. install ONLY these 7 Spring IDE features into ~/eclipse/36clean:
+# org.springframework.ide.eclipse.feature
+# org.springframework.ide.eclipse.aop.feature
+# org.springframework.ide.eclipse.osgi.feature
+# org.springframework.ide.eclipse.webflow.feature
+# org.springframework.ide.eclipse.batch.feature
+# org.springframework.ide.eclipse.integration.feature
+# org.springframework.ide.eclipse.autowire.feature
+# 3. zip up installed features/plugins using
+# cd ~/eclipse/36clean; \
+# zip -r9 ~/tru/download.jboss.org/jbosstools/requirements/helios/spring-ide-2.5.1.201011101000-RELEASE.zip \
+# $(find . -mindepth 3 -maxdepth 3 -name "???.spring*")
+
Modified: trunk/download.jboss.org/jbosstools/requirements/helios/index.html
===================================================================
--- trunk/download.jboss.org/jbosstools/requirements/helios/index.html 2010-12-04 11:28:21 UTC (rev 27175)
+++ trunk/download.jboss.org/jbosstools/requirements/helios/index.html 2010-12-04 20:26:12 UTC (rev 27176)
@@ -73,7 +73,7 @@
<li><a class=link href=org.eclipse.swtbot.eclipse.gef-2.0.1.20101106_1831-73ca7af-dev-e36.zip>org.eclipse.swtbot.eclipse.gef-2.0.1.20101106_1831-73ca7af-dev-e36.zip</a></li>
<li><a class=link href=org.eclipse.swtbot.eclipse.test.junit4-2.0.1.20101106_1831-73ca7af-dev-e36.zip>org.eclipse.swtbot.eclipse.test.junit4-2.0.1.20101106_1831-73ca7af-dev-e36.zip</a></li>
<li><a class=link href=swtbot-update-site-2.0.1.20101106_1831-73ca7af-dev-e36.zip>swtbot-update-site-2.0.1.20101106_1831-73ca7af-dev-e36.zip</a></li>
-<li><a class=link href=spring-ide-2.5.0.201009082100-CI-R3828-B183.zip>spring-ide-2.5.0.201009082100-CI-R3828-B183.zip</a></li>
+<li><a class=link href=spring-ide-2.5.1.201011101000-RELEASE.zip>spring-ide-2.5.1.201011101000-RELEASE.zip</a></li>
<li><a class=link href=tptp.runtime-TPTP-4.7.1.zip>tptp.runtime-TPTP-4.7.1.zip</a></li>
<li><a class=link href=mdt-uml2-runtime-3.1.1.zip>mdt-uml2-runtime-3.1.1.zip</a></li>
<li><a class=link href=wtp-R-3.2.2-20100915173744.zip>wtp-R-3.2.2-20100915173744.zip</a></li>
14 years
JBoss Tools SVN: r27175 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-04 06:28:21 -0500 (Sat, 04 Dec 2010)
New Revision: 27175
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementTableView.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/ImageView.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/ImageViewLabelAndContentProvider.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceViewLabelAndContentProvider.java
Log:
[JBIDE-7688] first implementation that loads elements in a background task
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementTableView.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementTableView.java 2010-12-03 20:05:27 UTC (rev 27174)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementTableView.java 2010-12-04 11:28:21 UTC (rev 27175)
@@ -13,10 +13,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.layout.TableColumnLayout;
import org.eclipse.jface.viewers.ColumnWeightData;
@@ -90,7 +86,7 @@
return;
}
- removeListener(currentCloud);
+// removeListener(currentCloud);
AbstractCloudElementTableView.this.currentCloud = getCurrentCloud(index, getClouds());
if (currentCloud != null) {
@@ -100,7 +96,7 @@
@Override
public void run() {
setViewerInput(currentCloud);
- addListener(currentCloud);
+// addListener(currentCloud);
}
});
}
@@ -118,15 +114,15 @@
}
};
- private Job viewerInputJob = new Job("") {
+// private Job viewerInputJob = new Job("") {
+//
+// @Override
+// protected IStatus run(IProgressMonitor monitor) {
+//
+// return Status.OK_STATUS;
+// }
+// };
- @Override
- protected IStatus run(IProgressMonitor monitor) {
-
- return Status.OK_STATUS;
- }
- };
-
public AbstractCloudElementTableView() {
lastSelectedCloudPref = new TextPreferenceValue(getSelectedCloudPrefsKey(), Activator.getDefault());
}
@@ -156,15 +152,8 @@
protected abstract String getSelectedCloudPrefsKey();
- protected abstract void addListener(DeltaCloud cloud);
-
- protected abstract void removeListener(DeltaCloud cloud);
-
@Override
public void dispose() {
- for (DeltaCloud cloud : getClouds()) {
- removeListener(cloud);
- }
DeltaCloudManager.getDefault().removeCloudManagerListener(this);
super.dispose();
}
@@ -191,7 +180,7 @@
currentCloud = getCurrentCloud(currentCloudSelector.getSelectionIndex(), clouds);
- addListener(currentCloud);
+// addListener(currentCloud);
setViewerInput(currentCloud);
setFilterLabelVisible(currentCloud, filterLabel);
@@ -406,27 +395,8 @@
*/
protected abstract void refreshToolbarCommandStates();
- public void listChanged(final DeltaCloud cloud, final CLOUDELEMENT[] cloudChildren) {
- // Run following under Display thread since this can be
- // triggered by a non-display thread notifying listeners.
- if (cloud != null
- && currentCloud != null
- && cloud.getName().equals(currentCloud.getName())) {
- Display.getDefault().syncExec(new Runnable() {
- @Override
- public void run() {
- // does not add identical instance twice
- addListener(cloud);
- setViewerInput(cloud);
- refreshToolbarCommandStates();
- }
- });
- }
- }
-
@Override
public void setFocus() {
viewer.getControl().setFocus();
}
-
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java 2010-12-03 20:05:27 UTC (rev 27174)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java 2010-12-04 11:28:21 UTC (rev 27175)
@@ -10,16 +10,23 @@
*******************************************************************************/
package org.jboss.tools.deltacloud.ui.views;
-import java.util.Arrays;
-import java.util.Collection;
+import java.text.MessageFormat;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.viewers.BaseLabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.widgets.Display;
+import org.jboss.tools.common.log.StatusFactory;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.deltacloud.core.ICloudElementFilter;
import org.jboss.tools.deltacloud.core.IDeltaCloudElement;
+import org.jboss.tools.deltacloud.ui.Activator;
import org.jboss.tools.deltacloud.ui.ErrorUtils;
/**
@@ -32,26 +39,13 @@
public abstract class AbstractCloudElementViewLabelAndContentProvider<CLOUDELEMENT extends IDeltaCloudElement> extends
BaseLabelProvider implements ITableContentAndLabelProvider {
+ private DeltaCloud currentCloud;
private ICloudElementFilter<CLOUDELEMENT> localFilter;
+ private TableViewer viewer;
@Override
public Object[] getElements(Object input) {
- Object[] elements = new Object[] {};
- if (input instanceof DeltaCloud) {
- DeltaCloud cloud = (DeltaCloud) input;
- try {
- CLOUDELEMENT[] cloudElements = getCloudElements(cloud);
- ICloudElementFilter<CLOUDELEMENT> filter = getCloudFilter(cloud);
- elements = filter(filter, cloudElements).toArray();
- } catch (DeltaCloudException e) {
- // TODO: internationalize strings
- ErrorUtils.handleError(
- "Error",
- "Could not display elements for cloud " + cloud.getName(),
- e, Display.getDefault().getActiveShell());
- }
- }
- return elements;
+ return new Object[] {};
}
public void setFilter(ICloudElementFilter<CLOUDELEMENT> filter) {
@@ -59,26 +53,100 @@
}
@Override
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ public void inputChanged(final Viewer viewer, Object oldInput, Object newInput) {
+ if (!(newInput instanceof DeltaCloud)) {
+ return;
+ }
+ Assert.isTrue(viewer instanceof TableViewer);
+ this.viewer = (TableViewer) viewer;
+ removeListener(currentCloud);
+ this.currentCloud = (DeltaCloud) newInput;
+ addListener(currentCloud);
+ // TODO internationalize strings
+ final String workTitle = MessageFormat.format("Loading elements of cloud \"{0}\"", currentCloud.getName());
+ new Job(workTitle) {
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ monitor.beginTask(workTitle, IProgressMonitor.UNKNOWN);
+ /*
+ * trigger load of elements, data will get in through
+ * notification (#listChanged)
+ */
+ getCloudElements(currentCloud);
+ monitor.done();
+ return Status.OK_STATUS;
+ } catch (DeltaCloudException e) {
+ return StatusFactory.getInstance(IStatus.ERROR, Activator.PLUGIN_ID,
+ MessageFormat.format("Could not get elements of cloud \"{0}\"", currentCloud.getName()), e);
+ }
+ }
+
+ }.schedule();
}
- protected Collection<CLOUDELEMENT> filter(ICloudElementFilter<CLOUDELEMENT> filter, CLOUDELEMENT[] cloudElements)
- throws DeltaCloudException {
- if (filter == null && cloudElements != null) {
- return Arrays.asList(cloudElements);
- } else {
- return filter.filter(cloudElements);
+ public void listChanged(final DeltaCloud cloud, final CLOUDELEMENT[] cloudElements) {
+ if (isCurrentCloud(cloud)) {
+ addToViewer(cloudElements);
}
}
+ private boolean isCurrentCloud(final DeltaCloud cloud) {
+ return cloud != null
+ && currentCloud != null
+ && cloud.getName().equals(currentCloud.getName());
+ }
+
+ private void addToViewer(final CLOUDELEMENT[] cloudElements) {
+ viewer.getControl().getDisplay().asyncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ try {
+ Object[] elements = filter(getFilter(currentCloud), cloudElements);
+ viewer.add(elements);
+ } catch (DeltaCloudException e) {
+ // TODO: internationalize strings
+ ErrorUtils.handleError(
+ "Error",
+ "Could not get elements of clouds " + currentCloud.getName(),
+ e, Display.getDefault().getActiveShell());
+
+ }
+ }
+ });
+ }
+
private ICloudElementFilter<CLOUDELEMENT> getFilter(DeltaCloud cloud) {
if (localFilter != null) {
return localFilter;
} else {
- return getFilter(cloud);
+ return getCloudFilter(cloud);
}
}
+ protected Object[] filter(ICloudElementFilter<CLOUDELEMENT> filter, CLOUDELEMENT[] cloudElements)
+ throws DeltaCloudException {
+ if (cloudElements == null) {
+ return new Object[] {};
+ }
+ if (filter == null) {
+ return cloudElements;
+ } else {
+ return filter.filter(cloudElements).toArray();
+ }
+ }
+
+ @Override
+ public void dispose() {
+ removeListener(currentCloud);
+ }
+
+ protected abstract void addListener(DeltaCloud cloud);
+
+ protected abstract void removeListener(DeltaCloud cloud);
+
protected abstract ICloudElementFilter<CLOUDELEMENT> getCloudFilter(DeltaCloud cloud);
protected abstract CLOUDELEMENT[] getCloudElements(DeltaCloud cloud) throws DeltaCloudException;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/ImageView.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/ImageView.java 2010-12-03 20:05:27 UTC (rev 27174)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/ImageView.java 2010-12-04 11:28:21 UTC (rev 27175)
@@ -12,7 +12,6 @@
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudImage;
-import org.jboss.tools.deltacloud.core.IImageListListener;
import org.jboss.tools.deltacloud.ui.IDeltaCloudPreferenceConstants;
/**
@@ -23,7 +22,7 @@
* @author Jeff Johnston
* @author Andre Dietisheim
*/
-public class ImageView extends AbstractCloudElementTableView<DeltaCloudImage> implements IImageListListener {
+public class ImageView extends AbstractCloudElementTableView<DeltaCloudImage> { //implements IImageListListener {
@Override
protected String getSelectedCloudPrefsKey() {
@@ -44,20 +43,4 @@
protected void refreshToolbarCommandStates() {
// do nothing
}
-
- @Override
- protected void addListener(DeltaCloud currentCloud) {
- if (currentCloud != null) {
- currentCloud.removeImageListListener(this);
- currentCloud.addImageListListener(this);
- }
- }
-
- @Override
- protected void removeListener(DeltaCloud currentCloud) {
- if (currentCloud != null) {
- currentCloud.removeImageListListener(this);
- currentCloud.addImageListListener(this);
- }
- }
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/ImageViewLabelAndContentProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/ImageViewLabelAndContentProvider.java 2010-12-03 20:05:27 UTC (rev 27174)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/ImageViewLabelAndContentProvider.java 2010-12-04 11:28:21 UTC (rev 27175)
@@ -19,12 +19,14 @@
import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.deltacloud.core.DeltaCloudImage;
import org.jboss.tools.deltacloud.core.ICloudElementFilter;
+import org.jboss.tools.deltacloud.core.IImageListListener;
/**
* @author Jeff Johnston
* @author André Dietisheim
*/
-public class ImageViewLabelAndContentProvider extends AbstractCloudElementViewLabelAndContentProvider<DeltaCloudImage> implements ITableContentAndLabelProvider {
+public class ImageViewLabelAndContentProvider extends AbstractCloudElementViewLabelAndContentProvider<DeltaCloudImage>
+ implements ITableContentAndLabelProvider, IImageListListener {
public enum Column {
NAME(0, 20),
@@ -95,4 +97,17 @@
return cloud.getImages();
}
+ @Override
+ protected void addListener(DeltaCloud currentCloud) {
+ if (currentCloud != null) {
+ currentCloud.addImageListListener(this);
+ }
+ }
+
+ @Override
+ protected void removeListener(DeltaCloud currentCloud) {
+ if (currentCloud != null) {
+ currentCloud.removeImageListListener(this);
+ }
+ }
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java 2010-12-03 20:05:27 UTC (rev 27174)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java 2010-12-04 11:28:21 UTC (rev 27175)
@@ -14,7 +14,6 @@
import org.eclipse.ui.services.IEvaluationService;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
-import org.jboss.tools.deltacloud.core.IInstanceListListener;
import org.jboss.tools.deltacloud.ui.IDeltaCloudPreferenceConstants;
/**
@@ -25,7 +24,7 @@
* @author Jeff Johnston
* @author Andre Dietisheim
*/
-public class InstanceView extends AbstractCloudElementTableView<DeltaCloudInstance> implements IInstanceListListener {
+public class InstanceView extends AbstractCloudElementTableView<DeltaCloudInstance> {
protected String getSelectedCloudPrefsKey() {
return IDeltaCloudPreferenceConstants.LAST_CLOUD_INSTANCE_VIEW;
@@ -50,19 +49,4 @@
evaluationService.requestEvaluation("org.jboss.tools.deltacloud.ui.commands.canReboot");
evaluationService.requestEvaluation("org.jboss.tools.deltacloud.ui.commands.canDestroy");
}
-
-
- protected void addListener(DeltaCloud currentCloud) {
- if (currentCloud != null) {
- currentCloud.removeInstanceListListener(this);
- currentCloud.addInstanceListListener(this);
- }
- }
-
- protected void removeListener(DeltaCloud currentCloud) {
- if (currentCloud != null) {
- currentCloud.removeInstanceListListener(this);
- currentCloud.addInstanceListListener(this);
- }
- }
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceViewLabelAndContentProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceViewLabelAndContentProvider.java 2010-12-03 20:05:27 UTC (rev 27174)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceViewLabelAndContentProvider.java 2010-12-04 11:28:21 UTC (rev 27175)
@@ -21,6 +21,7 @@
import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
import org.jboss.tools.deltacloud.core.ICloudElementFilter;
+import org.jboss.tools.deltacloud.core.IInstanceListListener;
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
/**
@@ -28,7 +29,7 @@
* @author Andre Dietisheim
*/
public class InstanceViewLabelAndContentProvider extends
- AbstractCloudElementViewLabelAndContentProvider<DeltaCloudInstance> implements ITableContentAndLabelProvider {
+ AbstractCloudElementViewLabelAndContentProvider<DeltaCloudInstance> implements ITableContentAndLabelProvider, IInstanceListListener {
public enum Column {
NAME(0, 20),
@@ -125,4 +126,18 @@
return cloud.getInstances();
}
+ @Override
+ protected void addListener(DeltaCloud currentCloud) {
+ if (currentCloud != null) {
+ currentCloud.addInstanceListListener(this);
+ }
+ }
+
+ @Override
+ protected void removeListener(DeltaCloud currentCloud) {
+ if (currentCloud != null) {
+ currentCloud.removeInstanceListListener(this);
+ }
+ }
+
}
14 years
JBoss Tools SVN: r27174 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-03 15:05:27 -0500 (Fri, 03 Dec 2010)
New Revision: 27174
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java
Log:
[JBIDE-7688] cleanup
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java 2010-12-03 19:41:10 UTC (rev 27173)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java 2010-12-03 20:05:27 UTC (rev 27174)
@@ -12,15 +12,12 @@
import java.util.Arrays;
import java.util.Collection;
-import java.util.Collections;
-import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.viewers.BaseLabelProvider;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.widgets.Display;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudException;
-import org.jboss.tools.deltacloud.core.DeltaCloudImage;
import org.jboss.tools.deltacloud.core.ICloudElementFilter;
import org.jboss.tools.deltacloud.core.IDeltaCloudElement;
import org.jboss.tools.deltacloud.ui.ErrorUtils;
@@ -35,48 +32,36 @@
public abstract class AbstractCloudElementViewLabelAndContentProvider<CLOUDELEMENT extends IDeltaCloudElement> extends
BaseLabelProvider implements ITableContentAndLabelProvider {
- private DeltaCloud cloud;
- private Collection<CLOUDELEMENT> cloudElements;
private ICloudElementFilter<CLOUDELEMENT> localFilter;
@Override
- public Object[] getElements(Object inputElement) {
- if (cloudElements == null) {
- return new DeltaCloudImage[] {};
- }
- return cloudElements.toArray();
- }
-
- public void setFilter(ICloudElementFilter<CLOUDELEMENT> filter) {
- this.localFilter = filter;
- }
-
- @Override
- public void dispose() {
- this.cloud = null;
- this.cloudElements = null;
- }
-
- @Override
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- if (newInput != null) {
+ public Object[] getElements(Object input) {
+ Object[] elements = new Object[] {};
+ if (input instanceof DeltaCloud) {
+ DeltaCloud cloud = (DeltaCloud) input;
try {
- Assert.isLegal(newInput instanceof DeltaCloud);
- this.cloud = (DeltaCloud) newInput;
CLOUDELEMENT[] cloudElements = getCloudElements(cloud);
ICloudElementFilter<CLOUDELEMENT> filter = getCloudFilter(cloud);
- this.cloudElements = filter(filter, cloudElements);
+ elements = filter(filter, cloudElements).toArray();
} catch (DeltaCloudException e) {
- this.cloudElements = Collections.emptyList();
// TODO: internationalize strings
ErrorUtils.handleError(
"Error",
"Could not display elements for cloud " + cloud.getName(),
- e, viewer.getControl().getShell());
+ e, Display.getDefault().getActiveShell());
}
}
+ return elements;
}
+ public void setFilter(ICloudElementFilter<CLOUDELEMENT> filter) {
+ this.localFilter = filter;
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+
protected Collection<CLOUDELEMENT> filter(ICloudElementFilter<CLOUDELEMENT> filter, CLOUDELEMENT[] cloudElements)
throws DeltaCloudException {
if (filter == null && cloudElements != null) {
14 years
JBoss Tools SVN: r27173 - branches/jbosstools-3.2.0.Beta2/build/aggregate/site.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-12-03 14:41:10 -0500 (Fri, 03 Dec 2010)
New Revision: 27173
Modified:
branches/jbosstools-3.2.0.Beta2/build/aggregate/site/pom.xml
Log:
remove duplicate entry
Modified: branches/jbosstools-3.2.0.Beta2/build/aggregate/site/pom.xml
===================================================================
--- branches/jbosstools-3.2.0.Beta2/build/aggregate/site/pom.xml 2010-12-03 19:39:16 UTC (rev 27172)
+++ branches/jbosstools-3.2.0.Beta2/build/aggregate/site/pom.xml 2010-12-03 19:41:10 UTC (rev 27173)
@@ -85,14 +85,6 @@
can be referred to in Ant script later -->
<repository>
<id>inputRepo1</id>
- <url>${inputRepo1}</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </repository>
- <repository>
- <id>inputRepo1</id>
<url>${inputRepo1}/all/repo/</url>
<layout>p2</layout>
<snapshots>
14 years
JBoss Tools SVN: r27172 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-03 14:39:16 -0500 (Fri, 03 Dec 2010)
New Revision: 27172
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java
Log:
[JBIDE-7688] cleanup
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java 2010-12-03 19:38:15 UTC (rev 27171)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java 2010-12-03 19:39:16 UTC (rev 27172)
@@ -72,7 +72,7 @@
ErrorUtils.handleError(
"Error",
"Could not display elements for cloud " + cloud.getName(),
- e, Display.getDefault().getActiveShell());
+ e, viewer.getControl().getShell());
}
}
}
14 years
JBoss Tools SVN: r27171 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-03 14:38:15 -0500 (Fri, 03 Dec 2010)
New Revision: 27171
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java
Log:
[JBIDE-7688] cleanup
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java 2010-12-03 19:37:45 UTC (rev 27170)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java 2010-12-03 19:38:15 UTC (rev 27171)
@@ -79,7 +79,7 @@
protected Collection<CLOUDELEMENT> filter(ICloudElementFilter<CLOUDELEMENT> filter, CLOUDELEMENT[] cloudElements)
throws DeltaCloudException {
- if (filter == null && cloud != null) {
+ if (filter == null && cloudElements != null) {
return Arrays.asList(cloudElements);
} else {
return filter.filter(cloudElements);
14 years
JBoss Tools SVN: r27170 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-03 14:37:45 -0500 (Fri, 03 Dec 2010)
New Revision: 27170
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java
Log:
[JBIDE-7688] cleanup
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java 2010-12-03 19:37:06 UTC (rev 27169)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java 2010-12-03 19:37:45 UTC (rev 27170)
@@ -79,7 +79,7 @@
protected Collection<CLOUDELEMENT> filter(ICloudElementFilter<CLOUDELEMENT> filter, CLOUDELEMENT[] cloudElements)
throws DeltaCloudException {
- if (filter == null) {
+ if (filter == null && cloud != null) {
return Arrays.asList(cloudElements);
} else {
return filter.filter(cloudElements);
14 years
JBoss Tools SVN: r27169 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-03 14:37:06 -0500 (Fri, 03 Dec 2010)
New Revision: 27169
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java
Log:
[JBIDE-7688] cleanup
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java 2010-12-03 19:35:02 UTC (rev 27168)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java 2010-12-03 19:37:06 UTC (rev 27169)
@@ -63,7 +63,9 @@
try {
Assert.isLegal(newInput instanceof DeltaCloud);
this.cloud = (DeltaCloud) newInput;
- this.cloudElements = filter(cloud);
+ CLOUDELEMENT[] cloudElements = getCloudElements(cloud);
+ ICloudElementFilter<CLOUDELEMENT> filter = getCloudFilter(cloud);
+ this.cloudElements = filter(filter, cloudElements);
} catch (DeltaCloudException e) {
this.cloudElements = Collections.emptyList();
// TODO: internationalize strings
@@ -75,14 +77,8 @@
}
}
- protected Collection<CLOUDELEMENT> filter(DeltaCloud cloud) throws DeltaCloudException {
- if (cloud == null) {
- return null;
- }
-
- CLOUDELEMENT[] cloudElements = getCloudElements(cloud);
- ICloudElementFilter<CLOUDELEMENT> filter = getCloudFilter(cloud);
-
+ protected Collection<CLOUDELEMENT> filter(ICloudElementFilter<CLOUDELEMENT> filter, CLOUDELEMENT[] cloudElements)
+ throws DeltaCloudException {
if (filter == null) {
return Arrays.asList(cloudElements);
} else {
14 years
JBoss Tools SVN: r27168 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-03 14:35:02 -0500 (Fri, 03 Dec 2010)
New Revision: 27168
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementTableView.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java
Log:
[JBIDE-7688] cleanup
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementTableView.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementTableView.java 2010-12-03 19:13:50 UTC (rev 27167)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementTableView.java 2010-12-03 19:35:02 UTC (rev 27168)
@@ -373,7 +373,7 @@
}
String[] cloudNames = toCloudNames(clouds);
- setCloudSelectorItems(cloudNames);
+ setCloudSelectorItems(cloudNames, currentCloudSelector);
this.currentCloud = getCurrentCloud(index, clouds);
if (cloudNames.length > 0) {
@@ -395,10 +395,10 @@
return (String[]) cloudNames.toArray(new String[cloudNames.size()]);
}
- private void setCloudSelectorItems(String[] cloudNames) {
- currentCloudSelector.removeModifyListener(cloudModifyListener);
- currentCloudSelector.setItems(cloudNames);
- currentCloudSelector.addModifyListener(cloudModifyListener);
+ private void setCloudSelectorItems(String[] cloudNames, Combo cloudSelector) {
+ cloudSelector.removeModifyListener(cloudModifyListener);
+ cloudSelector.setItems(cloudNames);
+ cloudSelector.addModifyListener(cloudModifyListener);
}
/**
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java 2010-12-03 19:13:50 UTC (rev 27167)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/AbstractCloudElementViewLabelAndContentProvider.java 2010-12-03 19:35:02 UTC (rev 27168)
@@ -80,14 +80,14 @@
return null;
}
- ICloudElementFilter<CLOUDELEMENT> filter = null;
- filter = getCloudFilter(cloud);
+ CLOUDELEMENT[] cloudElements = getCloudElements(cloud);
+ ICloudElementFilter<CLOUDELEMENT> filter = getCloudFilter(cloud);
if (filter == null) {
- return Arrays.asList(getCloudElements(cloud));
+ return Arrays.asList(cloudElements);
+ } else {
+ return filter.filter(cloudElements);
}
-
- return filter.filter(getCloudElements(cloud));
}
private ICloudElementFilter<CLOUDELEMENT> getFilter(DeltaCloud cloud) {
14 years