JBoss Tools SVN: r31962 - in trunk: tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2011-06-09 10:14:31 -0400 (Thu, 09 Jun 2011)
New Revision: 31962
Added:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SelectTextInSourcePaneException.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/OpenOnHelper.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/OpenOnTest.java
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTUtilExt.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java
Log:
Added testing of Open Ons functionality within VPE.
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTUtilExt.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTUtilExt.java 2011-06-09 13:42:17 UTC (rev 31961)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTUtilExt.java 2011-06-09 14:14:31 UTC (rev 31962)
@@ -32,6 +32,7 @@
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.Widget;
import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
import org.eclipse.swtbot.swt.finder.SWTBot;
@@ -799,5 +800,77 @@
File.separator +
projectName;
}
+ /**
+ * Selects textToSelect within Source Pane of editor with title editorTitle
+ * @param bot
+ * @param editorTitle
+ * @param textToSelect
+ * @param selectionOffset
+ * @param selectionLength
+ * @return SWTBotEclipseEditor
+ */
+ public static SWTBotEclipseEditor selectTextInSourcePane(SWTBotExt bot,
+ String editorTitle, String textToSelect ,
+ int selectionOffset , int selectionLength) {
+ return selectTextInSourcePane(bot, editorTitle, textToSelect,
+ selectionOffset, selectionLength, 0);
+ }
+ /**
+ * Selects textToSelect within Source Pane of editor with title editorTitle
+ * @param bot
+ * @param editorTitle
+ * @param textToSelect
+ * @param selectionOffset
+ * @param selectionLength
+ * @param textToSelectIndex
+ * @return SWTBotEclipseEditor
+ */
+ public static SWTBotEclipseEditor selectTextInSourcePane(SWTBotExt bot,
+ String editorTitle, String textToSelect ,
+ int selectionOffset , int selectionLength , int textToSelectIndex) {
+
+ SWTBotEclipseEditor editor = bot.editorByTitle(editorTitle).toTextEditor();
+ String editorText = editor.getText();
+ boolean found = false;
+ int iStartIndex = 0;
+ int iRow = 0;
+ if (editorText != null && editorText.length() > 0 && editorText.contains(textToSelect)){
+ String[] editorLines = editorText.split("\n");
+ int iOccurenceIndex = 0;
+ while (!found && iRow < editorLines.length){
+ String lineText = editorLines[iRow];
+ iStartIndex = 0;
+ while (!found && lineText.contains(textToSelect)){
+ if (iOccurenceIndex == textToSelectIndex){
+ found = true;
+ iStartIndex += lineText.indexOf(textToSelect);
+ }
+ else{
+ iOccurenceIndex++;
+ int iNewStartIndex = lineText.indexOf(textToSelect) + textToSelect.length();
+ iStartIndex += iNewStartIndex;
+ lineText = lineText.substring(iNewStartIndex);
+ }
+ }
+ if (!found){
+ iRow++;
+ }
+ }
+
+ }
+
+ if (found) {
+ editor.selectRange(iRow, iStartIndex + selectionOffset, selectionLength);
+ }
+ else{
+ throw new SelectTextInSourcePaneException ("Wrong parameters specified for method selectTextInSourcePane.\n" +
+ "Unable to select required text '" + textToSelect +
+ "' within editor with title " + editorTitle + ".\n" +
+ "Editor text is: " + editorText);
+ }
+
+ return editor;
+
+ }
}
\ No newline at end of file
Added: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SelectTextInSourcePaneException.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SelectTextInSourcePaneException.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SelectTextInSourcePaneException.java 2011-06-09 14:14:31 UTC (rev 31962)
@@ -0,0 +1,20 @@
+package org.jboss.tools.ui.bot.ext;
+/**
+ * an exception thrown when it's nopt possible to select required text within Source pane of VPE
+ * @author vpakan
+ *
+ */
+public class SelectTextInSourcePaneException extends RuntimeException {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+ public SelectTextInSourcePaneException(String message, Throwable t) {
+ super(message,t);
+ }
+ public SelectTextInSourcePaneException(String message) {
+ super(message);
+ }
+
+}
Property changes on: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SelectTextInSourcePaneException.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/OpenOnHelper.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/OpenOnHelper.java (rev 0)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/OpenOnHelper.java 2011-06-09 14:14:31 UTC (rev 31962)
@@ -0,0 +1,71 @@
+ /*******************************************************************************
+ * Copyright (c) 2007-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.ui.bot.ext.helper;
+
+import static org.junit.Assert.assertTrue;
+
+import java.awt.event.KeyEvent;
+
+import org.apache.log4j.Logger;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEclipseEditor;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
+import org.jboss.tools.ui.bot.ext.SWTUtilExt;
+import org.jboss.tools.ui.bot.ext.Timing;
+
+/**
+ * Helper for Open On functionality testing
+ * @author Vladimir Pakan
+ *
+ */
+public class OpenOnHelper {
+ protected static final Logger log = Logger.getLogger(OpenOnHelper.class);
+ /**
+ * Applies Open On (F3) on textToSelect within editor with editorTitle
+ * and checks if expectedOpenedFileName was opened
+ * @param editorTitle
+ * @param textToSelect
+ * @param selectionOffset
+ * @param selectionLength
+ * @param textToSelectIndex
+ * @param expectedOpenedFileName
+ */
+ public static SWTBotEditor checkOpenOnFileIsOpened(SWTBotExt bot,
+ String editorTitle, String textToSelect ,
+ int selectionOffset , int selectionLength , int textToSelectIndex,
+ String expectedOpenedFileName){
+
+ SWTBotEditor openedEditor = null;
+
+ SWTBotEclipseEditor sourceEditor = SWTUtilExt.selectTextInSourcePane(bot, editorTitle, textToSelect,
+ selectionOffset, selectionLength, textToSelectIndex);
+
+ bot.sleep(Timing.time1S());
+
+ sourceEditor.setFocus();
+
+ bot.sleep(Timing.time1S());
+
+ KeyboardHelper.typeKeyCodeUsingAWT(KeyEvent.VK_F3);
+
+ bot.sleep(Timing.time3S());
+
+ openedEditor = bot.activeEditor();
+
+ assertTrue("Opened file has to have title " + expectedOpenedFileName + " but has " + openedEditor.getTitle(),
+ openedEditor.getTitle().equalsIgnoreCase(expectedOpenedFileName));
+
+ return openedEditor;
+
+ }
+
+}
Property changes on: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/OpenOnHelper.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2011-06-09 13:42:17 UTC (rev 31961)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2011-06-09 14:14:31 UTC (rev 31962)
@@ -82,6 +82,7 @@
public static final String COPY = "Copy";
public static final String PASTE = "Paste";
public static final String UNDO = "Undo";
+ public static final String CLOSE_ALL = "Close All";
}
public class Button {
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2011-06-09 13:42:17 UTC (rev 31961)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2011-06-09 14:14:31 UTC (rev 31962)
@@ -77,6 +77,7 @@
import org.jboss.tools.vpe.ui.bot.test.palette.PaletteEditorTest;
import org.jboss.tools.vpe.ui.bot.test.smoke.EditorSynchronizationTest;
import org.jboss.tools.vpe.ui.bot.test.smoke.JSPPageCreationTest;
+import org.jboss.tools.vpe.ui.bot.test.smoke.OpenOnTest;
import org.jboss.tools.vpe.ui.bot.test.smoke.RenameFacesConfigFileTest;
import org.jboss.tools.vpe.ui.bot.test.smoke.RenameJSPFileTest;
import org.jboss.tools.vpe.ui.bot.test.smoke.RenameXHTMLFileTest;
@@ -169,6 +170,7 @@
suite.addTestSuite(IncludeTagTest.class);
suite.addTestSuite(AjaxInvisibleTagsTest.class);
suite.addTestSuite(LogTagTest.class);
+ suite.addTestSuite(OpenOnTest.class);
suite.addTestSuite(XhtmlFilePerformanceTest.class);
return new TestSetup(suite);
}
Added: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/OpenOnTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/OpenOnTest.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/OpenOnTest.java 2011-06-09 14:14:31 UTC (rev 31962)
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2007-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.vpe.ui.bot.test.smoke;
+
+import org.apache.log4j.Logger;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.widgets.TimeoutException;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.helper.OpenOnHelper;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.jboss.tools.ui.bot.test.JBTSWTBotTestCase;
+import org.jboss.tools.vpe.ui.bot.test.editor.VPEEditorTestCase;
+/**
+ * Test open on functionality
+ * @author Vladimir Pakan
+ *
+ */
+public class OpenOnTest extends VPEEditorTestCase{
+ private static Logger log = Logger.getLogger(JBTSWTBotTestCase.class);
+ public void testOpenOn() throws Throwable{
+ try{
+ bot.menu(IDELabel.Menu.FILE).menu(IDELabel.Menu.CLOSE_ALL).click();
+ log.info("All Editors closed");
+ } catch (WidgetNotFoundException wnfe){
+ log.info("No Editors to close");
+ } catch (TimeoutException te){
+ log.info("No Editors to close");
+ }
+
+
+ openPage();
+ checkOpenOn();
+
+ }
+ /**
+ * Check Open On functionality for jsp page
+ */
+ private void checkOpenOn() {
+ // Check open on for uri="http://java.sun.com/jsf/html"
+ String expectedOpenedFileName = "html_basic.tld";
+ SWTBotEditor openedEditor = OpenOnHelper.checkOpenOnFileIsOpened(
+ SWTTestExt.bot, TEST_PAGE, "uri=\"http://java.sun.com/jsf/html\"", 5,
+ 0, 0, expectedOpenedFileName);
+ String selectedTreeItemLabel = openedEditor.bot().tree().selection()
+ .get(0, 0);
+ assertTrue("Selected tree item has to have label " + expectedOpenedFileName
+ + " but it has " + selectedTreeItemLabel,
+ selectedTreeItemLabel.equalsIgnoreCase(expectedOpenedFileName));
+ openedEditor.close();
+ // Check open on for uri="http://java.sun.com/jsf/core"
+ expectedOpenedFileName = "jsf_core.tld";
+ openedEditor = OpenOnHelper.checkOpenOnFileIsOpened(SWTTestExt.bot,
+ TEST_PAGE, "uri=\"http://java.sun.com/jsf/core\"", 5, 0, 0,
+ expectedOpenedFileName);
+ selectedTreeItemLabel = openedEditor.bot().tree().selection().get(0, 0);
+ assertTrue("Selected tree item has to have label " + expectedOpenedFileName
+ + " but it has " + selectedTreeItemLabel,
+ selectedTreeItemLabel.equalsIgnoreCase(expectedOpenedFileName));
+ openedEditor.close();
+ // Check open on for h:outputText
+ String tagToCheck = "outputText";
+ expectedOpenedFileName = "html_basic.tld";
+ openedEditor = OpenOnHelper.checkOpenOnFileIsOpened(SWTTestExt.bot,
+ TEST_PAGE, "h:" + tagToCheck, 5, 0, 0,
+ expectedOpenedFileName);
+ selectedTreeItemLabel = openedEditor.bot().tree().selection().get(0, 0);
+ assertTrue("Selected tree item has to have label " + tagToCheck
+ + " but it has " + selectedTreeItemLabel,
+ selectedTreeItemLabel.equalsIgnoreCase(tagToCheck));
+ openedEditor.close();
+ // Check open on for f:view
+ tagToCheck = "view";
+ expectedOpenedFileName = "jsf_core.tld";
+ openedEditor = OpenOnHelper.checkOpenOnFileIsOpened(SWTTestExt.bot,
+ TEST_PAGE, "f:" + tagToCheck, 5, 0, 0,
+ expectedOpenedFileName);
+ selectedTreeItemLabel = openedEditor.bot().tree().selection().get(0, 0);
+ assertTrue("Selected tree item has to have label " + tagToCheck
+ + " but it has " + selectedTreeItemLabel,
+ selectedTreeItemLabel.equalsIgnoreCase(tagToCheck));
+ openedEditor.close();
+ }
+}
\ No newline at end of file
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/OpenOnTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
14 years, 10 months
JBoss Tools SVN: r31961 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2011-06-09 09:42:17 -0400 (Thu, 09 Jun 2011)
New Revision: 31961
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/pom.xml
Log:
https://issues.jboss.org/browse/JBIDE-8777
- configuration problem is fixed for jsf.vpe.ajax4jsf tests
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/pom.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/pom.xml 2011-06-09 12:47:48 UTC (rev 31960)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/pom.xml 2011-06-09 13:42:17 UTC (rev 31961)
@@ -15,4 +15,18 @@
<emma.filter>org.jboss.tools.jsf.vpe.ajax4jsf*</emma.filter>
<emma.instrument.bundles>org.jboss.tools.jsf.vpe.ajax4jsf</emma.instrument.bundles>
</properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.sonatype.tycho</groupId>
+ <artifactId>maven-osgi-test-plugin</artifactId>
+ <configuration>
+ <explodedBundles combine.children="append">
+ <bundle>org.jboss.tools.jsf.vpe.ajax4jsf</bundle>
+ </explodedBundles>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
14 years, 10 months
JBoss Tools SVN: r31960 - trunk/deltacloud/tests.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-06-09 08:47:48 -0400 (Thu, 09 Jun 2011)
New Revision: 31960
Removed:
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/
Log:
[JBIDE-9105] removed org.jboss.tools.deltacloud.client and replaced by a jarred version of org.apache.deltacloud java client (it's the same code, but it's now hosted in the deltacloud project
14 years, 10 months
JBoss Tools SVN: r31959 - trunk/deltacloud/plugins.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-06-09 08:40:40 -0400 (Thu, 09 Jun 2011)
New Revision: 31959
Removed:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.client/
Modified:
trunk/deltacloud/plugins/pom.xml
Log:
[JBIDE-9105] removed org.jboss.tools.deltacloud.client and replaced by a jarred version of org.apache.deltacloud java client (it's the same code, but it's now hosted in the deltacloud project
Modified: trunk/deltacloud/plugins/pom.xml
===================================================================
--- trunk/deltacloud/plugins/pom.xml 2011-06-09 12:37:04 UTC (rev 31958)
+++ trunk/deltacloud/plugins/pom.xml 2011-06-09 12:40:40 UTC (rev 31959)
@@ -13,7 +13,6 @@
<name>deltacloud.plugins</name>
<packaging>pom</packaging>
<modules>
- <module>org.jboss.tools.deltacloud.client</module>
<module>org.jboss.tools.deltacloud.core</module>
<module>org.jboss.tools.deltacloud.ui</module>
<module>org.jboss.tools.deltacloud.integration</module>
14 years, 10 months
JBoss Tools SVN: r31958 - in trunk/deltacloud: plugins/org.jboss.tools.deltacloud.core/META-INF and 9 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-06-09 08:37:04 -0400 (Thu, 09 Jun 2011)
New Revision: 31958
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/client-0.2.0-SNAPSHOT.jar
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/.classpath
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/META-INF/MANIFEST.MF
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/build.properties
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudDriver.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudHardwareProfile.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudHardwareProperty.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudImage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudImageFactory.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstanceFactory.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudKey.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudRealm.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudResourceAction.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/AbstractInstanceHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/InstancePropertySource.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/SshPrivateKeysPreferences.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/META-INF/MANIFEST.MF
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/context/MockIntegrationTestContext.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/DeltaCloudMockIntegrationTest.java
trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/job/CloudSchedulingRulesTest.java
Log:
[JBIDE-9105] removed org.jboss.tools.deltacloud.client and replaced by a jarred version of org.apache.deltacloud java client (it's the same code, but it's now hosted in the deltacloud project
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/.classpath
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/.classpath 2011-06-09 12:00:51 UTC (rev 31957)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/.classpath 2011-06-09 12:37:04 UTC (rev 31958)
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry exported="true" kind="lib" path="client-0.2.0-SNAPSHOT.jar" sourcepath="/home/adietish/jboss-workspaces/deltacloud/deltacloud/clients/java"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry exported="true" kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
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-06-09 12:00:51 UTC (rev 31957)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/META-INF/MANIFEST.MF 2011-06-09 12:37:04 UTC (rev 31958)
@@ -7,10 +7,13 @@
Bundle-Vendor: JBoss by Red Hat
Require-Bundle: org.jboss.tools.common;bundle-version="[3.2.0,4.0.0)",
org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.equinox.security;bundle-version="1.1.0",
- org.jboss.tools.deltacloud.client;bundle-version="[0.2.0,1.0.0)"
+ org.eclipse.equinox.security;bundle-version="1.1.0"
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",
+Export-Package: org.apache.deltacloud.client;x-friends:="org.jboss.tools.deltacloud.integration,org.jboss.tools.deltacloud.test",
+ org.apache.deltacloud.client.utils;x-friends:="org.jboss.tools.deltacloud.test,org.jboss.tools.deltacloud.ui",
+ 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;x-friends:="org.jboss.tools.deltacloud.ui,org.jboss.tools.deltacloud.test",
org.jboss.tools.internal.deltacloud.core.observable;x-friends:="org.jboss.tools.deltacloud.ui"
+Bundle-ClassPath: client-0.2.0-SNAPSHOT.jar,
+ .
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/build.properties
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/build.properties 2011-06-09 12:00:51 UTC (rev 31957)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/build.properties 2011-06-09 12:37:04 UTC (rev 31958)
@@ -2,5 +2,6 @@
output.. = bin/
bin.includes = ChangeLog,\
about.html,\
- .,\
- META-INF/
+ .,\
+ META-INF/,\
+ client-0.2.0-SNAPSHOT.jar
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/client-0.2.0-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/client-0.2.0-SNAPSHOT.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2011-06-09 12:00:51 UTC (rev 31957)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloud.java 2011-06-09 12:37:04 UTC (rev 31958)
@@ -16,18 +16,18 @@
import java.util.Iterator;
import java.util.List;
+import org.apache.deltacloud.client.API.Driver;
+import org.apache.deltacloud.client.DeltaCloudAuthClientException;
+import org.apache.deltacloud.client.DeltaCloudClient;
+import org.apache.deltacloud.client.DeltaCloudClientException;
+import org.apache.deltacloud.client.DeltaCloudClientImpl;
+import org.apache.deltacloud.client.DeltaCloudNotFoundClientException;
+import org.apache.deltacloud.client.HardwareProfile;
+import org.apache.deltacloud.client.Image;
+import org.apache.deltacloud.client.Instance;
+import org.apache.deltacloud.client.Key;
+import org.apache.deltacloud.client.Realm;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.jboss.tools.deltacloud.client.DeltaCloudAuthClientException;
-import org.jboss.tools.deltacloud.client.DeltaCloudClient;
-import org.jboss.tools.deltacloud.client.DeltaCloudClientException;
-import org.jboss.tools.deltacloud.client.DeltaCloudClientImpl;
-import org.jboss.tools.deltacloud.client.DeltaCloudNotFoundClientException;
-import org.jboss.tools.deltacloud.client.HardwareProfile;
-import org.jboss.tools.deltacloud.client.Image;
-import org.jboss.tools.deltacloud.client.Instance;
-import org.jboss.tools.deltacloud.client.Key;
-import org.jboss.tools.deltacloud.client.Realm;
-import org.jboss.tools.deltacloud.client.API.Driver;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance.State;
import org.jboss.tools.internal.deltacloud.core.observable.ObservablePojo;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudDriver.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudDriver.java 2011-06-09 12:00:51 UTC (rev 31957)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudDriver.java 2011-06-09 12:37:04 UTC (rev 31958)
@@ -10,7 +10,7 @@
******************************************************************************/
package org.jboss.tools.deltacloud.core;
-import org.jboss.tools.deltacloud.client.API.Driver;
+import org.apache.deltacloud.client.API.Driver;
/**
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudHardwareProfile.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudHardwareProfile.java 2011-06-09 12:00:51 UTC (rev 31957)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudHardwareProfile.java 2011-06-09 12:37:04 UTC (rev 31958)
@@ -13,8 +13,8 @@
import java.util.ArrayList;
import java.util.List;
-import org.jboss.tools.deltacloud.client.HardwareProfile;
-import org.jboss.tools.deltacloud.client.Property;
+import org.apache.deltacloud.client.HardwareProfile;
+import org.apache.deltacloud.client.Property;
/**
* @author Jeff Johnston
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudHardwareProperty.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudHardwareProperty.java 2011-06-09 12:00:51 UTC (rev 31957)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudHardwareProperty.java 2011-06-09 12:37:04 UTC (rev 31958)
@@ -12,7 +12,7 @@
import java.util.List;
-import org.jboss.tools.deltacloud.client.Property;
+import org.apache.deltacloud.client.Property;
public class DeltaCloudHardwareProperty {
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudImage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudImage.java 2011-06-09 12:00:51 UTC (rev 31957)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudImage.java 2011-06-09 12:37:04 UTC (rev 31958)
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.jboss.tools.deltacloud.core;
-import org.jboss.tools.deltacloud.client.Image;
+import org.apache.deltacloud.client.Image;
/**
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudImageFactory.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudImageFactory.java 2011-06-09 12:00:51 UTC (rev 31957)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudImageFactory.java 2011-06-09 12:37:04 UTC (rev 31958)
@@ -14,8 +14,8 @@
import java.util.Collection;
import java.util.List;
+import org.apache.deltacloud.client.Image;
import org.eclipse.core.runtime.Assert;
-import org.jboss.tools.deltacloud.client.Image;
/**
* @author André Dietisheim
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java 2011-06-09 12:00:51 UTC (rev 31957)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstance.java 2011-06-09 12:37:04 UTC (rev 31958)
@@ -14,10 +14,10 @@
import java.util.ArrayList;
import java.util.List;
-import org.jboss.tools.deltacloud.client.Action;
-import org.jboss.tools.deltacloud.client.DeltaCloudClient;
-import org.jboss.tools.deltacloud.client.DeltaCloudClientException;
-import org.jboss.tools.deltacloud.client.Instance;
+import org.apache.deltacloud.client.Action;
+import org.apache.deltacloud.client.DeltaCloudClient;
+import org.apache.deltacloud.client.DeltaCloudClientException;
+import org.apache.deltacloud.client.Instance;
/**
* An instance that may be reached on a DeltaCloud instance. Wraps Instance from
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstanceFactory.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstanceFactory.java 2011-06-09 12:00:51 UTC (rev 31957)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudInstanceFactory.java 2011-06-09 12:37:04 UTC (rev 31958)
@@ -14,8 +14,8 @@
import java.util.Collection;
import java.util.List;
+import org.apache.deltacloud.client.Instance;
import org.eclipse.core.runtime.Assert;
-import org.jboss.tools.deltacloud.client.Instance;
/**
* @author André Dietisheim
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudKey.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudKey.java 2011-06-09 12:00:51 UTC (rev 31957)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudKey.java 2011-06-09 12:37:04 UTC (rev 31958)
@@ -10,7 +10,7 @@
******************************************************************************/
package org.jboss.tools.deltacloud.core;
-import org.jboss.tools.deltacloud.client.Key;
+import org.apache.deltacloud.client.Key;
/**
* @author André Dietisheim
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java 2011-06-09 12:00:51 UTC (rev 31957)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudManager.java 2011-06-09 12:37:04 UTC (rev 31958)
@@ -26,10 +26,10 @@
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
+import org.apache.deltacloud.client.utils.StringUtils;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.ListenerList;
-import org.jboss.tools.deltacloud.client.utils.StringUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudRealm.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudRealm.java 2011-06-09 12:00:51 UTC (rev 31957)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudRealm.java 2011-06-09 12:37:04 UTC (rev 31958)
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.jboss.tools.deltacloud.core;
-import org.jboss.tools.deltacloud.client.Realm;
+import org.apache.deltacloud.client.Realm;
/**
*
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudResourceAction.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudResourceAction.java 2011-06-09 12:00:51 UTC (rev 31957)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/DeltaCloudResourceAction.java 2011-06-09 12:37:04 UTC (rev 31958)
@@ -10,7 +10,7 @@
******************************************************************************/
package org.jboss.tools.deltacloud.core;
-import org.jboss.tools.deltacloud.client.Action;
+import org.apache.deltacloud.client.Action;
/**
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-06-09 12:00:51 UTC (rev 31957)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF 2011-06-09 12:37:04 UTC (rev 31958)
@@ -10,7 +10,6 @@
org.eclipse.core.runtime;bundle-version="3.7.0",
org.eclipse.ui.views;bundle-version="3.6.0",
org.eclipse.ui.views.properties.tabbed;bundle-version="3.5.200",
- org.jboss.tools.deltacloud.client,
org.jboss.tools.deltacloud.core;bundle-version="[0.0.1,1.0.0]",
org.eclipse.rse.core;bundle-version="3.1.200",
org.eclipse.jface.databinding;bundle-version="1.5.0",
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/AbstractInstanceHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/AbstractInstanceHandler.java 2011-06-09 12:00:51 UTC (rev 31957)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/AbstractInstanceHandler.java 2011-06-09 12:37:04 UTC (rev 31958)
@@ -10,12 +10,12 @@
******************************************************************************/
package org.jboss.tools.deltacloud.ui.commands;
+import org.apache.deltacloud.client.utils.StringUtils;
+import org.apache.deltacloud.client.utils.StringUtils.IElementFormatter;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.IHandler;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.jboss.tools.deltacloud.client.utils.StringUtils;
-import org.jboss.tools.deltacloud.client.utils.StringUtils.IElementFormatter;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
import org.jboss.tools.deltacloud.core.DeltaCloudResourceAction;
import org.jboss.tools.deltacloud.core.job.InstanceActionJob;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/InstancePropertySource.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/InstancePropertySource.java 2011-06-09 12:00:51 UTC (rev 31957)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/InstancePropertySource.java 2011-06-09 12:37:04 UTC (rev 31958)
@@ -12,10 +12,10 @@
import java.util.List;
+import org.apache.deltacloud.client.utils.StringUtils;
import org.eclipse.ui.views.properties.IPropertyDescriptor;
import org.eclipse.ui.views.properties.IPropertySource;
import org.eclipse.ui.views.properties.PropertyDescriptor;
-import org.jboss.tools.deltacloud.client.utils.StringUtils;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
import org.jboss.tools.deltacloud.ui.views.CVMessages;
import org.jboss.tools.deltacloud.ui.views.cloud.InstanceItem;
Modified: 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-06-09 12:00:51 UTC (rev 31957)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/SshPrivateKeysPreferences.java 2011-06-09 12:37:04 UTC (rev 31958)
@@ -13,8 +13,8 @@
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.deltacloud.client.utils.StringUtils;
import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.deltacloud.ui.preferences.StringPreferenceValue;
import org.jboss.tools.deltacloud.ui.preferences.StringsPreferenceValue;
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/META-INF/MANIFEST.MF 2011-06-09 12:00:51 UTC (rev 31957)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/META-INF/MANIFEST.MF 2011-06-09 12:37:04 UTC (rev 31958)
@@ -6,8 +6,7 @@
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
org.jboss.tools.common;bundle-version="[3.2.0,4.0.0)",
- org.jboss.tools.deltacloud.client;bundle-version="0.1.0",
- org.jboss.tools.deltacloud.core;bundle-version="0.0.1",
- org.jboss.tools.deltacloud.ui;bundle-version="0.1.0",
+ org.jboss.tools.deltacloud.core;bundle-version="[0.2.0,1.0.0)",
+ org.jboss.tools.deltacloud.ui;bundle-version="[0.2.0,1.0.0)",
org.junit;bundle-version="[4.8.0,5.0.0)"
Bundle-ClassPath: .
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/context/MockIntegrationTestContext.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/context/MockIntegrationTestContext.java 2011-06-09 12:00:51 UTC (rev 31957)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/context/MockIntegrationTestContext.java 2011-06-09 12:37:04 UTC (rev 31958)
@@ -24,12 +24,12 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
-import org.jboss.tools.deltacloud.client.DeltaCloudClient;
-import org.jboss.tools.deltacloud.client.DeltaCloudClientException;
-import org.jboss.tools.deltacloud.client.DeltaCloudClientImpl;
-import org.jboss.tools.deltacloud.client.Image;
-import org.jboss.tools.deltacloud.client.Instance;
-import org.jboss.tools.deltacloud.client.StateAware.State;
+import org.apache.deltacloud.client.DeltaCloudClient;
+import org.apache.deltacloud.client.DeltaCloudClientException;
+import org.apache.deltacloud.client.DeltaCloudClientImpl;
+import org.apache.deltacloud.client.Image;
+import org.apache.deltacloud.client.Instance;
+import org.apache.deltacloud.client.StateAware.State;
/**
* A class that holds the integration test context
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/DeltaCloudMockIntegrationTest.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/DeltaCloudMockIntegrationTest.java 2011-06-09 12:00:51 UTC (rev 31957)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/DeltaCloudMockIntegrationTest.java 2011-06-09 12:37:04 UTC (rev 31958)
@@ -15,7 +15,7 @@
import java.io.IOException;
import java.net.MalformedURLException;
-import org.jboss.tools.deltacloud.client.DeltaCloudClientException;
+import org.apache.deltacloud.client.DeltaCloudClientException;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.internal.deltacloud.test.context.MockIntegrationTestContext;
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/job/CloudSchedulingRulesTest.java
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/job/CloudSchedulingRulesTest.java 2011-06-09 12:00:51 UTC (rev 31957)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.test/src/org/jboss/tools/internal/deltacloud/test/core/job/CloudSchedulingRulesTest.java 2011-06-09 12:37:04 UTC (rev 31958)
@@ -13,7 +13,7 @@
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
-import org.jboss.tools.deltacloud.client.Instance;
+import org.apache.deltacloud.client.Instance;
import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
import org.jboss.tools.deltacloud.core.job.AbstractCloudElementJob;
14 years, 10 months
JBoss Tools SVN: r31957 - trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-06-09 08:00:51 -0400 (Thu, 09 Jun 2011)
New Revision: 31957
Modified:
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedSeamProjectTest.java
Log:
JBIDE-9102 Issues running Maven tests
Modified: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedSeamProjectTest.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedSeamProjectTest.java 2011-06-09 09:28:50 UTC (rev 31956)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedSeamProjectTest.java 2011-06-09 12:00:51 UTC (rev 31957)
@@ -33,6 +33,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.datatools.connectivity.ConnectionProfileConstants;
import org.eclipse.datatools.connectivity.ConnectionProfileException;
import org.eclipse.datatools.connectivity.ProfileManager;
@@ -87,7 +88,6 @@
import org.jboss.tools.seam.core.project.facet.SeamRuntime;
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
import org.jboss.tools.seam.core.project.facet.SeamVersion;
-import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
import org.junit.After;
import org.junit.AfterClass;
@@ -197,7 +197,7 @@
SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
SWTBotPreferences.TIMEOUT = 1000;
SWTBotPreferences.PLAYBACK_DELAY = 5;
- JobUtils.waitForIdle(IDLE_TIME);
+ waitForIdle();
try {
SWTBotView view = bot.viewByTitle("Welcome");
if (view != null) {
@@ -255,10 +255,10 @@
wc.modifyModules(new IModule[] {} , modules, monitor);
wc.save(true, monitor);
server.publish(IServer.PUBLISH_INCREMENTAL, monitor);
- JobUtils.waitForIdle(IDLE_TIME);
+ waitForIdle();
server.getRuntime().delete();
server.delete();
- JobUtils.waitForIdle(IDLE_TIME);
+ waitForIdle();
}
protected static void switchPerspective(final String pid) {
@@ -306,7 +306,7 @@
ResourcesUtils.setBuildAutomatically(buildAutomatically);
ValidationFramework.getDefault().suspendAllValidation(false);
}
- JobUtils.waitForIdle(IDLE_TIME);
+ waitForIdle();
}
protected static void createJBossServer(File asLocation, String serverType, String runtimeType, String name, String runtimeName) throws CoreException {
@@ -453,7 +453,7 @@
}
public static void createNewSeamWebProjectWizard(String projectName, String deployType) throws Exception {
- JobUtils.waitForIdle(IDLE_TIME);
+ waitForIdle();
bot.menu("File").menu("New").menu("Seam Web Project").click();
SWTBotShell mainShell = bot.shell("New Seam Project");
@@ -508,7 +508,7 @@
bot.comboBox(2).setSelection(CONNECTION_PROFILE_NAME);
bot.button("Finish").click();
- JobUtils.waitForIdle(IDLE_TIME);
+ waitForIdle();
}
@@ -589,7 +589,7 @@
bot.textWithLabel("Goals:").setText("clean package");
bot.button("Run").click();
- JobUtils.waitForIdle(IDLE_TIME);
+ waitForIdle();
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME_WAR);
project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
@@ -600,6 +600,46 @@
}
+ private static void waitForIdle() {
+ long start = System.currentTimeMillis();
+ int delay = 50;
+ while (!Job.getJobManager().isIdle()) {
+ delay(delay);
+ if ((System.currentTimeMillis() - start) > IDLE_TIME) {
+ Job[] jobs = Job.getJobManager().find(null);
+ StringBuffer str = new StringBuffer();
+ for (Job job : jobs) {
+ if (job.getThread() != null) {
+ str.append("\n").append(job.getName()).append(" (")
+ .append(job.getClass()).append(")");
+ }
+ }
+ throw new RuntimeException(
+ "Long running tasks detected:" + str.toString()); //$NON-NLS-1$
+ }
+ }
+ }
+
+ public static void delay(long waitTimeMillis) {
+ Display display = Display.getCurrent();
+ if (display != null) {
+ long endTimeMillis = System.currentTimeMillis() + waitTimeMillis;
+ while (System.currentTimeMillis() < endTimeMillis) {
+ if (!display.readAndDispatch())
+ display.sleep();
+ }
+ display.update();
+ }
+ // Otherwise, perform a simple sleep.
+ else {
+ try {
+ Thread.sleep(waitTimeMillis);
+ } catch (InterruptedException e) {
+ // Ignored.
+ }
+ }
+ }
+
// see https://jira.jboss.org/browse/JBIDE-6767
@Test
public void testLibraries() throws Exception {
14 years, 10 months
JBoss Tools SVN: r31956 - in trunk/forge/tests/org.jboss.tools.forge.core.test: .settings and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-06-09 05:28:50 -0400 (Thu, 09 Jun 2011)
New Revision: 31956
Added:
trunk/forge/tests/org.jboss.tools.forge.core.test/.classpath
trunk/forge/tests/org.jboss.tools.forge.core.test/.project
trunk/forge/tests/org.jboss.tools.forge.core.test/.settings/
trunk/forge/tests/org.jboss.tools.forge.core.test/.settings/org.eclipse.jdt.core.prefs
trunk/forge/tests/org.jboss.tools.forge.core.test/META-INF/
trunk/forge/tests/org.jboss.tools.forge.core.test/META-INF/MANIFEST.MF
trunk/forge/tests/org.jboss.tools.forge.core.test/build.properties
trunk/forge/tests/org.jboss.tools.forge.core.test/src/
trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/
trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/
trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/
trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/
trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/
trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/
trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeInstallationsTest.java
trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeLaunchHelperTest.java
trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeRuntimeTest.java
Log:
split forge plugin in runtime/core/ui triplet
Added: trunk/forge/tests/org.jboss.tools.forge.core.test/.classpath
===================================================================
--- trunk/forge/tests/org.jboss.tools.forge.core.test/.classpath (rev 0)
+++ trunk/forge/tests/org.jboss.tools.forge.core.test/.classpath 2011-06-09 09:28:50 UTC (rev 31956)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <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"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/forge/tests/org.jboss.tools.forge.core.test/.project
===================================================================
--- trunk/forge/tests/org.jboss.tools.forge.core.test/.project (rev 0)
+++ trunk/forge/tests/org.jboss.tools.forge.core.test/.project 2011-06-09 09:28:50 UTC (rev 31956)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.forge.core.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: trunk/forge/tests/org.jboss.tools.forge.core.test/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/forge/tests/org.jboss.tools.forge.core.test/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/forge/tests/org.jboss.tools.forge.core.test/.settings/org.eclipse.jdt.core.prefs 2011-06-09 09:28:50 UTC (rev 31956)
@@ -0,0 +1,8 @@
+#Wed Jun 01 11:02:35 CEST 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Added: trunk/forge/tests/org.jboss.tools.forge.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/forge/tests/org.jboss.tools.forge.core.test/META-INF/MANIFEST.MF (rev 0)
+++ trunk/forge/tests/org.jboss.tools.forge.core.test/META-INF/MANIFEST.MF 2011-06-09 09:28:50 UTC (rev 31956)
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Forge Core Test Plugin
+Bundle-SymbolicName: org.jboss.tools.forge.core.test
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: JBoss by Red Hat
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.junit;bundle-version="3.8.2",
+ org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.jboss.tools.forge.core;bundle-version="1.0.0",
+ org.eclipse.debug.core;bundle-version="3.7.0"
Added: trunk/forge/tests/org.jboss.tools.forge.core.test/build.properties
===================================================================
--- trunk/forge/tests/org.jboss.tools.forge.core.test/build.properties (rev 0)
+++ trunk/forge/tests/org.jboss.tools.forge.core.test/build.properties 2011-06-09 09:28:50 UTC (rev 31956)
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
Added: trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeInstallationsTest.java
===================================================================
--- trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeInstallationsTest.java (rev 0)
+++ trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeInstallationsTest.java 2011-06-09 09:28:50 UTC (rev 31956)
@@ -0,0 +1,7 @@
+package org.jboss.tools.forge.core.process;
+
+import junit.framework.TestCase;
+
+public class ForgeInstallationsTest extends TestCase {
+
+}
Added: trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeLaunchHelperTest.java
===================================================================
--- trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeLaunchHelperTest.java (rev 0)
+++ trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeLaunchHelperTest.java 2011-06-09 09:28:50 UTC (rev 31956)
@@ -0,0 +1,41 @@
+package org.jboss.tools.forge.core.process;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.model.IProcess;
+
+import junit.framework.TestCase;
+
+public class ForgeLaunchHelperTest extends TestCase {
+
+ private static final String PREFIX = "reference:file:";
+ private IProcess forgeProcess = null;
+
+ protected void setUp() {
+ forgeProcess = null;
+ }
+
+ public void testLaunch() {
+ try {
+ String location = Platform.getBundle("org.jboss.tools.forge.runtime").getLocation();
+ assertTrue(location.startsWith(PREFIX));
+ location = location.substring(PREFIX.length());
+ forgeProcess = ForgeLaunchHelper.launch("test", location);
+ assertNotNull(forgeProcess);
+ assertFalse(forgeProcess.isTerminated());
+ } catch (Throwable t) {
+ t.printStackTrace();
+ fail();
+ }
+ }
+
+ protected void tearDown() {
+ if (forgeProcess != null) {
+ try {
+ forgeProcess.terminate();
+ } catch (DebugException e) {}
+ }
+ forgeProcess = null;
+ }
+
+}
Added: trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeRuntimeTest.java
===================================================================
--- trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeRuntimeTest.java (rev 0)
+++ trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeRuntimeTest.java 2011-06-09 09:28:50 UTC (rev 31956)
@@ -0,0 +1,29 @@
+package org.jboss.tools.forge.core.process;
+
+import junit.framework.TestCase;
+
+import org.eclipse.core.runtime.Platform;
+
+public class ForgeRuntimeTest extends TestCase {
+
+ private ForgeRuntime forgeRuntime;
+
+ protected void setUp() {
+ String location = Platform.getBundle("org.jboss.tools.forge.runtime").getLocation();
+ location = location.substring("reference:file:".length());
+ forgeRuntime = new ForgeRuntime("forge-test", location);
+ }
+
+ public void testStartStop() {
+ assertTrue(forgeRuntime.isTerminated());
+ forgeRuntime.start();
+ assertFalse(forgeRuntime.isTerminated());
+ forgeRuntime.stop();
+ assertTrue(forgeRuntime.isTerminated());
+ }
+
+ protected void tearDown() {
+ forgeRuntime = null;
+ }
+
+}
14 years, 10 months
JBoss Tools SVN: r31955 - trunk/forge/tests.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-06-09 05:27:59 -0400 (Thu, 09 Jun 2011)
New Revision: 31955
Added:
trunk/forge/tests/org.jboss.tools.forge.core.test/
Log:
split forge plugin in runtime/core/ui triplet
14 years, 10 months
JBoss Tools SVN: r31954 - in trunk/forge/plugins/org.jboss.tools.forge.core: .settings and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-06-09 05:22:01 -0400 (Thu, 09 Jun 2011)
New Revision: 31954
Added:
trunk/forge/plugins/org.jboss.tools.forge.core/.classpath
trunk/forge/plugins/org.jboss.tools.forge.core/.project
trunk/forge/plugins/org.jboss.tools.forge.core/.settings/
trunk/forge/plugins/org.jboss.tools.forge.core/.settings/org.eclipse.jdt.core.prefs
trunk/forge/plugins/org.jboss.tools.forge.core/META-INF/
trunk/forge/plugins/org.jboss.tools.forge.core/META-INF/MANIFEST.MF
trunk/forge/plugins/org.jboss.tools.forge.core/build.properties
trunk/forge/plugins/org.jboss.tools.forge.core/src/
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/ForgeCorePlugin.java
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/io/
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeInstallations.java
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeLaunchHelper.java
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeRuntime.java
Log:
split forge plugin in runtime/core/ui triplet
Added: trunk/forge/plugins/org.jboss.tools.forge.core/.classpath
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.core/.classpath (rev 0)
+++ trunk/forge/plugins/org.jboss.tools.forge.core/.classpath 2011-06-09 09:22:01 UTC (rev 31954)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <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"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/forge/plugins/org.jboss.tools.forge.core/.project
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.core/.project (rev 0)
+++ trunk/forge/plugins/org.jboss.tools.forge.core/.project 2011-06-09 09:22:01 UTC (rev 31954)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.forge.core</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: trunk/forge/plugins/org.jboss.tools.forge.core/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.core/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/forge/plugins/org.jboss.tools.forge.core/.settings/org.eclipse.jdt.core.prefs 2011-06-09 09:22:01 UTC (rev 31954)
@@ -0,0 +1,8 @@
+#Tue May 31 15:58:07 CEST 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Added: trunk/forge/plugins/org.jboss.tools.forge.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.core/META-INF/MANIFEST.MF (rev 0)
+++ trunk/forge/plugins/org.jboss.tools.forge.core/META-INF/MANIFEST.MF 2011-06-09 09:22:01 UTC (rev 31954)
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Forge Core
+Bundle-SymbolicName: org.jboss.tools.forge.core;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.debug.core;bundle-version="3.7.0",
+ org.eclipse.jdt.launching;bundle-version="3.6.0"
+Bundle-ActivationPolicy: lazy
+Export-Package: org.jboss.tools.forge.core,
+ org.jboss.tools.forge.core.process
+Bundle-Activator: org.jboss.tools.forge.core.ForgeCorePlugin
Added: trunk/forge/plugins/org.jboss.tools.forge.core/build.properties
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.core/build.properties (rev 0)
+++ trunk/forge/plugins/org.jboss.tools.forge.core/build.properties 2011-06-09 09:22:01 UTC (rev 31954)
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
Added: trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/ForgeCorePlugin.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/ForgeCorePlugin.java (rev 0)
+++ trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/ForgeCorePlugin.java 2011-06-09 09:22:01 UTC (rev 31954)
@@ -0,0 +1,36 @@
+package org.jboss.tools.forge.core;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+import org.osgi.framework.BundleContext;
+
+public class ForgeCorePlugin extends Plugin {
+
+ public static final String PLUGIN_ID = "org.jboss.tools.forge.core";
+
+ private static ForgeCorePlugin plugin;
+
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ public static ForgeCorePlugin getDefault() {
+ return plugin;
+ }
+
+ public static void log(Throwable t) {
+ getDefault().getLog().log(newErrorStatus("Error logged from Forge Core Plugin: ", t));
+ }
+
+ private static IStatus newErrorStatus(String message, Throwable exception) {
+ return new Status(IStatus.ERROR, PLUGIN_ID, IStatus.INFO, message, exception);
+ }
+
+}
Added: trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeInstallations.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeInstallations.java (rev 0)
+++ trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeInstallations.java 2011-06-09 09:22:01 UTC (rev 31954)
@@ -0,0 +1,5 @@
+package org.jboss.tools.forge.core.process;
+
+public class ForgeInstallations {
+
+}
Added: trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeLaunchHelper.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeLaunchHelper.java (rev 0)
+++ trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeLaunchHelper.java 2011-06-09 09:22:01 UTC (rev 31954)
@@ -0,0 +1,164 @@
+package org.jboss.tools.forge.core.process;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.debug.core.DebugPlugin;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationType;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.model.IProcess;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
+import org.eclipse.jdt.launching.JavaRuntime;
+import org.jboss.tools.forge.core.ForgeCorePlugin;
+
+public class ForgeLaunchHelper {
+
+ private static final FilenameFilter JAR_FILTER = new FilenameFilter() {
+ @Override
+ public boolean accept(File dir, String name) {
+ return name.endsWith("jar");
+ }
+ };
+
+ private static final FilenameFilter LIB_FILTER = new FilenameFilter() {
+ @Override
+ public boolean accept(File dir, String name) {
+ return name.endsWith("lib");
+ }
+ };
+
+ private static final ILaunchManager LAUNCH_MANAGER = DebugPlugin.getDefault().getLaunchManager();
+
+ private static final ILaunchConfigurationType JAVA_LAUNCH_CONFIGURATION_TYPE =
+ LAUNCH_MANAGER.getLaunchConfigurationType(IJavaLaunchConfigurationConstants.ID_JAVA_APPLICATION);
+
+ private static final File WORKING_DIR = ResourcesPlugin.getWorkspace().getRoot().getLocation().toFile();
+
+ private static void removeLaunchConfiguration(String name) {
+ try {
+ ILaunchConfiguration[] configurations = LAUNCH_MANAGER.getLaunchConfigurations(JAVA_LAUNCH_CONFIGURATION_TYPE);
+ for (int i = 0; i < configurations.length; i++) {
+ ILaunchConfiguration configuration = configurations[i];
+ if (configuration.getName().equals(name)) {
+ configuration.delete();
+ break;
+ }
+ }
+ } catch (CoreException e) {
+ ForgeCorePlugin.log(new RuntimeException("CoreException while cleaning up launch configuration", e));
+ }
+ }
+
+ private static List<String> createClassPath(String location) {
+ List<String> result = new ArrayList<String>();
+ result = addUserClasses(result, location);
+ if (result != null) {
+ result = addSystemLibs(result);
+ }
+ return result;
+ }
+
+ private static List<String> addSystemLibs(List<String> classPath) {
+ try {
+ IPath systemLibsPath = new Path(JavaRuntime.JRE_CONTAINER);
+ IRuntimeClasspathEntry systemLibsEntry = JavaRuntime.newRuntimeContainerClasspathEntry(
+ systemLibsPath,
+ IRuntimeClasspathEntry.STANDARD_CLASSES);
+ classPath.add(systemLibsEntry.getMemento());
+ return classPath;
+ } catch (CoreException e) {
+ ForgeCorePlugin.log(new RuntimeException("Problem while creating System libs entry", e));
+ return null;
+ }
+ }
+
+ private static List<String> addUserClasses(List<String> classPath, String location) {
+ File file = new File(location);
+ if (!file.exists()) {
+ ForgeCorePlugin.log(new RuntimeException(location + " does not point to a correct Forge runtime."));
+ return null;
+ } else {
+ File[] children = file.listFiles(LIB_FILTER);
+ if (children.length != 1) {
+ ForgeCorePlugin.log(new RuntimeException(location + " does not point to a correct Forge runtime."));
+ return null;
+ } else {
+ for (File jarFile : children[0].listFiles(JAR_FILTER)) {
+ String memento = createUserClassEntryMemento(jarFile);
+ if (memento != null) {
+ classPath.add(memento);
+ }
+ }
+ return classPath;
+ }
+ }
+ }
+
+ private static String createUserClassEntryMemento(File file) {
+ String result = null;
+ try {
+ IRuntimeClasspathEntry entry = JavaRuntime.newArchiveRuntimeClasspathEntry(new Path(file.getAbsolutePath()));
+ entry.setClasspathProperty(IRuntimeClasspathEntry.USER_CLASSES);
+ result = entry.getMemento();
+ } catch (CoreException e) {
+ ForgeCorePlugin.log(new RuntimeException("Problem while creating classpath entry memento", e));
+ }
+ return result;
+ }
+
+ private static ILaunch launch(String name, List<String> classPath) {
+ ILaunch launch = null;
+ ILaunchConfigurationWorkingCopy workingCopy = createWorkingCopy(name, classPath);
+ if (workingCopy != null) {
+ try {
+ launch = workingCopy.doSave().launch(ILaunchManager.RUN_MODE, null, false, false);
+ } catch (CoreException e) {
+ ForgeCorePlugin.log(new RuntimeException("Problem while launching working copy.", e));
+ }
+ }
+ return launch;
+ }
+
+ private static ILaunchConfigurationWorkingCopy createWorkingCopy(String name, List<String> classPath) {
+ ILaunchConfigurationWorkingCopy result = null;
+ try {
+ result = JAVA_LAUNCH_CONFIGURATION_TYPE.newInstance(null, name);
+ result.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, "org.jboss.forge.shell.Bootstrap");
+ result.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH, classPath);
+ result.setAttribute(IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH, false);
+ result.setAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, WORKING_DIR.getAbsolutePath());
+ result.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, "-Dforge.compatibility.IDE=true");
+ } catch (CoreException e) {
+ ForgeCorePlugin.log(new RuntimeException("Problem while creating launch configuration working copy.", e));
+ }
+ return result;
+ }
+
+ public static IProcess launch(String name, String location) {
+ IProcess result = null;
+ String launchConfigurationName = name + System.currentTimeMillis();
+ List<String> classPath = createClassPath(location);
+ if (classPath != null) {
+ ILaunch launch = launch(launchConfigurationName, classPath);
+ removeLaunchConfiguration(launchConfigurationName);
+ if (launch != null) {
+ IProcess[] processes = launch.getProcesses();
+ if (processes.length == 1) {
+ result = processes[0];
+ }
+ }
+ }
+ return result;
+ }
+
+}
Added: trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeRuntime.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeRuntime.java (rev 0)
+++ trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeRuntime.java 2011-06-09 09:22:01 UTC (rev 31954)
@@ -0,0 +1,39 @@
+package org.jboss.tools.forge.core.process;
+
+import java.beans.PropertyChangeSupport;
+
+import org.eclipse.debug.core.model.IProcess;
+
+public class ForgeRuntime {
+
+ public static final String STATE_NOT_RUNNING = "org.jboss.tools.forge.notRunning";
+ public static final String STATE_RUNNING = "org.jboss.tools.forge.running";
+ public static final String STATE_STARTING = "org.jboss.tools.forge.starting";
+ public static final String STATE_STOPPING = "org.jboss.tools.forge.stopping";
+
+ private IProcess forgeProcess = null;
+ private String runtimeState = STATE_NOT_RUNNING;
+ private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);
+
+ private String name;
+ private String location;
+
+ public ForgeRuntime(String name, String location) {
+ this.name = name;
+ this.location = location;
+ }
+
+ public void start() {
+ if (!isTerminated()) return;
+
+ }
+
+ public void stop() {
+ if (isTerminated()) return;
+ }
+
+ public boolean isTerminated() {
+ return forgeProcess == null || forgeProcess.isTerminated();
+ }
+
+}
14 years, 10 months
JBoss Tools SVN: r31953 - trunk/forge/plugins.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-06-09 05:20:15 -0400 (Thu, 09 Jun 2011)
New Revision: 31953
Added:
trunk/forge/plugins/org.jboss.tools.forge.core/
Log:
split forge plugin in runtime/core/ui triplet
14 years, 10 months