JBoss Tools SVN: r37050 - branches/jbosstools-3.3.0.M5/as/plugins/org.jboss.ide.eclipse.as.core.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-12-07 07:16:02 -0500 (Wed, 07 Dec 2011)
New Revision: 37050
Modified:
branches/jbosstools-3.3.0.M5/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
JBIDE-10392 - missing 7.1 runtime component to branch
Modified: branches/jbosstools-3.3.0.M5/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- branches/jbosstools-3.3.0.M5/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2011-12-07 12:15:26 UTC (rev 37049)
+++ branches/jbosstools-3.3.0.M5/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2011-12-07 12:16:02 UTC (rev 37050)
@@ -640,6 +640,10 @@
runtimeTypeId="org.jboss.ide.eclipse.as.runtime.70"
runtime-component="org.jboss.ide.eclipse.as.runtime.component"
version="7.0"/>
+ <runtimeFacetMapping
+ runtimeTypeId="org.jboss.ide.eclipse.as.runtime.71"
+ runtime-component="org.jboss.ide.eclipse.as.runtime.component"
+ version="7.1"/>
<runtimeFacetMapping
runtimeTypeId="org.jboss.ide.eclipse.as.runtime.stripped"
runtime-component="org.jboss.ide.eclipse.as.runtime.stripped.component"
@@ -761,6 +765,9 @@
<runtime-component-version
type="org.jboss.ide.eclipse.as.runtime.component"
version="7.0"/>
+ <runtime-component-version
+ type="org.jboss.ide.eclipse.as.runtime.component"
+ version="7.1"/>
<supported>
@@ -863,6 +870,21 @@
<facet id="jst.webfragment" version="3.0"/>
</supported>
+ <supported>
+ <runtime-component
+ id="org.jboss.ide.eclipse.as.runtime.component"
+ version="7.1"/>
+ <facet id="wst.web" version="1.0,1.2,1.3,1.4"/>
+ <facet id="jst.web" version="2.2,2.3,2.4,2.5,3.0"/>
+ <facet id="jst.java" version="5.0,6.0,1.7"/>
+ <facet id="jst.utility" version="1.0"/>
+ <facet id="jst.connector" version="1.0,1.5,1.6"/>
+ <facet id="jst.ejb" version="2.0,2.1,3.0,3.1"/>
+ <facet id="jst.ear" version="1.2,1.3,1.4,5.0,6.0"/>
+ <facet id="jst.appclient" version="1.2,1.3,1.4,5.0,6.0"/>
+ <facet id="jst.webfragment" version="3.0"/>
+ </supported>
+
</extension>
14 years
JBoss Tools SVN: r37049 - in trunk/vpe/plugins: org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2011-12-07 07:15:26 -0500 (Wed, 07 Dec 2011)
New Revision: 37049
Added:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/org.jboss.tools.vpe.browsersim/
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/PlatformUtil.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/WebKitBrowserFactory.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/Activator.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/BrowserSimLauncher.java
Log:
https://issues.jboss.org/browse/JBIDE-10360 :
BrowserSim: Unhandled loop exception when running it on MacOSX with 64-bit Eclipse
- changed the way to resolve patches to bundles
- changed the name of the SWT bundle for MacOSX
- added exception handling when a bundle is not found
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/PlatformUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/PlatformUtil.java 2011-12-07 12:10:59 UTC (rev 37048)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/PlatformUtil.java 2011-12-07 12:15:26 UTC (rev 37049)
@@ -23,10 +23,13 @@
String ws = getWs();
String arch = getArch();
- CURRENT_PLATFORM = ws + '.' + os + ("macosx".equals(os) ? "" : '.' + arch);
+ if ("macosx".equals(os) && "x86".equals(arch)) {
+ CURRENT_PLATFORM = ws + '.' + os; // special case for MacOSX x86 (its SWT bundle has name org.eclipse.swt.cocoa.macosx)
+ } else {
+ CURRENT_PLATFORM = ws + '.' + os + '.' + arch;
+ }
}
-
-
+
/*
* Copy of org.eclipse.swt.internal.Library.arch()
*/
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/WebKitBrowserFactory.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/WebKitBrowserFactory.java 2011-12-07 12:10:59 UTC (rev 37048)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/WebKitBrowserFactory.java 2011-12-07 12:15:26 UTC (rev 37049)
@@ -26,7 +26,7 @@
return new WebKitBrowser_gtk_linux_x86(parent, style);
} else if (PlatformUtil.CURRENT_PLATFORM.equals("gtk.linux.x86_64")) {
return new WebKitBrowser_gtk_linux_x86_64(parent, style);
- } else if (PlatformUtil.CURRENT_PLATFORM.equals("cocoa.macosx")) {
+ } else if (PlatformUtil.CURRENT_PLATFORM.startsWith("cocoa.macosx")) {
return new WebKitBrowser_webkit_cocoa_macos(parent, style);
} else if (PlatformUtil.CURRENT_PLATFORM.equals("win32.win32.x86")) {
return new WebKitBrowser_win32_win32_x86(parent, style);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/Activator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/Activator.java 2011-12-07 12:10:59 UTC (rev 37048)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/Activator.java 2011-12-07 12:15:26 UTC (rev 37049)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.vpe.browsersim.eclipse;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -59,6 +61,10 @@
public static Activator getDefault() {
return plugin;
}
+
+ public static void logError(String message, Throwable throwable) {
+ getDefault().getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, throwable));
+ }
/**
* Returns an image descriptor for the image file at the given
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/BrowserSimLauncher.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/BrowserSimLauncher.java 2011-12-07 12:10:59 UTC (rev 37048)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/BrowserSimLauncher.java 2011-12-07 12:15:26 UTC (rev 37049)
@@ -13,13 +13,15 @@
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
-import java.net.URL;
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.preferences.ConfigurationScope;
import org.jboss.tools.vpe.browsersim.browser.PlatformUtil;
+import org.jboss.tools.vpe.browsersim.eclipse.Activator;
+import org.osgi.framework.Bundle;
/**
* @author "Yahor Radtsevich (yradtsevich)"
@@ -82,32 +84,29 @@
};
}.start();
} catch (IOException e) {
- e.printStackTrace();
+ Activator.logError(e.getMessage(), e);
}
}
private static String getBundleLocation(String symbolicName) throws IOException {
- String eclipseHome = new URL(System.getProperty("eclipse.home.location")).getFile();
- String locationId = Platform.getBundle(symbolicName).getLocation();
-
- File bundleLocation;
- if (locationId.startsWith("reference:file:")) {
- bundleLocation = new File(locationId.substring("reference:file:".length()));
- } else {
- bundleLocation = new File(locationId);
+ Bundle bundle = Platform.getBundle(symbolicName);
+ if (bundle == null) {
+ throw new IOException("Cannot find bundle: " + symbolicName);
}
- if (!bundleLocation.isAbsolute()) {
- bundleLocation = new File(eclipseHome, bundleLocation.getPath());
- }
-
- if (bundleLocation.isDirectory()) {
- File binDirectory = new File(bundleLocation, "bin");
- if (binDirectory.isDirectory()) {
- bundleLocation = binDirectory;
+ try {
+ File bundleLocation = FileLocator.getBundleFile(bundle);
+
+ if (bundleLocation.isDirectory()) {
+ File binDirectory = new File(bundleLocation, "bin");
+ if (binDirectory.isDirectory()) {
+ bundleLocation = binDirectory;
+ }
}
+
+ return bundleLocation.getCanonicalPath();
+ } catch (IOException e) {
+ throw new IOException("Cannot resolve the path to bundle: " + symbolicName, e);
}
-
- return bundleLocation.getCanonicalPath();
}
}
14 years
JBoss Tools SVN: r37048 - trunk/as/plugins/org.jboss.ide.eclipse.as.core.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-12-07 07:10:59 -0500 (Wed, 07 Dec 2011)
New Revision: 37048
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
JBIDE-10392 - missing 7.1 runtime component
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2011-12-07 12:10:42 UTC (rev 37047)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2011-12-07 12:10:59 UTC (rev 37048)
@@ -640,6 +640,10 @@
runtimeTypeId="org.jboss.ide.eclipse.as.runtime.70"
runtime-component="org.jboss.ide.eclipse.as.runtime.component"
version="7.0"/>
+ <runtimeFacetMapping
+ runtimeTypeId="org.jboss.ide.eclipse.as.runtime.71"
+ runtime-component="org.jboss.ide.eclipse.as.runtime.component"
+ version="7.1"/>
<runtimeFacetMapping
runtimeTypeId="org.jboss.ide.eclipse.as.runtime.stripped"
runtime-component="org.jboss.ide.eclipse.as.runtime.stripped.component"
@@ -761,6 +765,9 @@
<runtime-component-version
type="org.jboss.ide.eclipse.as.runtime.component"
version="7.0"/>
+ <runtime-component-version
+ type="org.jboss.ide.eclipse.as.runtime.component"
+ version="7.1"/>
<supported>
@@ -863,6 +870,21 @@
<facet id="jst.webfragment" version="3.0"/>
</supported>
+ <supported>
+ <runtime-component
+ id="org.jboss.ide.eclipse.as.runtime.component"
+ version="7.1"/>
+ <facet id="wst.web" version="1.0,1.2,1.3,1.4"/>
+ <facet id="jst.web" version="2.2,2.3,2.4,2.5,3.0"/>
+ <facet id="jst.java" version="5.0,6.0,1.7"/>
+ <facet id="jst.utility" version="1.0"/>
+ <facet id="jst.connector" version="1.0,1.5,1.6"/>
+ <facet id="jst.ejb" version="2.0,2.1,3.0,3.1"/>
+ <facet id="jst.ear" version="1.2,1.3,1.4,5.0,6.0"/>
+ <facet id="jst.appclient" version="1.2,1.3,1.4,5.0,6.0"/>
+ <facet id="jst.webfragment" version="3.0"/>
+ </supported>
+
</extension>
14 years
JBoss Tools SVN: r37047 - in trunk: tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2011-12-07 07:10:42 -0500 (Wed, 07 Dec 2011)
New Revision: 37047
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/ContentAssistBot.java
Log:
Fixes for CodeComletionTest.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java 2011-12-07 12:01:10 UTC (rev 37046)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java 2011-12-07 12:10:42 UTC (rev 37047)
@@ -340,10 +340,12 @@
contentAssist.checkContentAssist(useCodeAssist, false);
useCodeAssist = "prompt";
contentAssist.checkContentAssist(useCodeAssist, true);
- final String textToInsertAtEnd = "\"/>";
+ final String textToInsertAtEnd = "/>";
editor.insertText(editor.cursorPosition().line,
- editor.cursorPosition().column + 2,
+ editor.cursorPosition().column + 3,
textToInsertAtEnd);
+ editor.save();
+ bot.sleep(Timing.time1S());
Assertions.assertSourceEditorContains(editor.getText(),
textToInsert + "'" + useCodeAssist + "']}" + textToInsertAtEnd,
FACELETS_TEST_PAGE);
@@ -667,7 +669,7 @@
private void removeRichFacesFromJSF2ProjectClassPath(){
if (addedVariableRichfacesUiLocation != null){
BuildPathHelper.removeVariable(JSF2_TEST_PROJECT_NAME, addedVariableRichfacesUiLocation, true);
+ eclipse.cleanAllProjects();
}
- eclipse.cleanAllProjects();
}
}
\ No newline at end of file
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/ContentAssistBot.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/ContentAssistBot.java 2011-12-07 12:01:10 UTC (rev 37046)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/ContentAssistBot.java 2011-12-07 12:10:42 UTC (rev 37047)
@@ -15,6 +15,7 @@
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
import org.eclipse.swtbot.swt.finder.results.VoidResult;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
@@ -292,8 +293,15 @@
}
}
if (found == false) {
- ccShell = bs2;
- break;
+ // New Shell has to contain table
+ try{
+ bs2.bot().table();
+ ccShell = bs2;
+ break;
+ }
+ catch (WidgetNotFoundException wnfe){
+ // do nothing
+ }
}
}
return ccShell;
14 years
JBoss Tools SVN: r37046 - in branches/jbosstools-3.3.0.M5/vpe/plugins: org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2011-12-07 07:01:10 -0500 (Wed, 07 Dec 2011)
New Revision: 37046
Added:
branches/jbosstools-3.3.0.M5/vpe/plugins/org.jboss.tools.vpe.browsersim/org.jboss.tools.vpe.browsersim/
Modified:
branches/jbosstools-3.3.0.M5/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/PlatformUtil.java
branches/jbosstools-3.3.0.M5/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/WebKitBrowserFactory.java
branches/jbosstools-3.3.0.M5/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/Activator.java
branches/jbosstools-3.3.0.M5/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/BrowserSimLauncher.java
Log:
https://issues.jboss.org/browse/JBIDE-10360 :
BrowserSim: Unhandled loop exception when running it on MacOSX with 64-bit Eclipse
- changed the way to resolve patches to bundles
- changed the name of the SWT bundle for MacOSX
- added exception handling when a bundle is not found
Modified: branches/jbosstools-3.3.0.M5/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/PlatformUtil.java
===================================================================
--- branches/jbosstools-3.3.0.M5/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/PlatformUtil.java 2011-12-07 11:35:05 UTC (rev 37045)
+++ branches/jbosstools-3.3.0.M5/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/PlatformUtil.java 2011-12-07 12:01:10 UTC (rev 37046)
@@ -23,10 +23,13 @@
String ws = getWs();
String arch = getArch();
- CURRENT_PLATFORM = ws + '.' + os + ("macosx".equals(os) ? "" : '.' + arch);
+ if ("macosx".equals(os) && "x86".equals(arch)) {
+ CURRENT_PLATFORM = ws + '.' + os; // special case for MacOSX x86 (its SWT bundle has name org.eclipse.swt.cocoa.macosx)
+ } else {
+ CURRENT_PLATFORM = ws + '.' + os + '.' + arch;
+ }
}
-
-
+
/*
* Copy of org.eclipse.swt.internal.Library.arch()
*/
Modified: branches/jbosstools-3.3.0.M5/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/WebKitBrowserFactory.java
===================================================================
--- branches/jbosstools-3.3.0.M5/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/WebKitBrowserFactory.java 2011-12-07 11:35:05 UTC (rev 37045)
+++ branches/jbosstools-3.3.0.M5/vpe/plugins/org.jboss.tools.vpe.browsersim.browser/src/org/jboss/tools/vpe/browsersim/browser/WebKitBrowserFactory.java 2011-12-07 12:01:10 UTC (rev 37046)
@@ -26,7 +26,7 @@
return new WebKitBrowser_gtk_linux_x86(parent, style);
} else if (PlatformUtil.CURRENT_PLATFORM.equals("gtk.linux.x86_64")) {
return new WebKitBrowser_gtk_linux_x86_64(parent, style);
- } else if (PlatformUtil.CURRENT_PLATFORM.equals("cocoa.macosx")) {
+ } else if (PlatformUtil.CURRENT_PLATFORM.startsWith("cocoa.macosx")) {
return new WebKitBrowser_webkit_cocoa_macos(parent, style);
} else if (PlatformUtil.CURRENT_PLATFORM.equals("win32.win32.x86")) {
return new WebKitBrowser_win32_win32_x86(parent, style);
Modified: branches/jbosstools-3.3.0.M5/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/Activator.java
===================================================================
--- branches/jbosstools-3.3.0.M5/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/Activator.java 2011-12-07 11:35:05 UTC (rev 37045)
+++ branches/jbosstools-3.3.0.M5/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/Activator.java 2011-12-07 12:01:10 UTC (rev 37046)
@@ -10,6 +10,8 @@
******************************************************************************/
package org.jboss.tools.vpe.browsersim.eclipse;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -59,6 +61,10 @@
public static Activator getDefault() {
return plugin;
}
+
+ public static void logError(String message, Throwable throwable) {
+ getDefault().getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, throwable));
+ }
/**
* Returns an image descriptor for the image file at the given
Modified: branches/jbosstools-3.3.0.M5/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/BrowserSimLauncher.java
===================================================================
--- branches/jbosstools-3.3.0.M5/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/BrowserSimLauncher.java 2011-12-07 11:35:05 UTC (rev 37045)
+++ branches/jbosstools-3.3.0.M5/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/BrowserSimLauncher.java 2011-12-07 12:01:10 UTC (rev 37046)
@@ -13,13 +13,15 @@
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
-import java.net.URL;
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.preferences.ConfigurationScope;
import org.jboss.tools.vpe.browsersim.browser.PlatformUtil;
+import org.jboss.tools.vpe.browsersim.eclipse.Activator;
+import org.osgi.framework.Bundle;
/**
* @author "Yahor Radtsevich (yradtsevich)"
@@ -82,32 +84,29 @@
};
}.start();
} catch (IOException e) {
- e.printStackTrace();
+ Activator.logError(e.getMessage(), e);
}
}
private static String getBundleLocation(String symbolicName) throws IOException {
- String eclipseHome = new URL(System.getProperty("eclipse.home.location")).getFile();
- String locationId = Platform.getBundle(symbolicName).getLocation();
-
- File bundleLocation;
- if (locationId.startsWith("reference:file:")) {
- bundleLocation = new File(locationId.substring("reference:file:".length()));
- } else {
- bundleLocation = new File(locationId);
+ Bundle bundle = Platform.getBundle(symbolicName);
+ if (bundle == null) {
+ throw new IOException("Cannot find bundle: " + symbolicName);
}
- if (!bundleLocation.isAbsolute()) {
- bundleLocation = new File(eclipseHome, bundleLocation.getPath());
- }
-
- if (bundleLocation.isDirectory()) {
- File binDirectory = new File(bundleLocation, "bin");
- if (binDirectory.isDirectory()) {
- bundleLocation = binDirectory;
+ try {
+ File bundleLocation = FileLocator.getBundleFile(bundle);
+
+ if (bundleLocation.isDirectory()) {
+ File binDirectory = new File(bundleLocation, "bin");
+ if (binDirectory.isDirectory()) {
+ bundleLocation = binDirectory;
+ }
}
+
+ return bundleLocation.getCanonicalPath();
+ } catch (IOException e) {
+ throw new IOException("Cannot resolve the path to bundle: " + symbolicName, e);
}
-
- return bundleLocation.getCanonicalPath();
}
}
14 years
JBoss Tools SVN: r37045 - in trunk/documentation/whatsnew/vpe: images and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2011-12-07 06:35:05 -0500 (Wed, 07 Dec 2011)
New Revision: 37045
Added:
trunk/documentation/whatsnew/vpe/images/3.3.0.M5/
trunk/documentation/whatsnew/vpe/images/3.3.0.M5/10020.png
trunk/documentation/whatsnew/vpe/vpe-news-3.3.0.M5.html
Log:
https://issues.jboss.org/browse/JBIDE-10380 - adding N&N for M5.
Property changes on: trunk/documentation/whatsnew/vpe/images/3.3.0.M5
___________________________________________________________________
Added: bugtraq:number
+ true
Added: trunk/documentation/whatsnew/vpe/images/3.3.0.M5/10020.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/vpe/images/3.3.0.M5/10020.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/vpe/vpe-news-3.3.0.M5.html
===================================================================
--- trunk/documentation/whatsnew/vpe/vpe-news-3.3.0.M5.html (rev 0)
+++ trunk/documentation/whatsnew/vpe/vpe-news-3.3.0.M5.html 2011-12-07 11:35:05 UTC (rev 37045)
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Language" content="en-us" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<link rel="stylesheet" href="../whatsnew.css" />
+<title>What's New Visual Page Editor 3.3.0.M5</title>
+<script type="text/javascript">
+
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-17645367-5']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+
+</script></head>
+<body>
+<h1>What's New Visual Page Editor 3.3.0.M5</h1>
+
+<p align="right">
+<a href="../index.html">< Main Index</a>
+<a href="../cdi/cdi-news-3.3.0.M5.html">CDI/Seam 3 Tools ></a>
+</p>
+
+<table border="0" cellpadding="10" cellspacing="0">
+ <tr>
+ <td colspan="2">
+ <hr />
+ <h3>Editor</h3>
+ <hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <b><p>
+ Hot keys for VPE Refresh.
+ <p></b>
+ </td>
+ <td valign="top">
+ <p>Now there are "F5" and "CTRL+R" shortcuts to perform vusial refresh in Visual Page Editor.</p>
+ <p><img src="images/3.3.0.M5/10020.png" alt="Hot keys for VPE Refresh" /></p>
+ <p><small>
+ <a href="https://jira.jboss.org/jira/browse/JBIDE-10020">Related Jira</a>
+ </small></p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <b><p>
+ Browser Simulator application.
+ <p></b>
+ </td>
+ <td valign="top">
+ <p>Browsersim application for testing mobile/desktop web application was added.</p>
+ <p><img src="images/3.3.0.M5/.png" alt="" /></p>
+ <p><small>
+ <a href="https://jira.jboss.org/jira/browse/JBIDE-9539">Related Jira</a>
+ </small></p>
+ </td>
+ </tr>
+</table>
+</body>
+</html>
\ No newline at end of file
14 years
JBoss Tools SVN: r37044 - in trunk/openshift/plugins: org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/common and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-12-07 05:57:10 -0500 (Wed, 07 Dec 2011)
New Revision: 37044
Added:
trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/GitIgnore.java
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/common/FileUtils.java
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizardModel.java
Log:
[JBIDE-10171] creating .gitignore
Added: trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/GitIgnore.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/GitIgnore.java (rev 0)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/GitIgnore.java 2011-12-07 10:57:10 UTC (rev 37044)
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * 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.openshift.egit.core;
+
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jgit.lib.Constants;
+
+public class GitIgnore {
+
+ private List<String> entries;
+ private File baseDir;
+
+ public GitIgnore(File baseDir) {
+ this.baseDir = baseDir;
+ this.entries = new ArrayList<String>();
+ }
+
+ public GitIgnore add(String entry) {
+ this.entries.add(entry);
+ return this;
+ }
+
+ /**
+ * Writes the entries in this instance to the .gitignore file. Overwrites
+ * and existing file if the given overwrite is set to <code>true</code>,
+ * appends otherwise.
+ *
+ * @param overwrite
+ * overwrites an existing file if <code>true</code>, appends
+ * otherwise
+ * @throws IOException
+ */
+ public void write(boolean overwrite) throws IOException {
+ File file = getFile();
+ BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(file, !overwrite));
+ try {
+ for (String entry : entries) {
+ out.write(entry.getBytes());
+ out.write('\n');
+ }
+ out.flush();
+ } finally {
+ out.close();
+ }
+ }
+
+ public boolean exists() {
+ return getFile().exists();
+ }
+
+ private File getFile() {
+ File file = new File(baseDir, Constants.GITIGNORE_FILENAME);
+ return file;
+ }
+}
Property changes on: trunk/openshift/plugins/org.jboss.tools.openshift.egit.core/src/org/jboss/tools/openshift/egit/core/GitIgnore.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/common/FileUtils.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/common/FileUtils.java 2011-12-07 10:24:40 UTC (rev 37043)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/common/FileUtils.java 2011-12-07 10:57:10 UTC (rev 37044)
@@ -139,9 +139,15 @@
Assert.isLegal(destination != null);
InputStream in = null;
+ writeTo(new BufferedInputStream(new FileInputStream(source)), destination);
+ }
+
+ private static final void writeTo(InputStream in, File destination) throws IOException {
+ Assert.isLegal(in != null);
+ Assert.isLegal(destination != null);
+
OutputStream out = null;
try {
- in = new BufferedInputStream(new FileInputStream(source));
out = new BufferedOutputStream(new FileOutputStream(destination));
for (int read = -1; (read = in.read(buffer)) != -1; ) {
out.write(buffer, 0, read);
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizardModel.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizardModel.java 2011-12-07 10:24:40 UTC (rev 37043)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ImportProjectWizardModel.java 2011-12-07 10:57:10 UTC (rev 37044)
@@ -49,6 +49,7 @@
import org.jboss.ide.eclipse.as.core.util.FileUtil;
import org.jboss.tools.common.ui.databinding.ObservableUIPojo;
import org.jboss.tools.openshift.egit.core.EGitUtils;
+import org.jboss.tools.openshift.egit.core.GitIgnore;
import org.jboss.tools.openshift.express.client.IApplication;
import org.jboss.tools.openshift.express.client.ICartridge;
import org.jboss.tools.openshift.express.client.IUser;
@@ -191,14 +192,36 @@
private void copyOpenshiftConfiguration(final File sourceFolder, IProgressMonitor monitor)
throws IOException {
IProject project = getProject();
+ File projectFolder = project.getLocation().toFile();
monitor.subTask(NLS.bind("Copying openshift configuration to project {0}...", getProjectName()));
- FileUtils.copy(new File(sourceFolder, ".git"), project.getLocation().toFile(), false);
- FileUtils.copy(new File(sourceFolder, ".openshift"), project.getLocation().toFile(), false);
- FileUtils.copy(new File(sourceFolder, "deployments"), project.getLocation().toFile(), false);
- FileUtils.copy(new File(sourceFolder, "pom.xml"), project.getLocation().toFile(), false);
+ FileUtils.copy(new File(sourceFolder, ".git"), projectFolder, false);
+ FileUtils.copy(new File(sourceFolder, ".openshift"), projectFolder, false);
+ FileUtils.copy(new File(sourceFolder, "deployments"), projectFolder, false);
+ FileUtils.copy(new File(sourceFolder, "pom.xml"), projectFolder, false);
+ createGitIgnore(projectFolder);
}
/**
+ * Creates the git ignore file with a predefined set of entries. An existing
+ * .gitignore file is not overwritten, we then just dont do anything.
+ *
+ * @param projectFolder
+ * @throws IOException
+ */
+ private void createGitIgnore(File projectFolder) throws IOException {
+ GitIgnore gitIgnore = new GitIgnore(projectFolder);
+ if (gitIgnore.exists()) {
+ return;
+ }
+ gitIgnore.add("target")
+ .add(".settings")
+ .add(".project")
+ .add(".classpath")
+ .add(".factorypath");
+ gitIgnore.write(false);
+ }
+
+ /**
* Returns the user provided project.
*
* @throws OpenShiftException
@@ -244,7 +267,8 @@
* @throws IOException
* The configuration files could not be copied from the git
* clone to the user project
- * @throws CoreException The user project could not be shared with the git
+ * @throws CoreException
+ * The user project could not be shared with the git
*
* @see #cloneRepository
* @see #copyOpenshiftConfiguration
14 years