JBoss Tools SVN: r35632 - trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-10-13 15:59:40 -0400 (Thu, 13 Oct 2011)
New Revision: 35632
Modified:
trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/SSHKeyPair.java
Log:
Modified: trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/SSHKeyPair.java
===================================================================
--- trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/SSHKeyPair.java 2011-10-13 17:32:25 UTC (rev 35631)
+++ trunk/as/plugins/org.jboss.tools.openshift.express.client/src/org/jboss/tools/openshift/express/client/SSHKeyPair.java 2011-10-13 19:59:40 UTC (rev 35632)
@@ -93,11 +93,11 @@
return new String(Base64Encoder.encode(keyPair.getPublicKeyBlob()));
}
- protected String getPrivateKeyPath() {
+ public String getPrivateKeyPath() {
return privateKeyPath;
}
- protected String getPublicKeyPath() {
+ public String getPublicKeyPath() {
return publicKeyPath;
}
}
13 years, 3 months
JBoss Tools SVN: r35631 - in trunk/jst: tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2011-10-13 13:32:25 -0400 (Thu, 13 Oct 2011)
New Revision: 35631
Added:
trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CAMultipleCSSClassesInsertionTest.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/proposal/CSSClassProposalType.java
trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/JstJspAllTests.java
Log:
JBIDE-9752 Content Assist for CSS class names doesn't allow to enter more that one CSS class name (it always replaces the first typed CSS class name)
Issue is fixed. JUnit Test is added.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/proposal/CSSClassProposalType.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/proposal/CSSClassProposalType.java 2011-10-13 17:04:25 UTC (rev 35630)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/proposal/CSSClassProposalType.java 2011-10-13 17:32:25 UTC (rev 35631)
@@ -35,7 +35,6 @@
* @author Victor Rubezhny
*
*/
-@SuppressWarnings("restriction")
public class CSSClassProposalType extends CustomProposalType {
private static final String IMAGE_NAME = "EnumerationProposal.gif"; //$NON-NLS-1$
private static Image ICON;
@@ -127,14 +126,19 @@
@Override
public TextProposal[] getProposals(KbQuery query) {
- String v = query.getValue();
- int offset = v.length();
- int b = v.lastIndexOf(',');
- if(b < 0) b = 0; else b += 1;
- String tail = v.substring(offset);
- int e = tail.indexOf(',');
- if(e < 0) e = v.length(); else e += offset;
- String prefix = v.substring(b).trim();
+ // Do not use getValue() because it trims the string and removes opening quote char, but all the characters
+ // (including whitespaces and quotes) are valuable here
+ String v = query.getStringQuery(); //query.getValue();
+ int predicateLength = 0;
+ while(predicateLength < v.length() && (v.charAt(predicateLength) == '"' || v.charAt(predicateLength) == '\''))
+ predicateLength++;
+
+ int b = v.lastIndexOf(' ');
+ b = (b == -1 ? v.lastIndexOf('\t') : b);
+ b = (b == -1 ? predicateLength : b + 1);
+ int e = v.length();
+
+ String prefix = v.substring(b);
List<TextProposal> proposals = new ArrayList<TextProposal>();
for (String text: idList) {
@@ -142,9 +146,9 @@
TextProposal proposal = new TextProposal();
proposal.setLabel(text);
proposal.setReplacementString(text);
- proposal.setPosition(b + text.length());
- proposal.setStart(b);
- proposal.setEnd(e);
+ proposal.setPosition(b + text.length() - predicateLength);
+ proposal.setStart(b - predicateLength);
+ proposal.setEnd(e - predicateLength);
if(ICON==null) {
ICON = ImageDescriptor.createFromFile(WebKbPlugin.class, IMAGE_NAME).createImage();
}
Modified: trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/JstJspAllTests.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/JstJspAllTests.java 2011-10-13 17:04:25 UTC (rev 35630)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/JstJspAllTests.java 2011-10-13 17:32:25 UTC (rev 35631)
@@ -13,6 +13,7 @@
import junit.framework.Test;
import junit.framework.TestSuite;
+import org.jboss.tools.jst.jsp.test.ca.CAMultipleCSSClassesInsertionTest;
import org.jboss.tools.jst.jsp.test.ca.Jbide1791Test;
import org.jboss.tools.jst.jsp.test.ca.Jbide6061Test;
import org.jboss.tools.jst.jsp.test.ca.Jbide9092Test;
@@ -30,8 +31,12 @@
Jbide6061Test.class),
"org.jboss.tools.jst.jsp.test", "projects/Jbide6061Test", //$NON-NLS-1$ //$NON-NLS-2$
"Jbide6061Test")); //$NON-NLS-1$
+ suite.addTest(new ProjectImportTestSetup(new TestSuite(
+ CAMultipleCSSClassesInsertionTest.class),
+ "org.jboss.tools.jst.jsp.test", "projects/Jbide6061Test", //$NON-NLS-1$ //$NON-NLS-2$
+ "Jbide6061Test")); //$NON-NLS-1$
- suite.addTestSuite(JstJspJbide1585Test.class);
+ suite.addTestSuite(JstJspJbide1585Test.class);
suite.addTestSuite(JstJspJbide1641Test.class);
suite.addTestSuite(Jbide1791Test.class);
Added: trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CAMultipleCSSClassesInsertionTest.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CAMultipleCSSClassesInsertionTest.java (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CAMultipleCSSClassesInsertionTest.java 2011-10-13 17:32:25 UTC (rev 35631)
@@ -0,0 +1,213 @@
+/*******************************************************************************
+ * 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.jst.jsp.test.ca;
+
+import java.util.List;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.FindReplaceDocumentAdapter;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.jboss.tools.common.base.test.contentassist.CATestUtil;
+import org.jboss.tools.jst.jsp.contentassist.AutoContentAssistantProposal;
+import org.jboss.tools.test.util.JobUtils;
+
+/**
+ * The JUnit test case for JBIDE-9752 issue
+ *
+ * @author Victor V. Rubezhny
+ *
+ */
+public class CAMultipleCSSClassesInsertionTest extends ContentAssistantTestCase {
+ private static final String PROJECT_NAME = "Jbide6061Test"; //$NON-NLS-1$
+ private static final String PAGE_NAME = "/WebContent/pages/jsp_page.jsp"; //$NON-NLS-1$
+
+ private final String[] CSSCLASS_PROPOSALS = new String[]{
+ "errors", //$NON-NLS-1$
+ "cls1", //$NON-NLS-1$
+ "cls2", //$NON-NLS-1$
+ "cls3", //$NON-NLS-1$
+ "cls4", //$NON-NLS-1$
+ "cls5" //$NON-NLS-1$
+ };
+
+ private static final String STRING_TO_FIND = "class=\"";
+ private static final String FILTERING_INITIAL_VALUE = "errors cls1";
+ private static final String[] FILTERING_CSSCLASS_PROPOSALS = new String[]{
+ "errors", //$NON-NLS-1$
+ "cls1", //$NON-NLS-1$
+ };
+ private static final int FILTER_LENGTH = 3;
+
+ public static Test suite() {
+ return new TestSuite(CAMultipleCSSClassesInsertionTest.class);
+ }
+
+ public void setUp() throws Exception {
+ project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
+ }
+
+ public void testCAMultipleCSSClassesInsertion(){
+ openEditor(PAGE_NAME);
+ try {
+ for (int i = 0; i < CSSCLASS_PROPOSALS.length; i++) {
+ doCAMultipleCSSClassesInsertionTest(CSSCLASS_PROPOSALS[i]);
+ }
+ } finally {
+ closeEditor();
+ }
+ }
+
+ public void testCAMultipleCSSClassesInsertionWithFilter(){
+ openEditor(PAGE_NAME);
+ try {
+ for (int i = 0; i < FILTERING_CSSCLASS_PROPOSALS.length; i++) {
+ doCAMultipleCSSClassesInsertionWithFilterTest(FILTERING_CSSCLASS_PROPOSALS[i]);
+ }
+ } finally {
+ closeEditor();
+ }
+ }
+
+
+ @SuppressWarnings("restriction")
+ protected void doCAMultipleCSSClassesInsertionTest(String proposalToApply) {
+ String documentContent = document.get();
+ assertNotNull("Document must not be null", document);
+
+ IRegion reg=null;
+ try {
+ reg = new FindReplaceDocumentAdapter(this.document).find(0, STRING_TO_FIND, true, false, false, false); //$NON-NLS-1$
+ } catch (BadLocationException e) {
+ fail("Cannot find start of value text: " + e.getLocalizedMessage());
+ }
+ assertNotNull("Cannot find a text region to test", reg);
+ int start = reg.getOffset() + STRING_TO_FIND.length();
+
+ try {
+ reg = new FindReplaceDocumentAdapter(this.document).find(start, "\"", true, false, false, false); //$NON-NLS-1$
+ } catch (BadLocationException e) {
+ fail("Cannot find end of value text: " + e.getLocalizedMessage());
+ }
+ assertNotNull("Cannot find a text region to test", reg);
+ int end = reg.getOffset();
+
+ // insert space character if it's not first value
+ if (documentContent.substring(start, end).trim().length() > 0) {
+ documentContent = documentContent.substring(0, end) + ' ' +
+ documentContent.substring(end);
+ document.set(documentContent);
+ end++;
+ JobUtils.waitForIdle();
+ }
+
+ String documentContentToCompare = documentContent.substring(0, end) + proposalToApply +
+ documentContent.substring(end);
+
+ List<ICompletionProposal> res = CATestUtil.collectProposals(contentAssistant, viewer, end);
+
+ assertTrue("Content Assistant returned no proposals", (res != null && res.size() > 0));
+
+ boolean bPropoosalToApplyFound = false;
+ for (ICompletionProposal p : res) {
+ if (!(p instanceof AutoContentAssistantProposal))
+ continue;
+ AutoContentAssistantProposal proposal = (AutoContentAssistantProposal)p;
+ String proposalString = proposal.getDisplayString();
+
+ if (proposalToApply.equals(proposalString)) {
+ bPropoosalToApplyFound = true;
+ proposal.apply(document);
+ JobUtils.waitForIdle();
+ break;
+ }
+ }
+ assertTrue("The proposal to apply not found.", bPropoosalToApplyFound);
+
+ String documentUpdatedContent = document.get();
+ assertTrue("The proposal replacement is failed.", documentContentToCompare.equals(documentUpdatedContent));
+ }
+
+ protected void doCAMultipleCSSClassesInsertionWithFilterTest(String proposalToApply){
+ String documentContent = document.get();
+ assertNotNull("Document must not be null", document);
+
+ IRegion reg=null;
+ try {
+ reg = new FindReplaceDocumentAdapter(this.document).find(0, STRING_TO_FIND, true, false, false, false); //$NON-NLS-1$
+ } catch (BadLocationException e) {
+ fail("Cannot find start of value text: " + e.getLocalizedMessage());
+ }
+ assertNotNull("Cannot find a text region to test", reg);
+ int start = reg.getOffset() + STRING_TO_FIND.length();
+
+ try {
+ reg = new FindReplaceDocumentAdapter(this.document).find(start, "\"", true, false, false, false); //$NON-NLS-1$
+ } catch (BadLocationException e) {
+ fail("Cannot find end of value text: " + e.getLocalizedMessage());
+ }
+ assertNotNull("Cannot find a text region to test", reg);
+ int end = reg.getOffset();
+
+ // Make initial value of CSS Class attribute
+ documentContent = documentContent.substring(0, start) + FILTERING_INITIAL_VALUE +
+ documentContent.substring(end);
+ document.set(documentContent);
+ JobUtils.waitForIdle();
+
+ // Find end of value again after the document modification
+ try {
+ reg = new FindReplaceDocumentAdapter(this.document).find(start, "\"", true, false, false, false); //$NON-NLS-1$
+ } catch (BadLocationException e) {
+ fail("Cannot find end of value text: " + e.getLocalizedMessage());
+ }
+ assertNotNull("Cannot find a text region to test", reg);
+ end = reg.getOffset();
+
+ // Find start position in attribute value part which equals to the proposal
+ try {
+ reg = new FindReplaceDocumentAdapter(this.document).find(start, proposalToApply, true, false, false, false); //$NON-NLS-1$
+ } catch (BadLocationException e) {
+ fail("Cannot find end of value text: " + e.getLocalizedMessage());
+ }
+ int templateStart = reg.getOffset();
+
+ String documentContentToCompare = documentContent.substring(0, templateStart + FILTER_LENGTH) + proposalToApply.substring(FILTER_LENGTH) +
+ documentContent.substring(templateStart + FILTER_LENGTH);
+
+ List<ICompletionProposal> res = CATestUtil.collectProposals(contentAssistant, viewer, templateStart + FILTER_LENGTH);
+
+ assertTrue("Content Assistant returned no proposals", (res != null && res.size() > 0));
+
+ boolean bPropoosalToApplyFound = false;
+ for (ICompletionProposal p : res) {
+ if (!(p instanceof AutoContentAssistantProposal))
+ continue;
+ AutoContentAssistantProposal proposal = (AutoContentAssistantProposal)p;
+ String proposalString = proposal.getDisplayString();
+
+ if (proposalToApply.equals(proposalString)) {
+ bPropoosalToApplyFound = true;
+ proposal.apply(document);
+ JobUtils.waitForIdle();
+ break;
+ }
+ }
+ assertTrue("The proposal to apply not found.", bPropoosalToApplyFound);
+
+ String documentUpdatedContent = document.get();
+ assertTrue("The proposal replacement is failed.", documentContentToCompare.equals(documentUpdatedContent));
+ }
+}
\ No newline at end of file
Property changes on: trunk/jst/tests/org.jboss.tools.jst.jsp.test/src/org/jboss/tools/jst/jsp/test/ca/CAMultipleCSSClassesInsertionTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 3 months
JBoss Tools SVN: r35630 - trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime.
by jbosstools-commits@lists.jboss.org
Author: bfitzpat
Date: 2011-10-13 13:04:25 -0400 (Thu, 13 Oct 2011)
New Revision: 35630
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/AbstractESBRuntimeResolver.java
Log:
JBDS-1865 - updating library to include riftsaw-esb.esb in trunk
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/AbstractESBRuntimeResolver.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/AbstractESBRuntimeResolver.java 2011-10-13 17:04:04 UTC (rev 35629)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/AbstractESBRuntimeResolver.java 2011-10-13 17:04:25 UTC (rev 35630)
@@ -25,6 +25,7 @@
protected final static String JBOSSESB_SAR = "jbossesb.sar"; //$NON-NLS-1$
protected final static String SOAP_AS_LOCATION = "jboss-as"; //$NON-NLS-1$
protected final static String ROSETTA_JAR = "jbossesb-rosetta.jar"; //$NON-NLS-1$
+ protected final static String RIFTSAWESB_ESB = "riftsaw-esb.esb";//$NON-NLS-1$
public List<IPath> getJarDirectories(String runtimeLocation, String configuration) {
@@ -43,12 +44,13 @@
IPath esbPath = deployPath.append(JBOSSESB_ESB);
IPath sarPath = deployPath.append(JBOSSESB_SAR);
+ IPath riftsawESBPath = deployPath.append(RIFTSAWESB_ESB);
-
IPath libPath = rtHome.append("lib");
directories.add(esbPath);
directories.add(sarPath.append("lib"));
+ directories.add(riftsawESBPath.append("lib"));
directories.add(libPath.append(JBOSSESB_ESB));
directories.add(libPath.append(JBOSSESB_SAR).append("lib"));
directories.add(soapDeployPath.append(JBOSSESB_ESB));
13 years, 3 months
JBoss Tools SVN: r35629 - branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime.
by jbosstools-commits@lists.jboss.org
Author: bfitzpat
Date: 2011-10-13 13:04:04 -0400 (Thu, 13 Oct 2011)
New Revision: 35629
Modified:
branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/AbstractESBRuntimeResolver.java
Log:
JBDS-1865 - updating library to include riftsaw-esb.esb in 3.2.x
Modified: branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/AbstractESBRuntimeResolver.java
===================================================================
--- branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/AbstractESBRuntimeResolver.java 2011-10-13 16:30:33 UTC (rev 35628)
+++ branches/jbosstools-3.2.x/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/AbstractESBRuntimeResolver.java 2011-10-13 17:04:04 UTC (rev 35629)
@@ -25,6 +25,7 @@
protected final static String JBOSSESB_SAR = "jbossesb.sar"; //$NON-NLS-1$
protected final static String SOAP_AS_LOCATION = "jboss-as"; //$NON-NLS-1$
protected final static String ROSETTA_JAR = "jbossesb-rosetta.jar"; //$NON-NLS-1$
+ protected final static String RIFTSAWESB_ESB = "riftsaw-esb.esb";//$NON-NLS-1$
public List<IPath> getJarDirectories(String runtimeLocation, String configuration) {
@@ -43,12 +44,13 @@
IPath esbPath = deployPath.append(JBOSSESB_ESB);
IPath sarPath = deployPath.append(JBOSSESB_SAR);
+ IPath riftsawESBPath = deployPath.append(RIFTSAWESB_ESB);
-
IPath libPath = rtHome.append("lib");
directories.add(esbPath);
directories.add(sarPath.append("lib"));
+ directories.add(riftsawESBPath.append("lib"));
directories.add(libPath.append(JBOSSESB_ESB));
directories.add(libPath.append(JBOSSESB_SAR).append("lib"));
directories.add(soapDeployPath.append(JBOSSESB_ESB));
13 years, 3 months
JBoss Tools SVN: r35628 - trunk/central/features/org.jboss.tools.central.feature.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-10-13 12:30:33 -0400 (Thu, 13 Oct 2011)
New Revision: 35628
Modified:
trunk/central/features/org.jboss.tools.central.feature/feature.xml
Log:
JBIDE-9368 Dashboard(s) for easy news aggregation, twitter and easy additional/3rd party plugin installation and project template/creation
Modified: trunk/central/features/org.jboss.tools.central.feature/feature.xml
===================================================================
--- trunk/central/features/org.jboss.tools.central.feature/feature.xml 2011-10-13 16:03:27 UTC (rev 35627)
+++ trunk/central/features/org.jboss.tools.central.feature/feature.xml 2011-10-13 16:30:33 UTC (rev 35628)
@@ -18,7 +18,11 @@
%license
</license>
- <plugin id="org.jboss.tools.central" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
- <plugin id="org.jboss.tools.central.discovery" download-size="0" install-size="0" version="0.0.0" unpack="false"/>
+ <plugin
+ id="org.jboss.tools.central"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
</feature>
13 years, 3 months
JBoss Tools SVN: r35627 - branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest.
by jbosstools-commits@lists.jboss.org
Author: elvisisking
Date: 2011-10-13 12:03:27 -0400 (Thu, 13 Oct 2011)
New Revision: 35627
Modified:
branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest/modeshape-client.jar
Log:
JBDS-1875: Updated JBT ModeShape Tools to EDS ER5 ModeShape jars.
Modified: branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest/modeshape-client.jar
===================================================================
(Binary files differ)
13 years, 3 months
JBoss Tools SVN: r35626 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: src/org/jboss/tools/internal/deltacloud/ui/wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-10-13 11:52:22 -0400 (Thu, 13 Oct 2011)
New Revision: 35626
Removed:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/SshPrivateKeysPreferences.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
Log:
[JBIDE-9805] moved SshPrivateKeysPreferences to org.jboss.tools.common.ui (was: org.jboss.tools.deltacloud.ui)
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF 2011-10-13 15:51:01 UTC (rev 35625)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF 2011-10-13 15:52:22 UTC (rev 35626)
@@ -31,4 +31,5 @@
org.jboss.tools.internal.deltacloud.ui.utils;x-friends:="org.jboss.tools.deltacloud.test,org.jboss.tools.deltacloud.integration"
Import-Package: org.jboss.tools.common.ui,
org.jboss.tools.common.ui.databinding,
- org.jboss.tools.common.ui.preferencevalue
+ org.jboss.tools.common.ui.preferencevalue,
+ org.jboss.tools.common.ui.ssh
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java 2011-10-13 15:51:01 UTC (rev 35625)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPage.java 2011-10-13 15:52:22 UTC (rev 35626)
@@ -52,6 +52,7 @@
import org.eclipse.swt.widgets.Text;
import org.jboss.tools.common.log.StatusFactory;
import org.jboss.tools.common.ui.WizardUtils;
+import org.jboss.tools.common.ui.ssh.SshPrivateKeysPreferences;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.deltacloud.core.DeltaCloudKey;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java 2011-10-13 15:51:01 UTC (rev 35625)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/ManageKeysPageModel.java 2011-10-13 15:52:22 UTC (rev 35626)
@@ -17,6 +17,7 @@
import java.util.List;
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
+import org.jboss.tools.common.ui.ssh.SshPrivateKeysPreferences;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.deltacloud.core.DeltaCloudKey;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2011-10-13 15:51:01 UTC (rev 35625)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage.java 2011-10-13 15:52:22 UTC (rev 35626)
@@ -64,6 +64,7 @@
import org.eclipse.ui.dialogs.PreferencesUtil;
import org.jboss.tools.common.log.StatusFactory;
import org.jboss.tools.common.ui.databinding.MandatoryStringValidator;
+import org.jboss.tools.common.ui.ssh.SshPrivateKeysPreferences;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.deltacloud.core.DeltaCloudHardwareProfile;
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/SshPrivateKeysPreferences.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/SshPrivateKeysPreferences.java 2011-10-13 15:51:01 UTC (rev 35625)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/SshPrivateKeysPreferences.java 2011-10-13 15:52:22 UTC (rev 35626)
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.internal.deltacloud.ui.wizards;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-
-import org.apache.deltacloud.client.utils.StringUtils;
-import org.eclipse.core.runtime.Platform;
-import org.jboss.tools.common.ui.preferencevalue.StringPreferenceValue;
-import org.jboss.tools.common.ui.preferencevalue.StringsPreferenceValue;
-import org.jboss.tools.deltacloud.core.DeltaCloudException;
-
-/**
- * @author André Dietisheim
- */
-public class SshPrivateKeysPreferences {
-
- private static final String PLUGIN_ID = "org.eclipse.jsch.core";
- /**
- * Preference keys defined by org.eclipse.jsch.
- *
- * these keys are replicates from org.eclipse.jsch.internal.core.IConstants
- */
- private static final String PRIVATEKEY = "PRIVATEKEY";
- private static final String SSH2HOME = "SSH2HOME";
-
- private static final String SSH_USERHOME = ".ssh";
- private static final String SSH_USERHOME_WIN32 = "ssh";
-
- private static StringsPreferenceValue sshPrivateKeyPreference =
- new StringsPreferenceValue(',', PRIVATEKEY, PLUGIN_ID);
- private static StringPreferenceValue sshHome = new StringPreferenceValue(SSH2HOME, PLUGIN_ID);
-
- /**
- * Adds the given keyName to the ssh-preferences
- *
- * @param keyName
- * the name of the key to add
- */
- public static void add(String keyName) {
- sshPrivateKeyPreference.add(keyName);
- }
-
- public static String[] getKeys() {
- return sshPrivateKeyPreference.get();
- }
-
- /**
- * Removes the given keyName from the ssh-preferences
- *
- * @param keyName
- * the name of the key to remove
- */
- public static void remove(String keyName) {
- sshPrivateKeyPreference.remove(keyName);
- }
-
- /**
- * Returns the path to the folder that ssh keys get stored to. It either
- * gets the preferences value from org.eclipse.jsch or uses a ssh folder in
- * the user home. This code was built according to what
- * org.eclipse.jsch.internal.core.PreferenceInitializer is doing.
- *
- * @return the directory to store or load the ssh keys from
- * @throws DeltaCloudException
- * if the directory could not be determined
- */
- public static String getSshKeyDirectory() throws FileNotFoundException {
- String sshHomePath = sshHome.get();
- if (StringUtils.isEmpty(sshHomePath)) {
- sshHomePath = getSshSystemHome();
- }
-
- if (StringUtils.isEmpty(sshHomePath)) {
- throw new FileNotFoundException("Could not determine path to ssh keys directory.");
- }
- return sshHomePath;
- }
-
- private static String getSshSystemHome() {
- String userHomePath = System.getProperty("user.home");
- StringBuilder builder = new StringBuilder(userHomePath);
- builder.append(File.separatorChar);
- if (Platform.getOS().equals(Platform.OS_WIN32)) {
- builder.append(SSH_USERHOME_WIN32); //$NON-NLS-1$
- } else {
- builder.append(SSH_USERHOME);
- }
- return builder.toString();
- }
-}
13 years, 3 months
JBoss Tools SVN: r35625 - in trunk/common/plugins/org.jboss.tools.common.ui: src/org/jboss/tools/common/ui and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-10-13 11:51:01 -0400 (Thu, 13 Oct 2011)
New Revision: 35625
Added:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/ssh/
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/ssh/SshPrivateKeysPreferences.java
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF
Log:
[JBIDE-9805] moved SshPrivateKeysPreferences to org.jboss.tools.common.ui (was: org.jboss.tools.deltacloud.ui)
Modified: trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF 2011-10-13 15:37:22 UTC (rev 35624)
+++ trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF 2011-10-13 15:51:01 UTC (rev 35625)
@@ -23,6 +23,7 @@
org.jboss.tools.common.ui.databinding,
org.jboss.tools.common.ui.preferences,
org.jboss.tools.common.ui.preferencevalue,
+ org.jboss.tools.common.ui.ssh,
org.jboss.tools.common.ui.widget.editor,
org.jboss.tools.common.ui.widget.field,
org.jboss.tools.common.ui.wizard
Copied: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/ssh/SshPrivateKeysPreferences.java (from rev 35563, trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/SshPrivateKeysPreferences.java)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/ssh/SshPrivateKeysPreferences.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/ssh/SshPrivateKeysPreferences.java 2011-10-13 15:51:01 UTC (rev 35625)
@@ -0,0 +1,103 @@
+/*******************************************************************************
+ * 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.common.ui.ssh;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+
+import org.eclipse.core.runtime.Platform;
+import org.jboss.tools.common.ui.preferencevalue.StringPreferenceValue;
+import org.jboss.tools.common.ui.preferencevalue.StringsPreferenceValue;
+
+/**
+ * @author André Dietisheim
+ */
+public class SshPrivateKeysPreferences {
+
+ private static final String JSCH_PLUGIN_ID = "org.eclipse.jsch.core";
+ /**
+ * Preference keys defined by org.eclipse.jsch.
+ *
+ * these keys are replicates from org.eclipse.jsch.internal.core.IConstants
+ */
+ private static final String PRIVATEKEY = "PRIVATEKEY";
+ private static final String SSH2HOME = "SSH2HOME";
+
+ private static final String SSH_USERHOME = ".ssh";
+ private static final String SSH_USERHOME_WIN32 = "ssh";
+
+ private static StringsPreferenceValue sshPrivateKeyPreference =
+ new StringsPreferenceValue(',', PRIVATEKEY, JSCH_PLUGIN_ID);
+ private static StringPreferenceValue sshHome = new StringPreferenceValue(SSH2HOME, JSCH_PLUGIN_ID);
+
+ /**
+ * Adds the given keyName to the ssh-preferences
+ *
+ * @param keyName
+ * the name of the key to add
+ */
+ public static void add(String keyName) {
+ sshPrivateKeyPreference.add(keyName);
+ }
+
+ public static String[] getKeys() {
+ return sshPrivateKeyPreference.get();
+ }
+
+ /**
+ * Removes the given keyName from the ssh-preferences
+ *
+ * @param keyName
+ * the name of the key to remove
+ */
+ public static void remove(String keyName) {
+ sshPrivateKeyPreference.remove(keyName);
+ }
+
+ /**
+ * Returns the path to the folder that ssh keys get stored to. It either
+ * gets the preferences value from org.eclipse.jsch or uses a ssh folder in
+ * the user home. This code was built according to what
+ * org.eclipse.jsch.internal.core.PreferenceInitializer is doing.
+ *
+ * @return the directory to store or load the ssh keys from
+ * @throws DeltaCloudException
+ * if the directory could not be determined
+ */
+ public static String getSshKeyDirectory() throws FileNotFoundException {
+ String sshHomePath = sshHome.get();
+ if (isEmpty(sshHomePath)) {
+ sshHomePath = getSshSystemHome();
+ }
+
+ if (isEmpty(sshHomePath)) {
+ throw new FileNotFoundException("Could not determine path to ssh keys directory.");
+ }
+ return sshHomePath;
+ }
+
+ private static String getSshSystemHome() {
+ String userHomePath = System.getProperty("user.home");
+ StringBuilder builder = new StringBuilder(userHomePath);
+ builder.append(File.separatorChar);
+ if (Platform.getOS().equals(Platform.OS_WIN32)) {
+ builder.append(SSH_USERHOME_WIN32); //$NON-NLS-1$
+ } else {
+ builder.append(SSH_USERHOME);
+ }
+ return builder.toString();
+ }
+
+ private static boolean isEmpty(String value) {
+ return value == null
+ || value.length() == 0;
+ }
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/ssh/SshPrivateKeysPreferences.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 3 months
JBoss Tools SVN: r35624 - trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-10-13 11:37:22 -0400 (Thu, 13 Oct 2011)
New Revision: 35624
Modified:
trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp...
trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp...
Log:
Include Teiid 7.5 in trunk composite; 7.6 TBD for after M4
Modified: trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp...
===================================================================
--- trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp... 2011-10-13 15:11:17 UTC (rev 35623)
+++ trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp... 2011-10-13 15:37:22 UTC (rev 35624)
@@ -7,7 +7,7 @@
get new time w/
date +%s000
-->
-<property name='p2.timestamp' value='1317306501000'/>
+<property name='p2.timestamp' value='1318520045000'/>
</properties>
<children size='68'>
@@ -84,12 +84,14 @@
<child location='../../../staging.previous/jbosstools-3.3_trunk.component--ws/all/repo/'/>
<child location='../../../staging/jbosstools-drools-5.2_trunk/all/repo/'/>
-<child location='../../../staging/jbosstools-teiid-designer_trunk/all/repo/'/>
+<!-- TODO: 7.6 to be included after M4 <child location='../../../staging/jbosstools-teiid-designer_trunk/all/repo/'/> -->
+<child location='../../../staging/jbosstools-teiid-designer-7.5_stable_branch/all/repo/'/>
<child location='../../../staging/savara-tools-eclipse-master/all/repo/'/>
<child location='../../../staging/xulrunner-1.9.2/all/repo/'/>
<child location='../../../staging.previous/jbosstools-drools-5.2_trunk/all/repo/'/>
-<child location='../../../staging.previous/jbosstools-teiid-designer_trunk/all/repo/'/>
+<!-- TODO: 7.6 to be included after M4 <child location='../../../staging.previous/jbosstools-teiid-designer_trunk/all/repo/'/> -->
+<child location='../../../staging.previous/jbosstools-teiid-designer-7.5_stable_branch/all/repo/'/>
<child location='../../../staging.previous/savara-tools-eclipse-master/all/repo/'/>
<child location='../../../staging.previous/xulrunner-1.9.2/all/repo/'/>
Modified: trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp...
===================================================================
--- trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp... 2011-10-13 15:11:17 UTC (rev 35623)
+++ trunk/download.jboss.org/jbosstools/builds/staging/_composite_/trunk/comp... 2011-10-13 15:37:22 UTC (rev 35624)
@@ -7,7 +7,7 @@
get new time w/
date +%s000
-->
-<property name='p2.timestamp' value='1317306501000'/>
+<property name='p2.timestamp' value='1318520080000'/>
</properties>
<children size='68'>
@@ -84,12 +84,14 @@
<child location='../../../staging.previous/jbosstools-3.3_trunk.component--ws/all/repo/'/>
<child location='../../../staging/jbosstools-drools-5.2_trunk/all/repo/'/>
-<child location='../../../staging/jbosstools-teiid-designer_trunk/all/repo/'/>
+<!-- TODO: 7.6 to be included after M4 <child location='../../../staging/jbosstools-teiid-designer_trunk/all/repo/'/> -->
+<child location='../../../staging/jbosstools-teiid-designer-7.5_stable_branch/all/repo/'/>
<child location='../../../staging/savara-tools-eclipse-master/all/repo/'/>
<child location='../../../staging/xulrunner-1.9.2/all/repo/'/>
<child location='../../../staging.previous/jbosstools-drools-5.2_trunk/all/repo/'/>
-<child location='../../../staging.previous/jbosstools-teiid-designer_trunk/all/repo/'/>
+<!-- TODO: 7.6 to be included after M4 <child location='../../../staging.previous/jbosstools-teiid-designer_trunk/all/repo/'/> -->
+<child location='../../../staging.previous/jbosstools-teiid-designer-7.5_stable_branch/all/repo/'/>
<child location='../../../staging.previous/savara-tools-eclipse-master/all/repo/'/>
<child location='../../../staging.previous/xulrunner-1.9.2/all/repo/'/>
13 years, 3 months
JBoss Tools SVN: r35623 - trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/databinding.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-10-13 11:11:17 -0400 (Thu, 13 Oct 2011)
New Revision: 35623
Added:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/databinding/InvertingBooleanConverter.java
Log:
[JBIDE-9793] implemented default clone destination, default remote name
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/databinding/InvertingBooleanConverter.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/databinding/InvertingBooleanConverter.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/databinding/InvertingBooleanConverter.java 2011-10-13 15:11:17 UTC (rev 35623)
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.common.ui.databinding;
+
+import org.eclipse.core.databinding.conversion.Converter;
+
+/**
+ * A converter that inverts a boolean. <code>true</code> gets <code>false</code>
+ * and the opposite. If the converter gets a non-boolean value feeded in, it
+ * will always return <code>false</code>.
+ *
+ * @author André Dietisheim
+ */
+public class InvertingBooleanConverter extends Converter {
+
+ public InvertingBooleanConverter() {
+ super(Boolean.class, Boolean.class);
+ }
+
+ @Override
+ public Object convert(Object fromObject) {
+ if (!(fromObject instanceof Boolean)) {
+ return Boolean.FALSE;
+ }
+ return !((Boolean) fromObject).booleanValue();
+ }
+
+}
Property changes on: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/databinding/InvertingBooleanConverter.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 3 months