JBoss Tools SVN: r23987 - in trunk: maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-08-07 20:44:06 -0400 (Sat, 07 Aug 2010)
New Revision: 23987
Modified:
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/SeamProjectConfigurator.java
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedSeamProjectTest.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java
Log:
https://jira.jboss.org/browse/JBIDE-6767 If there is JBoss Maven Integration facet, new Seam Web Project wizard unnecessarily copies seam libraries to ear project
Modified: trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/SeamProjectConfigurator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/SeamProjectConfigurator.java 2010-08-08 00:20:34 UTC (rev 23986)
+++ trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/SeamProjectConfigurator.java 2010-08-08 00:44:06 UTC (rev 23987)
@@ -7,6 +7,7 @@
import org.apache.maven.model.Dependency;
import org.apache.maven.project.MavenProject;
+import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ProjectScope;
@@ -25,18 +26,23 @@
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jst.j2ee.application.Application;
-import org.eclipse.jst.j2ee.application.EjbModule;
import org.eclipse.jst.j2ee.application.Module;
-import org.eclipse.jst.j2ee.application.WebModule;
+import org.eclipse.jst.j2ee.application.internal.operations.AddComponentToEnterpriseApplicationDataModelProvider;
+import org.eclipse.jst.j2ee.application.internal.operations.RemoveComponentFromEnterpriseApplicationDataModelProvider;
+import org.eclipse.jst.j2ee.application.internal.operations.RemoveComponentFromEnterpriseApplicationOperation;
import org.eclipse.jst.j2ee.componentcore.util.EARArtifactEdit;
+import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathUpdater;
import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities;
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.ModuleCoreNature;
+import org.eclipse.wst.common.componentcore.datamodel.properties.ICreateReferenceComponentsDataModelProperties;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
+import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
@@ -47,7 +53,6 @@
import org.jboss.tools.maven.core.internal.project.facet.MavenFacetInstallDataModelProvider;
import org.jboss.tools.maven.jsf.MavenJSFActivator;
import org.jboss.tools.maven.seam.MavenSeamActivator;
-import org.jboss.tools.maven.seam.Messages;
import org.jboss.tools.maven.ui.Activator;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.SeamCorePlugin;
@@ -616,14 +621,101 @@
if (uri != null && (uri.startsWith("mvel14") || uri.startsWith("mvel2"))) { //$NON-NLS-1$ //$NON-NLS-2$
iterator.remove();
}
+ if (uri != null && (uri.equals("jboss-seam.jar"))) { //$NON-NLS-1$ //$NON-NLS-2$
+ iterator.remove();
+ }
}
}
- earArtifactEdit.saveIfNecessary(monitor);
+
}
} finally {
if(earArtifactEdit!=null) {
+ earArtifactEdit.saveIfNecessary(monitor);
earArtifactEdit.dispose();
}
}
+ try {
+ final IFacetedProject fproj = ProjectFacetsManager.create(project);
+ if (fproj != null && fproj.hasProjectFacet(earFacet)) {
+ IVirtualComponent earComponent = ComponentCore.createComponent(project);
+ IVirtualReference[] refs = earComponent.getReferences();
+ IVirtualReference mvelReference = null;
+ for (IVirtualReference ref:refs) {
+ String archiveName = ref.getArchiveName();
+ if (archiveName != null && archiveName.startsWith("/lib/mvel2")) { //$NON-NLS-1$
+ mvelReference = ref;
+ break;
+ }
+ }
+ if (mvelReference != null) {
+ changeReference(earComponent, mvelReference);
+ }
+ }
+ } catch (CoreException e) {
+ MavenSeamActivator.log(e);
+ }
+
}
+
+ /**
+ * @param earComponent
+ * @param mvelReference
+ */
+ private void changeReference(IVirtualComponent earComponent,
+ IVirtualReference mvelReference) {
+ List<IVirtualComponent> list = new ArrayList<IVirtualComponent>();
+ list.add(mvelReference.getReferencedComponent());
+
+ IDataModel model = DataModelFactory.createDataModel(new RemoveComponentFromEnterpriseApplicationDataModelProvider() {
+
+ @Override
+ public IDataModelOperation getDefaultOperation() {
+ return new RemoveComponentFromEnterpriseApplicationOperationEx(model);
+ }
+
+ });
+ model.setProperty(ICreateReferenceComponentsDataModelProperties.SOURCE_COMPONENT, earComponent);
+
+ model.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST, list);
+ model.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_DEPLOY_PATH, "/lib"); //$NON-NLS-1$
+ IDataModelOperation op = model.getDefaultOperation();
+ try {
+ op.execute(null, null);
+ J2EEComponentClasspathUpdater.getInstance().queueUpdateEAR(earComponent.getProject());
+ } catch (ExecutionException e) {
+ MavenSeamActivator.log(e);
+ }
+
+
+ String archiveName = mvelReference.getArchiveName();
+ archiveName = archiveName.substring(4);
+ mvelReference.setArchiveName(archiveName);
+ IDataModel dm = DataModelFactory.createDataModel(new AddComponentToEnterpriseApplicationDataModelProvider());
+
+ dm.setProperty(ICreateReferenceComponentsDataModelProperties.SOURCE_COMPONENT, earComponent);
+ dm.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENT_LIST, list);
+
+ dm.setProperty(ICreateReferenceComponentsDataModelProperties.TARGET_COMPONENTS_DEPLOY_PATH, "/lib"); //$NON-NLS-1$
+
+ try {
+ dm.getDefaultOperation().execute(null, null);
+ } catch (ExecutionException e) {
+ MavenSeamActivator.log(e);
+ }
+ }
+
+ private static class RemoveComponentFromEnterpriseApplicationOperationEx extends RemoveComponentFromEnterpriseApplicationOperation {
+
+ public RemoveComponentFromEnterpriseApplicationOperationEx(
+ IDataModel model) {
+ super(model);
+ }
+
+ @Override
+ protected void updateEARDD(IProgressMonitor monitor) {
+ //super.updateEARDD(monitor);
+ }
+
+
+ }
}
Modified: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedSeamProjectTest.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedSeamProjectTest.java 2010-08-08 00:20:34 UTC (rev 23986)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedSeamProjectTest.java 2010-08-08 00:44:06 UTC (rev 23987)
@@ -15,6 +15,7 @@
import static org.junit.Assert.assertTrue;
import java.io.File;
+import java.io.FilenameFilter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@@ -569,4 +570,33 @@
assertTrue(project.getFolder(webInfPath.append("lib")).exists());
}
+
+ // see https://jira.jboss.org/browse/JBIDE-6767
+ @Test
+ public void testLibraries() throws Exception {
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(EAR_PROJECT_NAME);
+ File rootDirectory = new File(project.getLocation().toOSString(), "EarContent");
+ String[] libs = rootDirectory.list(new FilenameFilter() {
+
+ public boolean accept(File dir, String name) {
+ if (name.endsWith(".jar")) {
+ return true;
+ }
+ return false;
+ }
+ });
+ assertTrue(libs.length == 0);
+ File libDirectory = new File (rootDirectory,"lib");
+ libs = libDirectory.list(new FilenameFilter() {
+
+ public boolean accept(File dir, String name) {
+ if (name.endsWith(".jar")) {
+ return true;
+ }
+ return false;
+ }
+ });
+ assertTrue(libs.length == 0);
+ }
+
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2010-08-08 00:20:34 UTC (rev 23986)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2FacetInstallDelegate.java 2010-08-08 00:44:06 UTC (rev 23987)
@@ -152,13 +152,15 @@
* @see org.jboss.tools.seam.internal.core.project.facet.SeamFacetAbstractInstallDelegate#fillEarContents()
*/
@Override
- protected void fillEarContents() {
- final File droolsLibFolder = new File(seamHomePath, DROOLS_LIB_SEAM_RELATED_PATH);
- AntCopyUtils.copyFiles(seamHomeFolder, earContentsFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamHomeFolder)), false);
- AntCopyUtils.copyFiles(seamLibFolder, earContentsFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamLibFolder)), false);
- AntCopyUtils.copyFiles(seamLibFolder, earLibFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_LIB).dir(seamLibFolder)), false);
- AntCopyUtils.copyFiles(droolsLibFolder, earContentsFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(droolsLibFolder)), false);
- AntCopyUtils.copyFiles(seamGenResFolder, earContentsFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamGenResFolder)), false);
+ protected void fillEarContents(IProject project) {
+ if (!SeamCorePlugin.getDefault().hasM2Facet(project)) {
+ final File droolsLibFolder = new File(seamHomePath, DROOLS_LIB_SEAM_RELATED_PATH);
+ AntCopyUtils.copyFiles(seamHomeFolder, earContentsFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamHomeFolder)), false);
+ AntCopyUtils.copyFiles(seamLibFolder, earContentsFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamLibFolder)), false);
+ AntCopyUtils.copyFiles(seamLibFolder, earLibFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_LIB).dir(seamLibFolder)), false);
+ AntCopyUtils.copyFiles(droolsLibFolder, earContentsFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(droolsLibFolder)), false);
+ AntCopyUtils.copyFiles(seamGenResFolder, earContentsFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamGenResFolder)), false);
+ }
}
/*
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java 2010-08-08 00:20:34 UTC (rev 23986)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam2ProjectCreator.java 2010-08-08 00:44:06 UTC (rev 23987)
@@ -89,9 +89,11 @@
@Override
protected void createEarProject() {
super.createEarProject();
- File earContentsFolder = new File(earProjectFolder, "EarContent"); //$NON-NLS-1$
- File earLibFolder = new File(earContentsFolder, "lib"); //$NON-NLS-1$
- AntCopyUtils.copyFiles(seamLibFolder, earLibFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(Seam2FacetInstallDelegate.JBOSS_EAR_LIB).dir(seamLibFolder)));
+ if (!SeamCorePlugin.getDefault().hasM2Facet(seamWebProject)) {
+ File earContentsFolder = new File(earProjectFolder, "EarContent"); //$NON-NLS-1$
+ File earLibFolder = new File(earContentsFolder, "lib"); //$NON-NLS-1$
+ AntCopyUtils.copyFiles(seamLibFolder, earLibFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(Seam2FacetInstallDelegate.JBOSS_EAR_LIB).dir(seamLibFolder)));
+ }
}
@Override
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2010-08-08 00:20:34 UTC (rev 23986)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2010-08-08 00:44:06 UTC (rev 23987)
@@ -566,7 +566,7 @@
SeamCorePlugin.getPluginLog().logError(e);
}
- fillEarContents();
+ fillEarContents(project);
File resources = new File(earProjectFolder, "resources"); //$NON-NLS-1$
AntCopyUtils.copyFileToFile(
@@ -610,7 +610,7 @@
/**
* Fill ear contents
*/
- abstract protected void fillEarContents();
+ abstract protected void fillEarContents(IProject project);
protected IResource getSrcFolder(IProject project) throws JavaModelException {
IJavaProject javaProject = EclipseResourceUtil.getJavaProject(project);
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java 2010-08-08 00:20:34 UTC (rev 23986)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegate.java 2010-08-08 00:44:06 UTC (rev 23987)
@@ -148,7 +148,7 @@
* @see org.jboss.tools.seam.internal.core.project.facet.SeamFacetAbstractInstallDelegate#fillEarContents()
*/
@Override
- protected void fillEarContents() {
+ protected void fillEarContents(IProject project) {
final File droolsLibFolder = new File(seamHomePath, DROOLS_LIB_SEAM_RELATED_PATH);
AntCopyUtils.copyFiles(seamHomeFolder, earContentsFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamHomeFolder)), false);
AntCopyUtils.copyFiles(seamLibFolder, earContentsFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(JBOSS_EAR_CONTENT).dir(seamLibFolder)), false);
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java 2010-08-08 00:20:34 UTC (rev 23986)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java 2010-08-08 00:44:06 UTC (rev 23987)
@@ -492,8 +492,10 @@
// Fill ear contents
AntCopyUtils.copyFiles(seamHomeFolder, earContentsFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(getJbossEarContent()).dir(seamHomeFolder)));
- AntCopyUtils.copyFiles(seamLibFolder, earContentsFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(getJbossEarContent()).dir(seamLibFolder)));
- AntCopyUtils.copyFiles(droolsLibFolder, earContentsFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(getJbossEarContent()).dir(droolsLibFolder)));
+ if (!SeamCorePlugin.getDefault().hasM2Facet(seamWebProject)) {
+ AntCopyUtils.copyFiles(seamLibFolder, earContentsFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(getJbossEarContent()).dir(seamLibFolder)));
+ AntCopyUtils.copyFiles(droolsLibFolder, earContentsFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(getJbossEarContent()).dir(droolsLibFolder)));
+ }
AntCopyUtils.copyFiles(seamGenResFolder, earContentsFolder, new AntCopyUtils.FileSetFileFilter(new AntCopyUtils.FileSet(getJbossEarContent()).dir(seamGenResFolder)));
File resources = new File(earProjectFolder, "resources");
15 years, 5 months
JBoss Tools SVN: r23985 - in trunk/vpe: plugins/org.jboss.tools.vpe.xulrunner/META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2010-08-07 19:59:53 -0400 (Sat, 07 Aug 2010)
New Revision: 23985
Modified:
trunk/vpe/features/org.jboss.tools.xulrunner.feature/feature.xml
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/META-INF/MANIFEST.MF
Log:
revert to XL 1.9.1.2
Modified: trunk/vpe/features/org.jboss.tools.xulrunner.feature/feature.xml
===================================================================
--- trunk/vpe/features/org.jboss.tools.xulrunner.feature/feature.xml 2010-08-06 23:02:25 UTC (rev 23984)
+++ trunk/vpe/features/org.jboss.tools.xulrunner.feature/feature.xml 2010-08-07 23:59:53 UTC (rev 23985)
@@ -29,19 +29,17 @@
version="0.0.0"/>
<plugin
- id="org.mozilla.xulrunner.carbon.macosx.x86"
+ id="org.mozilla.xulrunner.carbon.macosx"
os="macosx"
ws="carbon"
- arch="x86"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
- id="org.mozilla.xulrunner.cocoa.macosx.x86"
+ id="org.mozilla.xulrunner.cocoa.macosx"
os="macosx"
ws="cocoa"
- arch="x86"
download-size="0"
install-size="0"
version="0.0.0"/>
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/META-INF/MANIFEST.MF 2010-08-06 23:02:25 UTC (rev 23984)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/META-INF/MANIFEST.MF 2010-08-07 23:59:53 UTC (rev 23985)
@@ -8,8 +8,8 @@
org.eclipse.core.runtime,
org.mozilla.xpcom,
org.jboss.tools.common,
- org.mozilla.xulrunner.carbon.macosx.x86;resolution:=optional,
- org.mozilla.xulrunner.cocoa.macosx.x86;resolution:=optional,
+ org.mozilla.xulrunner.carbon.macosx;resolution:=optional,
+ org.mozilla.xulrunner.cocoa.macosx;resolution:=optional,
org.mozilla.xulrunner.gtk.linux.x86;resolution:=optional,
org.mozilla.xulrunner.gtk.linux.x86_64;resolution:=optional,
org.mozilla.xulrunner.win32.win32.x86;resolution:=optional
15 years, 5 months
JBoss Tools SVN: r23984 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core: src/org/jboss/tools/deltacloud/core and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjohnstn
Date: 2010-08-06 19:02:25 -0400 (Fri, 06 Aug 2010)
New Revision: 23984
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudRealm.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java
Log:
2010-08-06 Jeff Johnston <jjohnstn(a)redhat.com>
* src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java (sendRequest): Add
exception handling.
* src/org/jboss/tools/deltacloud/core/DeltaCloud.java (createInstance): New method.
* src/org/jboss/tools/deltacloud/core/DeltaCloudRealm.java: Add state constants.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-08-06 23:00:14 UTC (rev 23983)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-08-06 23:02:25 UTC (rev 23984)
@@ -1,3 +1,10 @@
+2010-08-06 Jeff Johnston <jjohnstn(a)redhat.com>
+
+ * src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java (sendRequest): Add
+ exception handling.
+ * src/org/jboss/tools/deltacloud/core/DeltaCloud.java (createInstance): New method.
+ * src/org/jboss/tools/deltacloud/core/DeltaCloudRealm.java: Add state constants.
+
2010-08-05 Jeff Johnston <jjohnstn(a)redhat.com>
* src/org/jboss/tools/deltacloud/core/DeltaCloudHardwareProperty.java (getKind): Fix to
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-08-06 23:00:14 UTC (rev 23983)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2010-08-06 23:02:25 UTC (rev 23984)
@@ -146,4 +146,13 @@
return realms.toArray(new DeltaCloudRealm[realms.size()]);
}
+ public boolean createInstance(String name, String imageId, String realmId, String profileId) throws DeltaCloudException {
+ try {
+ if (client.createInstance(imageId, profileId, realmId, name) != null)
+ return true;
+ } catch (DeltaCloudClientException e) {
+ throw new DeltaCloudException(e);
+ }
+ return false;
+ }
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudRealm.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudRealm.java 2010-08-06 23:00:14 UTC (rev 23983)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudRealm.java 2010-08-06 23:02:25 UTC (rev 23984)
@@ -4,6 +4,9 @@
public class DeltaCloudRealm {
+ public final static String AVAILABLE = "AVAILABLE"; //$NON-NLS-1$
+ public final static String UNAVAILABLE = "UNAVAILABLE"; //$NON-NLS-1$
+
private Realm realm;
public DeltaCloudRealm(Realm realm) {
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java 2010-08-06 23:00:14 UTC (rev 23983)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClient.java 2010-08-06 23:02:25 UTC (rev 23984)
@@ -111,6 +111,8 @@
{
logger.error("Error processing request to: " + requestUrl, e);
throw new DeltaCloudClientException("Error processing request to: " + requestUrl, e);
+ } catch (Exception e) {
+ throw new DeltaCloudClientException(e.getMessage());
}
throw new DeltaCloudClientException("Could not execute request to:" + requestUrl);
}
15 years, 5 months
JBoss Tools SVN: r23983 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: src/org/jboss/tools/deltacloud/ui and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: jjohnstn
Date: 2010-08-06 19:00:14 -0400 (Fri, 06 Aug 2010)
New Revision: 23983
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/IDeltaCloudPreferenceConstants.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/NewInstance.java
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/ProfileComposite.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties
Log:
2010-08-06 Jeff Johnston <jjohnstn(a)redhat.com>
* src/org/jboss/tools/deltacloud/ui/IDeltaCloudPreferenceConstants.java: New file.
* src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstance.java (performFinish): Add logic
to create instance and use confirmation dialog if preferences don't say otherwise.
* src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java (getMemoryProperty): New
method.
(getHardwareProfile): Ditto.
(getCpuProperty): Ditto.
(getInstanceName): Ditto.
(getStorageProperty): Ditto.
(getRealmId): Ditto.
(getPossibleProfiles): Allow profiles without architecture such as opaque profiles to be picked.
(createControl): Add realm and change formatting.
(NAME_ALREADY_IN_USE): Mark unused for time-being.
* src/org/jboss/tools/internal/deltacloud/ui/wizards/ProfileComposite.java (ProfileComposite): Fix format glitch.
* src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.java (getFormattedString): New method.
* src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties: Add new messages.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-08-06 19:25:49 UTC (rev 23982)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-08-06 23:00:14 UTC (rev 23983)
@@ -1,3 +1,22 @@
+2010-08-06 Jeff Johnston <jjohnstn(a)redhat.com>
+
+ * src/org/jboss/tools/deltacloud/ui/IDeltaCloudPreferenceConstants.java: New file.
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstance.java (performFinish): Add logic
+ to create instance and use confirmation dialog if preferences don't say otherwise.
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java (getMemoryProperty): New
+ method.
+ (getHardwareProfile): Ditto.
+ (getCpuProperty): Ditto.
+ (getInstanceName): Ditto.
+ (getStorageProperty): Ditto.
+ (getRealmId): Ditto.
+ (getPossibleProfiles): Allow profiles without architecture such as opaque profiles to be picked.
+ (createControl): Add realm and change formatting.
+ (NAME_ALREADY_IN_USE): Mark unused for time-being.
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/ProfileComposite.java (ProfileComposite): Fix format glitch.
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.java (getFormattedString): New method.
+ * src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties: Add new messages.
+
2010-08-05 Jeff Johnston <jjohnstn(a)redhat.com>
* src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java (createControl): Use a group
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/IDeltaCloudPreferenceConstants.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/IDeltaCloudPreferenceConstants.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/IDeltaCloudPreferenceConstants.java 2010-08-06 23:00:14 UTC (rev 23983)
@@ -0,0 +1,7 @@
+package org.jboss.tools.deltacloud.ui;
+
+public interface IDeltaCloudPreferenceConstants {
+
+ public final static String DONT_CONFIRM_CREATE_INSTANCE = "dont_confirm_create_instance"; //$NON-NLS-1$
+
+}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstance.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstance.java 2010-08-06 19:25:49 UTC (rev 23982)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstance.java 2010-08-06 23:00:14 UTC (rev 23983)
@@ -1,12 +1,31 @@
package org.jboss.tools.internal.deltacloud.ui.wizards;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
import org.eclipse.jface.wizard.Wizard;
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.ui.Activator;
+import org.jboss.tools.deltacloud.ui.IDeltaCloudPreferenceConstants;
+import org.osgi.service.prefs.Preferences;
public class NewInstance extends Wizard {
- private final static String MAINPAGE_NAME = "NewInstance.name"; //$NON-NLS-1$
+ private final static String CREATE_INSTANCE_FAILURE_TITLE = "CreateInstanceError.title"; //$NON-NLS-1$
+ private final static String CREATE_INSTANCE_FAILURE_MSG = "CreateInstanceError.msg"; //$NON-NLS-1$
+ private final static String DEFAULT_REASON = "CreateInstanceErrorReason.msg"; //$NON-NLS-1$
+ private final static String CONFIRM_CREATE_TITLE = "ConfirmCreate.title"; //$NON-NLS-1$
+ private final static String CONFIRM_CREATE_MSG = "ConfirmCreate.msg"; //$NON-NLS-1$
+ private final static String DONT_SHOW_THIS_AGAIN_MSG = "DontShowThisAgain.msg"; //$NON-NLS-1$
+
private NewInstancePage mainPage;
private DeltaCloud cloud;
@@ -31,8 +50,42 @@
@Override
public boolean performFinish() {
- // TODO Auto-generated method stub
- return false;
+ String imageId = image.getId();
+ String profileId = mainPage.getHardwareProfile();
+ String realmId = mainPage.getRealmId();
+ String name = null;
+ try {
+ name = URLEncoder.encode(mainPage.getInstanceName(), "UTF-8");
+ } catch (UnsupportedEncodingException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } //$NON-NLS-1$
+
+ boolean result = false;
+ String errorMessage = WizardMessages.getString(DEFAULT_REASON);
+ try {
+ Preferences prefs = new InstanceScope().getNode(Activator.PLUGIN_ID);
+ boolean dontShowDialog = prefs.getBoolean(IDeltaCloudPreferenceConstants.DONT_CONFIRM_CREATE_INSTANCE, false);
+ if (!dontShowDialog) {
+ MessageDialogWithToggle dialog =
+ MessageDialogWithToggle.openOkCancelConfirm(getShell(), WizardMessages.getString(CONFIRM_CREATE_TITLE),
+ WizardMessages.getString(CONFIRM_CREATE_MSG),
+ WizardMessages.getString(DONT_SHOW_THIS_AGAIN_MSG),
+ false, Activator.getDefault().getPreferenceStore(), IDeltaCloudPreferenceConstants.DONT_CONFIRM_CREATE_INSTANCE);
+ if (dialog.getReturnCode() == Dialog.CANCEL)
+ return true;
+ }
+ result = cloud.createInstance(name, imageId, realmId, profileId);
+ } catch (DeltaCloudException e) {
+ errorMessage = e.getLocalizedMessage();
+ }
+ if (!result) {
+ ErrorDialog.openError(this.getShell(),
+ WizardMessages.getString(CREATE_INSTANCE_FAILURE_TITLE),
+ WizardMessages.getFormattedString(CREATE_INSTANCE_FAILURE_MSG, new String[] {name, imageId, realmId, profileId}),
+ new Status(IStatus.ERROR, Activator.PLUGIN_ID, errorMessage));
+ }
+ return result;
}
}
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-08-06 19:25:49 UTC (rev 23982)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2010-08-06 23:00:14 UTC (rev 23983)
@@ -11,12 +11,14 @@
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudHardwareProfile;
import org.jboss.tools.deltacloud.core.DeltaCloudImage;
+import org.jboss.tools.deltacloud.core.DeltaCloudRealm;
public class NewInstancePage extends WizardPage {
@@ -28,7 +30,10 @@
private static final String IMAGE_LABEL = "Image.label"; //$NON-NLS-1$
private static final String ARCH_LABEL = "Arch.label"; //$NON-NLS-1$
private static final String HARDWARE_LABEL = "Profile.label"; //$NON-NLS-1$
+ private static final String REALM_LABEL = "Realm.label"; //$NON-NLS-1$
private static final String PROPERTIES_LABEL = "Properties.label"; //$NON-NLS-1$
+ private static final String NONE_RESPONSE = "None.response"; //$NON-NLS-1$
+ @SuppressWarnings("unused")
private static final String NAME_ALREADY_IN_USE = "ErrorNameInUse.text"; //$NON-NLS-1$
@@ -38,9 +43,11 @@
private Text nameText;
private Combo hardware;
+ private Control realm;
private String[] profileIds;
private ProfileComposite currPage;
private ProfileComposite[] profilePages;
+ private ArrayList<String> realmIds;
private ModifyListener textListener = new ModifyListener() {
@@ -72,6 +79,35 @@
setPageComplete(false);
}
+ public String getHardwareProfile() {
+ return hardware.getText();
+ }
+
+ public String getRealmId() {
+ if (realm instanceof Combo) {
+ int index = ((Combo)realm).getSelectionIndex();
+ return realmIds.get(index);
+ } else {
+ return null;
+ }
+ }
+
+ public String getCpuProperty() {
+ return currPage.getCPU();
+ }
+
+ public String getStorageProperty() {
+ return currPage.getStorage();
+ }
+
+ public String getMemoryProperty() {
+ return currPage.getMemory();
+ }
+
+ public String getInstanceName() {
+ return nameText.getText();
+ }
+
private void validate() {
boolean complete = true;
boolean errorFree = true;
@@ -92,7 +128,7 @@
profiles = new ArrayList<DeltaCloudHardwareProfile>();
DeltaCloudHardwareProfile[] allProfiles = cloud.getProfiles();
for (DeltaCloudHardwareProfile p : allProfiles) {
- if (image.getArchitecture().equals(p.getArchitecture())) {
+ if (p.getArchitecture() == null || image.getArchitecture().equals(p.getArchitecture())) {
profiles.add(p);
}
}
@@ -136,9 +172,33 @@
Label nameLabel = new Label(container, SWT.NULL);
nameLabel.setText(WizardMessages.getString(NAME_LABEL));
+ Label realmLabel = new Label(container, SWT.NULL);
+ realmLabel.setText(WizardMessages.getString(REALM_LABEL));
+
nameText = new Text(container, SWT.BORDER | SWT.SINGLE);
nameText.addModifyListener(textListener);
+ DeltaCloudRealm[] realms = cloud.getRealms();
+ realmIds = new ArrayList<String>();
+ ArrayList<String> realmNames = new ArrayList<String>();
+ for (int i = 0; i < realms.length; ++i) {
+ DeltaCloudRealm r = realms[i];
+ if (r.getState() == null || r.getState().equals(DeltaCloudRealm.AVAILABLE)) {
+ realmNames.add(r.getName());
+ realmIds.add(r.getId());
+ }
+ }
+ if (realmIds.size() > 0) {
+ Combo combo = new Combo(container, SWT.BORDER | SWT.READ_ONLY);
+ combo.setItems(realmNames.toArray(new String[realmNames.size()]));
+ combo.setText(realmNames.get(0));
+ realm = combo;
+ } else {
+ Label label = new Label(container, SWT.NULL);
+ label.setText(WizardMessages.getString(NONE_RESPONSE));
+ realm = label;
+ }
+
Label hardwareLabel = new Label(container, SWT.NULL);
hardwareLabel.setText(WizardMessages.getString(HARDWARE_LABEL));
@@ -168,10 +228,21 @@
f = new FormData();
f.top = new FormAttachment(dummyLabel, 8);
f.left = new FormAttachment(0, 0);
+ nameLabel.setLayoutData(f);
+
+ f = new FormData();
+ f.top = new FormAttachment(dummyLabel, 8);
+ f.left = new FormAttachment(hardwareLabel, 5);
+ f.right = new FormAttachment(100, 0);
+ nameText.setLayoutData(f);
+
+ f = new FormData();
+ f.top = new FormAttachment(nameText, 8);
+ f.left = new FormAttachment(0, 0);
imageLabel.setLayoutData(f);
f = new FormData();
- f.top = new FormAttachment(dummyLabel, 8);
+ f.top = new FormAttachment(nameText, 8);
f.left = new FormAttachment(hardwareLabel, 5);
f.right = new FormAttachment(100, 0);
imageId.setLayoutData(f);
@@ -187,23 +258,23 @@
arch.setLayoutData(f);
f = new FormData();
- f.top = new FormAttachment(archLabel, 8);
+ f.top = new FormAttachment(archLabel, 11);
f.left = new FormAttachment(0, 0);
- nameLabel.setLayoutData(f);
+ realmLabel.setLayoutData(f);
f = new FormData();
- f.top = new FormAttachment(arch, 5);
+ f.top = new FormAttachment(arch, 8);
f.left = new FormAttachment(hardwareLabel, 5);
f.right = new FormAttachment(100, 0);
- nameText.setLayoutData(f);
+ realm.setLayoutData(f);
f = new FormData();
- f.top = new FormAttachment(nameText, 8);
+ f.top = new FormAttachment(realm, 11);
f.left = new FormAttachment(0, 0);
hardwareLabel.setLayoutData(f);
f = new FormData();
- f.top = new FormAttachment(nameText, 5);
+ f.top = new FormAttachment(realm, 8);
f.left = new FormAttachment(hardwareLabel, 5);
f.right = new FormAttachment(100, 0);
hardware.setLayoutData(f);
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ProfileComposite.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ProfileComposite.java 2010-08-06 19:25:49 UTC (rev 23982)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ProfileComposite.java 2010-08-06 23:00:14 UTC (rev 23983)
@@ -21,6 +21,7 @@
private static final String CPU_LABEL = "Cpu.label"; //$NON-NLS-1$
private static final String MEMORY_LABEL = "Memory.label"; //$NON-NLS-1$
private static final String STORAGE_LABEL = "Storage.label"; //$NON-NLS-1$
+ private static final String DEFAULTED = "Defaulted"; //$NON-NLS-1$
private Composite container;
private DeltaCloudHardwareProfile profile;
@@ -94,11 +95,11 @@
storageLabel.setText(WizardMessages.getString(STORAGE_LABEL));
DeltaCloudHardwareProperty cpuProperty = profile.getNamedProperty("cpu"); //$NON-NLS-1$
+ FormData fd = new FormData();
+ fd.left = new FormAttachment(0, 0);
+ fd.top = new FormAttachment(0, 0);
+ cpuLabel.setLayoutData(fd);
if (cpuProperty != null) {
- FormData fd = new FormData();
- fd.left = new FormAttachment(0, 0);
- fd.top = new FormAttachment(0, 0);
- cpuLabel.setLayoutData(fd);
if (cpuProperty.getKind() == DeltaCloudHardwareProperty.Kind.FIXED) {
Label cpu = new Label(container, SWT.NULL);
cpu.setText(cpuProperty.getValue());
@@ -134,20 +135,28 @@
cpuControl = cpuCombo;
}
String cpuUnit = cpuProperty.getUnit();
- if (cpuUnit != null && !cpuUnit.equals("label")) { //$NON-NLS-1$
+ if (cpuUnit != null && !cpuUnit.equals("label") && !cpuUnit.equals("count")) { //$NON-NLS-1$ //$NON-NLS-1$
Label unitLabel = new Label(container, SWT.NULL);
unitLabel.setText(cpuProperty.getUnit());
FormData f = new FormData();
f.left = new FormAttachment(cpuControl, 5);
unitLabel.setLayoutData(f);
}
+ } else {
+ Label cpu = new Label(container, SWT.NULL);
+ cpu.setText(WizardMessages.getString(DEFAULTED));
+ FormData f = new FormData();
+ f.left = new FormAttachment(storageLabel, 50);
+ f.right = new FormAttachment(100, 0);
+ cpu.setLayoutData(f);
+ cpuControl = cpu;
}
DeltaCloudHardwareProperty memoryProperty = profile.getNamedProperty("memory"); //$NON-NLS-1$
+ fd = new FormData();
+ fd.left = new FormAttachment(cpuLabel, 0, SWT.LEFT);
+ fd.top = new FormAttachment(cpuLabel, 8);
+ memoryLabel.setLayoutData(fd);
if (memoryProperty != null) {
- FormData fd = new FormData();
- fd.left = new FormAttachment(cpuLabel, 0, SWT.LEFT);
- fd.top = new FormAttachment(cpuLabel, 8);
- memoryLabel.setLayoutData(fd);
if (memoryProperty.getKind() == DeltaCloudHardwareProperty.Kind.FIXED) {
Label memory = new Label(container, SWT.NULL);
memory.setText(memoryProperty.getValue());
@@ -229,13 +238,22 @@
f.top = new FormAttachment(cpuControl, 8);
unitLabel.setLayoutData(f);
}
+ } else {
+ Label memory = new Label(container, SWT.NULL);
+ memory.setText(WizardMessages.getString(DEFAULTED));
+ FormData f = new FormData();
+ f.top = new FormAttachment(cpuControl, 8);
+ f.left = new FormAttachment(storageLabel, 50);
+ f.right = new FormAttachment(100, 0);
+ memory.setLayoutData(f);
+ memoryControl = memory;
}
DeltaCloudHardwareProperty storageProperty = profile.getNamedProperty("storage"); //$NON-NLS-1$
+ fd = new FormData();
+ fd.left = new FormAttachment(cpuLabel, 0, SWT.LEFT);
+ fd.top = new FormAttachment(memoryControl, 8);
+ storageLabel.setLayoutData(fd);
if (storageProperty != null) {
- FormData fd = new FormData();
- fd.left = new FormAttachment(cpuLabel, 0, SWT.LEFT);
- fd.top = new FormAttachment(memoryControl, 8);
- storageLabel.setLayoutData(fd);
if (storageProperty.getKind() == DeltaCloudHardwareProperty.Kind.FIXED) {
Label storage = new Label(container, SWT.NULL);
storage.setText(storageProperty.getValue());
@@ -319,6 +337,16 @@
unitLabel.setLayoutData(f);
}
+ } else {
+ Label storage = new Label(container, SWT.NULL);
+ storage.setText(WizardMessages.getString(DEFAULTED));
+ FormData f = new FormData();
+ f.left = new FormAttachment(storageLabel, 50);
+ f.top = new FormAttachment(memoryControl, 8);
+ f.right = new FormAttachment(100, 0);
+ storage.setLayoutData(f);
+ storage.setVisible(true);
+ storageControl = storage;
}
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.java 2010-08-06 19:25:49 UTC (rev 23982)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.java 2010-08-06 23:00:14 UTC (rev 23983)
@@ -1,5 +1,6 @@
package org.jboss.tools.internal.deltacloud.ui.wizards;
+import java.text.MessageFormat;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
@@ -15,6 +16,14 @@
} catch (NullPointerException e) {
return '#' + key + '#';
}
- }
+ }
+
+ public static String getFormattedString(String key, String arg) {
+ return MessageFormat.format(getString(key), new Object[] { arg });
+ }
+ public static String getFormattedString(String key, String[] args) {
+ return MessageFormat.format(getString(key), (Object[])args);
+ }
+
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties 2010-08-06 19:25:49 UTC (rev 23982)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/WizardMessages.properties 2010-08-06 23:00:14 UTC (rev 23983)
@@ -17,8 +17,20 @@
Properties.label=Profile Properties
Cpu.label=CPUs:
Memory.label=Memory:
+Realm.label=Realm:
Storage.label=Storage:
+None.response=None
+Defaulted=Defaulted
+
+CreateInstanceError.title=Create Instance Failure
+CreateInstanceError.msg=The attempt to create instance: name={0}, image={1}, realm={2}, profile={3}
+CreateInstanceErrorReason.msg=Server did not create instance
+
+ConfirmCreate.title=Confirm Create Instance
+ConfirmCreate.msg=Creating an instance will end up starting it. This may result in financial charges. Do you wish to continue?
+DontShowThisAgain.msg=Don't show this dialog again
+
EC2UserNameLink.text=For EC2 use the <a href="https://console.aws.amazon.com/ec2/home">Access ID</a>
EC2PasswordLink.text=For EC2 use the <a href="https://console.aws.amazon.com/ec2/home">Access Secret Key</a>
15 years, 5 months
JBoss Tools SVN: r23982 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-08-06 15:25:49 -0400 (Fri, 06 Aug 2010)
New Revision: 23982
Modified:
trunk/build/target-platform/e36-wtp32.target
Log:
switch to use JBoss Orbit mirror to see if network issues are the problem here
Modified: trunk/build/target-platform/e36-wtp32.target
===================================================================
--- trunk/build/target-platform/e36-wtp32.target 2010-08-06 18:51:28 UTC (rev 23981)
+++ trunk/build/target-platform/e36-wtp32.target 2010-08-06 19:25:49 UTC (rev 23982)
@@ -8,11 +8,11 @@
<repository location="http://m2eclipse.sonatype.org/sites/m2e/"/>
</location>
<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
-<unit id="org.eclipse.swtbot.eclipse.feature.group" version="2.0.0.568-dev-e36"/>
-<unit id="org.eclipse.swtbot.eclipse.gef.feature.group" version="2.0.0.568-dev-e36"/>
-<unit id="org.eclipse.swtbot.feature.group" version="2.0.0.568-dev-e36"/>
-<unit id="org.eclipse.swtbot.ide.feature.group" version="2.0.0.568-dev-e36"/>
-<unit id="org.eclipse.swtbot.eclipse.test.junit4.feature.group" version="2.0.0.568-dev-e36"/>
+<unit id="org.eclipse.swtbot.eclipse.feature.group" version="2.0.0.595-dev-e36"/>
+<unit id="org.eclipse.swtbot.eclipse.gef.feature.group" version="2.0.0.595-dev-e36"/>
+<unit id="org.eclipse.swtbot.feature.group" version="2.0.0.595-dev-e36"/>
+<unit id="org.eclipse.swtbot.ide.feature.group" version="2.0.0.595-dev-e36"/>
+<unit id="org.eclipse.swtbot.eclipse.test.junit4.feature.group" version="2.0.0.595-dev-e36"/>
<repository location="http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site/"/>
</location>
<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
@@ -37,10 +37,10 @@
<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
<repository location="http://download.eclipse.org/technology/subversive/0.7/update-site/"/>
</location>
-<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
+<location includeAllPlatforms="true" includeMode="planner" type="InstallableUnit">
<unit id="javax.wsdl" version="1.6.2.v201005080631"/>
<unit id="org.apache.oro" version="2.0.8.v201005080400"/>
-<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/r..."/>
+<repository location="http://download.jboss.org/jbosstools/updates/orbit/R20100519200754/"/>
</location>
<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
<unit id="org.mozilla.xulrunner.feature.feature.group" version="1.9.2"/>
15 years, 5 months
JBoss Tools SVN: r23981 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-08-06 14:51:28 -0400 (Fri, 06 Aug 2010)
New Revision: 23981
Modified:
trunk/build/target-platform/e36-wtp32.target
Log:
add ORO back into TP
Modified: trunk/build/target-platform/e36-wtp32.target
===================================================================
--- trunk/build/target-platform/e36-wtp32.target 2010-08-06 18:43:52 UTC (rev 23980)
+++ trunk/build/target-platform/e36-wtp32.target 2010-08-06 18:51:28 UTC (rev 23981)
@@ -39,7 +39,7 @@
</location>
<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
<unit id="javax.wsdl" version="1.6.2.v201005080631"/>
-<!-- <unit id="org.apache.oro" version="2.0.8.v201005080400"/> -->
+<unit id="org.apache.oro" version="2.0.8.v201005080400"/>
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/r..."/>
</location>
<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
15 years, 5 months
JBoss Tools SVN: r23980 - trunk/build/target-platform.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-08-06 14:43:52 -0400 (Fri, 06 Aug 2010)
New Revision: 23980
Modified:
trunk/build/target-platform/e36-wtp32.target
Log:
features must be suffixed with .feature.group to be valid IUs. Hopefully.
Modified: trunk/build/target-platform/e36-wtp32.target
===================================================================
--- trunk/build/target-platform/e36-wtp32.target 2010-08-06 18:38:14 UTC (rev 23979)
+++ trunk/build/target-platform/e36-wtp32.target 2010-08-06 18:43:52 UTC (rev 23980)
@@ -43,8 +43,8 @@
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/r..."/>
</location>
<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
-<unit id="org.mozilla.xulrunner.feature" version="1.9.2"/>
-<unit id="org.mozilla.xpcom.feature" version="1.9.2"/>
+<unit id="org.mozilla.xulrunner.feature.feature.group" version="1.9.2"/>
+<unit id="org.mozilla.xpcom.feature.feature.group" version="1.9.2"/>
<repository location="http://download.jboss.org/jbosstools/updates/xulrunner-1.9.2/"/>
</location>
<location includeAllPlatforms="false" includeMode="planner" type="InstallableUnit">
15 years, 5 months
JBoss Tools SVN: r23979 - trunk/drools.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-08-06 14:38:14 -0400 (Fri, 06 Aug 2010)
New Revision: 23979
Modified:
trunk/drools/pom-with-deps.xml
Log:
fix path to org.jboss.tools.ui.bot.ext dependency
Modified: trunk/drools/pom-with-deps.xml
===================================================================
--- trunk/drools/pom-with-deps.xml 2010-08-06 18:33:31 UTC (rev 23978)
+++ trunk/drools/pom-with-deps.xml 2010-08-06 18:38:14 UTC (rev 23979)
@@ -13,25 +13,14 @@
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
- <module>org.jboss.tools.ui.bot.ext</module>
+ <!-- check out dependencies into folder parallel to this one in Hudson workspace -->
+ <module>../org.jboss.tools.ui.bot.ext</module>
+
+ <!-- contained children -->
<module>plugins</module>
<module>features</module>
<module>tests</module>
<module>site</module>
</modules>
- <!-- TODO: figure out how to invoke this BEFORE the dep resolution for target
- platform -->
- <!-- <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId> <version>1.3</version> <executions>
- <execution> <id>clean</id> <phase>clean</phase> <configuration> <tasks> <ant
- antfile="build.xml" /> </tasks> </configuration> <goals> <goal>run</goal>
- </goals> </execution> </executions> <dependencies> <dependency> <groupId>commons-net</groupId>
- <artifactId>commons-net</artifactId> <version>1.4.1</version> </dependency>
- <dependency> <groupId>org.apache.ant</groupId> <artifactId>ant-commons-net</artifactId>
- <version>1.7.1</version> </dependency> <dependency> <groupId>org.apache.ant</groupId>
- <artifactId>ant-apache-regexp</artifactId> <version>1.7.1</version> </dependency>
- <dependency> <groupId>ant-contrib</groupId> <artifactId>ant-contrib</artifactId>
- <version>1.0b3</version> </dependency> </dependencies> </plugin> </plugins>
- </build> -->
</project>
15 years, 5 months
JBoss Tools SVN: r23977 - trunk/maven/tests.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-08-06 14:29:33 -0400 (Fri, 06 Aug 2010)
New Revision: 23977
Modified:
trunk/maven/tests/pom.xml
Log:
https://jira.jboss.org/browse/JBIDE-6715 add org.jboss.tools.maven.ui.bot.test
Modified: trunk/maven/tests/pom.xml
===================================================================
--- trunk/maven/tests/pom.xml 2010-08-06 17:50:45 UTC (rev 23976)
+++ trunk/maven/tests/pom.xml 2010-08-06 18:29:33 UTC (rev 23977)
@@ -7,6 +7,7 @@
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
+ <module>org.jboss.tools.maven.ui.bot.test</module>
</modules>
</project>
15 years, 5 months