JBoss Tools SVN: r27669 - trunk/deltacloud/tests/org.jboss.tools.deltacloud.test.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-22 10:33:18 -0500 (Wed, 22 Dec 2010)
New Revision: 27669
Modified:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/DeltaCloudTestSuite.launch
Log:
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/DeltaCloudTestSuite.launch
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/DeltaCloudTestSuite.launch 2010-12-22 15:12:23 UTC (rev 27668)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/DeltaCloudTestSuite.launch 2010-12-22 15:33:18 UTC (rev 27669)
@@ -12,7 +12,7 @@
<booleanAttribute key="clearwslog" value="false"/>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
<booleanAttribute key="default" value="false"/>
-<stringAttribute key="deselected_workspace_plugins" value="org.jboss.tools.gwt.ui,org.eclipse.epp.usagedata.recording,org.jboss.tools.deltacloud.integration,org.eclipse.epp.usagedata.gathering,org.jboss.tools.deltacloud.docs,org.jboss.tools.usage,org.jboss.tools.usage.test,com.jboss.jbds.usage.branding,org.jboss.tools.gwt.core,org.eclipse.epp.usagedata.ui,org.jboss.tools.deltacloud.ui,org.jboss.tools.tests"/>
+<stringAttribute key="deselected_workspace_plugins" value="org.jboss.tools.deltacloud.integration,org.jboss.tools.tests,org.jboss.tools.deltacloud.docs,org.jboss.tools.deltacloud.ui"/>
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
@@ -22,8 +22,8 @@
<listEntry value="1"/>
</listAttribute>
<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.junit.CONTAINER" value=""/>
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
@@ -38,8 +38,8 @@
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
<booleanAttribute key="run_in_ui_thread" value="true"/>
-<stringAttribute key="selected_target_plugins" value="org.eclipse.compare@default:default,org.eclipse.equinox.app@default:default,org.eclipse.ui.workbench@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.eclipse.core.resources@default:default,org.eclipse.emf.common@default:default,org.eclipse.wst.common.uriresolver@default:default,javax.servlet@default:default,org.eclipse.core.commands@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.osgi.services@default:default,org.eclipse.text@default:default,org.jboss.tools.xulrunner.initializer@default:false,org.eclipse.ecf.ssl@default:false,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.jface@default:default,org.eclipse.jface.text@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.e!
clipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.databinding@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.ui.console@default:default,org.eclipse.debug.ui@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.ecf@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.swt@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.core.databinding.property@default:default,org.eclipse.ui.views@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.wst.common.environment@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.team.core@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.osgi@-1:tru!
e,org.eclipse.core.filebuffers@default:default,org.eclipse.ltk!
.core.re
factoring@default:default,org.eclipse.core.jobs@default:default,com.ibm.icu@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.equinox.common@2:true,org.eclipse.ui.navigator.resources@default:default,org.eclipse.wst.validation@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.core.net@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.wst.xml.core@default:default,org.apache.xml.resolver@default:default,org.eclipse.search@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.equinox.preferences@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.jem.util@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.ui.workbench.texteditor@defa!
ult:default,org.eclipse.ui.navigator@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.ui.editors@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.ui.forms@default:default,org.hamcrest.core@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.equinox.security@default:default,javax.xml@default:default,org.eclipse.help@default:default,org.apache.xml.serializer@default:default,org.apache.xerces@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.emf.edit@default:default,org.eclipse.core.variables@default:default,com.instantiations.designer.jdt.fragment@default:false,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.ant.core@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.core.runtime@default:true,org.eclipse.jdt.launching@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.osgi.util@default:default,org.eclipse.core.runtime.compatibility.re!
gistry@default:false,org.eclipse.core.databinding.observable@d!
efault:d
efault,org.eclipse.team.ui@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.ui.ide@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.jdt.core@default:default,org.eclipse.debug.core@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.ui@default:default,org.eclipse.compare.core@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.deltacloud.test@default:default,org.jboss.tools.common@default:default,org.jboss.tools.deltacloud.core@default:default"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.core.variables@default:default,org.eclipse.ui.forms@default:default,org.eclipse.osgi@-1:true,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.core.runtime@default:true,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.jem.util@default:default,org.eclipse.osgi.util@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.ecf@default:default,org.eclipse.core.jobs@default:default,org.eclipse.wst.sse.core@default:default,javax.servlet@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.jdt.core@default:default,org.eclipse.equinox.p!
2.metadata.repository@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.debug.ui@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ui.editors@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.ui@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.databinding@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.jface.text@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.compare.core@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.hamcrest.core@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.apache.xml.resolver@default:default,org.eclipse.debug.core@default:default,org.eclipse.jdt.ui@default:default,org.apache.xerces@default:default,org.eclipse.u!
i.ide@default:default,org.eclipse.jface@default:default,org.ec!
lipse.jd
t.debug@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.osgi.services@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.wst.common.frameworks@default:default,com.ibm.icu@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.equinox.common@2:true,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.text@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.help@default:default,org.eclipse.compare@default:default,org.eclipse.core.net@default:default,org.eclipse.emf.edit@default:default,org.eclipse.equinox.app@default:default,org.eclipse.team.ui@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.emf.common@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.equinox.p2.repository@default:de!
fault,javax.xml@default:default,org.eclipse.wst.validation@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.commands@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.search@default:default,org.eclipse.core.expressions@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.team.core@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.ui.console@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.swt@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.equinox.security@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.!
wst.common.core@default:default,org.eclipse.equinox.concurrent!
@default
:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.ant.core@default:default,org.apache.xml.serializer@default:default,org.eclipse.core.runtime.compatibility.registry@default:false"/>
+<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.common.model.ui.test@default:default,org.jboss.ide.eclipse.as.ui.mbeans@default:default,org.jboss.ide.eclipse.archives.ui.test@default:default,org.jboss.ide.eclipse.archives.webtools@default:default,org.jboss.ide.eclipse.as.classpath.core@default:default,org.jboss.tools.common.el.ui@default:default,org.jboss.tools.deltacloud.core@default:default,org.jboss.tools.common.text.ext@default:default,org.jboss.tools.ui.bot.ext.test@default:default,org.jboss.ide.eclipse.as.core@default:default,org.jboss.ide.eclipse.as.archives.integration.test@default:default,org.jboss.tools.common.meta.ui@default:default,org.jboss.tools.common.verification.ui.test@default:default,org.jboss.tools.ui.bot.ext@default:default,org.jboss.tools.common.resref.ui@default:default,org.jboss.tools.common.gef@default:default,org.jboss.ide.eclipse.as.wtp.ui@default:default,org.jboss.tools.common.model.ui@default:default,org.jboss.ide.eclips!
e.archives.ui@default:default,org.jboss.tools.jmx.core.test@default:default,org.jboss.ide.eclipse.as.rse.core@default:default,org.jboss.tools.common.model.test@default:default,org.jboss.tools.common.ui@default:default,org.jboss.tools.common.model.ui.capabilities@default:default,org.jboss.tools.jmx.ui@default:default,org.jboss.tools.common.el.core@default:default,org.jboss.ide.eclipse.as.wtp.core@default:default,org.jboss.tools.common.verification@default:default,org.jboss.tools.common.text.xml@default:default,org.jboss.ide.eclipse.archives.jdt.integration@default:default,org.jboss.ide.eclipse.as.rse.ui@default:default,org.jboss.tools.tests.performance@default:default,org.jboss.ide.eclipse.as.test@default:default,org.jboss.ide.eclipse.as.ui.test@default:default,org.jboss.tools.deltacloud.test@default:default,org.jboss.tools.common.projecttemplates@default:default,org.jboss.tools.common.model@default:default,org.jboss.ide.eclipse.as.doc.user@default:default,org.jboss.ide.ecli!
pse.archives.core@default:default,org.jboss.tools.common.test@!
default:
default,org.jboss.tools.common.verification.ui@default:default,org.jboss.tools.jmx.ui.test@default:default,org.jboss.tools.common@default:default,org.jboss.ide.eclipse.as.ssh@default:default,org.jboss.tools.common.verification.test@default:default,org.jboss.ide.eclipse.archives.test@default:default,org.jboss.tools.jmx.core@default:default,org.jboss.tools.common.resref.core@default:default,org.jboss.ide.eclipse.as.ui@default:default,org.jboss.ide.eclipse.as.classpath.ui@default:default,org.jboss.tools.common.el.core.test@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<booleanAttribute key="tracing" value="false"/>
<booleanAttribute key="useCustomFeatures" value="false"/>
14 years
JBoss Tools SVN: r27668 - in trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi: configurators and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-12-22 10:12:23 -0500 (Wed, 22 Dec 2010)
New Revision: 27668
Modified:
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/MavenCDIActivator.java
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/configurators/CDIProjectConfigurator.java
Log:
JBIDE-7944 CDI is not enabled on CDI projects like seam forge
Modified: trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/MavenCDIActivator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/MavenCDIActivator.java 2010-12-22 14:52:15 UTC (rev 27667)
+++ trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/MavenCDIActivator.java 2010-12-22 15:12:23 UTC (rev 27668)
@@ -66,7 +66,7 @@
public IDataModel createCDIDataModel(IFacetedProject fproj, IProjectFacetVersion facetVersion) {
IDataModel config = (IDataModel) new CDIFacetInstallDataModelProvider().create();
-
+ config.setBooleanProperty(CDIFacetInstallDataModelProvider.GENERATE_BEANS_XML,false);
return config;
}
Modified: trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/configurators/CDIProjectConfigurator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/configurators/CDIProjectConfigurator.java 2010-12-22 14:52:15 UTC (rev 27667)
+++ trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/configurators/CDIProjectConfigurator.java 2010-12-22 15:12:23 UTC (rev 27668)
@@ -4,6 +4,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.wst.common.componentcore.ModuleCoreNature;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
@@ -11,6 +12,7 @@
import org.eclipse.wst.common.project.facet.core.IProjectFacet;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.jboss.tools.cdi.core.CDIUtil;
import org.jboss.tools.maven.cdi.MavenCDIActivator;
import org.jboss.tools.maven.core.IJBossMavenConstants;
import org.jboss.tools.maven.core.internal.project.facet.MavenFacetInstallDataModelProvider;
@@ -64,8 +66,10 @@
String cdiVersion = getCDIVersion(mavenProject);
if (cdiVersion != null) {
final IFacetedProject fproj = ProjectFacetsManager.create(project);
- if (fproj != null && "war".equals(packaging)) { //$NON-NLS-1$
+ if ( (fproj != null) && ("war".equals(packaging) || "ejb".equals(packaging)) ) { //$NON-NLS-1$
installWarFacets(fproj, cdiVersion, monitor);
+ } else {
+ CDIUtil.enableCDI(project, false, new NullProgressMonitor());
}
}
}
14 years
JBoss Tools SVN: r27667 - trunk/documentation/qa/docs/Test_Cases.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2010-12-22 09:52:15 -0500 (Wed, 22 Dec 2010)
New Revision: 27667
Modified:
trunk/documentation/qa/docs/Test_Cases/VPEtests.doc
Log:
Some Tests Automated via SWTBot
Modified: trunk/documentation/qa/docs/Test_Cases/VPEtests.doc
===================================================================
(Binary files differ)
14 years
JBoss Tools SVN: r27666 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-22 09:39:19 -0500 (Wed, 22 Dec 2010)
New Revision: 27666
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
Log:
[JBIDE-7977] checking null on given name
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-22 14:38:37 UTC (rev 27665)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-12-22 14:39:19 UTC (rev 27666)
@@ -1,3 +1,8 @@
+2010-12-22 adietisheim <adietisheim@adietisheim-thinkpad>
+
+ * src/org/jboss/tools/deltacloud/ui/views/cloud/InstanceItem.java (getName):
+ [JBIDE-7977] checking null on given name
+
2010-12-16 André Dietisheim <adietish(a)redhat.com>
* src/org/jboss/tools/internal/deltacloud/ui/utils/DataBindingUtils.java:
14 years
JBoss Tools SVN: r27665 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-22 09:38:37 -0500 (Wed, 22 Dec 2010)
New Revision: 27665
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/InstanceItem.java
Log:
[JBIDE-7977] checking null on given name
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 14:35:09 UTC (rev 27664)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/InstanceItem.java 2010-12-22 14:38:37 UTC (rev 27665)
@@ -29,7 +29,9 @@
DeltaCloudInstance instance = getModel();
StringBuilder sb = new StringBuilder();
if (instance != null) {
- sb.append(instance.getGivenName());
+ if (instance.getGivenName() != null) {
+ sb.append(instance.getGivenName());
+ }
if (instance.getName() != null) {
sb.append(" [").append(instance.getName()).append("]");
}
14 years
JBoss Tools SVN: r27664 - in trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test: fakes and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-22 09:35:09 -0500 (Wed, 22 Dec 2010)
New Revision: 27664
Modified:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/KeyDomUnmarshallingTest.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ServerKeyResponseFakes.java
Log:
[JBIDE-7979] ignoring failing test for now, reactivating when fixing bug
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/KeyDomUnmarshallingTest.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/KeyDomUnmarshallingTest.java 2010-12-22 14:16:19 UTC (rev 27663)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/KeyDomUnmarshallingTest.java 2010-12-22 14:35:09 UTC (rev 27664)
@@ -31,6 +31,7 @@
import org.jboss.tools.internal.deltacloud.test.fakes.ServerKeyResponseFakes.KeyActionResponse;
import org.jboss.tools.internal.deltacloud.test.fakes.ServerKeyResponseFakes.KeyResponse;
import org.jboss.tools.internal.deltacloud.test.fakes.ServerKeyResponseFakes.KeysResponse;
+import org.junit.Ignore;
import org.junit.Test;
/**
@@ -49,6 +50,7 @@
assertEquals(KeyActionResponse.method.toUpperCase(), keyAction.getMethod().toString().toUpperCase());
}
+ @Ignore
@Test
public void keyMayBeUnmarshalled() throws MalformedURLException, JAXBException, DeltaCloudClientException {
Key key = new Key();
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ServerKeyResponseFakes.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ServerKeyResponseFakes.java 2010-12-22 14:16:19 UTC (rev 27663)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/fakes/ServerKeyResponseFakes.java 2010-12-22 14:35:09 UTC (rev 27664)
@@ -51,7 +51,8 @@
+ "1wkG4gTjHkfEhCs05/+PZ4rFG15nVpv06e/a3nXtyDQ77qH3irRPsLZDp/CWFdt=Poe4NLX46gE"
+ "nU07L+ueqgZUa8Tq6A9oG7QUyjtJh4ZxkShYkIullvUksW0yppaIeB32Xxw2XVEtdu/v=rFHSHh"
+ "HwoZ1A/=ku7ICdMg5gD6U+Zg0YlxniHDaSJ8A6kdt2iUaPaZQQcH8T4yh90CKHhbl5NzhxAu3Jz"
- + "dc=oRQqdzizw9UrN84wEmQ6r9hDHUq2x14PR=xBzwLGzR2dh73GdjxF5OmOrp3m4yCkw-----END RSA PRIVATE KEY-----";
+ + "dc=oRQqdzizw9UrN84wEmQ6r9hDHUq2x14PR=xBzwLGzR2dh73GdjxF5OmOrp3m4yCkw"
+ + "-----END RSA PRIVATE KEY-----";
public static final String keyResponse = getKeyResponseXML(id, fingerprint, pem, url, method, name);
}
14 years
JBoss Tools SVN: r27663 - trunk/deltacloud/features/org.jboss.tools.deltacloud.feature.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-22 09:16:19 -0500 (Wed, 22 Dec 2010)
New Revision: 27663
Modified:
trunk/deltacloud/features/org.jboss.tools.deltacloud.feature/feature.xml
Log:
corrected mismatch btw pom-version and feature-version
Modified: trunk/deltacloud/features/org.jboss.tools.deltacloud.feature/feature.xml
===================================================================
--- trunk/deltacloud/features/org.jboss.tools.deltacloud.feature/feature.xml 2010-12-22 14:00:37 UTC (rev 27662)
+++ trunk/deltacloud/features/org.jboss.tools.deltacloud.feature/feature.xml 2010-12-22 14:16:19 UTC (rev 27663)
@@ -2,7 +2,7 @@
<feature
id="org.jboss.tools.deltacloud.feature"
label="%featureName"
- version="0.1.0.qualifier"
+ version="0.0.1.qualifier"
provider-name="%providerName">
<description>
14 years
JBoss Tools SVN: r27662 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-22 09:00:37 -0500 (Wed, 22 Dec 2010)
New Revision: 27662
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java
Log:
removed logger
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java 2010-12-22 13:59:49 UTC (rev 27661)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java 2010-12-22 14:00:37 UTC (rev 27662)
@@ -46,7 +46,6 @@
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.impl.client.DefaultHttpClient;
-import org.apache.log4j.Logger;
import org.eclipse.core.runtime.Path;
import org.jboss.tools.deltacloud.core.client.request.AbstractListObjectsRequest;
import org.jboss.tools.deltacloud.core.client.request.CreateInstanceRequest;
@@ -86,8 +85,6 @@
private static final Pattern ELEMENT_TEXTVALUE_REGEX = Pattern
.compile("[^\n\t ]+[^\n]+");
- public static Logger logger = Logger.getLogger(DeltaCloudClientImpl.class);
-
private DocumentBuilder documentBuilder;
public static enum DeltaCloudServerType {
@@ -105,9 +102,6 @@
public DeltaCloudClientImpl(String url, String username, String password)
throws DeltaCloudClientException {
-
- logger.debug("Creating new Delta Cloud Client for Server: " + url);
-
this.baseUrl = createUrl(url);
this.username = username;
this.password = password;
@@ -139,7 +133,6 @@
try {
URL url = deltaCloudRequest.getUrl();
addCredentials(url, httpClient, username, password);
- logger.debug("Sending Request to: " + url);
HttpUriRequest request = createRequest(deltaCloudRequest);
HttpResponse httpResponse = httpClient.execute(request);
throwOnHttpErrors(deltaCloudRequest.getUrl(), httpResponse);
@@ -202,7 +195,6 @@
return null;
}
String xml = readInputStreamToString(inputStream);
- logger.debug("Response:\n" + xml);
return xml;
}
14 years
JBoss Tools SVN: r27661 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-22 08:59:49 -0500 (Wed, 22 Dec 2010)
New Revision: 27661
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java
Log:
corrected: was closing connection too early
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java 2010-12-22 13:49:50 UTC (rev 27660)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java 2010-12-22 13:59:49 UTC (rev 27661)
@@ -83,7 +83,8 @@
private static final String DOCUMENT_ELEMENT_DRIVER = "driver";
private static final String DOCUMENT_ELEMENT_API = "api";
- private static final Pattern ELEMENT_TEXTVALUE_REGEX = Pattern.compile("[^\n\t ]+[^\n]+");
+ private static final Pattern ELEMENT_TEXTVALUE_REGEX = Pattern
+ .compile("[^\n\t ]+[^\n]+");
public static Logger logger = Logger.getLogger(DeltaCloudClientImpl.class);
@@ -97,11 +98,13 @@
private String username;
private String password;
- public DeltaCloudClientImpl(String url) throws MalformedURLException, DeltaCloudClientException {
+ public DeltaCloudClientImpl(String url) throws MalformedURLException,
+ DeltaCloudClientException {
this(url, null, null);
}
- public DeltaCloudClientImpl(String url, String username, String password) throws DeltaCloudClientException {
+ public DeltaCloudClientImpl(String url, String username, String password)
+ throws DeltaCloudClientException {
logger.debug("Creating new Delta Cloud Client for Server: " + url);
@@ -115,19 +118,23 @@
try {
return new URL(url);
} catch (MalformedURLException e) {
- throw new DeltaCloudClientException(MessageFormat.format("Could not create url for {0}", url), e);
+ throw new DeltaCloudClientException(MessageFormat.format(
+ "Could not create url for {0}", url), e);
}
}
- private DocumentBuilder createDocumentBuilder() throws DeltaCloudClientException {
+ private DocumentBuilder createDocumentBuilder()
+ throws DeltaCloudClientException {
try {
return DocumentBuilderFactory.newInstance().newDocumentBuilder();
} catch (ParserConfigurationException e) {
- throw new DeltaCloudClientException("Could not create document builder", e);
+ throw new DeltaCloudClientException(
+ "Could not create document builder", e);
}
}
- protected InputStream request(DeltaCloudRequest deltaCloudRequest) throws DeltaCloudClientException {
+ protected InputStream request(DeltaCloudRequest deltaCloudRequest)
+ throws DeltaCloudClientException {
DefaultHttpClient httpClient = new DefaultHttpClient();
try {
URL url = deltaCloudRequest.getUrl();
@@ -147,11 +154,12 @@
} catch (Exception e) {
throw new DeltaCloudClientException(e);
} finally {
- httpClient.getConnectionManager().shutdown();
+ // httpClient.getConnectionManager().shutdown();
}
}
- protected String requestStringResponse(DeltaCloudRequest deltaCloudRequest) throws DeltaCloudClientException {
+ protected String requestStringResponse(DeltaCloudRequest deltaCloudRequest)
+ throws DeltaCloudClientException {
try {
InputStream inputStream = request(deltaCloudRequest);
if (inputStream == null) {
@@ -163,22 +171,28 @@
}
}
- private void throwOnHttpErrors(URL requestUrl, HttpResponse httpResponse) throws DeltaCloudClientException {
+ private void throwOnHttpErrors(URL requestUrl, HttpResponse httpResponse)
+ throws DeltaCloudClientException {
int statusCode = httpResponse.getStatusLine().getStatusCode();
if (HttpStatusCode.OK.isStatus(statusCode)) {
return;
} else if (HttpStatusCode.FORBIDDEN.isStatus(statusCode)) {
throw new DeltaCloudAuthClientException(
- MessageFormat.format("The server reported an authorization error \"{0}\" on requesting \"{1}\"",
- httpResponse.getStatusLine().getReasonPhrase(), requestUrl));
+ MessageFormat
+ .format("The server reported an authorization error \"{0}\" on requesting \"{1}\"",
+ httpResponse.getStatusLine()
+ .getReasonPhrase(), requestUrl));
} else if (HttpStatusCode.NOT_FOUND.isStatus(statusCode)) {
- throw new DeltaCloudNotFoundClientException(
- MessageFormat.format("The server could not find the resource \"{0}\"", requestUrl));
+ throw new DeltaCloudNotFoundClientException(MessageFormat.format(
+ "The server could not find the resource \"{0}\"",
+ requestUrl));
} else if (HttpStatusRange.CLIENT_ERROR.isInRange(statusCode)
|| HttpStatusRange.SERVER_ERROR.isInRange(statusCode)) {
throw new DeltaCloudClientException(
- MessageFormat.format("The server reported an error \"{0}\" on requesting \"{1}\"",
- httpResponse.getStatusLine().getReasonPhrase(), requestUrl));
+ MessageFormat
+ .format("The server reported an error \"{0}\" on requesting \"{1}\"",
+ httpResponse.getStatusLine()
+ .getReasonPhrase(), requestUrl));
}
}
@@ -202,7 +216,8 @@
* @return the request instance
* @throws MalformedURLException
*/
- protected HttpUriRequest createRequest(DeltaCloudRequest deltaCloudRequest) throws MalformedURLException {
+ protected HttpUriRequest createRequest(DeltaCloudRequest deltaCloudRequest)
+ throws MalformedURLException {
HttpUriRequest request = null;
String url = deltaCloudRequest.getUrl().toString();
HttpMethod httpMethod = deltaCloudRequest.getHttpMethod();
@@ -229,7 +244,8 @@
* @return the default http client
* @throws UnknownHostException
*/
- private DefaultHttpClient addCredentials(URL url, DefaultHttpClient httpClient, String username, String password)
+ private DefaultHttpClient addCredentials(URL url,
+ DefaultHttpClient httpClient, String username, String password)
throws UnknownHostException {
if (username != null && password != null) {
httpClient.getCredentialsProvider().setCredentials(
@@ -239,14 +255,16 @@
return httpClient;
}
- private static String readInputStreamToString(InputStream is) throws DeltaCloudClientException {
+ private static String readInputStreamToString(InputStream is)
+ throws DeltaCloudClientException {
try {
try {
if (is != null) {
StringBuilder sb = new StringBuilder();
- String line;
+ String line = null;
- BufferedReader reader = new BufferedReader(new InputStreamReader(is, "UTF-8"));
+ BufferedReader reader = new BufferedReader(
+ new InputStreamReader(is, "UTF-8"));
while ((line = reader.readLine()) != null) {
sb.append(line).append("\n");
}
@@ -256,7 +274,8 @@
is.close();
}
} catch (Exception e) {
- throw new DeltaCloudClientException("Error converting Response to String", e);
+ throw new DeltaCloudClientException(
+ "Error converting Response to String", e);
}
return "";
}
@@ -266,13 +285,16 @@
try {
String apiResponse = requestStringResponse(new TypeRequest(baseUrl));
Document document = getDocument(apiResponse);
- NodeList elements = document.getElementsByTagName(DOCUMENT_ELEMENT_API);
+ NodeList elements = document
+ .getElementsByTagName(DOCUMENT_ELEMENT_API);
if (elements.getLength() > 0) {
Node n = elements.item(0);
- Node driver = n.getAttributes().getNamedItem(DOCUMENT_ELEMENT_DRIVER);
+ Node driver = n.getAttributes().getNamedItem(
+ DOCUMENT_ELEMENT_DRIVER);
if (driver != null) {
String driverValue = driver.getNodeValue();
- serverType = DeltaCloudServerType.valueOf(driverValue.toUpperCase());
+ serverType = DeltaCloudServerType.valueOf(driverValue
+ .toUpperCase());
}
}
} catch (Exception e) {
@@ -282,9 +304,11 @@
}
@Override
- public Instance createInstance(String imageId) throws DeltaCloudClientException {
+ public Instance createInstance(String imageId)
+ throws DeltaCloudClientException {
try {
- return buildInstance(requestStringResponse(new CreateInstanceRequest(baseUrl, imageId)));
+ return buildInstance(requestStringResponse(new CreateInstanceRequest(
+ baseUrl, imageId)));
} catch (DeltaCloudClientException e) {
throw e;
} catch (Exception e) {
@@ -294,22 +318,26 @@
}
@Override
- public Instance createInstance(String imageId, String profileId, String realmId, String name)
+ public Instance createInstance(String imageId, String profileId,
+ String realmId, String name) throws DeltaCloudClientException {
+ return createInstance(imageId, profileId, realmId, name, null, null,
+ null);
+ }
+
+ public Instance createInstance(String imageId, String profileId,
+ String realmId, String name, String memory, String storage)
throws DeltaCloudClientException {
- return createInstance(imageId, profileId, realmId, name, null, null, null);
+ return createInstance(imageId, profileId, realmId, name, null, memory,
+ storage);
}
- public Instance createInstance(String imageId, String profileId, String realmId, String name, String memory,
+ public Instance createInstance(String imageId, String profileId,
+ String realmId, String name, String keyname, String memory,
String storage) throws DeltaCloudClientException {
- return createInstance(imageId, profileId, realmId, name, null, memory, storage);
- }
-
- public Instance createInstance(String imageId, String profileId, String realmId, String name, String keyname,
- String memory, String storage) throws DeltaCloudClientException {
try {
- return buildInstance(requestStringResponse(new CreateInstanceRequest(baseUrl, imageId, profileId, realmId,
- name,
- keyname, memory, storage)));
+ return buildInstance(requestStringResponse(new CreateInstanceRequest(
+ baseUrl, imageId, profileId, realmId, name, keyname,
+ memory, storage)));
} catch (DeltaCloudClientException e) {
throw e;
} catch (Exception e) {
@@ -318,11 +346,12 @@
}
@Override
- public HardwareProfile listProfile(String profileId) throws DeltaCloudClientException {
+ public HardwareProfile listProfile(String profileId)
+ throws DeltaCloudClientException {
try {
- return buildDeltaCloudObject(HardwareProfile.class, requestStringResponse(new ListHardwareProfileRequest(
- baseUrl,
- profileId)));
+ return buildDeltaCloudObject(HardwareProfile.class,
+ requestStringResponse(new ListHardwareProfileRequest(
+ baseUrl, profileId)));
} catch (DeltaCloudClientException e) {
throw e;
} catch (Exception e) {
@@ -331,33 +360,39 @@
}
@Override
- public List<HardwareProfile> listProfiles() throws DeltaCloudClientException {
+ public List<HardwareProfile> listProfiles()
+ throws DeltaCloudClientException {
return listDeltaCloudObjects(HardwareProfile.class,
new ListHardwareProfilesRequest(baseUrl), "hardware_profile");
}
@Override
public List<Image> listImages() throws DeltaCloudClientException {
- return listDeltaCloudObjects(Image.class, new ListImagesRequest(baseUrl), "image");
+ return listDeltaCloudObjects(Image.class,
+ new ListImagesRequest(baseUrl), "image");
}
@Override
public Image listImages(String imageId) throws DeltaCloudClientException {
- return JAXB.unmarshal(new StringReader(requestStringResponse(new ListImageRequest(baseUrl, imageId))),
+ return JAXB.unmarshal(new StringReader(
+ requestStringResponse(new ListImageRequest(baseUrl, imageId))),
Image.class);
}
@Override
public List<Instance> listInstances() throws DeltaCloudClientException {
- return listDeltaCloudObjects(Instance.class, new ListInstancesRequest(baseUrl), "instance");
+ return listDeltaCloudObjects(Instance.class, new ListInstancesRequest(
+ baseUrl), "instance");
}
@Override
- public Instance listInstances(String instanceId) throws DeltaCloudClientException {
+ public Instance listInstances(String instanceId)
+ throws DeltaCloudClientException {
// return JAXB.unmarshal(new StringReader(request(new
// ListInstanceRequest(baseUrl, instanceId))), Instance.class);
try {
- return buildInstance(requestStringResponse(new ListInstanceRequest(baseUrl, instanceId)));
+ return buildInstance(requestStringResponse(new ListInstanceRequest(
+ baseUrl, instanceId)));
} catch (DeltaCloudClientException e) {
throw e;
} catch (Exception e) {
@@ -367,12 +402,14 @@
@Override
public List<Realm> listRealms() throws DeltaCloudClientException {
- return listDeltaCloudObjects(Realm.class, new ListRealmsRequest(baseUrl), "realm");
+ return listDeltaCloudObjects(Realm.class,
+ new ListRealmsRequest(baseUrl), "realm");
}
@Override
public Realm listRealms(String realmId) throws DeltaCloudClientException {
- return JAXB.unmarshal(new StringReader(requestStringResponse(new ListRealmRequest(baseUrl, realmId))),
+ return JAXB.unmarshal(new StringReader(
+ requestStringResponse(new ListRealmRequest(baseUrl, realmId))),
Realm.class);
}
@@ -389,7 +426,8 @@
}
}
- public void createKey(String keyname, String keyStoreLocation) throws DeltaCloudClientException {
+ public void createKey(String keyname, String keyStoreLocation)
+ throws DeltaCloudClientException {
Key key = createKey(keyname);
try {
File keyFile = createKeyFile(keyname, keyStoreLocation);
@@ -405,11 +443,10 @@
w.close();
}
- private File createKeyFile(String keyname, String keyStoreLocation) throws IOException {
- File keyFile =
- Path.fromOSString(keyStoreLocation)
- .append(keyname).append(".").append(PEM_FILE_SUFFIX)
- .toFile(); //$NON-NLS-1$
+ private File createKeyFile(String keyname, String keyStoreLocation)
+ throws IOException {
+ File keyFile = Path.fromOSString(keyStoreLocation).append(keyname)
+ .append(".").append(PEM_FILE_SUFFIX).toFile(); //$NON-NLS-1$
if (!keyFile.exists()) {
keyFile.createNewFile();
}
@@ -436,26 +473,35 @@
return key;
}
- private Instance updateInstance(String xml, Instance instance) throws Exception {
+ private Instance updateInstance(String xml, Instance instance)
+ throws Exception {
Document document = getDocument(xml);
- instance.setImageId(getIdFromHref(getAttributeValues(document, "image", "href").get(0))); //$NON-NLS-1$ //$NON-NLS-2$
- instance.setProfileId(getIdFromHref(getAttributeValues(document, "hardware_profile", "href").get(0))); //$NON-NLS-1$ //$NON-NLS-2$
- getProfileProperties(instance, getPropertyNodes(document, "hardware_profile")); //$NON-NLS-1$
- instance.setRealmId(getIdFromHref(getAttributeValues(document, "realm", "href").get(0))); //$NON-NLS-1$ //$NON-NLS-2$
+ instance.setImageId(getIdFromHref(getAttributeValues(document,
+ "image", "href").get(0))); //$NON-NLS-1$ //$NON-NLS-2$
+ instance.setProfileId(getIdFromHref(getAttributeValues(document,
+ "hardware_profile", "href").get(0))); //$NON-NLS-1$ //$NON-NLS-2$
+ getProfileProperties(instance,
+ getPropertyNodes(document, "hardware_profile")); //$NON-NLS-1$
+ instance.setRealmId(getIdFromHref(getAttributeValues(document,
+ "realm", "href").get(0))); //$NON-NLS-1$ //$NON-NLS-2$
instance.setState(getElementTextValues(document, "state").get(0)); //$NON-NLS-1$
getAuthentication(document, instance);
instance.setActions(createInstanceActions(instance, document));
- instance.setPublicAddresses(new AddressList(getElementTextValues(document, "public_addresses")));
- instance.setPrivateAddresses(new AddressList(getElementTextValues(document, "private_addresses")));
+ instance.setPublicAddresses(new AddressList(getElementTextValues(
+ document, "public_addresses")));
+ instance.setPrivateAddresses(new AddressList(getElementTextValues(
+ document, "private_addresses")));
return instance;
}
private Instance buildInstance(String xml) throws Exception {
- Instance instance = JAXB.unmarshal(new StringReader(xml), Instance.class);
+ Instance instance = JAXB.unmarshal(new StringReader(xml),
+ Instance.class);
return updateInstance(xml, instance);
}
- private List<InstanceAction> createInstanceActions(final Instance instance, Document document) throws Exception {
+ private List<InstanceAction> createInstanceActions(final Instance instance,
+ Document document) throws Exception {
final List<InstanceAction> actions = new ArrayList<InstanceAction>();
forEachNode(document, "link", new INodeVisitor() {
@@ -470,7 +516,8 @@
return actions;
}
- private void setActionProperties(final AbstractDeltaCloudResourceAction action, Node node)
+ private void setActionProperties(
+ final AbstractDeltaCloudResourceAction action, Node node)
throws DeltaCloudClientException {
NamedNodeMap attributes = node.getAttributes();
String name = getAttributeTextContent("rel", attributes, node);
@@ -481,20 +528,24 @@
action.setMethod(method);
}
- private String getAttributeTextContent(String attributeName, NamedNodeMap namedNodeMap, Node node)
+ private String getAttributeTextContent(String attributeName,
+ NamedNodeMap namedNodeMap, Node node)
throws DeltaCloudClientException {
Node attributeNode = namedNodeMap.getNamedItem(attributeName);
if (attributeNode == null) {
- throw new DeltaCloudClientException(MessageFormat.format("Could not find attribute {0} in node {1}",
- attributeName, node.getNodeName()));
+ throw new DeltaCloudClientException(MessageFormat.format(
+ "Could not find attribute {0} in node {1}", attributeName,
+ node.getNodeName()));
}
return attributeNode.getTextContent();
}
- private HardwareProfile buildHardwareProfile(String xml) throws DeltaCloudClientException {
+ private HardwareProfile buildHardwareProfile(String xml)
+ throws DeltaCloudClientException {
try {
- HardwareProfile profile = JAXB.unmarshal(new StringReader(xml), HardwareProfile.class);
+ HardwareProfile profile = JAXB.unmarshal(new StringReader(xml),
+ HardwareProfile.class);
Document document = getDocument(xml);
@@ -503,7 +554,8 @@
for (Node n : nodes) {
Property p = new Property();
p.setName(n.getAttributes().getNamedItem("name").getNodeValue()); //$NON-NLS-1$
- p.setValue(n.getAttributes().getNamedItem("value").getNodeValue()); //$NON-NLS-1$
+ p.setValue(n.getAttributes()
+ .getNamedItem("value").getNodeValue()); //$NON-NLS-1$
p.setUnit(n.getAttributes().getNamedItem("unit").getNodeValue()); //$NON-NLS-1$
p.setKind(n.getAttributes().getNamedItem("kind").getNodeValue()); //$NON-NLS-1$
if (p.getKind().equals("range")) { //$NON-NLS-1$
@@ -511,8 +563,10 @@
for (int i = 0; i < children.getLength(); ++i) {
Node child = children.item(i);
if (child.getNodeName().equals("range")) { //$NON-NLS-1$
- String first = child.getAttributes().getNamedItem("first").getNodeValue(); //$NON-NLS-1$
- String last = child.getAttributes().getNamedItem("last").getNodeValue(); //$NON-NLS-1$
+ String first = child.getAttributes()
+ .getNamedItem("first").getNodeValue(); //$NON-NLS-1$
+ String last = child.getAttributes()
+ .getNamedItem("last").getNodeValue(); //$NON-NLS-1$
p.setRange(first, last);
}
}
@@ -526,7 +580,9 @@
for (int j = 0; j < enumChildren.getLength(); ++j) {
Node enumChild = enumChildren.item(j);
if (enumChild.getNodeName().equals("entry")) {
- enums.add(enumChild.getAttributes().getNamedItem("value").getNodeValue()); //$NON-NLS-1$
+ enums.add(enumChild
+ .getAttributes()
+ .getNamedItem("value").getNodeValue()); //$NON-NLS-1$
}
}
}
@@ -542,23 +598,27 @@
return null;
}
- private void forEachNode(Document document, String tagName, INodeVisitor visitor) throws Exception {
+ private void forEachNode(Document document, String tagName,
+ INodeVisitor visitor) throws Exception {
NodeList elements = document.getElementsByTagName(tagName);
for (int i = 0; i < elements.getLength(); i++) {
visitor.visit(elements.item(i));
}
}
- private List<String> getAttributeValues(Document document, String elementName, String attributeName) {
+ private List<String> getAttributeValues(Document document,
+ String elementName, String attributeName) {
NodeList elements = document.getElementsByTagName(elementName);
ArrayList<String> values = new ArrayList<String>();
for (int i = 0; i < elements.getLength(); i++) {
- values.add(elements.item(i).getAttributes().getNamedItem(attributeName).getTextContent());
+ values.add(elements.item(i).getAttributes()
+ .getNamedItem(attributeName).getTextContent());
}
return values;
}
- private List<String> getElementTextValues(Document document, String elementName) {
+ private List<String> getElementTextValues(Document document,
+ String elementName) {
NodeList elements = document.getElementsByTagName(elementName);
ArrayList<String> values = new ArrayList<String>();
for (int i = 0; i < elements.getLength(); i++) {
@@ -611,7 +671,8 @@
}
}
- private void getProfileProperties(Instance instance, List<Node> propertyNodes) {
+ private void getProfileProperties(Instance instance,
+ List<Node> propertyNodes) {
if (propertyNodes != null) {
for (Iterator<Node> i = propertyNodes.iterator(); i.hasNext();) {
Node n = i.next();
@@ -641,33 +702,36 @@
return href.substring(href.lastIndexOf("/") + 1, href.length());
}
- private <T extends AbstractDeltaCloudObject> List<T> listDeltaCloudObjects(Class<T> clazz,
- AbstractListObjectsRequest request, String elementName)
- throws DeltaCloudClientException {
+ private <T extends AbstractDeltaCloudObject> List<T> listDeltaCloudObjects(
+ Class<T> clazz, AbstractListObjectsRequest request,
+ String elementName) throws DeltaCloudClientException {
try {
Document document = getDocument(requestStringResponse(request));
ArrayList<T> dco = new ArrayList<T>();
NodeList nodeList = document.getElementsByTagName(elementName);
for (int i = 0; i < nodeList.getLength(); i++) {
- dco.add(buildDeltaCloudObject(clazz, nodeToString(nodeList.item(i))));
+ dco.add(buildDeltaCloudObject(clazz,
+ nodeToString(nodeList.item(i))));
}
return dco;
} catch (DeltaCloudClientException e) {
throw e;
} catch (Exception e) {
- throw new DeltaCloudClientException(MessageFormat.format("Could not list object of type {0}", clazz), e);
+ throw new DeltaCloudClientException(MessageFormat.format(
+ "Could not list object of type {0}", clazz), e);
}
}
- private Document getDocument(String response) throws ParserConfigurationException,
- SAXException, IOException {
+ private Document getDocument(String response)
+ throws ParserConfigurationException, SAXException, IOException {
InputSource is = new InputSource(new StringReader(response));
Document document = documentBuilder.parse(is);
return document;
}
@SuppressWarnings("unchecked")
- private <T extends Object> T buildDeltaCloudObject(Class<T> clazz, String node) throws Exception {
+ private <T extends Object> T buildDeltaCloudObject(Class<T> clazz,
+ String node) throws Exception {
if (clazz.equals(Instance.class)) {
return (T) buildInstance(node);
} else if (clazz.equals(HardwareProfile.class)) {
@@ -677,19 +741,19 @@
}
}
- public boolean performInstanceAction(InstanceAction action) throws DeltaCloudClientException {
+ public boolean performInstanceAction(InstanceAction action)
+ throws DeltaCloudClientException {
if (action != null) {
try {
- String response = requestStringResponse(
- new PerformInstanceActionRequest(new URL(action.getUrl()),
- action.getMethod()));
+ String response = requestStringResponse(new PerformInstanceActionRequest(
+ new URL(action.getUrl()), action.getMethod()));
if (!InstanceAction.DESTROY.equals(action.getName())) {
updateInstance(response, action.getInstance());
}
} catch (MalformedURLException e) {
throw new DeltaCloudClientException(MessageFormat.format(
- "Could not perform action {0} on instance {1}", action.getName(), action.getInstance()
- .getName()), e);
+ "Could not perform action {0} on instance {1}",
+ action.getName(), action.getInstance().getName()), e);
} catch (DeltaCloudClientException e) {
throw e;
} catch (Exception e) {
@@ -707,7 +771,8 @@
t.transform(new DOMSource(node), new StreamResult(writer));
return writer.toString();
} catch (TransformerException e) {
- throw new DeltaCloudClientException("Error transforming node to string", e);
+ throw new DeltaCloudClientException(
+ "Error transforming node to string", e);
}
}
14 years
JBoss Tools SVN: r27660 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-22 08:49:50 -0500 (Wed, 22 Dec 2010)
New Revision: 27660
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF
Log:
added org.eclipse.equinox.security.ui to dependencies since it's needed for secure password store to work
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF 2010-12-22 13:06:05 UTC (rev 27659)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF 2010-12-22 13:49:50 UTC (rev 27660)
@@ -8,7 +8,6 @@
Bundle-Localization: plugin
Require-Bundle: org.jboss.tools.common;bundle-version="[3.2.0,4.0.0)",
org.eclipse.ui;bundle-version="[3.6.0,4.0.0)",
- org.eclipse.equinox.security;bundle-version="[1.0.100,2.0.0)",
org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
org.eclipse.ui.views;bundle-version="[3.4.1,4.0.0)",
org.eclipse.ui.views.properties.tabbed;bundle-version="[3.5.0,4.0.0)",
@@ -19,7 +18,9 @@
org.eclipse.core.databinding.observable;bundle-version="[1.3.0,2.0.0)",
org.eclipse.core.databinding.property;bundle-version="[1.3.0,2.0.0)",
org.eclipse.core.databinding.beans;bundle-version="[1.2.100,2.0.0)",
- org.eclipse.core.expressions;bundle-version="[3.4.200,4.0.0)"
+ org.eclipse.core.expressions;bundle-version="[3.4.200,4.0.0)",
+ org.eclipse.equinox.security;bundle-version="[1.0.100,2.0.0)",
+ org.eclipse.equinox.security.ui;bundle-version="1.0.200"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.deltacloud.ui,
14 years