JBoss Tools SVN: r38749 - in trunk: tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2012-02-15 06:17:39 -0500 (Wed, 15 Feb 2012)
New Revision: 38749
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/pom.xml
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/BuildPathHelper.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/MenuBarHelper.java
Log:
Fixes for maven integration
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/pom.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/pom.xml 2012-02-15 11:04:44 UTC (rev 38748)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/pom.xml 2012-02-15 11:17:39 UTC (rev 38749)
@@ -11,8 +11,8 @@
<packaging>eclipse-test-plugin</packaging>
<properties>
- <jbosstools.test.jboss-as.home>${requirement.build.root}/jboss-5.1.0.GA</jbosstools.test.jboss-as.home>
- <systemProperties>-Dswtbot.test.skip=false -Dtest.configurations.dir=resources/properties/ -Djbosstools.test.jboss-as.home=${jbosstools.test.jboss-as.home}</systemProperties>
+ <jbosstools.test.jboss-as.home>${requirement.build.root}/jboss-5.1.0.GA</jbosstools.test.jboss-as.home>
+ <systemProperties>-Dswtbot.test.skip=false -Dtest.configurations.dir=resources/properties/ -Djbosstools.test.jboss-as.home=${jbosstools.test.jboss-as.home} -Dorg.eclipse.swt.browser.XULRunnerPath=${project.build.outputDirectory}/../work/plugins/org.mozilla.xulrunner.gtk.linux.x86_1.9.2.16b/xulrunner</systemProperties>
<test.suite.class>org.jboss.tools.jsf.ui.bot.test.JSFAllBotTests</test.suite.class>
</properties>
<build>
@@ -25,7 +25,8 @@
<testClass>${test.suite.class}</testClass>
<useUIThread>false</useUIThread>
<skip>${swtbot.test.skip}</skip>
- <dependencies combine.children="append">
+ <product>org.eclipse.platform.ide</product>
+ <dependencies combine.children="append">
<dependency>
<type>p2-installable-unit</type>
<artifactId>org.jboss.ide.eclipse.as.feature.feature.group</artifactId>
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/BuildPathHelper.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/BuildPathHelper.java 2012-02-15 11:04:44 UTC (rev 38748)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/BuildPathHelper.java 2012-02-15 11:17:39 UTC (rev 38749)
@@ -15,9 +15,12 @@
import java.io.File;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
import org.jboss.tools.ui.bot.ext.SWTBotExt;
import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
import org.jboss.tools.ui.bot.ext.SWTUtilExt;
+import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
/**
@@ -53,14 +56,24 @@
*/
public static String addExternalJar(final String externalJarLocation,
final String projectName, boolean overwriteIfExists) {
-
assertTrue("External Jar Location cannot be empty but is " + externalJarLocation,
externalJarLocation != null && externalJarLocation.length() > 0);
SWTBotExt bot = new SWTEclipseExt().openPropertiesOfProject(projectName);
+ bot.shell(IDELabel.Shell.PROPERTIES_FOR + " " + projectName).activate().bot();
bot.tree().expandNode(IDELabel.JavaBuildPathPropertiesEditor.JAVA_BUILD_PATH_TREE_ITEM_LABEL).select();
- bot.tabItem(IDELabel.JavaBuildPathPropertiesEditor.LIBRARIES_TAB_LABEL).activate();
- bot.button(IDELabel.Button.ADD_VARIABLE).click();
- bot.shell(IDELabel.Shell.NEW_VARIABLE_CLASS_PATH_ENTRY).activate();
+ bot.sleep(Timing.time3S());
+ bot.tabItem(IDELabel.JavaBuildPathPropertiesEditor.LIBRARIES_TAB_LABEL).activate();
+ final SWTBotButton btn = bot.button(IDELabel.Button.ADD_VARIABLE);
+ btn.click();
+ bot.sleep(Timing.time2S());
+ // workaround because first click is not working when test is run via maven
+ try {
+ bot.shell(IDELabel.Shell.NEW_VARIABLE_CLASS_PATH_ENTRY).activate();
+ } catch (WidgetNotFoundException wnfe){
+ btn.click();
+ bot.sleep(Timing.time2S());
+ bot.shell(IDELabel.Shell.NEW_VARIABLE_CLASS_PATH_ENTRY).activate();
+ }
String jarFileName = new File(externalJarLocation).getName();
String variableEntryName = jarFileName.toUpperCase() + "_LOCATION";
boolean externalJarExists = false;
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/MenuBarHelper.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/MenuBarHelper.java 2012-02-15 11:04:44 UTC (rev 38748)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/MenuBarHelper.java 2012-02-15 11:17:39 UTC (rev 38749)
@@ -21,7 +21,6 @@
import org.eclipse.swtbot.swt.finder.results.Result;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
import org.hamcrest.Matcher;
-import org.jboss.tools.ui.bot.ext.types.IDELabel;
/**
* Helper to find menu within menu bar
@@ -39,7 +38,7 @@
final MenuItem menuItem = UIThreadRunnable.syncExec(new Result<MenuItem>() {
@Override
public MenuItem run() {
- Matcher<? extends Widget> matcher = withMnemonic(IDELabel.Menu.PROJECT);
+ Matcher<? extends Widget> matcher = withMnemonic(menuLabel);
MenuItem[] items = activeShell.getMenuBar().getItems();
int index = 0;
while (index < items.length && !matcher.matches(items[index])){
@@ -49,7 +48,7 @@
return items[index];
}
else{
- throw new WidgetNotFoundException("Unable to find menu with label " + IDELabel.Menu.PROJECT +
+ throw new WidgetNotFoundException("Unable to find menu with label " + menuLabel +
" within active shell menu bar.");
}
14 years, 1 month
JBoss Tools SVN: r38748 - in trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse: icons and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2012-02-15 06:04:44 -0500 (Wed, 15 Feb 2012)
New Revision: 38748
Added:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/icons/browsersim_16px.png
Removed:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/icons/sample.gif
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/plugin.xml
Log:
https://issues.jboss.org/browse/JBIDE-10869 : better icon for browsersim
Added: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/icons/browsersim_16px.png
===================================================================
(Binary files differ)
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/icons/browsersim_16px.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/icons/sample.gif
===================================================================
(Binary files differ)
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/plugin.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/plugin.xml 2012-02-15 11:01:10 UTC (rev 38747)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/plugin.xml 2012-02-15 11:04:44 UTC (rev 38748)
@@ -34,7 +34,7 @@
toolbarPath="browserSim"
label="Run BrowserSim"
class="org.jboss.tools.vpe.browsersim.eclipse.actions.RunBrowserSimAction"
- icon="icons/sample.gif">
+ icon="icons/browsersim_16px.png">
</action>
</actionSet>
</extension>
@@ -42,7 +42,7 @@
point="org.eclipse.ui.editors">
<editor
extensions="htm, html"
- icon="icons/sample.gif"
+ icon="icons/browsersim_16px.png"
id="org.jboss.tools.vpe.browsersim.eclipse.editors.BrowserSimLauncher"
launcher="org.jboss.tools.vpe.browsersim.eclipse.editors.BrowserSimEditorLauncher"
name="BrowserSim">
14 years, 1 month
JBoss Tools SVN: r38747 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-02-15 06:01:10 -0500 (Wed, 15 Feb 2012)
New Revision: 38747
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
Log:
[JBIDE-10907] resetting application settings widgets (name, selected cartridge, embedded cartridges) only if the user unchecks *use existing application* (was: resetting also when page gets active)
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-02-15 10:58:23 UTC (rev 38746)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-02-15 11:01:10 UTC (rev 38747)
@@ -330,6 +330,9 @@
Object newValue = event.diff.getNewValue();
if (newValue instanceof Boolean) {
Boolean useExisting = (Boolean) newValue;
+ if (!useExisting) {
+ pageModel.resetExistingApplication();
+ }
enableApplicationWidgets(
useExisting, applicationConfigurationGroup, applicationNameText, applicationBrowseButton);
}
@@ -348,9 +351,6 @@
*/
private void enableApplicationWidgets(final Boolean useExisting, final Group applicationConfigurationGroup,
final Text applicationNameText, final Button applicationBrowseButton) {
- if (!useExisting) {
- pageModel.resetExistingApplication();
- }
applicationNameText.setEnabled(useExisting);
applicationBrowseButton.setEnabled(useExisting);
UIUtils.doForAllChildren(new UIUtils.IWidgetVisitor() {
14 years, 1 month
JBoss Tools SVN: r38746 - in trunk/forge/plugins: org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2012-02-15 05:58:23 -0500 (Wed, 15 Feb 2012)
New Revision: 38746
Modified:
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeLaunchHelper.java
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/AllCommandsInterceptor.java
Log:
JBIDE-10271: Make the Forge "cd" Command Aware of the Eclipse Workspace
Modified: 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 2012-02-15 10:51:41 UTC (rev 38745)
+++ trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeLaunchHelper.java 2012-02-15 10:58:23 UTC (rev 38746)
@@ -133,10 +133,16 @@
buffer.append("-Dforge.home=").append(encloseWithDoubleQuotesIfNeeded(location)).append(' ');
buffer.append("-Dforge.shell.colorEnabled=true").append(' ');
buffer.append("-Dforge.compatibility.IDE=true").append(' ');
- buffer.append(getClassPathArgument(location));
+ buffer.append(getClassPathArgument(location)).append(' ');
+ buffer.append("-Dforge.workspace=").append(getWorkspaceLocation());
return buffer.toString();
}
+ private static String getWorkspaceLocation() {
+ return encloseWithDoubleQuotesIfNeeded(
+ ResourcesPlugin.getWorkspace().getRoot().getLocation().toString());
+ }
+
private static String getClassPathArgument(String location) {
return "-cp " + encloseWithDoubleQuotesIfNeeded(location + "/jboss-modules.jar");
}
Modified: trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/AllCommandsInterceptor.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/AllCommandsInterceptor.java 2012-02-15 10:51:41 UTC (rev 38745)
+++ trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/AllCommandsInterceptor.java 2012-02-15 10:58:23 UTC (rev 38746)
@@ -16,24 +16,47 @@
@Override
public String intercept(String line) {
if (line.startsWith("open ")) {
- String crn = shell.getCurrentResource().getFullyQualifiedName();
- String crt = shell.getCurrentResource().getClass().getSimpleName();
- Project project = shell.getCurrentProject();
- String cpn = "";
- if (project != null) {
- cpn = project.getProjectRoot().getFullyQualifiedName();
- }
- String par = line.substring(5);
- sendEscaped(
- " EC: " + line +
- " CRN: " + crn +
- " CRT: " + crt +
- " CPN: " + cpn +
- " PAR: " + par);
- return "\n";
+ return doOpenLine(line);
+ } else if (line.startsWith("cd ")) {
+ return doCdLine(line);
+ } else if (line.startsWith("pick-up ")) {
+ return doPickUpLine(line);
}
return line;
}
+
+ private String doCdLine(String line) {
+ return "cd " + handleWorkspaceShortCut(line.substring(3));
+ }
+
+ private String doPickUpLine(String line) {
+ return "pick-up " + handleWorkspaceShortCut(line.substring(8));
+ }
+
+ private String doOpenLine(String line) {
+ String crn = shell.getCurrentResource().getFullyQualifiedName();
+ String crt = shell.getCurrentResource().getClass().getSimpleName();
+ Project project = shell.getCurrentProject();
+ String cpn = "";
+ if (project != null) {
+ cpn = project.getProjectRoot().getFullyQualifiedName();
+ }
+ String par = handleWorkspaceShortCut(line.substring(5));
+ sendEscaped(
+ " EC: " + line +
+ " CRN: " + crn +
+ " CRT: " + crt +
+ " CPN: " + cpn +
+ " PAR: " + par);
+ return "\n";
+ }
+
+ private String handleWorkspaceShortCut(String str) {
+ if (str.startsWith("#")) {
+ return System.getProperty("forge.workspace") + str.substring(1);
+ }
+ return str;
+ }
private void sendEscaped(String str) {
shell.print(ESCAPE + str + ESCAPE);
14 years, 1 month
JBoss Tools SVN: r38745 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-02-15 05:51:41 -0500 (Wed, 15 Feb 2012)
New Revision: 38745
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPage.java
Log:
[JBIDE-10906] updating page title on page activation (since appliaction name changed since page instantiation - it's set in the previous page)
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPage.java 2012-02-15 10:45:09 UTC (rev 38744)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ProjectAndServerAdapterSettingsWizardPage.java 2012-02-15 10:51:41 UTC (rev 38745)
@@ -33,6 +33,7 @@
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
@@ -47,19 +48,20 @@
import org.jboss.tools.common.ui.databinding.ValueBindingBuilder;
/**
- * @author Andr� Dietisheim
+ * @author Andre Dietisheim
* @author Xavier Coulon
*/
public class ProjectAndServerAdapterSettingsWizardPage extends AbstractOpenShiftWizardPage {
public static final String PREF_CONTENTASSISTKEY = "prefContentAssistKey";
-
+
+ private static final String PAGE_TITLE_FORMAT = "Setup Project for OpenShift application \"{0}\"";
+
private ProjectAndServerAdapterSettingsWizardPageModel pageModel;
-
private Text existingProjectNameText = null;
public ProjectAndServerAdapterSettingsWizardPage(IWizard wizard, IOpenShiftExpressWizardModel wizardModel) {
- super("Setup Project for OpenShift application '" + wizardModel.getApplicationName() + "'",
+ super(NLS.bind(PAGE_TITLE_FORMAT, wizardModel.getApplicationName()),
"Configure your project and server adapter settings, then click 'next' or 'finish'.",
"Project Configuration", wizard);
this.pageModel = new ProjectAndServerAdapterSettingsWizardPageModel(wizardModel);
@@ -270,15 +272,14 @@
}
}
- /*
- * (non-Javadoc)
- * @see
- * org.jboss.tools.openshift.express.internal.ui.wizard.AbstractOpenShiftWizardPage#onPageActivated(org.eclipse.
- * core.databinding.DataBindingContext)
- */
@Override
protected void onPageActivated(DataBindingContext dbc) {
+ setPageTitle();
pageModel.validateExistingProject();
}
+ private void setPageTitle() {
+ setTitle(NLS.bind(PAGE_TITLE_FORMAT, pageModel.getApplicationName()));
+ }
+
}
14 years, 1 month
JBoss Tools SVN: r38744 - trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/actions.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2012-02-15 05:45:09 -0500 (Wed, 15 Feb 2012)
New Revision: 38744
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/actions/RunBrowserSimAction.java
Log:
https://issues.jboss.org/browse/JBIDE-10905 : BrowserSim: null argument exception
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/actions/RunBrowserSimAction.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/actions/RunBrowserSimAction.java 2012-02-15 10:27:21 UTC (rev 38743)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/actions/RunBrowserSimAction.java 2012-02-15 10:45:09 UTC (rev 38744)
@@ -168,8 +168,10 @@
if (selection instanceof IStructuredSelection) {
IStructuredSelection ssel = (IStructuredSelection) selection;
Object firstSelectedElement = ssel.getFirstElement();
- file = (IFile) Platform.getAdapterManager().getAdapter(firstSelectedElement,
- IFile.class);
+ if (firstSelectedElement != null) {
+ file = (IFile) Platform.getAdapterManager().getAdapter(firstSelectedElement,
+ IFile.class);
+ }
if (file == null) {
if (firstSelectedElement instanceof IAdaptable) {
14 years, 1 month
JBoss Tools SVN: r38743 - trunk/cdi/tests/org.jboss.tools.cdi.bot.test.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-02-15 05:27:21 -0500 (Wed, 15 Feb 2012)
New Revision: 38743
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml
Log:
added default profile into CDI bot tests' pom.xml
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml 2012-02-15 10:13:30 UTC (rev 38742)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml 2012-02-15 10:27:21 UTC (rev 38743)
@@ -12,8 +12,7 @@
<packaging>eclipse-test-plugin</packaging>
<properties>
<!-- <systemProperties>-Xdebug -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=y -Dswtbot.test.properties.file=${project.basedir}/properties/config_files/swtbot.properties</systemProperties> -->
- <systemProperties> -Dswtbot.test.properties.file=${project.basedir}/properties/config_files/swtbot.properties</systemProperties>
- <test.suite.class>org.jboss.tools.cdi.bot.test.CDIAllBotTests</test.suite.class>
+ <systemProperties> -Dswtbot.test.properties.file=${project.basedir}/properties/config_files/swtbot.properties</systemProperties>
</properties>
<build>
@@ -55,6 +54,15 @@
<profiles>
<profile>
+ <activation>
+ <activeByDefault></activeByDefault>
+ </activation>
+ <id>all-bot-tests</id>
+ <properties>
+ <test.suite.class>org.jboss.tools.cdi.bot.test.CDIAllBotTests</test.suite.class>
+ </properties>
+ </profile>
+ <profile>
<id>smoke-bot-tests</id>
<properties>
<test.suite.class>org.jboss.tools.cdi.bot.test.CDISmokeBotTests</test.suite.class>
14 years, 1 month
JBoss Tools SVN: r38742 - trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2012-02-15 05:13:30 -0500 (Wed, 15 Feb 2012)
New Revision: 38742
Modified:
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/OpenPostProcessor.java
Log:
JBIDE-10904: Open command does not work when including ~ symbol for home folder in path to open
Modified: trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/OpenPostProcessor.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/OpenPostProcessor.java 2012-02-15 10:08:42 UTC (rev 38741)
+++ trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/OpenPostProcessor.java 2012-02-15 10:13:30 UTC (rev 38742)
@@ -7,7 +7,7 @@
protected String getResourceToOpen(Map<String, String> commandDetails) {
String par = commandDetails.get("par");
if (par.startsWith("~")) {
- return System.getProperty("user.home") + "/" + par;
+ return System.getProperty("user.home") + par.substring(1);
} else if (!par.startsWith("/")) {
String crn = commandDetails.get("crn");
return crn + "/" + par;
14 years, 1 month
JBoss Tools SVN: r38741 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2012-02-15 05:08:42 -0500 (Wed, 15 Feb 2012)
New Revision: 38741
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
Log:
https://issues.jboss.org/browse/JBIDE-9997 - code cleanup.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2012-02-15 09:49:50 UTC (rev 38740)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2012-02-15 10:08:42 UTC (rev 38741)
@@ -631,13 +631,12 @@
Object feature, Object oldValue, Object newValue, int pos) {
if (editPart.getVisualMode() != VpeEditorPart.SOURCE_MODE) {
if (VpeDebug.PRINT_SOURCE_MUTATION_EVENT) {
- VpeDebugUtil.printSourceEvent(notifier, eventType, feature, oldValue,
- newValue, pos);
+ VpeDebugUtil.printSourceEvent(
+ notifier, eventType, feature, oldValue, newValue, pos);
}
if (visualBuilder == null) {
return;
}
- // visualBuilder.rebuildFlag = false;
switch (eventType) {
case INodeNotifier.CHANGE:
sourceChangeFlag = true;
@@ -650,30 +649,29 @@
boolean update = visualBuilder.setText((Node) notifier);
visualEditor.showResizer();
// Added by Max Areshkau JBIDE-1554
- if (!update)
+ if (!update) {
visualBuilder.updateNode((Node) notifier);
+ }
} else if (type == Node.COMMENT_NODE) {
if ("yes".equals(VpePreference.SHOW_COMMENTS.getValue())) { //$NON-NLS-1$
visualBuilder.clearSelectionRectangle();
visualBuilder.updateNode((Node) notifier);
}
- } else if (feature != null
+ } else if ((feature != null)
&& ((Node) feature).getNodeType() == Node.ATTRIBUTE_NODE) {
if (newValue != null) {
String attrName = ((Attr) feature).getName();
if ((Attr) feature == lastRemovedAttr
&& !attrName.equals(lastRemovedAttrName)) {
lastRemovedAttr = null;
- visualBuilder.removeAttribute((Element) notifier,
- lastRemovedAttrName);
+ visualBuilder.removeAttribute((Element) notifier, lastRemovedAttrName);
}
visualBuilder.setAttribute((Element) notifier,
((Attr) feature).getName(), (String) newValue);
} else {
lastRemovedAttr = (Attr) feature;
lastRemovedAttrName = ((Attr) feature).getName();
- visualBuilder.removeAttribute((Element) notifier,
- lastRemovedAttrName);
+ visualBuilder.removeAttribute((Element) notifier, lastRemovedAttrName);
}
}
visualEditor.showResizer();
@@ -715,14 +713,12 @@
case INodeNotifier.STRUCTURE_CHANGED:
/*
- * https://jira.jboss.org/jira/browse/JBIDE-4102 Do not update
- * parent tag when a comment was changed,
+ * https://jira.jboss.org/jira/browse/JBIDE-4102
+ * Do not update parent tag when a comment was changed,
+ *
+ * https://jira.jboss.org/jira/browse/JBIDE-6067
+ * Update if action is connected with add or remove comment
*/
-
- /*
- * https://jira.jboss.org/jira/browse/JBIDE-6067 Update if action
- * is connected with add or remove comment
- */
if (!commentNodeChanged ||(commentNodeChanged && (commentAddCount != 1 || commentRemoveCount != 1))) {
visualEditor.hideResizer();
visualBuilder.clearSelectionRectangle();
@@ -1093,7 +1089,7 @@
removeSourceScrollListener();
visualScrollEventFlag = true;
int line = scrollCoordinator.computeSourcePositionFromVisual();
- if ((line != -1) && (sourceEditor.getTextViewer() != null)){
+ if ((line != -1) && (sourceEditor.getTextViewer() != null)) {
sourceEditor.getTextViewer().setTopIndex(line);
}
addSourceScrollListener();
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2012-02-15 09:49:50 UTC (rev 38740)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2012-02-15 10:08:42 UTC (rev 38741)
@@ -98,17 +98,9 @@
private MozillaEditor visualEditor;
private XulRunnerEditor xulRunnerEditor;
-
- // JBIDE-2170 Sergey Dzmitrovich
- // private nsIDOMElement visualContentArea;
private VpePageContext pageContext;
- // JBIDE-2170 Sergey Dzmitrovich
- // private nsIDOMNode headNode;
private List<VpeIncludeInfo> includeStack;
- // TODO Max Areshkau JBIDE-1457
- // boolean rebuildFlag = false;
-
private static final String ATTR_VPE = "vpe"; //$NON-NLS-1$
private static final String ATTR_VPE_INLINE_LINK_VALUE = "inlinelink"; //$NON-NLS-1$
@@ -142,29 +134,17 @@
private boolean showBorderForUnknownTags;
public static final List<nsIDOMNode> EMPTY_SELECTION = Collections.unmodifiableList(new ArrayList<nsIDOMNode>(0));
- public VpeVisualDomBuilder(VpeDomMapping domMapping,
- INodeAdapter sorceAdapter,
+ public VpeVisualDomBuilder(VpeDomMapping domMapping, INodeAdapter sorceAdapter,
MozillaEditor visualEditor, VpePageContext pageContext) {
super(domMapping, sorceAdapter);
this.visualEditor = visualEditor;
xulRunnerEditor = visualEditor.getXulRunnerEditor();
-
- // this.visualContentArea = visualEditor.getContentArea();
this.pageContext = pageContext;
- // this.headNode = visualEditor.getHeadNode();
-
-// if (isFacelet()) {
-// faceletFile = true;
-// } else {
-// faceletFile = false;
-// }
-
this.showInvisibleTags = JspEditorPlugin.getDefault().getPreferenceStore().getBoolean(
IVpePreferencesPage.SHOW_NON_VISUAL_TAGS);
this.showBorderForUnknownTags = JspEditorPlugin.getDefault().getPreferenceStore().getBoolean(
IVpePreferencesPage.SHOW_BORDER_FOR_UNKNOWN_TAGS);
-
}
public void buildDom(Document sourceDocument) {
14 years, 1 month
JBoss Tools SVN: r38740 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2012-02-15 04:49:50 -0500 (Wed, 15 Feb 2012)
New Revision: 38740
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/DndUtil.java
Log:
https://issues.jboss.org/browse/JBIDE-10728 - check for null was added.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/DndUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/DndUtil.java 2012-02-15 09:36:25 UTC (rev 38739)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/DndUtil.java 2012-02-15 09:49:50 UTC (rev 38740)
@@ -125,20 +125,24 @@
*/
public static DragTransferData getDragTransferData(String... flavors) {
nsIDragSession dragSession = getCurrentDragSession();
- String []supportedFlavors = getSupportedDataFlavors(dragSession, flavors);
- if (supportedFlavors.length > 0) {
- nsITransferable iTransferable = createTransferable(supportedFlavors);
-
- String[] aFlavor = new String[1];
- nsISupports[] aValue = new nsISupports[1];
- long[] aDataLen = new long[1];
-
- dragSession.getData(iTransferable, 0);
- iTransferable.getAnyTransferData(aFlavor, aValue, aDataLen);
- return new DragTransferData(aFlavor[0], aValue[0], aDataLen[0]);
- } else {
- return null;
+ /*
+ * https://issues.jboss.org/browse/JBIDE-10728
+ */
+ if (dragSession != null) {
+ String []supportedFlavors = getSupportedDataFlavors(dragSession, flavors);
+ if (supportedFlavors.length > 0) {
+ nsITransferable iTransferable = createTransferable(supportedFlavors);
+
+ String[] aFlavor = new String[1];
+ nsISupports[] aValue = new nsISupports[1];
+ long[] aDataLen = new long[1];
+
+ dragSession.getData(iTransferable, 0);
+ iTransferable.getAnyTransferData(aFlavor, aValue, aDataLen);
+ return new DragTransferData(aFlavor[0], aValue[0], aDataLen[0]);
+ }
}
+ return null;
}
public static String getDragTransferDataAsString(String... flavors) {
@@ -171,14 +175,19 @@
return iTransferable;
}
- public static String []getSupportedDataFlavors(
+ public static String[] getSupportedDataFlavors(
final nsIDragSession dragSession, String... flavors) {
final List<String> supportedDataFlavors = new ArrayList<String>();
- for (final String flavor : flavors) {
- if (dragSession.isDataFlavorSupported(flavor)) {
- supportedDataFlavors.add(flavor);
- }
- }
+ /*
+ * https://issues.jboss.org/browse/JBIDE-10728
+ */
+ if (dragSession != null) {
+ for (final String flavor : flavors) {
+ if (dragSession.isDataFlavorSupported(flavor)) {
+ supportedDataFlavors.add(flavor);
+ }
+ }
+ }
return supportedDataFlavors.toArray(new String[supportedDataFlavors.size()]);
}
14 years, 1 month