JBoss Tools SVN: r30103 - in trunk: jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2011-03-29 10:33:13 -0400 (Tue, 29 Mar 2011)
New Revision: 30103
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JSF2CCAttrsHyperlink.java
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JSF2CCAttrsHyperlinkPartitioner.java
Modified:
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xpl/AbstractBaseHyperlink.java
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/JSFTextExtMessages.java
trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/JSFTextExtMessages.properties
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSF2CCAttrsELCompletionEngine.java
Log:
JBIDE-7461
OpenOns for #{cc.attrs.*}
Issue is fixed
Modified: trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xpl/AbstractBaseHyperlink.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xpl/AbstractBaseHyperlink.java 2011-03-29 13:50:38 UTC (rev 30102)
+++ trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/xpl/AbstractBaseHyperlink.java 2011-03-29 14:33:13 UTC (rev 30103)
@@ -22,7 +22,6 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.Region;
import org.eclipse.ui.IEditorDescriptor;
import org.eclipse.ui.IEditorInput;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSF2CCAttrsELCompletionEngine.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSF2CCAttrsELCompletionEngine.java 2011-03-29 13:50:38 UTC (rev 30102)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSF2CCAttrsELCompletionEngine.java 2011-03-29 14:33:13 UTC (rev 30103)
@@ -35,6 +35,7 @@
import org.jboss.tools.common.el.core.parser.ELParser;
import org.jboss.tools.common.el.core.parser.ELParserFactory;
import org.jboss.tools.common.el.core.parser.ELParserUtil;
+import org.jboss.tools.common.el.core.parser.LexicalToken;
import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.el.core.resolver.ELResolution;
import org.jboss.tools.common.el.core.resolver.ELResolutionImpl;
@@ -192,7 +193,16 @@
resolution.setLastResolvedToken(left);
ELSegmentImpl segment = new ELSegmentImpl();
- segment.setToken(left.getFirstToken());
+ // Combine left's tokens into a single token
+ LexicalToken token = left.getFirstToken();
+ String singleText = left.getText();
+ int start = token.getStart();
+ int type = token.getType();
+ int length = singleText.length();
+
+ LexicalToken singleToken = new LexicalToken(start, length, singleText, type);
+
+ segment.setToken(singleToken);
segment.setResolved(true);
resolution.addSegment(segment);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml 2011-03-29 13:50:38 UTC (rev 30102)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/plugin.xml 2011-03-29 14:33:13 UTC (rev 30103)
@@ -907,6 +907,27 @@
</hyperlinkPartitioner -->
<hyperlinkPartitioner
+ id="org.jboss.tools.jsf.text.ext.hyperlink.JSF2CCAttrsOpenOnPartitioner"
+ class="org.jboss.tools.jsf.text.ext.hyperlink.JSF2CCAttrsHyperlinkPartitioner">
+ <contentType id="org.eclipse.jst.jsp.core.jspsource">
+ <partitionType id="org.jboss.tools.common.text.ext.jsp.JSP_EXPRESSION" />
+ </contentType>
+ <!-- these CTs were copied from the JsfJSPBundleHyperlinkPartitioner -->
+ <contentType id="org.eclipse.wst.html.core.htmlsource">
+ <partitionType id="org.jboss.tools.common.text.ext.jsp.JSP_EXPRESSION" />
+ </contentType>
+ <contentType id="jsf.facelet">
+ <partitionType id="org.jboss.tools.common.text.ext.jsp.JSP_EXPRESSION" />
+ </contentType>
+ <contentType id="jsf.facelet.composite">
+ <partitionType id="org.jboss.tools.common.text.ext.jsp.JSP_EXPRESSION" />
+ </contentType>
+ <contentType id="org.jboss.tools.jst.jsp.jspincludesource">
+ <partitionType id="org.jboss.tools.common.text.ext.jsp.JSP_EXPRESSION" />
+ </contentType>
+ </hyperlinkPartitioner>
+
+ <hyperlinkPartitioner
id="org.jboss.tools.common.text.ext.jsf.hyperlink.JSPClassHyperlinkPartitioner"
class="org.jboss.tools.jst.text.ext.hyperlink.jsp.JSPClassHyperlinkPartitioner">
<contentType id="org.eclipse.jst.jsp.core.jspsource">
@@ -1210,6 +1231,26 @@
</contenttypeidentifier>
</hyperlink>
+ <hyperlink
+ class="org.jboss.tools.jsf.text.ext.hyperlink.JSF2CCAttrsHyperlink"
+ id="org.jboss.tools.jsf.text.ext.hyperlink.JSF2CCAttrsHyperlink">
+ <contenttypeidentifier id="org.eclipse.jst.jsp.core.jspsource">
+ <partitiontype id="org.jboss.tools.common.text.ext.jsp.JSF2_CC_ATTRIBUTE" />
+ </contenttypeidentifier>
+ <contenttypeidentifier id="org.eclipse.wst.html.core.htmlsource">
+ <partitiontype id="org.jboss.tools.common.text.ext.jsp.JSF2_CC_ATTRIBUTE" />
+ </contenttypeidentifier>
+ <contenttypeidentifier id="jsf.facelet">
+ <partitiontype id="org.jboss.tools.common.text.ext.jsp.JSF2_CC_ATTRIBUTE" />
+ </contenttypeidentifier>
+ <contenttypeidentifier id="jsf.facelet.composite">
+ <partitiontype id="org.jboss.tools.common.text.ext.jsp.JSF2_CC_ATTRIBUTE" />
+ </contenttypeidentifier>
+ <contenttypeidentifier id="org.jboss.tools.jst.jsp.jspincludesource">
+ <partitiontype id="org.jboss.tools.common.text.ext.jsp.JSF2_CC_ATTRIBUTE" />
+ </contenttypeidentifier>
+ </hyperlink>
+
<!-- hyperlink
class="org.jboss.tools.jsf.text.ext.hyperlink.JsfBundleHyperlink"
id="org.jboss.tools.common.text.ext.jsf.hyperlink.JsfBundleHyperlink">
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/JSFTextExtMessages.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/JSFTextExtMessages.java 2011-03-29 13:50:38 UTC (rev 30102)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/JSFTextExtMessages.java 2011-03-29 14:33:13 UTC (rev 30103)
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Copyright (c) 2011 Red Hat, Inc.
* Distributed under license by Red Hat, Inc. All rights reserved.
* This program is made available under the terms of the
* Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ * Red Hat, Inc. - initial API and implementation
******************************************************************************/
package org.jboss.tools.jsf.text.ext;
@@ -41,4 +41,5 @@
public static String Validator;
public static String OpenValidatorForId;
public static String OpenJavaElement;
+ public static String OpenJsf2CCAttribute;
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/JSFTextExtMessages.properties
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/JSFTextExtMessages.properties 2011-03-29 13:50:38 UTC (rev 30102)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/JSFTextExtMessages.properties 2011-03-29 14:33:13 UTC (rev 30103)
@@ -1,12 +1,12 @@
# ******************************************************************************
-# Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+# Copyright (c) 2011 Red Hat, Inc.
# Distributed under license by Red Hat, Inc. All rights reserved.
# This program is made available under the terms of the
# Eclipse Public License v1.0 which accompanies this distribution,
# and is available at http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
-# Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+# Red Hat, Inc. - initial API and implementation
# ******************************************************************************
Converter=Converter
@@ -24,3 +24,5 @@
Validator=validator
OpenValidatorForId=Open a validator for ID ''{1}''
OpenJavaElement=Open Java Element
+OpenJsf2CCAttribute=Open a Custom Component Attribute definition
+
\ No newline at end of file
Added: trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JSF2CCAttrsHyperlink.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JSF2CCAttrsHyperlink.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JSF2CCAttrsHyperlink.java 2011-03-29 14:33:13 UTC (rev 30103)
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.text.ext.hyperlink;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Region;
+import org.jboss.tools.common.el.core.model.ELInvocationExpression;
+import org.jboss.tools.common.el.core.resolver.ELContext;
+import org.jboss.tools.common.el.core.resolver.ELResolution;
+import org.jboss.tools.common.el.core.resolver.ELSegment;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.util.PositionHolder;
+import org.jboss.tools.common.text.ext.hyperlink.AbstractHyperlink;
+import org.jboss.tools.common.text.ext.util.StructuredSelectionHelper;
+import org.jboss.tools.jsf.text.ext.JSFTextExtMessages;
+import org.jboss.tools.jsf.text.ext.hyperlink.JSPExprHyperlinkPartitioner.ExpressionStructure;
+
+/**
+ *
+ * @author Victor V. Rubezhny
+ *
+ */
+public class JSF2CCAttrsHyperlink extends AbstractHyperlink {
+ IRegion fLastRegion = null;
+
+ @Override
+ protected IRegion doGetHyperlinkRegion(int offset) {
+ fLastRegion = JSF2CCAttrsHyperlinkPartitioner.getRegion(getDocument(), offset);
+ return fLastRegion;
+ }
+
+ @Override
+ protected void doHyperlink(IRegion region) {
+ XModelObject attrObject = null;
+ IRegion attrRegion = null;
+
+ ELContext context = JSPExprHyperlinkPartitioner.getELContext(getDocument());
+ if(context != null){
+ ExpressionStructure eStructure = JSPExprHyperlinkPartitioner.getExpression(context, getOffset());
+ if(eStructure != null){
+ ELInvocationExpression invocationExpression = JSPExprHyperlinkPartitioner.getInvocationExpression(eStructure.reference, eStructure.expression, getOffset());
+ if(invocationExpression != null){
+
+ ELResolution resolution = JSF2CCAttrsHyperlinkPartitioner.getResolution(context, invocationExpression, getOffset()-eStructure.reference.getStartPosition(), getOffset());
+ if (resolution == null)
+ return;
+
+ ELSegment segment = resolution.findSegmentByOffset(getOffset()-eStructure.reference.getStartPosition());
+ if(segment != null && segment.isResolved()){
+ // Find text for the part of operand
+ StringBuffer sbBuffer = new StringBuffer();
+ for (ELSegment s : resolution.getSegments()) {
+ sbBuffer.append(s.getToken().getText());
+ if (s == segment) {
+ break;
+ }
+ sbBuffer.append('.'); // Use default separator for ELs here
+ }
+
+ String text = sbBuffer.toString();
+
+ attrObject = JSF2CCAttrsHyperlinkPartitioner.findJSF2CCAttributeXModelObject(text, getFile());
+ if (attrObject != null) {
+ PositionHolder h = PositionHolder.getPosition(attrObject, null);
+ h.update();
+ attrRegion = new Region(h.getStart(), h.getEnd() - h.getStart());
+ }
+ }
+ }
+ }
+ }
+ if (attrObject != null && attrRegion != null) {
+ IFile file = (IFile)attrObject.getAdapter(IFile.class);
+ if (file != null) {
+ if (openFileInEditor(file) != null) {
+ StructuredSelectionHelper.setSelectionAndRevealInActiveEditor(attrRegion);
+ return;
+ }
+ }
+ }
+
+ openFileFailed();
+ }
+
+ @Override
+ public String getHyperlinkText() {
+ return JSFTextExtMessages.OpenJsf2CCAttribute;
+ }
+
+}
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JSF2CCAttrsHyperlink.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JSF2CCAttrsHyperlinkPartitioner.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JSF2CCAttrsHyperlinkPartitioner.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JSF2CCAttrsHyperlinkPartitioner.java 2011-03-29 14:33:13 UTC (rev 30103)
@@ -0,0 +1,189 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.text.ext.hyperlink;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jface.text.IDocument;
+import org.jboss.tools.common.el.core.model.ELExpression;
+import org.jboss.tools.common.el.core.model.ELInvocationExpression;
+import org.jboss.tools.common.el.core.resolver.ELContext;
+import org.jboss.tools.common.el.core.resolver.ELResolution;
+import org.jboss.tools.common.el.core.resolver.ELResolver;
+import org.jboss.tools.common.el.core.resolver.ELSegment;
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.common.text.ext.hyperlink.AbstractHyperlinkPartitioner;
+import org.jboss.tools.common.text.ext.hyperlink.HyperlinkRegion;
+import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkPartitionRecognizer;
+import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
+import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
+import org.jboss.tools.common.text.ext.util.Utils;
+import org.jboss.tools.jsf.text.ext.hyperlink.JSPExprHyperlinkPartitioner.ExpressionStructure;
+import org.jboss.tools.jst.text.ext.hyperlink.jsp.JSPRootHyperlinkPartitioner;
+import org.w3c.dom.Document;
+
+/**
+ *
+ * @author Victor V. Rubezhny
+ *
+ */
+public class JSF2CCAttrsHyperlinkPartitioner extends AbstractHyperlinkPartitioner implements IHyperlinkPartitionRecognizer {
+ public static final String JSF2_CC_ATTRIBUTE_PARTITION = "org.jboss.tools.common.text.ext.jsp.JSF2_CC_ATTRIBUTE"; //$NON-NLS-1$
+
+ protected String getPartitionType() {
+ return JSF2_CC_ATTRIBUTE_PARTITION;
+ }
+
+ @Override
+ public boolean recognize(IDocument document, IHyperlinkRegion region) {
+ StructuredModelWrapper smw = new StructuredModelWrapper();
+ smw.init(document);
+ try {
+ Document xmlDocument = smw.getDocument();
+ if (xmlDocument == null) return false;
+
+ Utils.findNodeForOffset(xmlDocument, region.getOffset());
+
+ return (getRegion(document, region.getOffset()) != null);
+ } finally {
+ smw.dispose();
+ }
+ }
+
+ @Override
+ protected IHyperlinkRegion parse(IDocument document, IHyperlinkRegion superRegion) {
+ StructuredModelWrapper smw = new StructuredModelWrapper();
+ smw.init(document);
+ try {
+ Document xmlDocument = smw.getDocument();
+ if (xmlDocument == null) return null;
+
+ Utils.findNodeForOffset(xmlDocument, superRegion.getOffset());
+ if (!recognize(document, superRegion)) return null;
+ IHyperlinkRegion r = getRegion(document, superRegion.getOffset());
+ if (r == null) return null;
+
+ String axis = getAxis(document, superRegion);
+ String contentType = superRegion.getContentType();
+ String type = getPartitionType();
+ int length = r.getLength() - (superRegion.getOffset() - r.getOffset());
+ int offset = superRegion.getOffset();
+
+ IHyperlinkRegion region = new HyperlinkRegion(offset, length, axis, contentType, type);
+ return region;
+ } finally {
+ smw.dispose();
+ }
+ }
+
+ protected String getAxis(IDocument document, IHyperlinkRegion superRegion) {
+ if (superRegion.getAxis() == null || superRegion.getAxis().length() == 0) {
+ return JSPRootHyperlinkPartitioner.computeAxis(document, superRegion.getOffset()) + "/"; //$NON-NLS-1$
+ }
+ return superRegion.getAxis();
+ }
+
+ public static IHyperlinkRegion getRegion(IDocument document, final int offset) {
+ ELContext context = JSPExprHyperlinkPartitioner.getELContext(document);
+ if(context != null){
+ ExpressionStructure eStructure = JSPExprHyperlinkPartitioner.getExpression(context, offset);
+ if(eStructure != null){
+ ELInvocationExpression invocationExpression = JSPExprHyperlinkPartitioner.getInvocationExpression(eStructure.reference, eStructure.expression, offset);
+ if(invocationExpression != null){
+ ELSegment segment = decide(context, eStructure.expression, invocationExpression, offset-eStructure.reference.getStartPosition(), offset, getFile(document));
+ if (segment != null) {
+ IHyperlinkRegion region = new HyperlinkRegion(eStructure.reference.getStartPosition() + segment.getSourceReference().getStartPosition(), segment.getSourceReference().getLength(), null, null, null);
+ return region;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ static String[] vs = {"cc.attrs", "compositeComponent.attrs"};
+
+ public static XModelObject findJSF2CCAttributeXModelObject(String varName, IFile file) {
+ XModelObject xModelObject = EclipseResourceUtil.createObjectForResource(file);
+ if(xModelObject == null) return null;
+ if(!"FileJSF2Component".equals(xModelObject.getModelEntity().getName())) return null;
+
+ IJavaProject javaProject = EclipseResourceUtil.getJavaProject(file.getProject());
+ XModelObject is = xModelObject.getChildByPath("Interface");
+ if(is != null && javaProject != null) {
+ for (int i = 0; i < vs.length; i++) {
+ if (vs[i].equals(varName)) return is;
+ }
+ XModelObject[] cs = is.getChildren("JSF2ComponentAttribute");
+
+ for (int i = 0; i < cs.length; i++) {
+ String name = cs[i].getAttributeValue("name");
+ String[] names = {vs[0] + "." + name, vs[1] + "." + name};
+ for (String n: names) {
+ if (n.equals(varName)) return cs[i];
+ }
+ }
+ }
+ return null;
+ }
+
+ private static IFile getFile(IDocument document) {
+ StructuredModelWrapper smw = new StructuredModelWrapper();
+ try {
+ smw.init(document);
+ return smw.getFile();
+ } finally {
+ smw.dispose();
+ }
+ }
+
+ private static ELSegment decide(ELContext context, ELExpression expression, ELInvocationExpression invocationExpression, int offset, int globalOffset, IFile file){
+ ELResolution resolution = getResolution(context, invocationExpression, offset, globalOffset);
+ if (resolution == null)
+ return null;
+
+ ELSegment segment = resolution.findSegmentByOffset(offset);
+ if(segment != null && segment.isResolved()){
+ // Find text for the part of operand
+ StringBuffer sbBuffer = new StringBuffer();
+ for (ELSegment s : resolution.getSegments()) {
+ sbBuffer.append(s.getToken().getText());
+ if (s == segment) {
+ break;
+ }
+ sbBuffer.append('.'); // Use default separator for ELs here
+ }
+
+ String text = sbBuffer.toString();
+ if (findJSF2CCAttributeXModelObject(text, file) != null) {
+ return segment;
+ }
+ }
+ return null;
+ }
+
+ static ELResolution getResolution(ELContext context, ELInvocationExpression invocationExpression, int offset, int globalOffset) {
+ for(ELResolver resolver : context.getElResolvers()){
+ ELResolution resolution = resolver.resolve(context, invocationExpression, globalOffset);
+ if(resolution==null) {
+ continue;
+ }
+ ELSegment segment = resolution.findSegmentByOffset(offset);
+ if(segment != null && segment.isResolved()){
+ return resolution;
+ }
+ }
+ return null;
+
+ }
+
+}
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.text.ext/src/org/jboss/tools/jsf/text/ext/hyperlink/JSF2CCAttrsHyperlinkPartitioner.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 1 month
JBoss Tools SVN: r30102 - trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: psrna
Date: 2011-03-29 09:50:38 -0400 (Tue, 29 Mar 2011)
New Revision: 30102
Modified:
trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/modeshape.ui.bot.test.properties
Log:
* modified swtbot test configuration properties file
Modified: trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/modeshape.ui.bot.test.properties
===================================================================
--- trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/modeshape.ui.bot.test.properties 2011-03-29 13:49:49 UTC (rev 30101)
+++ trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/modeshape.ui.bot.test.properties 2011-03-29 13:50:38 UTC (rev 30102)
@@ -5,7 +5,7 @@
#EAP|JBOSS_AS|EPP|SOA,<server version>,<jre version to run with>|default,<server home>
# note : when server is type of SOA, version is version of SOA (not the bundled EAP)
#SERVER=JBOSS_AS,5.0,1.6,/home/psrna/data/jboss/jboss/jboss-as
-SERVER=SOA,5.1,1.6,/home/psrna/data/jboss/soa-5.1.0.CR1-eds/jboss-as
+SERVER=SOA,5.1,1.6,/home/psrna/data/jboss/soa-5.1.0/jboss-as
#<seam version>,<seam runtime home>
#SEAM=2.2,/home/psrna/data/jboss/jboss-eap-5.0/seam
#<esb versoin>,<esb runtime home>
13 years, 1 month
JBoss Tools SVN: r30101 - in trunk/deltacloud: plugins/org.jboss.tools.deltacloud.client/META-INF and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-03-29 09:49:49 -0400 (Tue, 29 Mar 2011)
New Revision: 30101
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/transport/
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/transport/AbstractHttpTransport.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/transport/Base64Coder.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/transport/IHttpTransport.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/transport/URLConnectionTransport.java
Removed:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/lib/
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/.classpath
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/META-INF/MANIFEST.MF
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/build.properties
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.client.test/src/org/jboss/tools/internal/deltacloud/client/test/core/client/InstanceMockIntegrationTest.java
Log:
[JBIDE-8635] removed http client and replaced by urlConnection
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/.classpath
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/.classpath 2011-03-29 13:48:42 UTC (rev 30100)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/.classpath 2011-03-29 13:49:49 UTC (rev 30101)
@@ -1,13 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry exported="true" kind="lib" path="lib/apache-mime4j-0.6.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/commons-codec-1.3.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/commons-logging-1.1.1.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/httpclient-4.0.1.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/httpcore-4.0.1.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/httpcore-nio-4.0.1.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/httpmime-4.0.1.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/log4j-1.2.14.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/ChangeLog 2011-03-29 13:48:42 UTC (rev 30100)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/ChangeLog 2011-03-29 13:49:49 UTC (rev 30101)
@@ -1,3 +1,10 @@
+2011-03-29 André Dietisheim <André Dietisheim@adietisheim-thinkpad>
+
+ * src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java
+ (request):
+ (DeltaCloudClientImpl):
+ [JBIDE-8635] removed http client and replaced by urlConnection
+
2011-03-11 André Dietisheim <André Dietisheim@adietisheim-thinkpad>
* src/org/jboss/tools/deltacloud/core/client/StateAware.java:
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/META-INF/MANIFEST.MF
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/META-INF/MANIFEST.MF 2011-03-29 13:48:42 UTC (rev 30100)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/META-INF/MANIFEST.MF 2011-03-29 13:49:49 UTC (rev 30101)
@@ -8,18 +8,10 @@
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ClassPath: .,
- lib/apache-mime4j-0.6.jar,
- lib/commons-codec-1.3.jar,
- lib/commons-logging-1.1.1.jar,
- lib/httpclient-4.0.1.jar,
- lib/httpcore-4.0.1.jar,
- lib/httpcore-nio-4.0.1.jar,
- lib/httpmime-4.0.1.jar,
- lib/log4j-1.2.14.jar
Require-Bundle: org.eclipse.core.runtime
Export-Package: org.jboss.tools.deltacloud.client,
org.jboss.tools.deltacloud.core.client,
org.jboss.tools.deltacloud.core.client.request,
+ org.jboss.tools.deltacloud.core.client.transport,
org.jboss.tools.deltacloud.core.client.unmarshal,
org.jboss.tools.deltacloud.core.client.utils
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/build.properties
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/build.properties 2011-03-29 13:48:42 UTC (rev 30100)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/build.properties 2011-03-29 13:49:49 UTC (rev 30101)
@@ -1,18 +1,8 @@
-source.. = src/
output.. = bin/
bin.includes = META-INF/,\
- .,\
- lib/apache-mime4j-0.6.jar,\
- lib/commons-codec-1.3.jar,\
- lib/commons-logging-1.1.1.jar,\
- lib/httpclient-4.0.1.jar,\
- lib/httpcore-4.0.1.jar,\
- lib/httpcore-nio-4.0.1.jar,\
- lib/httpmime-4.0.1.jar,\
- lib/log4j-1.2.14.jar,\
about.html,\
pom.xml,\
-src.includes = lib/,\
+ src.includes = lib/,\
pom.xml
jars.extra.classpath = lib/apache-mime4j-0.6.jar,\
lib/commons-codec-1.3.jar,\
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java 2011-03-29 13:48:42 UTC (rev 30100)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/DeltaCloudClientImpl.java 2011-03-29 13:49:49 UTC (rev 30101)
@@ -10,23 +10,12 @@
*******************************************************************************/
package org.jboss.tools.deltacloud.core.client;
-import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.UnknownHostException;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
-import org.apache.http.HttpResponse;
-import org.apache.http.auth.AuthScope;
-import org.apache.http.auth.UsernamePasswordCredentials;
-import org.apache.http.client.methods.HttpDelete;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.impl.client.DefaultHttpClient;
import org.jboss.tools.deltacloud.core.client.API.Driver;
import org.jboss.tools.deltacloud.core.client.request.CreateInstanceRequest;
import org.jboss.tools.deltacloud.core.client.request.CreateKeyRequest;
@@ -43,6 +32,8 @@
import org.jboss.tools.deltacloud.core.client.request.ListRealmsRequest;
import org.jboss.tools.deltacloud.core.client.request.PerformActionRequest;
import org.jboss.tools.deltacloud.core.client.request.TypeRequest;
+import org.jboss.tools.deltacloud.core.client.transport.IHttpTransport;
+import org.jboss.tools.deltacloud.core.client.transport.URLConnectionTransport;
import org.jboss.tools.deltacloud.core.client.unmarshal.APIUnmarshaller;
import org.jboss.tools.deltacloud.core.client.unmarshal.HardwareProfileUnmarshaller;
import org.jboss.tools.deltacloud.core.client.unmarshal.HardwareProfilesUnmarshaller;
@@ -61,127 +52,26 @@
public class DeltaCloudClientImpl implements DeltaCloudClient {
private String baseUrl;
- private String username;
- private String password;
+ private IHttpTransport transport;
- 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 {
- this.baseUrl = url;
- this.username = username;
- this.password = password;
+ public DeltaCloudClientImpl(String url, String username, String password) throws MalformedURLException,
+ DeltaCloudClientException {
+ this(url, new URLConnectionTransport(username, password));
}
- protected InputStream request(DeltaCloudRequest deltaCloudRequest)
- throws DeltaCloudClientException {
- DefaultHttpClient httpClient = new DefaultHttpClient();
- try {
- URL url = deltaCloudRequest.getUrl();
- addCredentials(url, httpClient, username, password);
- HttpUriRequest request = createRequest(deltaCloudRequest);
- HttpResponse httpResponse = httpClient.execute(request);
- throwOnHttpErrors(deltaCloudRequest.getUrl(), httpResponse);
- if (httpResponse.getEntity() == null) {
- return null;
- }
- InputStream in = httpResponse.getEntity().getContent();
-// StringWriter writer = new StringWriter();
-// int data = -1;
-//
-// while(((data = in.read()) != -1)) {
-// writer.write(data);
-// }
-// System.err.println(writer.toString());
- return in;
- } catch (DeltaCloudClientException e) {
- throw e;
- } catch (MalformedURLException e) {
- throw new DeltaCloudClientException(MessageFormat.format(
- "Could not connect to \"{0}\". The url is invalid.", deltaCloudRequest.toString()), e);
- } catch (IOException e) {
- throw new DeltaCloudClientException(e);
- } catch (Exception e) {
- throw new DeltaCloudClientException(e);
- }
+ public DeltaCloudClientImpl(String url, IHttpTransport transport) throws DeltaCloudClientException {
+ this.baseUrl = url;
+ this.transport = transport;
}
- private void throwOnHttpErrors(URL requestUrl, HttpResponse httpResponse)
- throws DeltaCloudClientException {
- int statusCode = httpResponse.getStatusLine().getStatusCode();
- if (HttpStatusCode.OK.isStatus(statusCode)) {
- return;
- } else if (HttpStatusCode.UNAUTHORIZED.isStatus(statusCode)) {
- throw new DeltaCloudAuthClientException(
- 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));
- } 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));
- }
+ protected InputStream request(DeltaCloudRequest deltaCloudRequest) throws DeltaCloudClientException {
+ return transport.request(deltaCloudRequest);
}
- /**
- * Returns a request instance for the given request type and url.
- *
- * @param httpMethod
- * the request type to use
- * @param requestUrl
- * the requested url
- * @return the request instance
- * @throws MalformedURLException
- */
- protected HttpUriRequest createRequest(DeltaCloudRequest deltaCloudRequest)
- throws MalformedURLException {
- HttpUriRequest request = null;
- String url = deltaCloudRequest.getUrl().toString();
- HttpMethod httpMethod = deltaCloudRequest.getHttpMethod();
- switch (httpMethod) {
- case POST:
- request = new HttpPost(url);
- break;
- case DELETE:
- request = new HttpDelete(url);
- break;
- case GET:
- default:
- request = new HttpGet(url);
- }
- request.setHeader("Accept", "application/xml;q=1");
- return request;
- }
-
- /**
- * Adds the credentials to the given http client.
- *
- * @param httpClient
- * the http client
- * @return the default http client
- * @throws UnknownHostException
- */
- private DefaultHttpClient addCredentials(URL url,
- DefaultHttpClient httpClient, String username, String password)
- throws UnknownHostException {
- if (username != null && password != null) {
- httpClient.getCredentialsProvider().setCredentials(
- new AuthScope(url.getHost(), url.getPort()),
- new UsernamePasswordCredentials(username, password));
- }
- return httpClient;
- }
-
public Driver getServerType() {
try {
InputStream response = request(new TypeRequest(baseUrl));
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/transport/AbstractHttpTransport.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/transport/AbstractHttpTransport.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/transport/AbstractHttpTransport.java 2011-03-29 13:49:49 UTC (rev 30101)
@@ -0,0 +1,69 @@
+package org.jboss.tools.deltacloud.core.client.transport;
+
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.text.MessageFormat;
+
+import org.jboss.tools.deltacloud.core.client.DeltaCloudAuthClientException;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudNotFoundClientException;
+import org.jboss.tools.deltacloud.core.client.HttpStatusCode;
+import org.jboss.tools.deltacloud.core.client.HttpStatusRange;
+import org.jboss.tools.deltacloud.core.client.request.DeltaCloudRequest;
+
+public abstract class AbstractHttpTransport implements IHttpTransport {
+
+ private String username;
+ private String password;
+
+ public AbstractHttpTransport(String username, String password) {
+ this.username = username;
+ this.password = password;
+ }
+
+ @Override
+ public final InputStream request(DeltaCloudRequest request) throws DeltaCloudClientException {
+ try {
+ return doRequest(request);
+ } catch (MalformedURLException e) {
+ throw new DeltaCloudClientException(MessageFormat.format(
+ "Could not connect to \"{0}\". The url is invalid.", request.getUrlString()), e);
+ } catch(DeltaCloudClientException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new DeltaCloudClientException(e);
+ }
+ }
+
+ protected abstract InputStream doRequest(DeltaCloudRequest request) throws Exception;
+
+ protected void throwOnHttpErrors(int statusCode, String statusMessage, URL requestUrl)
+ throws DeltaCloudClientException {
+ if (HttpStatusCode.OK.isStatus(statusCode)) {
+ return;
+ } else if (HttpStatusCode.UNAUTHORIZED.isStatus(statusCode)) {
+ throw new DeltaCloudAuthClientException(
+ MessageFormat.format("The server reported an authorization error \"{0}\" on requesting \"{1}\"",
+ statusMessage, requestUrl));
+ } else if (HttpStatusCode.NOT_FOUND.isStatus(statusCode)) {
+ 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}\"",
+ statusMessage, requestUrl));
+ }
+ }
+
+ protected String getUsername() {
+ return username;
+ }
+
+ protected String getPassword() {
+ return password;
+ }
+
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/transport/AbstractHttpTransport.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/transport/Base64Coder.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/transport/Base64Coder.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/transport/Base64Coder.java 2011-03-29 13:49:49 UTC (rev 30101)
@@ -0,0 +1,226 @@
+// Copyright 2003-2010 Christian d'Heureuse, Inventec Informatik AG, Zurich, Switzerland
+// www.source-code.biz, www.inventec.ch/chdh
+//
+// This module is multi-licensed and may be used under the terms
+// of any of the following licenses:
+//
+// EPL, Eclipse Public License, V1.0 or later, http://www.eclipse.org/legal
+// LGPL, GNU Lesser General Public License, V2.1 or later, http://www.gnu.org/licenses/lgpl.html
+// GPL, GNU General Public License, V2 or later, http://www.gnu.org/licenses/gpl.html
+// AL, Apache License, V2.0 or later, http://www.apache.org/licenses
+// BSD, BSD License, http://www.opensource.org/licenses/bsd-license.php
+//
+// Please contact the author if you need another license.
+// This module is provided "as is", without warranties of any kind.
+
+package org.jboss.tools.deltacloud.core.client.transport;
+
+/**
+* A Base64 encoder/decoder.
+*
+* <p>
+* This class is used to encode and decode data in Base64 format as described in RFC 1521.
+*
+* <p>
+* Project home page: <a href="http://www.source-code.biz/base64coder/java/">www.source-code.biz/base64coder/java</a><br>
+* Author: Christian d'Heureuse, Inventec Informatik AG, Zurich, Switzerland<br>
+* Multi-licensed: EPL / LGPL / GPL / AL / BSD.
+*/
+public class Base64Coder {
+
+// The line separator string of the operating system.
+private static final String systemLineSeparator = System.getProperty("line.separator");
+
+// Mapping table from 6-bit nibbles to Base64 characters.
+private static char[] map1 = new char[64];
+ static {
+ int i=0;
+ for (char c='A'; c<='Z'; c++) map1[i++] = c;
+ for (char c='a'; c<='z'; c++) map1[i++] = c;
+ for (char c='0'; c<='9'; c++) map1[i++] = c;
+ map1[i++] = '+'; map1[i++] = '/'; }
+
+// Mapping table from Base64 characters to 6-bit nibbles.
+private static byte[] map2 = new byte[128];
+ static {
+ for (int i=0; i<map2.length; i++) map2[i] = -1;
+ for (int i=0; i<64; i++) map2[map1[i]] = (byte)i; }
+
+/**
+* Encodes a string into Base64 format.
+* No blanks or line breaks are inserted.
+* @param s A String to be encoded.
+* @return A String containing the Base64 encoded data.
+*/
+public static String encodeString (String s) {
+ return new String(encode(s.getBytes())); }
+
+/**
+* Encodes a byte array into Base 64 format and breaks the output into lines of 76 characters.
+* This method is compatible with <code>sun.misc.BASE64Encoder.encodeBuffer(byte[])</code>.
+* @param in An array containing the data bytes to be encoded.
+* @return A String containing the Base64 encoded data, broken into lines.
+*/
+public static String encodeLines (byte[] in) {
+ return encodeLines(in, 0, in.length, 76, systemLineSeparator); }
+
+/**
+* Encodes a byte array into Base 64 format and breaks the output into lines.
+* @param in An array containing the data bytes to be encoded.
+* @param iOff Offset of the first byte in <code>in</code> to be processed.
+* @param iLen Number of bytes to be processed in <code>in</code>, starting at <code>iOff</code>.
+* @param lineLen Line length for the output data. Should be a multiple of 4.
+* @param lineSeparator The line separator to be used to separate the output lines.
+* @return A String containing the Base64 encoded data, broken into lines.
+*/
+public static String encodeLines (byte[] in, int iOff, int iLen, int lineLen, String lineSeparator) {
+ int blockLen = (lineLen*3) / 4;
+ if (blockLen <= 0) throw new IllegalArgumentException();
+ int lines = (iLen+blockLen-1) / blockLen;
+ int bufLen = ((iLen+2)/3)*4 + lines*lineSeparator.length();
+ StringBuilder buf = new StringBuilder(bufLen);
+ int ip = 0;
+ while (ip < iLen) {
+ int l = Math.min(iLen-ip, blockLen);
+ buf.append (encode(in, iOff+ip, l));
+ buf.append (lineSeparator);
+ ip += l; }
+ return buf.toString(); }
+
+/**
+* Encodes a byte array into Base64 format.
+* No blanks or line breaks are inserted in the output.
+* @param in An array containing the data bytes to be encoded.
+* @return A character array containing the Base64 encoded data.
+*/
+public static char[] encode (byte[] in) {
+ return encode(in, 0, in.length); }
+
+/**
+* Encodes a byte array into Base64 format.
+* No blanks or line breaks are inserted in the output.
+* @param in An array containing the data bytes to be encoded.
+* @param iLen Number of bytes to process in <code>in</code>.
+* @return A character array containing the Base64 encoded data.
+*/
+public static char[] encode (byte[] in, int iLen) {
+ return encode(in, 0, iLen); }
+
+/**
+* Encodes a byte array into Base64 format.
+* No blanks or line breaks are inserted in the output.
+* @param in An array containing the data bytes to be encoded.
+* @param iOff Offset of the first byte in <code>in</code> to be processed.
+* @param iLen Number of bytes to process in <code>in</code>, starting at <code>iOff</code>.
+* @return A character array containing the Base64 encoded data.
+*/
+public static char[] encode (byte[] in, int iOff, int iLen) {
+ int oDataLen = (iLen*4+2)/3; // output length without padding
+ int oLen = ((iLen+2)/3)*4; // output length including padding
+ char[] out = new char[oLen];
+ int ip = iOff;
+ int iEnd = iOff + iLen;
+ int op = 0;
+ while (ip < iEnd) {
+ int i0 = in[ip++] & 0xff;
+ int i1 = ip < iEnd ? in[ip++] & 0xff : 0;
+ int i2 = ip < iEnd ? in[ip++] & 0xff : 0;
+ int o0 = i0 >>> 2;
+ int o1 = ((i0 & 3) << 4) | (i1 >>> 4);
+ int o2 = ((i1 & 0xf) << 2) | (i2 >>> 6);
+ int o3 = i2 & 0x3F;
+ out[op++] = map1[o0];
+ out[op++] = map1[o1];
+ out[op] = op < oDataLen ? map1[o2] : '='; op++;
+ out[op] = op < oDataLen ? map1[o3] : '='; op++; }
+ return out; }
+
+/**
+* Decodes a string from Base64 format.
+* No blanks or line breaks are allowed within the Base64 encoded input data.
+* @param s A Base64 String to be decoded.
+* @return A String containing the decoded data.
+* @throws IllegalArgumentException If the input is not valid Base64 encoded data.
+*/
+public static String decodeString (String s) {
+ return new String(decode(s)); }
+
+/**
+* Decodes a byte array from Base64 format and ignores line separators, tabs and blanks.
+* CR, LF, Tab and Space characters are ignored in the input data.
+* This method is compatible with <code>sun.misc.BASE64Decoder.decodeBuffer(String)</code>.
+* @param s A Base64 String to be decoded.
+* @return An array containing the decoded data bytes.
+* @throws IllegalArgumentException If the input is not valid Base64 encoded data.
+*/
+public static byte[] decodeLines (String s) {
+ char[] buf = new char[s.length()];
+ int p = 0;
+ for (int ip = 0; ip < s.length(); ip++) {
+ char c = s.charAt(ip);
+ if (c != ' ' && c != '\r' && c != '\n' && c != '\t')
+ buf[p++] = c; }
+ return decode(buf, 0, p); }
+
+/**
+* Decodes a byte array from Base64 format.
+* No blanks or line breaks are allowed within the Base64 encoded input data.
+* @param s A Base64 String to be decoded.
+* @return An array containing the decoded data bytes.
+* @throws IllegalArgumentException If the input is not valid Base64 encoded data.
+*/
+public static byte[] decode (String s) {
+ return decode(s.toCharArray()); }
+
+/**
+* Decodes a byte array from Base64 format.
+* No blanks or line breaks are allowed within the Base64 encoded input data.
+* @param in A character array containing the Base64 encoded data.
+* @return An array containing the decoded data bytes.
+* @throws IllegalArgumentException If the input is not valid Base64 encoded data.
+*/
+public static byte[] decode (char[] in) {
+ return decode(in, 0, in.length); }
+
+/**
+* Decodes a byte array from Base64 format.
+* No blanks or line breaks are allowed within the Base64 encoded input data.
+* @param in A character array containing the Base64 encoded data.
+* @param iOff Offset of the first character in <code>in</code> to be processed.
+* @param iLen Number of characters to process in <code>in</code>, starting at <code>iOff</code>.
+* @return An array containing the decoded data bytes.
+* @throws IllegalArgumentException If the input is not valid Base64 encoded data.
+*/
+public static byte[] decode (char[] in, int iOff, int iLen) {
+ if (iLen%4 != 0) throw new IllegalArgumentException ("Length of Base64 encoded input string is not a multiple of 4.");
+ while (iLen > 0 && in[iOff+iLen-1] == '=') iLen--;
+ int oLen = (iLen*3) / 4;
+ byte[] out = new byte[oLen];
+ int ip = iOff;
+ int iEnd = iOff + iLen;
+ int op = 0;
+ while (ip < iEnd) {
+ int i0 = in[ip++];
+ int i1 = in[ip++];
+ int i2 = ip < iEnd ? in[ip++] : 'A';
+ int i3 = ip < iEnd ? in[ip++] : 'A';
+ if (i0 > 127 || i1 > 127 || i2 > 127 || i3 > 127)
+ throw new IllegalArgumentException ("Illegal character in Base64 encoded data.");
+ int b0 = map2[i0];
+ int b1 = map2[i1];
+ int b2 = map2[i2];
+ int b3 = map2[i3];
+ if (b0 < 0 || b1 < 0 || b2 < 0 || b3 < 0)
+ throw new IllegalArgumentException ("Illegal character in Base64 encoded data.");
+ int o0 = ( b0 <<2) | (b1>>>4);
+ int o1 = ((b1 & 0xf)<<4) | (b2>>>2);
+ int o2 = ((b2 & 3)<<6) | b3;
+ out[op++] = (byte)o0;
+ if (op<oLen) out[op++] = (byte)o1;
+ if (op<oLen) out[op++] = (byte)o2; }
+ return out; }
+
+// Dummy constructor.
+private Base64Coder() {}
+
+} // end class Base64Coder
\ No newline at end of file
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/transport/Base64Coder.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/transport/IHttpTransport.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/transport/IHttpTransport.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/transport/IHttpTransport.java 2011-03-29 13:49:49 UTC (rev 30101)
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.deltacloud.core.client.transport;
+
+import java.io.InputStream;
+
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClientException;
+import org.jboss.tools.deltacloud.core.client.request.DeltaCloudRequest;
+
+/**
+ * An interface for http transport implementation to be used by the
+ * DeltaCloudClient.
+ *
+ * @author André Dietisheim
+ * @see URLConnectionTransport
+ */
+public interface IHttpTransport {
+
+ public InputStream request(DeltaCloudRequest request) throws DeltaCloudClientException;
+
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/transport/IHttpTransport.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/transport/URLConnectionTransport.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/transport/URLConnectionTransport.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/transport/URLConnectionTransport.java 2011-03-29 13:49:49 UTC (rev 30101)
@@ -0,0 +1,108 @@
+package org.jboss.tools.deltacloud.core.client.transport;
+
+import java.io.BufferedInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.Authenticator;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLConnection;
+import java.text.MessageFormat;
+
+import org.jboss.tools.deltacloud.core.client.DeltaCloudNotFoundClientException;
+import org.jboss.tools.deltacloud.core.client.HttpMethod;
+import org.jboss.tools.deltacloud.core.client.request.DeltaCloudRequest;
+
+public class URLConnectionTransport extends AbstractHttpTransport {
+
+ private static final char USERNAME_PASSWORD_DELIMITER = ':';
+ private static final String PROPERTY_AUTHORIZATION = "Authorization";
+ private static final String PROPERTY_ACCEPT = "Accept";
+ private static final String PREFIX_BASIC_AUTHENTICATION = "Basic ";
+ private static final int TIMEOUT = 10 * 1024;
+
+ public URLConnectionTransport(String username, String password) {
+ super(username, password);
+ }
+
+ @Override
+ protected InputStream doRequest(DeltaCloudRequest request) throws Exception {
+ try {
+ URL url = request.getUrl();
+ HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+ connection.setUseCaches(false);
+ connection.setDoInput(true);
+ connection.setAllowUserInteraction(false);
+ connection.setConnectTimeout(TIMEOUT);
+ connection.setRequestProperty(PROPERTY_ACCEPT, "application/xml;q=1");
+ connection.setInstanceFollowRedirects(true);
+ addCredentials(connection);
+ setRequestMethod(request, connection);
+ BufferedInputStream in = new BufferedInputStream(connection.getInputStream());
+ throwOnHttpErrors(
+ connection.getResponseCode(), connection.getResponseMessage(), request.getUrl());
+ return in;
+ } catch (FileNotFoundException e) {
+ /*
+ * thrown by #connect when server resonds with 404
+ */
+ throw new DeltaCloudNotFoundClientException(
+ MessageFormat.format("Could not find resource {0}", request.getUrlString()));
+
+ }
+ }
+
+ private void setRequestMethod(DeltaCloudRequest request, HttpURLConnection connection) throws IOException {
+ HttpMethod httpMethod = request.getHttpMethod();
+ connection.setRequestMethod(httpMethod.name());
+ switch (httpMethod) {
+ case PUT:
+ case POST:
+ connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
+ connection.setRequestProperty("Content-Length", "0");// String.valueOf(request.getParametersLength()));
+ connection.setDoOutput(true);
+ connection.getOutputStream().flush();
+ break;
+ case GET:
+ connection.setDoOutput(false);
+ break;
+ }
+
+ }
+
+ /**
+ * Adds the credentials to the given http url connection.
+ *
+ * The current implementation uses low level API. Alternatively
+ * {@link Authenticator#setDefault(Authenticator)} could be used which would
+ * then rule all url connections in the same jvm.
+ *
+ * @param httpClient
+ * the http client
+ * @return the default http client
+ * @throws IOException
+ */
+ private void addCredentials(URLConnection urlConnection) throws IOException {
+ String username = getUsername();
+ String password = getPassword();
+ if (username != null && password != null) {
+ String credentials = new StringBuilder()
+ .append(PREFIX_BASIC_AUTHENTICATION)
+ .append(getAuthenticationValue(username, password))
+ .toString();
+ urlConnection.setRequestProperty(PROPERTY_AUTHORIZATION, credentials);
+ }
+
+ }
+
+ private String getAuthenticationValue(String username, String password) throws IOException {
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ out.write(username.getBytes());
+ out.write(USERNAME_PASSWORD_DELIMITER);
+ out.write(password.getBytes());
+ char[] encoded = Base64Coder.encode(out.toByteArray());
+ return new String(encoded);
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/transport/URLConnectionTransport.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.client.test/src/org/jboss/tools/internal/deltacloud/client/test/core/client/InstanceMockIntegrationTest.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.client.test/src/org/jboss/tools/internal/deltacloud/client/test/core/client/InstanceMockIntegrationTest.java 2011-03-29 13:48:42 UTC (rev 30100)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.client.test/src/org/jboss/tools/internal/deltacloud/client/test/core/client/InstanceMockIntegrationTest.java 2011-03-29 13:49:49 UTC (rev 30101)
@@ -13,7 +13,6 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import java.io.IOException;
@@ -146,14 +145,14 @@
testSetup.getClient().createInstance("dummy");
}
- @Test
+ @Test(expected=DeltaCloudClientException.class)
public void canDestroy() throws DeltaCloudClientException {
Image image = testSetup.getFirstImage(testSetup.getClient());
DeltaCloudClient client = testSetup.getClient();
Instance instance = client.createInstance(image.getId());
instance.stop(client);
instance.destroy(client);
- assertNull(testSetup.getInstanceById(instance.getId(), testSetup.getClient()));
+ client.listInstances(instance.getId());
}
@Test(expected = DeltaCloudClientException.class)
13 years, 1 month
JBoss Tools SVN: r30100 - trunk/deltacloud/tests/org.jboss.tools.deltacloud.test.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-03-29 09:48:42 -0400 (Tue, 29 Mar 2011)
New Revision: 30100
Removed:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/APIDomUnmarshallingTest.launch
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/CloudSchedulingRulesTest.launch
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/DeltaCloudTestSuite.launch
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/StringsPreferenceValueTest.launch
Log:
removed launch configs
Deleted: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/APIDomUnmarshallingTest.launch
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/APIDomUnmarshallingTest.launch 2011-03-29 13:34:57 UTC (rev 30099)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/APIDomUnmarshallingTest.launch 2011-03-29 13:48:42 UTC (rev 30100)
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<booleanAttribute key="append.args" value="true"/>
-<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
-<booleanAttribute key="askclear" value="false"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="clearws" value="true"/>
-<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.ide.eclipse.as.wtp.ui,org.jboss.tools.ui.bot.ext,org.jboss.ide.eclipse.as.core,org.jboss.tools.common.projecttemplates,org.jboss.ide.eclipse.as.rse.core,org.jboss.tools.tests.performance,org.jboss.tools.common.el.core,org.jboss.ide.eclipse.as.ui.mbeans,org.jboss.tools.common.gef,org.jboss.ide.eclipse.as.archives.integration.test,org.jboss.tools.common.verification.test,org.jboss.ide.eclipse.archives.core,org.jboss.tools.common.verification,org.jboss.tools.jmx.core.test,org.jboss.ide.eclipse.archives.jdt.integration,org.jboss.tools.common.model,org.jboss.ide.eclipse.as.classpath.core,org.jboss.ide.eclipse.archives.test,org.jboss.ide.eclipse.as.classpath.ui,org.jboss.tools.deltacloud.integration,org.jboss.tools.common.ui,org.jboss.tools.common.text.ext,org.jboss.tools.jmx.ui,org.jboss.tools.ui.bot.ext.test,org.jboss.tools.common.el.core.test,org.jboss.tools.common.model.ui.test,org.jboss.tools.tests,org.jbos!
s.tools.common.text.xml,org.jboss.ide.eclipse.as.ui.test,org.jboss.tools.common.meta.ui,org.jboss.ide.eclipse.archives.webtools,org.jboss.tools.deltacloud.docs,org.jboss.ide.eclipse.as.rse.ui,org.jboss.tools.common.verification.ui.test,org.jboss.tools.common.verification.ui,org.jboss.ide.eclipse.as.wtp.core,org.jboss.tools.common.test,org.jboss.tools.deltacloud.ui,org.jboss.tools.common.model.ui.capabilities,org.jboss.tools.common.resref.core,org.eclipse.jsch.ui,org.jboss.ide.eclipse.archives.ui,org.jboss.tools.common.el.ui,org.jboss.ide.eclipse.as.test,org.jboss.tools.jmx.ui.test,org.jboss.tools.common.resref.ui,org.jboss.ide.eclipse.as.ui,org.jboss.ide.eclipse.archives.ui.test,org.jboss.ide.eclipse.as.doc.user,org.jboss.tools.jmx.core,org.jboss.tools.common.model.ui,org.jboss.tools.common.model.test"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/client/APIDomUnmarshallingTest.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<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"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.internal.deltacloud.test.core.client.APIDomUnmarshallingTest"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.deltacloud.test"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx1024m"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
-<booleanAttribute key="run_in_ui_thread" value="true"/>
-<stringAttribute key="selected_target_plugins" value="org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.ui.console@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.ui.editors@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.core.variables@default:default,org.eclipse.ui@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.osgi@-1:true,org.eclipse.equinox.p2.repository@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.jem.util@default:default,org.eclipse.swt@default:default,javax.xml@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.apache.xml.serializer@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.core.databinding@default:default,org.eclipse.debug.ui@def!
ault:default,org.eclipse.core.commands@default:default,org.eclipse.ui.ide@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.search@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.core.expressions@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.jface@default:default,org.eclipse.osgi.util@default:default,org.eclipse.team.ui@default:default,org.eclipse.ui.forms@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.text@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.p2.metadata@default:default,javax.servlet@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ui.navigator@default:default,org.hamcrest.core@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.core.jobs@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.ecf@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclip!
se.emf.common@default:default,org.eclipse.equinox.p2.core@defa!
ult:defa
ult,org.apache.xml.resolver@default:default,org.eclipse.core.net@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.wst.common.environment@default:default,org.eclipse.help@default:default,org.eclipse.core.resources@default:default,org.eclipse.jdt.core@default:default,org.eclipse.compare.core@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.runtime@default:true,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.apache.xerces@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.wst.common.frameworks@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.osgi.services@d!
efault:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.wst.validation@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.team.core@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.ant.core@default:default,org.eclipse.ui.views@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.equinox.security@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.jface.text@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.emf.edit@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.databinding.observable@default:default,org.apache.commons.lo!
gging*1.0.4.v201005080501@default:default,org.eclipse.debug.co!
re@defau
lt:default,org.eclipse.ui.workbench@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.ecf.filetransfer@default:default,com.ibm.icu@default:default,org.eclipse.compare@default:default,org.eclipse.wst.common.core@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.deltacloud.core@default:default,org.jboss.tools.gwt.core@default:default,org.jboss.tools.deltacloud.test@default:default,org.jboss.tools.usage.test@default:default,org.jboss.tools.usage@default:default,com.jboss.jbds.usage.branding@default:default,org.jboss.tools.gwt.ui@default:default,org.jboss.tools.common@default:default"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useCustomFeatures" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="false"/>
-<booleanAttribute key="useProduct" value="false"/>
-</launchConfiguration>
Deleted: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/CloudSchedulingRulesTest.launch
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/CloudSchedulingRulesTest.launch 2011-03-29 13:34:57 UTC (rev 30099)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/CloudSchedulingRulesTest.launch 2011-03-29 13:48:42 UTC (rev 30100)
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<booleanAttribute key="append.args" value="true"/>
-<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
-<booleanAttribute key="askclear" value="false"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="clearws" value="true"/>
-<booleanAttribute key="clearwslog" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/CloudSchedulingRulesTest"/>
-<booleanAttribute key="default" value="false"/>
-<stringAttribute key="deselected_workspace_plugins" value="org.jboss.tools.deltacloud.integration,org.jboss.tools.usage,org.jboss.tools.usage.test,org.jboss.tools.tests,org.jboss.tools.deltacloud.docs,com.jboss.jbds.usage.branding,org.jboss.tools.deltacloud.ui,org.jboss.tools.gwt.ui,org.jboss.tools.gwt.core"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/job/CloudSchedulingRulesTest.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<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"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.internal.deltacloud.test.core.job.CloudSchedulingRulesTest"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.deltacloud.test"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx1024m"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
-<booleanAttribute key="run_in_ui_thread" value="true"/>
-<stringAttribute key="selected_target_plugins" value="com.ibm.icu@default:default,javax.servlet@default:default,org.eclipse.debug.ui@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.ltk.core.refactoring@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.core.expressions@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.ui.ide@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.commands@default:default,org.eclipse.help@default:default,org.eclipse.equinox.app@default:default,javax.xml@default:default,org.eclipse.jface.databinding@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.ecf@default:de!
fault,org.apache.xml.resolver@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.wst.validation@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.core.net@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.osgi.util@default:default,org.eclipse.jdt.core@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.core.runtime@default:true,org.eclipse.team.core@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.apache.xerces@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.emf.edit@default:default,org.eclipse.team.ui@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.core.filebuffers@default:!
default,org.eclipse.jdt.ui@default:default,org.eclipse.core.fi!
lesystem
@default:default,org.eclipse.ui.views@default:default,org.eclipse.equinox.common@2:true,org.eclipse.ui.editors@default:default,org.eclipse.core.variables@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.osgi.services@default:default,org.eclipse.compare@default:default,org.eclipse.search@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ant.core@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.wst.common.core@default:default,org.eclipse.equinox.security@default:default,org.eclipse.jface.text@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.compare.core@default:default,org.eclipse.text@default:default,org.apache.xml.serializer@default:default,org.hamcrest.core@default!
:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.ui.console@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.jdt.launching@default:default,org.eclipse.jface@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.ui@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.osgi@-1:true,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.debug.core@default:default,org.eclipse.ui.forms@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.core.databinding.property@default:default,org!
.eclipse.equinox.p2.core@default:default,org.eclipse.core.net.!
linux.x8
6_64@default:false,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.jobs@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.emf.common@default:default,org.eclipse.jem.util@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.jboss.ide.eclipse.archives.test@default:default,org.jboss.ide.eclipse.archives.jdt.integration@default:default,org.jboss.ide.eclipse.as.ui@default:default,org.jboss.tools.common.meta.ui@default:default,org.jboss.tools.common@default:default,org.jboss.tools.common.verification.test@default:default,org.jboss.ide.eclipse.as.archives.integration.test@default:default,org.jboss.tools.common.el.ui@default:default,org.jboss.tools.common.projecttemplates@default:default,org.jboss.ide.eclipse.as.classpath.ui@default:default,org.jboss.tools.deltacloud.core@default:default,org.jboss.tools.common.el.core.test@default:default,org.jboss.tools.jmx.core.test@default:default,org.jboss.tools.common.test@default:default,org.jboss.tools.common.ui@default:default,org.jboss.tools.common.verification.ui.test@default:default,org.jboss.ide.eclipse.archives.ui.test@default:default,org.jboss.tools.common.verification@default:default,org.jbos!
s.tools.tests.performance@default:default,org.jboss.ide.eclipse.archives.ui@default:default,org.jboss.tools.common.resref.core@default:default,org.jboss.ide.eclipse.as.doc.user@default:default,org.jboss.ide.eclipse.as.classpath.core@default:default,org.jboss.tools.common.model.test@default:default,org.jboss.tools.common.el.core@default:default,org.jboss.tools.ui.bot.ext.test@default:default,org.jboss.tools.jmx.ui.test@default:default,org.jboss.ide.eclipse.archives.core@default:default,org.jboss.tools.common.resref.ui@default:default,org.jboss.tools.ui.bot.ext@default:default,org.jboss.ide.eclipse.as.rse.ui@default:default,org.jboss.tools.common.model@default:default,org.jboss.ide.eclipse.as.wtp.ui@default:default,org.jboss.tools.common.text.ext@default:default,org.jboss.ide.eclipse.as.wtp.core@default:default,org.jboss.tools.jmx.ui@default:default,org.jboss.tools.deltacloud.test@default:default,org.jboss.ide.eclipse.as.test@default:default,org.jboss.ide.eclipse.as.core@defa!
ult:default,org.eclipse.jsch.ui@default:default,org.jboss.tool!
s.jmx.co
re@default:default,org.jboss.tools.common.model.ui.capabilities@default:default,org.jboss.tools.common.verification.ui@default:default,org.jboss.ide.eclipse.as.rse.core@default:default,org.jboss.tools.common.model.ui@default:default,org.jboss.ide.eclipse.archives.webtools@default:default,org.jboss.ide.eclipse.as.ui.test@default:default,org.jboss.ide.eclipse.as.ui.mbeans@default:default,org.jboss.tools.common.gef@default:default,org.jboss.tools.common.model.ui.test@default:default,org.jboss.tools.common.text.xml@default:default"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useCustomFeatures" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useProduct" value="false"/>
-</launchConfiguration>
Deleted: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/DeltaCloudTestSuite.launch
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/DeltaCloudTestSuite.launch 2011-03-29 13:34:57 UTC (rev 30099)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/DeltaCloudTestSuite.launch 2011-03-29 13:48:42 UTC (rev 30100)
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<booleanAttribute key="append.args" value="true"/>
-<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
-<booleanAttribute key="askclear" value="false"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="clearws" value="true"/>
-<booleanAttribute key="clearwslog" value="false"/>
-<booleanAttribute key="com.mountainminds.eclemma.core.INPLACE_INSTRUMENTATION" value="true"/>
-<listAttribute key="com.mountainminds.eclemma.core.INSTRUMENTATION_PATHS">
-<listEntry value="/org.jboss.tools.deltacloud.integration/bin"/>
-<listEntry value="/org.jboss.tools.deltacloud.ui/bin"/>
-<listEntry value="/org.jboss.tools.deltacloud.core/bin"/>
-</listAttribute>
-<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.ide.eclipse.as.wtp.ui,org.jboss.tools.ui.bot.ext,org.jboss.ide.eclipse.as.core,org.jboss.tools.common.projecttemplates,org.jboss.ide.eclipse.as.rse.core,org.jboss.tools.tests.performance,org.jboss.tools.common.el.core,org.jboss.ide.eclipse.as.ui.mbeans,org.jboss.tools.common.gef,org.jboss.ide.eclipse.as.archives.integration.test,org.jboss.tools.common.verification.test,org.jboss.ide.eclipse.archives.core,org.jboss.tools.common.verification,org.jboss.tools.jmx.core.test,org.jboss.ide.eclipse.archives.jdt.integration,org.jboss.tools.common.model,org.jboss.ide.eclipse.as.classpath.core,org.jboss.ide.eclipse.archives.test,org.jboss.ide.eclipse.as.classpath.ui,org.jboss.tools.deltacloud.integration,org.jboss.tools.common.ui,org.jboss.tools.usage,org.jboss.tools.usage.test,org.jboss.tools.common.text.ext,org.jboss.tools.jmx.ui,org.jboss.tools.ui.bot.ext.test,org.jboss.tools.common.el.core.test,org.jboss.tools.co!
mmon.model.ui.test,org.jboss.tools.tests,org.jboss.tools.common.text.xml,org.jboss.ide.eclipse.as.ui.test,org.jboss.tools.common.meta.ui,org.jboss.ide.eclipse.archives.webtools,org.jboss.tools.deltacloud.docs,org.jboss.tools.common.verification.ui.test,org.jboss.ide.eclipse.as.rse.ui,com.jboss.jbds.usage.branding,org.jboss.tools.common.verification.ui,org.jboss.ide.eclipse.as.wtp.core,org.jboss.tools.common.test,org.jboss.tools.gwt.ui,org.jboss.tools.common.model.ui.capabilities,org.jboss.tools.common.resref.core,org.jboss.ide.eclipse.archives.ui,org.jboss.tools.common.el.ui,org.jboss.ide.eclipse.as.test,org.jboss.tools.gwt.core,org.jboss.tools.jmx.ui.test,org.jboss.tools.common.resref.ui,org.jboss.ide.eclipse.as.ui,org.jboss.ide.eclipse.as.doc.user,org.jboss.ide.eclipse.archives.ui.test,org.jboss.tools.common.model.ui,org.jboss.tools.jmx.core,org.jboss.tools.common.model.test"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/DeltaCloudTestSuite.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<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"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.internal.deltacloud.test.DeltaCloudClientTestSuite"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.deltacloud.test"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx1024m"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
-<booleanAttribute key="run_in_ui_thread" value="true"/>
-<stringAttribute key="selected_target_plugins" value="org.eclipse.equinox.common@2:true,org.eclipse.jdt.launching@default:default,org.eclipse.core.runtime@default:true,org.eclipse.core.variables@default:default,org.apache.xerces@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.rse.services@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.equinox.p2.core@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jdt.core@default:default,org.eclipse.wst.validation@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.ant.core@default:default,org.eclipse.team.core@default:default,org.eclipse.help@default:default,org.eclipse.swt@default:def!
ault,org.eclipse.ui.console@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.debug.ui@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.core.jobs@default:default,org.eclipse.ui.views@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.equinox.security.ui@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.text@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.emf.edit@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.ui.forms@default:default,org.apache.xml.resolver@defa!
ult:default,org.eclipse.jface@default:default,javax.xml@defaul!
t:defaul
t,com.ibm.icu@default:default,org.eclipse.rse.core@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.osgi.services@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.jdt.ui@default:default,org.hamcrest.core@default:default,org.apache.xml.serializer@default:default,org.eclipse.ltk.ui.refactoring@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.debug.core@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.search@default:default,org.eclipse.osgi.util@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.emf.common@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.r!
esources@default:default,org.eclipse.compare.core@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.ui.ide@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.compare@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.equinox.app@default:default,com.jcraft.jsch@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.osgi@-1:true,org.eclipse.ui@default:default,org.eclipse.jem.util@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.equinox.security@default:default,org.eclipse!
.ui.workbench.texteditor@default:default,org.eclipse.ecf@defau!
lt:defau
lt,org.eclipse.core.contenttype@default:default,org.eclipse.ui.editors@default:default,org.eclipse.jface.text@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.core.net@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.team.ui@default:default,org.eclipse.jsch.core@default:default,javax.servlet@default:default,org.eclipse.core.databinding@default:default,org.eclipse.emf.ecore@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.deltacloud.core@default:default,org.jboss.tools.deltacloud.test@default:default,org.jboss.tools.deltacloud.ui@default:default,org.jboss.tools.common@default:default"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useCustomFeatures" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="false"/>
-<booleanAttribute key="useProduct" value="false"/>
-</launchConfiguration>
Deleted: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/StringsPreferenceValueTest.launch
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/StringsPreferenceValueTest.launch 2011-03-29 13:34:57 UTC (rev 30099)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/StringsPreferenceValueTest.launch 2011-03-29 13:48:42 UTC (rev 30100)
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
-<booleanAttribute key="append.args" value="true"/>
-<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
-<booleanAttribute key="askclear" value="false"/>
-<booleanAttribute key="automaticAdd" value="true"/>
-<booleanAttribute key="automaticValidate" value="false"/>
-<stringAttribute key="bootstrap" value=""/>
-<stringAttribute key="checked" value="[NONE]"/>
-<booleanAttribute key="clearConfig" value="true"/>
-<booleanAttribute key="clearws" value="true"/>
-<booleanAttribute key="clearwslog" value="false"/>
-<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/StringEntriesPreferenceValueTest"/>
-<booleanAttribute key="default" value="false"/>
-<stringAttribute key="deselected_workspace_plugins" value="org.jboss.ide.eclipse.as.wtp.ui,org.jboss.tools.ui.bot.ext,org.jboss.ide.eclipse.as.core,org.jboss.tools.common.projecttemplates,org.jboss.ide.eclipse.as.rse.core,org.jboss.tools.tests.performance,org.jboss.tools.common.el.core,org.jboss.ide.eclipse.as.ui.mbeans,org.jboss.tools.common.gef,org.jboss.ide.eclipse.as.archives.integration.test,org.jboss.tools.common.verification.test,org.jboss.ide.eclipse.archives.core,org.jboss.tools.common.verification,org.jboss.ide.eclipse.archives.jdt.integration,org.jboss.tools.jmx.core.test,org.jboss.tools.common.model,org.jboss.ide.eclipse.as.classpath.core,org.jboss.ide.eclipse.archives.test,org.jboss.ide.eclipse.as.classpath.ui,org.jboss.tools.deltacloud.integration,org.jboss.tools.common.ui,org.jboss.tools.usage,org.jboss.tools.usage.test,org.jboss.tools.common.text.ext,org.jboss.tools.jmx.ui,org.jboss.tools.ui.bot.ext.test,org.jboss.tools.common.el.core.test,org.jboss.tools.co!
mmon.model.ui.test,org.jboss.tools.tests,org.jboss.tools.common.text.xml,org.jboss.ide.eclipse.as.ui.test,org.jboss.tools.common.meta.ui,org.jboss.ide.eclipse.archives.webtools,org.jboss.tools.deltacloud.docs,org.jboss.tools.common.verification.ui.test,org.jboss.ide.eclipse.as.rse.ui,com.jboss.jbds.usage.branding,org.jboss.tools.common.verification.ui,org.jboss.ide.eclipse.as.wtp.core,org.jboss.tools.common.test,org.jboss.tools.gwt.ui,org.jboss.tools.common.model.ui.capabilities,org.jboss.tools.common.resref.core,org.eclipse.jsch.ui,org.jboss.ide.eclipse.archives.ui,org.jboss.tools.common.el.ui,org.jboss.ide.eclipse.as.test,org.jboss.tools.gwt.core,org.jboss.tools.jmx.ui.test,org.jboss.tools.common.resref.ui,org.jboss.ide.eclipse.as.ui,org.jboss.ide.eclipse.archives.ui.test,org.jboss.ide.eclipse.as.doc.user,org.jboss.tools.jmx.core,org.jboss.tools.common.model.ui,org.jboss.tools.common.model.test"/>
-<booleanAttribute key="includeOptional" value="true"/>
-<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/ui/preferences/StringsPreferenceValueTest.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<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"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
-<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
-<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
-<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.internal.deltacloud.test.ui.preferences.StringsPreferenceValueTest"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.deltacloud.test"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx1024m"/>
-<stringAttribute key="pde.version" value="3.3"/>
-<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
-<booleanAttribute key="run_in_ui_thread" value="true"/>
-<stringAttribute key="selected_target_plugins" value="com.ibm.icu@default:default,javax.servlet@default:default,org.eclipse.debug.ui@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.jdt.debug@default:default,com.jcraft.jsch@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.ltk.core.refactoring@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.core.expressions@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.ui.ide@default:default,org.eclipse.core.resources@default:default,org.eclipse.core.commands@default:default,org.eclipse.help@default:default,org.eclipse.equinox.app@default:default,javax.xml@default:default,org.eclipse.jface.databinding@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:de!
fault,org.eclipse.ecf@default:default,org.apache.xml.resolver@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.wst.validation@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.swt@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.core.net@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.jsch.core@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.osgi.util@default:default,org.eclipse.jdt.core@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.core.runtime@default:true,org.eclipse.equinox.security.ui@default:default,org.eclipse.team.core@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.apache.xerces@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.emf.edit@default:default,or!
g.eclipse.team.ui@default:default,org.eclipse.ltk.ui.refactori!
ng@defau
lt:default,org.eclipse.core.filebuffers@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.ui.views@default:default,org.eclipse.rse.core@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.equinox.common@2:true,org.eclipse.ui.editors@default:default,org.eclipse.core.variables@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.osgi.services@default:default,org.eclipse.compare@default:default,org.eclipse.search@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.ant.core@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.wst.common.core@default:default,org.eclipse.equinox.security@default:default,org.eclipse.jface.text@default:default,org.eclipse.ui.views.properties.tab!
bed@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.compare.core@default:default,org.eclipse.text@default:default,org.apache.xml.serializer@default:default,org.hamcrest.core@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.rse.services@default:default,org.eclipse.ui.console@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.jdt.launching@default:default,org.eclipse.jface@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.wst.xml.core@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.ui@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.!
eclipse.osgi@-1:true,org.eclipse.jdt.compiler.apt@default:fals!
e,org.ec
lipse.debug.core@default:default,org.eclipse.ui.forms@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.jobs@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.emf.common@default:default,org.eclipse.jem.util@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.deltacloud.ui@default:default,org.jboss.tools.common@default:default,org.jboss.tools.deltacloud.core@default:default,org.jboss.tools.deltacloud.test@default:default"/>
-<booleanAttribute key="show_selected_only" value="false"/>
-<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
-<booleanAttribute key="tracing" value="false"/>
-<booleanAttribute key="useCustomFeatures" value="false"/>
-<booleanAttribute key="useDefaultConfig" value="true"/>
-<booleanAttribute key="useDefaultConfigArea" value="true"/>
-<booleanAttribute key="useProduct" value="false"/>
-</launchConfiguration>
13 years, 1 month
JBoss Tools SVN: r30099 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/META-INF.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-03-29 09:34:57 -0400 (Tue, 29 Mar 2011)
New Revision: 30099
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/META-INF/MANIFEST.MF
Log:
restrictied package export
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/META-INF/MANIFEST.MF 2011-03-29 13:17:40 UTC (rev 30098)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/META-INF/MANIFEST.MF 2011-03-29 13:34:57 UTC (rev 30099)
@@ -13,5 +13,5 @@
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.deltacloud.core;x-friends:="org.jboss.tools.deltacloud.ui,org.jboss.tools.deltacloud.test,org.jboss.tools.deltacloud.integration",
- org.jboss.tools.deltacloud.core.job,
+ org.jboss.tools.deltacloud.core.job;x-friends:="org.jboss.tools.deltacloud.ui",
org.jboss.tools.internal.deltacloud.core.observable;x-friends:="org.jboss.tools.deltacloud.ui"
13 years, 1 month
JBoss Tools SVN: r30098 - trunk/deltacloud/tests/org.jboss.tools.deltacloud.client.test/src/org/jboss/tools/internal/deltacloud/client/test/core/client.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-03-29 09:17:40 -0400 (Tue, 29 Mar 2011)
New Revision: 30098
Modified:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.client.test/src/org/jboss/tools/internal/deltacloud/client/test/core/client/ServerTypeMockIntegrationTest.java
Log:
renamed method to better reflect its purpose
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.client.test/src/org/jboss/tools/internal/deltacloud/client/test/core/client/ServerTypeMockIntegrationTest.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.client.test/src/org/jboss/tools/internal/deltacloud/client/test/core/client/ServerTypeMockIntegrationTest.java 2011-03-29 13:17:07 UTC (rev 30097)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.client.test/src/org/jboss/tools/internal/deltacloud/client/test/core/client/ServerTypeMockIntegrationTest.java 2011-03-29 13:17:40 UTC (rev 30098)
@@ -111,8 +111,8 @@
}
@Override
- public int getParametersLength() {
- return 0;
+ public String getUrlString() {
+ return null;
}
}
);
13 years, 1 month
JBoss Tools SVN: r30097 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/request.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-03-29 09:17:07 -0400 (Tue, 29 Mar 2011)
New Revision: 30097
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/request/AbstractDeltaCloudRequest.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/request/DeltaCloudRequest.java
Log:
renamed method to better reflect its purpose
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/request/AbstractDeltaCloudRequest.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/request/AbstractDeltaCloudRequest.java 2011-03-29 13:16:14 UTC (rev 30096)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/request/AbstractDeltaCloudRequest.java 2011-03-29 13:17:07 UTC (rev 30097)
@@ -44,13 +44,13 @@
return url;
}
- protected String getUrlString() {
+ public String getUrlString() {
if (urlString == null) {
this.urlString = doCreateUrl(urlBuilder);
}
return urlString;
}
-
+
public String toString() {
return getUrlString();
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/request/DeltaCloudRequest.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/request/DeltaCloudRequest.java 2011-03-29 13:16:14 UTC (rev 30096)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/src/org/jboss/tools/deltacloud/core/client/request/DeltaCloudRequest.java 2011-03-29 13:17:07 UTC (rev 30097)
@@ -26,5 +26,7 @@
public URL getUrl() throws MalformedURLException;
+ public String getUrlString();
+
public HttpMethod getHttpMethod();
}
13 years, 1 month
JBoss Tools SVN: r30096 - in trunk/deltacloud/tests/org.jboss.tools.deltacloud.client.test/src/org/jboss/tools/internal/deltacloud/client: test and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-03-29 09:16:14 -0400 (Tue, 29 Mar 2011)
New Revision: 30096
Added:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.client.test/src/org/jboss/tools/internal/deltacloud/client/utils/
trunk/deltacloud/tests/org.jboss.tools.deltacloud.client.test/src/org/jboss/tools/internal/deltacloud/client/utils/test/
trunk/deltacloud/tests/org.jboss.tools.deltacloud.client.test/src/org/jboss/tools/internal/deltacloud/client/utils/test/UrlBuilderTest.java
Modified:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.client.test/src/org/jboss/tools/internal/deltacloud/client/test/DeltaCloudClientTestSuite.java
Log:
added UrlBuilderTest
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.client.test/src/org/jboss/tools/internal/deltacloud/client/test/DeltaCloudClientTestSuite.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.client.test/src/org/jboss/tools/internal/deltacloud/client/test/DeltaCloudClientTestSuite.java 2011-03-29 12:58:03 UTC (rev 30095)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.client.test/src/org/jboss/tools/internal/deltacloud/client/test/DeltaCloudClientTestSuite.java 2011-03-29 13:16:14 UTC (rev 30096)
@@ -16,6 +16,7 @@
import org.jboss.tools.internal.deltacloud.client.test.core.client.InstanceDomUnmarshallingTest;
import org.jboss.tools.internal.deltacloud.client.test.core.client.KeyDomUnmarshallingTest;
import org.jboss.tools.internal.deltacloud.client.test.core.client.RealmDomUnmarshallingTest;
+import org.jboss.tools.internal.deltacloud.client.utils.test.UrlBuilderTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -29,6 +30,7 @@
ImageDomUnmarshallingTest.class,
HardwareProfileDomUnmarshallingTest.class,
APIDomUnmarshallingTest.class,
- RealmDomUnmarshallingTest.class})
+ RealmDomUnmarshallingTest.class,
+ UrlBuilderTest.class})
public class DeltaCloudClientTestSuite {
}
Added: trunk/deltacloud/tests/org.jboss.tools.deltacloud.client.test/src/org/jboss/tools/internal/deltacloud/client/utils/test/UrlBuilderTest.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.client.test/src/org/jboss/tools/internal/deltacloud/client/utils/test/UrlBuilderTest.java (rev 0)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.client.test/src/org/jboss/tools/internal/deltacloud/client/utils/test/UrlBuilderTest.java 2011-03-29 13:16:14 UTC (rev 30096)
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.internal.deltacloud.client.utils.test;
+
+import static org.junit.Assert.assertEquals;
+
+import org.jboss.tools.deltacloud.core.client.utils.UrlBuilder;
+import org.junit.Test;
+
+public class UrlBuilderTest {
+
+ @Test
+ public void buildsHost() {
+ String host = "jboss.org";
+ assertEquals(host, new UrlBuilder(host).toString());
+ }
+
+ @Test
+ public void buildsHostWithPort() {
+ assertEquals(
+ "jboss.org:8080",
+ new UrlBuilder("jboss.org")
+ .port(8080)
+ .toString());
+ }
+
+ @Test
+ public void buildsWithPath() {
+ assertEquals(
+ "jboss.org:8080/tools",
+ new UrlBuilder("jboss.org")
+ .port(8080)
+ .path("tools")
+ .toString());
+ }
+
+ @Test
+ public void buildsWith2Paths() {
+ assertEquals(
+ "jboss.org:8080/tools/usage",
+ new UrlBuilder("jboss.org")
+ .port(8080)
+ .path("tools")
+ .path("usage")
+ .toString());
+ }
+
+ @Test
+ public void buildsWithParameters() {
+ assertEquals(
+ "jboss.org:8080/tools/usage?parameter=dummy",
+ new UrlBuilder("jboss.org")
+ .port(8080)
+ .path("tools")
+ .path("usage")
+ .parameter("parameter", "dummy")
+ .toString());
+ }
+}
Property changes on: trunk/deltacloud/tests/org.jboss.tools.deltacloud.client.test/src/org/jboss/tools/internal/deltacloud/client/utils/test/UrlBuilderTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 1 month
JBoss Tools SVN: r30095 - trunk/build/parent.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-03-29 08:58:03 -0400 (Tue, 29 Mar 2011)
New Revision: 30095
Modified:
trunk/build/parent/pom.xml
Log:
remove redundant multiple.site profile, and set unified.site to be on by default
Modified: trunk/build/parent/pom.xml
===================================================================
--- trunk/build/parent/pom.xml 2011-03-29 12:57:11 UTC (rev 30094)
+++ trunk/build/parent/pom.xml 2011-03-29 12:58:03 UTC (rev 30095)
@@ -355,7 +355,7 @@
<profile>
<id>unified.site</id>
<activation>
- <activeByDefault>false</activeByDefault>
+ <activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
@@ -372,42 +372,7 @@
</repositories>
</profile>
- <!-- Time saver: to build everything from scratch (without target platform);
- To enable it use -P multiple.site in command line. Do not remove repos
- that contains the same artefacts, it is done for purpose to make build more
- stable in case one of the repos is offline. -->
<profile>
- <id>multiple.site</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <repositories>
- <repository>
- <id>jbosstools-target-site</id>
- <url>${jbosstools-target-site}</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>jbosstools-requirements-composite-mirror</id>
- <url>http://download.jboss.org/jbosstools/updates/indigo/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- </repositories>
- </profile>
-
- <profile>
<id>osx</id>
<activation>
<property>
13 years, 1 month
JBoss Tools SVN: r30094 - branches/3.3.indigo/build/parent.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-03-29 08:57:11 -0400 (Tue, 29 Mar 2011)
New Revision: 30094
Modified:
branches/3.3.indigo/build/parent/pom.xml
Log:
remove redundant multiple.site profile, and set unified.site to be on by default
Modified: branches/3.3.indigo/build/parent/pom.xml
===================================================================
--- branches/3.3.indigo/build/parent/pom.xml 2011-03-29 10:40:30 UTC (rev 30093)
+++ branches/3.3.indigo/build/parent/pom.xml 2011-03-29 12:57:11 UTC (rev 30094)
@@ -355,7 +355,7 @@
<profile>
<id>unified.site</id>
<activation>
- <activeByDefault>false</activeByDefault>
+ <activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
@@ -372,42 +372,7 @@
</repositories>
</profile>
- <!-- Time saver: to build everything from scratch (without target platform);
- To enable it use -P multiple.site in command line. Do not remove repos
- that contains the same artefacts, it is done for purpose to make build more
- stable in case one of the repos is offline. -->
<profile>
- <id>multiple.site</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- </activation>
- <repositories>
- <repository>
- <id>jbosstools-target-site</id>
- <url>${jbosstools-target-site}</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- <repository>
- <id>jbosstools-requirements-composite-mirror</id>
- <url>http://download.jboss.org/jbosstools/updates/indigo/</url>
- <layout>p2</layout>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </repository>
- </repositories>
- </profile>
-
- <profile>
<id>osx</id>
<activation>
<property>
13 years, 1 month