JBoss Tools SVN: r27679 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: src/org/jboss/tools/internal/deltacloud/ui/wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-22 13:03:17 -0500 (Wed, 22 Dec 2010)
New Revision: 27679
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePageLabelAndContentProvider.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java
Log:
[JBIDE-7981] created a image- and label-provider that is unique to the find image page (since the ImageViewLabelAndContentProvider adds items asyncronously and does not fit in the wizard page)
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-22 17:53:58 UTC (rev 27678)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-22 18:03:17 UTC (rev 27679)
@@ -1,5 +1,11 @@
2010-12-22 adietisheim <adietisheim@adietisheim-thinkpad>
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePageLabelAndContentProvider.java:
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java
+ (.doRun):
+ (createControl):
+ [JBIDE-7981] created a image- and label-provider that is unique to the find image page
+ (since the ImageViewLabelAndContentProvider adds items asyncronously and does not fit in the wizard page)
* src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
(bindProfileCombo):
[JBIDE-7983] do not report an error if no hardware profiles are available and no profile is selected therefore.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java 2010-12-22 17:53:58 UTC (rev 27678)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java 2010-12-22 18:03:17 UTC (rev 27679)
@@ -342,4 +342,4 @@
}
});
}
-}
+}
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePageLabelAndContentProvider.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePageLabelAndContentProvider.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePageLabelAndContentProvider.java 2010-12-22 18:03:17 UTC (rev 27679)
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * 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.internal.deltacloud.ui.wizards;
+
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.core.DeltaCloudImage;
+import org.jboss.tools.deltacloud.core.ICloudElementFilter;
+import org.jboss.tools.deltacloud.ui.views.cloudelements.ITableContentAndLabelProvider;
+
+/**
+ * @author Jeff Johnston
+ * @author André Dietisheim
+ */
+public class FindImagePageLabelAndContentProvider implements ITableContentAndLabelProvider {
+
+ public enum Column {
+ NAME(0, 20),
+ ID(1, 20),
+ ARCH(2, 20),
+ DESC(3, 40);
+
+ private int column;
+ private int weight;
+ private static final Map<Integer, Column> lookup = new HashMap<Integer, Column>();
+
+ static {
+ for (Column c : EnumSet.allOf(Column.class))
+ lookup.put(c.getColumnNumber(), c);
+ }
+
+ private Column(int column, int weight) {
+ this.column = column;
+ this.weight = weight;
+ }
+
+ public int getColumnNumber() {
+ return column;
+ }
+
+ public int getWeight() {
+ return weight;
+ }
+
+ public static Column getColumn(int number) {
+ return lookup.get(number);
+ }
+
+ public static int getSize() {
+ return lookup.size();
+ }
+
+ };
+
+ @Override
+ public Image getColumnImage(Object element, int columnIndex) {
+ return null;
+ }
+
+ @Override
+ public String getColumnText(Object element, int columnIndex) {
+ Column c = Column.getColumn(columnIndex);
+ DeltaCloudImage i = (DeltaCloudImage) element;
+ switch (c) {
+ case NAME:
+ return i.getName();
+ case ID:
+ return i.getId();
+ case ARCH:
+ return i.getArchitecture();
+ case DESC:
+ return i.getDescription();
+ }
+ return "";
+ }
+
+ protected ICloudElementFilter<DeltaCloudImage> getCloudFilter(DeltaCloud cloud) {
+ return cloud.getImageFilter();
+ }
+
+ @Override
+ public Object[] getElements(Object input) {
+ Assert.isTrue(input instanceof DeltaCloudImage[]);
+ return (DeltaCloudImage[]) input;
+ }
+
+ @Override
+ public void dispose() {
+ // do nothing
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ // do nothing
+ }
+
+ @Override
+ public void addListener(ILabelProviderListener listener) {
+ // do nothing
+ }
+
+ @Override
+ public boolean isLabelProperty(Object element, String property) {
+ return true;
+ }
+
+ @Override
+ public void removeListener(ILabelProviderListener listener) {
+ // do nothing
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePageLabelAndContentProvider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years
JBoss Tools SVN: r27678 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: src/org/jboss/tools/internal/deltacloud/ui/wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-22 12:53:58 -0500 (Wed, 22 Dec 2010)
New Revision: 27678
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
Log:
[JBIDE-7983] do not report an error if no hardware profiles are available and no profile is selected therefore.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-22 17:35:28 UTC (rev 27677)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-22 17:53:58 UTC (rev 27678)
@@ -1,5 +1,8 @@
2010-12-22 adietisheim <adietisheim@adietisheim-thinkpad>
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
+ (bindProfileCombo):
+ [JBIDE-7983] do not report an error if no hardware profiles are available and no profile is selected therefore.
* src/org/jboss/tools/deltacloud/ui/views/cloud/ImageItem.java:
* src/org/jboss/tools/internal/deltacloud/ui/utils/DeltaCloudObjectLabelUtils.java (getLabel):
* src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java (ImageLabel2DeltaCloudImageConverter.convert):
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 17:35:28 UTC (rev 27677)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2010-12-22 17:53:58 UTC (rev 27678)
@@ -259,8 +259,8 @@
@Override
public IStatus validate(Object value) {
- if (value == null
- || (value instanceof Integer && ((Integer) value) < 0)) {
+ if (areRealmsAvailable() &&
+ !isValidComboIndex(value)) {
// TODO: internationalize strings
return ValidationStatus.error("You must select a realm.");
}
@@ -303,7 +303,7 @@
@Override
public void handleChange(ChangeEvent event) {
- realmCombo.setEnabled(model.getFilteredProfiles().size() > 0);
+ realmCombo.setEnabled(areRealmsAvailable());
}
}, realmsObservable, container);
@@ -320,8 +320,8 @@
@Override
public IStatus validate(Object value) {
- if (value == null
- || (value instanceof Integer && ((Integer) value) < 0)) {
+ if (areProfilesAvailable() &&
+ !isValidComboIndex(value)) {
// TODO: internationalize strings
return ValidationStatus.error("You must select a hardware profile.");
}
@@ -355,7 +355,6 @@
}
}
));
-
// bind combo enablement
IObservableList filteredProfilesObservable =
BeanProperties.list(NewInstanceModel.PROPERTY_FILTERED_PROFILES).observe(model);
@@ -364,11 +363,24 @@
@Override
public void handleChange(ChangeEvent event) {
- profileCombo.setEnabled(model.getFilteredProfiles().size() > 0);
+ profileCombo.setEnabled(areProfilesAvailable());
}
}, filteredProfilesObservable, container);
}
+ private boolean isValidComboIndex(Object index) {
+ return index != null
+ && (index instanceof Integer && ((Integer) index) >= 0);
+ }
+
+ private boolean areProfilesAvailable() {
+ return model.getFilteredProfiles().size() > 0;
+ }
+
+ private boolean areRealmsAvailable() {
+ return model.getRealms().size() > 0;
+ }
+
private void bindProfilePages(Combo hardwareCombo, final Map<String, ProfilePage> profilePages,
DataBindingContext dbc) {
// bind all profiles
@@ -468,7 +480,6 @@
return image;
}
-
private DeltaCloudImage getImage(String id) {
try {
return cloud.getImage(id);
14 years
JBoss Tools SVN: r27677 - 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 12:35:28 -0500 (Wed, 22 Dec 2010)
New Revision: 27677
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
Log:
[JBIDE-7980] extracted image label construction to central class, displaying now "image name [image id]"
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java 2010-12-22 17:08:13 UTC (rev 27676)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java 2010-12-22 17:35:28 UTC (rev 27677)
@@ -11,6 +11,7 @@
package org.jboss.tools.internal.deltacloud.ui.wizards;
import java.text.MessageFormat;
+import java.util.Collection;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -46,7 +47,6 @@
import org.jboss.tools.deltacloud.core.job.AbstractCloudElementJob.CLOUDELEMENT;
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
import org.jboss.tools.deltacloud.ui.views.CVMessages;
-import org.jboss.tools.deltacloud.ui.views.cloudelements.ImageViewLabelAndContentProvider;
import org.jboss.tools.deltacloud.ui.views.cloudelements.TableViewerColumnComparator;
/**
@@ -80,7 +80,6 @@
@Override
public void modifyText(ModifyEvent e) {
- // TODO Auto-generated method stub
validate();
}
@@ -123,9 +122,10 @@
}
public String getImageId() {
- if (selectedElement != null)
- return selectedElement.getId();
- return "";
+ if (selectedElement == null) {
+ return null;
+ }
+ return selectedElement.getId();
}
private void validate() {
@@ -155,7 +155,7 @@
filter = new ImageFilter(cloud);
filter.setRules(newRules);
oldRules = newRules;
- asyncSetImagesToViewer();
+ asyncSetImagesToViewer(filter);
}
}
setPageComplete(isComplete && !hasError);
@@ -216,15 +216,15 @@
Table table = viewer.getTable();
table.setHeaderVisible(true);
table.setLinesVisible(true);
- ImageViewLabelAndContentProvider contentProvider = new ImageViewLabelAndContentProvider();
+ FindImagePageLabelAndContentProvider contentProvider = new FindImagePageLabelAndContentProvider();
viewer.setContentProvider(contentProvider);
viewer.setLabelProvider(contentProvider);
TableViewerColumnComparator comparator = new TableViewerColumnComparator();
viewer.setComparator(comparator);
- for (int i = 0; i < ImageViewLabelAndContentProvider.Column.getSize(); ++i) {
- ImageViewLabelAndContentProvider.Column c =
- ImageViewLabelAndContentProvider.Column.getColumn(i);
+ for (int i = 0; i < FindImagePageLabelAndContentProvider.Column.getSize(); ++i) {
+ FindImagePageLabelAndContentProvider.Column c =
+ FindImagePageLabelAndContentProvider.Column.getColumn(i);
TableColumn tc = new TableColumn(table, SWT.NONE);
if (i == 0)
table.setSortColumn(tc);
@@ -315,14 +315,15 @@
validate();
}
- private void asyncSetImagesToViewer() {
+ private void asyncSetImagesToViewer(final IImageFilter filter) {
new AbstractCloudElementJob(
MessageFormat.format("Get images from cloud {0}", cloud.getName()), cloud, CLOUDELEMENT.IMAGES) {
@Override
protected IStatus doRun(IProgressMonitor monitor) throws DeltaCloudException {
try {
- setViewerInput(cloud.getImages());
+ Collection<DeltaCloudImage> filteredImages = filter.filter(cloud.getImages());
+ setViewerInput(filteredImages.toArray(new DeltaCloudImage[] {}));
return Status.OK_STATUS;
} catch (DeltaCloudException e) {
setViewerInput(new DeltaCloudImage[] {});
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 17:08:13 UTC (rev 27676)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2010-12-22 17:35:28 UTC (rev 27677)
@@ -60,7 +60,6 @@
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.MandatoryStringValidator;
import org.jboss.tools.internal.deltacloud.ui.utils.DataBindingUtils;
-import org.jboss.tools.internal.deltacloud.ui.utils.DeltaCloudObjectLabelUtils;
/**
* @author Jeff Jonston
@@ -460,8 +459,8 @@
@Override
public Object convert(Object fromObject) {
Assert.isLegal(fromObject instanceof String);
+ String id = (String) fromObject;
DeltaCloudImage image = null;
- String id = DeltaCloudObjectLabelUtils.getId((String) fromObject);
if (id != null) {
image = getImage(id);
}
@@ -492,7 +491,7 @@
public Object convert(Object fromObject) {
if (fromObject instanceof DeltaCloudImage) {
DeltaCloudImage image = (DeltaCloudImage) fromObject;
- return DeltaCloudObjectLabelUtils.getLabel(image);
+ return image.getId();
} else {
return "";
}
14 years
JBoss Tools SVN: r27676 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-12-22 12:08:13 -0500 (Wed, 22 Dec 2010)
New Revision: 27676
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardPage.java
Log:
Release model after getting it for read
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardPage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardPage.java 2010-12-22 16:33:57 UTC (rev 27675)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/i18n/ExternalizeStringsWizardPage.java 2010-12-22 17:08:13 UTC (rev 27676)
@@ -996,8 +996,9 @@
if (webContentResource instanceof IContainer) {
IFile templateFile = (IFile) ((IContainer) webContentResource).findMember(filePath); //$NON-NLS-1$
Document document = null;
+ IDOMModel wtpModel = null;
try {
- IDOMModel wtpModel = (IDOMModel)StructuredModelManager.getModelManager().getModelForRead(templateFile);
+ wtpModel = (IDOMModel)StructuredModelManager.getModelManager().getModelForRead(templateFile);
if (wtpModel != null) {
document = wtpModel.getDocument();
}
@@ -1005,6 +1006,10 @@
JspEditorPlugin.getPluginLog().logError(e);
} catch(CoreException e) {
JspEditorPlugin.getPluginLog().logError(e);
+ } finally {
+ if(wtpModel!=null) {
+ wtpModel.releaseFromRead();
+ }
}
if (null != document) {
/*
14 years
JBoss Tools SVN: r27675 - 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 11:33:57 -0500 (Wed, 22 Dec 2010)
New Revision: 27675
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImageWizard.java
Log:
corrected copyright headers and authors
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImageWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImageWizard.java 2010-12-22 16:03:46 UTC (rev 27674)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImageWizard.java 2010-12-22 16:33:57 UTC (rev 27675)
@@ -32,7 +32,6 @@
@Override
public void addPages() {
- // TODO Auto-generated method stub
mainPage = new FindImagePage(cloud);
addPage(mainPage);
}
14 years
JBoss Tools SVN: r27674 - 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 11:03:46 -0500 (Wed, 22 Dec 2010)
New Revision: 27674
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java
Log:
corrected copyright headers and authors
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java 2010-12-22 16:01:32 UTC (rev 27673)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java 2010-12-22 16:03:46 UTC (rev 27674)
@@ -51,6 +51,7 @@
/**
* @author Jeff Johnston
+ * @author André Dietisheim
*/
public class FindImagePage extends WizardPage {
14 years
JBoss Tools SVN: r27673 - 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 11:01:32 -0500 (Wed, 22 Dec 2010)
New Revision: 27673
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CustomWizardDialog.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImageWizard.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ImageFilterPage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ImageFilterWizard.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterPage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterWizard.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysWizard.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java
Log:
corrected copyright headers and authors
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CustomWizardDialog.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CustomWizardDialog.java 2010-12-22 15:56:30 UTC (rev 27672)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CustomWizardDialog.java 2010-12-22 16:01:32 UTC (rev 27673)
@@ -17,6 +17,9 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
+/**
+ * @author Jeff Johnston
+ */
public class CustomWizardDialog extends WizardDialog {
private String finishText;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java 2010-12-22 15:56:30 UTC (rev 27672)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImagePage.java 2010-12-22 16:01:32 UTC (rev 27673)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.internal.deltacloud.ui.wizards;
import java.text.MessageFormat;
@@ -39,6 +49,9 @@
import org.jboss.tools.deltacloud.ui.views.cloudelements.ImageViewLabelAndContentProvider;
import org.jboss.tools.deltacloud.ui.views.cloudelements.TableViewerColumnComparator;
+/**
+ * @author Jeff Johnston
+ */
public class FindImagePage extends WizardPage {
private final static String NAME = "FindImage.name"; //$NON-NLS-1$
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImageWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImageWizard.java 2010-12-22 15:56:30 UTC (rev 27672)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/FindImageWizard.java 2010-12-22 16:01:32 UTC (rev 27673)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.internal.deltacloud.ui.wizards;
import org.eclipse.jface.wizard.Wizard;
@@ -3,4 +13,7 @@
import org.jboss.tools.deltacloud.core.DeltaCloud;
+/**
+ * @author Jeff Johnston
+ */
public class FindImageWizard extends Wizard {
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ImageFilterPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ImageFilterPage.java 2010-12-22 15:56:30 UTC (rev 27672)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ImageFilterPage.java 2010-12-22 16:01:32 UTC (rev 27673)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.internal.deltacloud.ui.wizards;
import org.eclipse.jface.wizard.WizardPage;
@@ -17,6 +27,9 @@
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
+/**
+ * @author Jeff Johnston
+ */
public class ImageFilterPage extends WizardPage {
private final static String NAME = "ImageFilter.name"; //$NON-NLS-1$
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ImageFilterWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ImageFilterWizard.java 2010-12-22 15:56:30 UTC (rev 27672)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ImageFilterWizard.java 2010-12-22 16:01:32 UTC (rev 27673)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.internal.deltacloud.ui.wizards;
import org.eclipse.jface.wizard.Wizard;
@@ -5,6 +15,9 @@
import org.jboss.tools.deltacloud.core.DeltaCloudManager;
import org.jboss.tools.deltacloud.ui.ErrorUtils;
+/**
+ * @author Jeff Johnston
+ */
public class ImageFilterWizard extends Wizard {
private DeltaCloud cloud;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterPage.java 2010-12-22 15:56:30 UTC (rev 27672)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterPage.java 2010-12-22 16:01:32 UTC (rev 27673)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.internal.deltacloud.ui.wizards;
import org.eclipse.jface.wizard.WizardPage;
@@ -17,6 +27,9 @@
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
+/**
+ * @author Jeff Johnston
+ */
public class InstanceFilterPage extends WizardPage {
private final static String NAME = "InstanceFilter.name"; //$NON-NLS-1$
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterWizard.java 2010-12-22 15:56:30 UTC (rev 27672)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/InstanceFilterWizard.java 2010-12-22 16:01:32 UTC (rev 27673)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.internal.deltacloud.ui.wizards;
import org.eclipse.jface.wizard.Wizard;
@@ -6,6 +16,9 @@
import org.jboss.tools.deltacloud.core.DeltaCloudManager;
import org.jboss.tools.deltacloud.ui.ErrorUtils;
+/**
+ * @author Jeff Johnston
+ */
public class InstanceFilterWizard extends Wizard {
private DeltaCloud cloud;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java 2010-12-22 15:56:30 UTC (rev 27672)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java 2010-12-22 16:01:32 UTC (rev 27673)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.internal.deltacloud.ui.wizards;
import java.io.File;
@@ -35,6 +45,9 @@
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
import org.osgi.service.prefs.Preferences;
+/**
+ * @author Jeff Johnston
+ */
public class ManageKeysPage extends WizardPage {
private final static String NAME = "ManageKeys.name"; //$NON-NLS-1$
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysWizard.java 2010-12-22 15:56:30 UTC (rev 27672)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysWizard.java 2010-12-22 16:01:32 UTC (rev 27673)
@@ -13,6 +13,9 @@
import org.eclipse.jface.wizard.Wizard;
import org.jboss.tools.deltacloud.core.DeltaCloud;
+/**
+ * @author Jeff Johnston
+ */
public class ManageKeysWizard extends Wizard {
private DeltaCloud cloud;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java 2010-12-22 15:56:30 UTC (rev 27672)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java 2010-12-22 16:01:32 UTC (rev 27673)
@@ -28,7 +28,6 @@
/**
* @author Jeff Johnston
* @author Andre Dietisheim
- *
*/
public class NewCloudConnectionWizard extends Wizard implements INewWizard, CloudConnection {
14 years
JBoss Tools SVN: r27672 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui: wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-22 10:56:30 -0500 (Wed, 22 Dec 2010)
New Revision: 27672
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/DeltaCloudObjectLabelUtils.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
Log:
[JBIDE-7980] extracted image label construction to central class, displaying now "image name [image id]"
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/DeltaCloudObjectLabelUtils.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/DeltaCloudObjectLabelUtils.java 2010-12-22 15:35:02 UTC (rev 27671)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/DeltaCloudObjectLabelUtils.java 2010-12-22 15:56:30 UTC (rev 27672)
@@ -45,4 +45,20 @@
}
return sb.toString();
}
+
+ public static String getId(String imageLabel) {
+ if (imageLabel == null) {
+ return null;
+ }
+ int idStart = imageLabel.indexOf('[');
+ if (idStart == -1) {
+ return imageLabel;
+ }
+ int idStop = imageLabel.indexOf(']');
+ if (idStop == -1) {
+ return imageLabel.substring(idStart + 1);
+ }
+ return imageLabel.substring(idStart + 1, idStop);
+ }
+
}
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 15:35:02 UTC (rev 27671)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2010-12-22 15:56:30 UTC (rev 27672)
@@ -13,8 +13,6 @@
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
import org.eclipse.core.databinding.Binding;
import org.eclipse.core.databinding.DataBindingContext;
@@ -453,8 +451,6 @@
private class ImageLabel2DeltaCloudImageConverter extends Converter {
- private final Pattern IMAGE_ID_PATTERN = Pattern.compile("[^\\[]*\\[(.*)\\]");
-
private WritableValue imageObservable = new WritableValue();
public ImageLabel2DeltaCloudImageConverter() {
@@ -464,8 +460,8 @@
@Override
public Object convert(Object fromObject) {
Assert.isLegal(fromObject instanceof String);
- String id = getId((String) fromObject);
DeltaCloudImage image = null;
+ String id = DeltaCloudObjectLabelUtils.getId((String) fromObject);
if (id != null) {
image = getImage(id);
}
@@ -473,13 +469,6 @@
return image;
}
- private String getId(String imageLabel) {
- Matcher matcher = IMAGE_ID_PATTERN.matcher(imageLabel);
- if (matcher.find()) {
- return matcher.group(1);
- }
- return null;
- }
private DeltaCloudImage getImage(String id) {
try {
14 years
JBoss Tools SVN: r27671 - trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-12-22 10:35:02 -0500 (Wed, 22 Dec 2010)
New Revision: 27671
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/.project
Log:
validation builder removed from SeamJava test project descriptor
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/.project
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/.project 2010-12-22 15:33:53 UTC (rev 27670)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamJava/.project 2010-12-22 15:35:02 UTC (rev 27671)
@@ -6,11 +6,6 @@
</projects>
<buildSpec>
<buildCommand>
- <name>org.eclipse.wst.validation.validationbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
14 years
JBoss Tools SVN: r27670 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: src/org/jboss/tools/deltacloud/ui/views/cloud and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-22 10:33:53 -0500 (Wed, 22 Dec 2010)
New Revision: 27670
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/DeltaCloudObjectLabelUtils.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud Tools.launch
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/ImageItem.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/InstanceItem.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
Log:
[JBIDE-7980] extracted image label construction to central class, displaying now "image name [image id]"
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-22 15:33:18 UTC (rev 27669)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-22 15:33:53 UTC (rev 27670)
@@ -1,5 +1,9 @@
2010-12-22 adietisheim <adietisheim@adietisheim-thinkpad>
+ * src/org/jboss/tools/deltacloud/ui/views/cloud/ImageItem.java:
+ * src/org/jboss/tools/internal/deltacloud/ui/utils/DeltaCloudObjectLabelUtils.java (getLabel):
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java (ImageLabel2DeltaCloudImageConverter.convert):
+ [JBIDE-7980] extracted image label construction to central class, displaying now "image name [image id]"
* src/org/jboss/tools/deltacloud/ui/views/cloud/InstanceItem.java (getName):
[JBIDE-7977] checking null on given name
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud Tools.launch
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud Tools.launch 2010-12-22 15:33:18 UTC (rev 27669)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud Tools.launch 2010-12-22 15:33:53 UTC (rev 27670)
@@ -10,21 +10,22 @@
<booleanAttribute key="clearws" value="false"/>
<booleanAttribute key="clearwslog" value="false"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Deltacloud Tools"/>
-<booleanAttribute key="default" value="true"/>
-<stringAttribute key="deselected_workspace_plugins" value="org.eclipse.epp.usagedata.recording,org.eclipse.epp.usagedata.ui,org.eclipse.epp.usagedata.gathering,org.jboss.tools.deltacloud.docs,org.jboss.tools.tests,org.jboss.tools.usage.test,org.jboss.tools.deltacloud.test,com.jboss.jbds.usage.branding"/>
+<booleanAttribute key="default" value="false"/>
+<stringAttribute key="deselected_workspace_plugins" value="org.jboss.ide.eclipse.as.wtp.ui,org.jboss.tools.ui.bot.ext,org.jboss.tools.common.projecttemplates,org.jboss.ide.eclipse.as.rse.core,org.jboss.tools.tests.performance,org.jboss.tools.common.el.core,org.jboss.ide.eclipse.as.ui.mbeans,org.jboss.tools.common.gef,org.jboss.ide.eclipse.as.archives.integration.test,org.jboss.tools.common.verification.test,org.jboss.ide.eclipse.archives.core,org.jboss.tools.common.verification,org.jboss.ide.eclipse.archives.jdt.integration,org.jboss.tools.jmx.core.test,org.jboss.tools.common.model,org.jboss.ide.eclipse.as.classpath.core,org.jboss.ide.eclipse.archives.test,org.jboss.ide.eclipse.as.classpath.ui,org.jboss.tools.common.ui,org.jboss.tools.common.text.ext,org.jboss.tools.jmx.ui,org.jboss.tools.ui.bot.ext.test,org.jboss.tools.common.el.core.test,org.jboss.tools.common.model.ui.test,org.jboss.tools.tests,org.jboss.tools.common.text.xml,org.jboss.ide.eclipse.as.ui.test,org.jboss.to!
ols.common.meta.ui,org.jboss.ide.eclipse.archives.webtools,org.jboss.tools.deltacloud.docs,org.jboss.ide.eclipse.as.rse.ui,org.jboss.tools.common.verification.ui.test,org.jboss.tools.common.verification.ui,org.jboss.tools.common.test,org.jboss.tools.common.model.ui.capabilities,org.jboss.tools.common.resref.core,org.jboss.ide.eclipse.archives.ui,org.jboss.tools.common.el.ui,org.jboss.ide.eclipse.as.test,org.jboss.tools.deltacloud.test,org.jboss.tools.jmx.ui.test,org.jboss.ide.eclipse.as.ssh,org.jboss.tools.common.resref.ui,org.jboss.ide.eclipse.as.ui,org.jboss.ide.eclipse.archives.ui.test,org.jboss.ide.eclipse.as.doc.user,org.jboss.tools.common.model.ui,org.jboss.tools.common.model.test"/>
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/../runtime-deltacloud"/>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
-<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -console -debug"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx1024m"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
-<stringAttribute key="selected_target_plugins" value="org.eclipse.core.databinding.beans@default:default,org.jboss.ide.eclipse.archives.core@default:default,javax.mail@default:default,org.eclipse.ecf@default:default,org.eclipse.rse.ui@default:default,org.mortbay.jetty.server@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.core.resources@default:default,org.eclipse.wst.common.emf@default:default,org.jboss.ide.eclipse.archives.ui@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.wst.xml.core@default:default,javax.xml@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.osgi.services@default:default,org.eclipse.rse.subsystems.terminals.core@default:default,org.jboss.tools.jmx.ui@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.rse.shells.ui@default:default,org.eclipse.equinox.p2.operations@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.core.net.linux.x86_!
64@default:false,org.junit4@default:default,org.eclipse.rse.dstore.security@default:default,org.eclipse.rse.efs.ui@default:default,org.eclipse.swt@default:default,org.eclipse.help.ui@default:default,org.eclipse.emf.edit.ui@default:default,org.eclipse.emf.codegen@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.core.variables@default:default,org.eclipse.ui.workbench@default:default,org.apache.xerces@default:default,org.eclipse.compare.core@default:default,org.eclipse.help.base@default:default,org.eclipse.osgi.util@default:default,org.eclipse.pde.build@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.debug.core@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.rse.processes.ui@default:default,javax.activation@default:default,org.eclipse.equinox.common@2:true,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.apache.xml.resolver@default:default,org.eclipse.rse.efs@default:default,org.!
eclipse.core.net@default:default,org.eclipse.rse.subsystems.fi!
les.dsto
re@default:default,javax.servlet@default:default,org.eclipse.rse.files.ui@default:default,org.eclipse.jdt.junit.core@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.compare@default:default,org.eclipse.update.core@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@default:default,org.eclipse.ui.intro@default:default,org.eclipse.rse.subsystems.processes.core@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.jface.databinding@default:default,org.apache.axis@default:default,org.eclipse.equinox.security.ui@default:default,org.uddi4j@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.jface@default:default,org.eclipse.update.configurator@3:true,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.common.ui@default:default,org.apache.ant@default:default,org.eclipse.core.runtime!
.compatibility.auth@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.ui.forms@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.rse.subsystems.files.ssh@default:default,org.sat4j.core@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.ui.views@default:default,org.eclipse.emf.common@default:default,com.ibm.icu@default:default,org.eclipse.jface.text@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.xsd@default:default,org.eclipse.core.databinding@default:default,org.eclipse.emf.edit@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.equinox.p2.director@default:default,org.jboss.tools.jmx.core@default:default,org.eclipse.rse.core@default:default,javax.wsdl*1.6.2.v201005080631@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.r!
se.importexport@default:default,org.eclipse.equinox.http.servl!
et@defau
lt:default,org.eclipse.rse.subsystems.shells.dstore@default:default,com.instantiations.designer.jdt.fragment@default:false,org.eclipse.rse.services.local@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.core.contenttype@default:default,org.eclipse.cdt.core@default:default,org.apache.xml.serializer@default:default,org.eclipse.rse.subsystems.shells.ssh@default:default,org.eclipse.pde.core@default:default,org.eclipse.core.filesystem@default:default,javax.xml.soap@default:default,org.eclipse.rse.services.dstore@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.jdt.debug.ui@default:default,org.eclipse.equinox.app@default:default,org.apache.lucene@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.equinox.security@default:default,org.apache.jasper@default:default,org.eclipse.rse.connectorservice.telnet@default:default,org.eclipse.rse@default:default,org.eclipse.ui.view!
s.properties.tabbed@default:default,org.eclipse.rse.subsystems.processes.dstore@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.ant.core@default:default,org.eclipse.help@default:default,org.eclipse.sdk@default:default,org.eclipse.team.core@default:default,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse.core.databinding.property@default:default,org.eclipse.rse.services.telnet@default:default,org.eclipse.wst.validation@default:default,org.eclipse.ui.editors@default:default,org.eclipse.rse.subsystems.shells.local@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.jdt.junit.runtime@default:default,org.eclipse.tm.terminal@default:default,org.eclipse.ui.views.log@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.jem.util@default:default,org.jboss.tools.xul!
runner.initializer@default:false,org.eclipse.rse.connectorserv!
ice.dsto
re@default:default,org.eclipse.team.ui@default:default,org.apache.commons.net@default:default,org.eclipse.search@default:default,org.apache.commons.el@default:default,org.eclipse.ui.ide@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.rse.subsystems.files.core@default:default,org.eclipse.rse.subsystems.files.local@default:default,org.apache.lucene.analysis@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.jdt.core@default:default,org.eclipse.debug.ui@default:default,org.sat4j.pb@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.eclipse.jsch.core@default:default,org.eclipse.equinox.p2.ui@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.rse.subsystems.files.ftp@default:default,org.eclipse.equinox.p2.di!
rector.app@default:default,org.eclipse.rse.services.files.ftp@default:default,org.eclipse.core.commands@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.rse.subsystems.processes.shell.linux@default:default,org.eclipse.rse.subsystems.processes.local@default:default,org.eclipse.rse.connectorservice.ssh@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.rse.services@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.dstore.extra@default:default,org.eclipse.ui@default:default,org.eclipse.rse.terminals.ui@default:default,org.eclipse.osgi@-1:true,org.eclipse.ui.ide.application@default:default,org.eclipse.cdt.core.linux@default:false,org.eclipse.swtbot.ant.optional.junit3@default:false,org.eclipse.ui.console@default:default,org.eclipse.cdt.ui@default:default,org.eclipse.core.expressions@default:default,org.eclipse.rse.services.ssh@default:default,org.eclipse.equin!
ox.p2.core@default:default,org.eclipse.rse.doc.user@default:de!
fault,or
g.eclipse.jdt.compiler.tool@default:false,org.eclipse.jdt.debug@default:default,org.eclipse.core.jobs@default:default,javax.servlet.jsp@default:default,org.eclipse.jdt@default:default,org.mortbay.jetty.util@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.text@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.cdt.core.linux.x86_64@default:false,org.eclipse.rse.connectorservice.local@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.ui.browser@default:default,org.eclipse.dstore.core@default:default,com.jcraft.jsch@default:default,org.apache.commons.discovery@default:default,javax.xml.rpc@default:default,org.eclipse.rse.subsystems.shells.telnet@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.rse.subsystems.terminals.ssh@default:default,org.eclipse.core.runtime@default:true,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.jdt.juni!
t@default:default,org.hamcrest.core@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.rse.subsystems.shells.core@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.jdt.core.manipulation@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.rse.useractions@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.deltacloud.ui@default:default,org.jboss.tools.deltacloud.core@default:default,org.jboss.tools.common@default:default,org.jboss.tools.usage@default:default"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.rse.services@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.sdk@default:default,org.eclipse.jem.beaninfo@default:default,org.eclipse.compare@default:default,org.eclipse.compare.core@default:default,org.eclipse.equinox.p2.director@default:default,org.apache.commons.el@default:default,org.eclipse.wst.web@default:default,org.eclipse.equinox.p2.touchpoint.eclipse@default:default,org.eclipse.jem.beaninfo.vm@default:default,org.eclipse.pde.build@default:default,org.eclipse.team.ui@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.wst.server.core@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.search@default:default,org.apache.lucene.analysis@default:default,org.eclipse.emf.edit@default:default,org.eclipse.equinox.simpleconfigurator.manipulator@def!
ault:default,org.eclipse.jem.beaninfo.vm.common@default:default,org.eclipse.osgi@-1:true,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.equinox.p2.repository.tools@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.equinox.frameworkadmin@default:default,org.eclipse.core.jobs@default:default,org.hamcrest.core@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.core.contenttype@default:default,org.eclipse.pde.core@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.jst.common.annotations.core@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.ui.editors@default:default,org.eclipse.debug.ui@default:default,org.eclipse.wst.validation@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.jst.j2ee.jca@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.ui.wor!
kbench@default:default,org.eclipse.ui.console@default:default,!
org.ecli
pse.core.expressions@default:default,org.eclipse.jst.j2ee@default:default,org.eclipse.debug.core@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.jdt.debug@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.help@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.jst.common.project.facet.core@default:default,javax.servlet.jsp@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.wst.common.modulecore@default:default,org.eclipse.core.databinding@default:default,org.eclipse.emf.codegen@default:default,org.eclipse.core.resources@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.jface.databinding@de!
fault:default,javax.servlet@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.jface.text@default:default,org.mortbay.jetty.server@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.equinox.preferences@default:default,org.eclipse.core.variables@default:default,org.eclipse.equinox.p2.director.app@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.osgi.services@default:default,org.eclipse.text@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.apache.lucene@default:default,org.eclipse.jem.workbench@default:default,org.eclipse.equinox.app@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.ecf@default:default,org.eclipse.team.core@default:default,org.eclipse.emf.ecore.change!
@default:default,org.eclipse.jem@default:default,org.sat4j.cor!
e@defaul
t:default,org.eclipse.jst.server.core@default:default,org.eclipse.ui.views@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.ant.core@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.apache.xml.serializer@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.jst.j2ee.core@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.jst.jee@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.registry@default:default,org.eclipse.jem.util@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ui.intro@default:default,org.eclipse.equinox.p2.garbagecollector@default:default,org.junit4@default:default,org.apache.ant@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.equinox.security@!
default:default,org.eclipse.core.commands@default:default,org.eclipse.update.core@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.ui.ide@default:default,org.eclipse.core.net@default:default,org.apache.jasper@default:default,org.eclipse.rse.core@default:default,org.eclipse.equinox.p2.publisher@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.jface@default:default,org.eclipse.equinox.frameworkadmin.equinox@default:default,org.eclipse.core.runtime@default:true,org.eclipse.swt@default:default,javax.xml@default:default,org.eclipse.equinox.p2.updatesite@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.equinox.simpleconfigurator@1:true,org.eclipse.wst.xml.core@default:default,org.eclipse.update.configurator@3:true,org.eclipse.jdt.core@default:default,org.eclipse.help.base@default:default,org.eclipse.ui@def!
ault:default,com.ibm.icu@default:default,org.apache.xerces@def!
ault:def
ault,org.eclipse.emf.common@default:default,org.eclipse.jst.common.frameworks@default:default,org.apache.xml.resolver@default:default,org.eclipse.platform@default:default,org.eclipse.swtbot.ant.optional.junit3@default:false,org.eclipse.jst.common.annotations.controller@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.help.ui@default:default,org.mortbay.jetty.util@default:default,org.eclipse.core.filebuffers@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse.ui.ide.application@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.jdt.core.manipulation@default:default,org.sat4j.pb@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.jem.proxy@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.osgi.util@default:default,org.eclipse.equinox.security.ui@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.jboss.ide.eclipse.as.core@default:default,org.jboss.tools.deltacloud.integration@default:default,org.jboss.tools.common@default:default,org.jboss.tools.jmx.core@default:default,org.jboss.ide.eclipse.as.wtp.core@default:default,org.jboss.tools.deltacloud.ui@default:default,org.jboss.tools.deltacloud.core@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
<booleanAttribute key="tracing" value="false"/>
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/ImageItem.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/ImageItem.java 2010-12-22 15:33:18 UTC (rev 27669)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/ImageItem.java 2010-12-22 15:33:53 UTC (rev 27670)
@@ -14,6 +14,7 @@
import org.eclipse.ui.views.properties.IPropertySource;
import org.jboss.tools.deltacloud.core.DeltaCloudImage;
import org.jboss.tools.deltacloud.ui.views.cloud.property.ImagePropertySource;
+import org.jboss.tools.internal.deltacloud.ui.utils.DeltaCloudObjectLabelUtils;
/**
* @author Jeff Johnston
@@ -26,7 +27,7 @@
}
public String getName() {
- return getModel().getName();
+ return DeltaCloudObjectLabelUtils.getLabel(getModel());
}
@Override
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/InstanceItem.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/InstanceItem.java 2010-12-22 15:33:18 UTC (rev 27669)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/InstanceItem.java 2010-12-22 15:33:53 UTC (rev 27670)
@@ -14,6 +14,7 @@
import org.eclipse.ui.views.properties.IPropertySource;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
import org.jboss.tools.deltacloud.ui.views.cloud.property.InstancePropertySource;
+import org.jboss.tools.internal.deltacloud.ui.utils.DeltaCloudObjectLabelUtils;
/**
* @author Jeff Johnston
@@ -26,21 +27,7 @@
}
public String getName() {
- DeltaCloudInstance instance = getModel();
- StringBuilder sb = new StringBuilder();
- if (instance != null) {
- if (instance.getGivenName() != null) {
- sb.append(instance.getGivenName());
- }
- if (instance.getName() != null) {
- sb.append(" [").append(instance.getName()).append("]");
- }
- if (instance.getId() != null) {
- sb.append(" [").append(instance.getId()).append("] ");
- }
- }
- return sb.toString();
-
+ return DeltaCloudObjectLabelUtils.getLabel(getModel());
}
@Override
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/DeltaCloudObjectLabelUtils.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/DeltaCloudObjectLabelUtils.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/DeltaCloudObjectLabelUtils.java 2010-12-22 15:33:53 UTC (rev 27670)
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.internal.deltacloud.ui.utils;
+
+import org.jboss.tools.deltacloud.core.DeltaCloudImage;
+import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
+
+/**
+ * @author André Dietisheim
+ */
+public class DeltaCloudObjectLabelUtils {
+ public static String getLabel(DeltaCloudImage image) {
+ StringBuilder builder = new StringBuilder();
+ if (image != null) {
+ if (image.getName() != null) {
+ builder.append(image.getName()).append(' ');
+ }
+ if (image.getId() != null) {
+ builder.append('[').append(image.getId()).append(']');
+ }
+ }
+ return builder.toString();
+ }
+
+ public static String getLabel(DeltaCloudInstance instance) {
+ StringBuilder sb = new StringBuilder();
+ if (instance != null) {
+ if (instance.getGivenName() != null) {
+ sb.append(instance.getGivenName()).append(' ');
+ }
+ if (instance.getName() != null) {
+ sb.append('[').append(instance.getName()).append(']');
+ }
+ if (instance.getId() != null) {
+ sb.append('[').append(instance.getId()).append(']');
+ }
+ }
+ return sb.toString();
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/DeltaCloudObjectLabelUtils.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
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 15:33:18 UTC (rev 27669)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2010-12-22 15:33:53 UTC (rev 27670)
@@ -13,6 +13,8 @@
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import org.eclipse.core.databinding.Binding;
import org.eclipse.core.databinding.DataBindingContext;
@@ -60,6 +62,7 @@
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.MandatoryStringValidator;
import org.jboss.tools.internal.deltacloud.ui.utils.DataBindingUtils;
+import org.jboss.tools.internal.deltacloud.ui.utils.DeltaCloudObjectLabelUtils;
/**
* @author Jeff Jonston
@@ -430,23 +433,14 @@
private IObservableValue bindImage(Text imageText, DataBindingContext dbc) {
UpdateValueStrategy widgetToModelUpdateStrategy = new UpdateValueStrategy();
- ImageConverter imageConverter = new ImageConverter();
+ ImageLabel2DeltaCloudImageConverter imageConverter = new ImageLabel2DeltaCloudImageConverter();
widgetToModelUpdateStrategy.setConverter(imageConverter);
widgetToModelUpdateStrategy.setAfterGetValidator(
new MandatoryStringValidator(WizardMessages.getString(MUST_ENTER_IMAGE_ID)));
- widgetToModelUpdateStrategy.setAfterConvertValidator(new ImageValidator());
+ widgetToModelUpdateStrategy.setAfterConvertValidator(new DeltaCloudImageValidator());
UpdateValueStrategy modelToTextUpdateStrategy = new UpdateValueStrategy();
- modelToTextUpdateStrategy.setConverter(new Converter(DeltaCloudImage.class, String.class) {
- @Override
- public Object convert(Object fromObject) {
- if (fromObject instanceof DeltaCloudImage) {
- return ((DeltaCloudImage) fromObject).getName();
- } else {
- return "";
- }
- }
- });
+ modelToTextUpdateStrategy.setConverter(new DeltaCloudImage2LabelConverter());
Binding imageBinding = dbc.bindValue(
WidgetProperties.text(SWT.Modify).observeDelayed(IMAGE_CHECK_DELAY, imageText),
@@ -457,36 +451,36 @@
return imageConverter.getImageObservable();
}
- private class ImageValidator implements IValidator {
+ private class ImageLabel2DeltaCloudImageConverter extends Converter {
- @Override
- public IStatus validate(Object value) {
- if (value instanceof DeltaCloudImage) {
- return ValidationStatus.ok();
- } else {
- return ValidationStatus.error(WizardMessages.getFormattedString(
- IMAGE_ID_NOT_FOUND, imageText.getText()));
- }
- }
- }
+ private final Pattern IMAGE_ID_PATTERN = Pattern.compile("[^\\[]*\\[(.*)\\]");
- private class ImageConverter extends Converter {
-
private WritableValue imageObservable = new WritableValue();
- public ImageConverter() {
+ public ImageLabel2DeltaCloudImageConverter() {
super(String.class, DeltaCloudImage.class);
}
@Override
public Object convert(Object fromObject) {
Assert.isLegal(fromObject instanceof String);
- String id = (String) fromObject;
- DeltaCloudImage image = getImage(id);
+ String id = getId((String) fromObject);
+ DeltaCloudImage image = null;
+ if (id != null) {
+ image = getImage(id);
+ }
imageObservable.setValue(image);
return image;
}
+ private String getId(String imageLabel) {
+ Matcher matcher = IMAGE_ID_PATTERN.matcher(imageLabel);
+ if (matcher.find()) {
+ return matcher.group(1);
+ }
+ return null;
+ }
+
private DeltaCloudImage getImage(String id) {
try {
return cloud.getImage(id);
@@ -500,6 +494,35 @@
}
}
+ private class DeltaCloudImage2LabelConverter extends Converter {
+ private DeltaCloudImage2LabelConverter() {
+ super(DeltaCloudImage.class, String.class);
+ }
+
+ @Override
+ public Object convert(Object fromObject) {
+ if (fromObject instanceof DeltaCloudImage) {
+ DeltaCloudImage image = (DeltaCloudImage) fromObject;
+ return DeltaCloudObjectLabelUtils.getLabel(image);
+ } else {
+ return "";
+ }
+ }
+ }
+
+ private class DeltaCloudImageValidator implements IValidator {
+
+ @Override
+ public IStatus validate(Object value) {
+ if (value instanceof DeltaCloudImage) {
+ return ValidationStatus.ok();
+ } else {
+ return ValidationStatus.error(WizardMessages.getFormattedString(
+ IMAGE_ID_NOT_FOUND, imageText.getText()));
+ }
+ }
+ }
+
public NewInstanceModel getModel() {
return model;
}
14 years