JBoss Tools SVN: r32550 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-07-04 09:15:30 -0400 (Mon, 04 Jul 2011)
New Revision: 32550
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ServerStartupLaunchConfiguration.java
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ServerStartupLaunchConfiguration.java
Log:
[JBIDE-9054] removed unneeded import
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ServerStartupLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ServerStartupLaunchConfiguration.java 2011-07-04 12:57:07 UTC (rev 32549)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ServerStartupLaunchConfiguration.java 2011-07-04 13:15:30 UTC (rev 32550)
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * 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.ide.eclipse.as.core.server.internal.v7;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.model.ILaunchConfigurationDelegate;
-import org.eclipse.debug.core.model.IProcess;
-import org.jboss.ide.eclipse.as.core.extensions.polling.WebPortPoller;
-import org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior;
-import org.jboss.ide.eclipse.as.core.server.internal.LocalJBossBehaviorDelegate;
-import org.jboss.ide.eclipse.as.core.server.internal.launch.JBossServerStartupLaunchConfiguration;
-import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
-import org.jboss.ide.eclipse.as.core.util.JBossServerBehaviorUtils;
-import org.jboss.ide.eclipse.as.core.util.LaunchCommandPreferences;
-
-/**
- * @author Rob Stryker
- */
-public class JBoss7ServerStartupLaunchConfiguration extends JBossServerStartupLaunchConfiguration implements
- ILaunchConfigurationDelegate {
-
- public String[] getJavaLibraryPath(ILaunchConfiguration configuration) throws CoreException {
- return new String[] {};
- }
-
- public boolean preLaunchCheck(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor)
- throws CoreException {
- JBossServerBehavior jbsBehavior = JBossServerBehaviorUtils.getServerBehavior(configuration);
- if( LaunchCommandPreferences.ignoreLaunchCommand(jbsBehavior.getServer())) {
- jbsBehavior.setServerStarting();
- jbsBehavior.setServerStarted();
- return false;
- }
- boolean started = WebPortPoller.onePing(jbsBehavior.getServer());
- if( started ) {
- jbsBehavior.setServerStarting();
- jbsBehavior.setServerStarted();
- return false;
- }
- return true;
- }
-
- public void preLaunch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor)
- throws CoreException {
- try {
- JBossServerBehavior jbsBehavior = JBossServerBehaviorUtils.getServerBehavior(configuration);
- jbsBehavior.setRunMode(mode);
- jbsBehavior.serverStarting();
- } catch (CoreException ce) {
- // report it
- }
- }
-
- public void postLaunch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor)
- throws CoreException {
- try {
- JBoss7ServerBehavior behavior = JBossServerBehaviorUtils.getJBoss7ServerBehavior(configuration);
- IProcess[] processes = launch.getProcesses();
- if (processes != null && processes.length >= 1) {
- behavior.setProcess(processes[0]);
- ((LocalJBossBehaviorDelegate) (behavior.getDelegate())).setProcess(processes[0]);
- }
- behavior.setRunMode(mode);
- } catch (CoreException ce) {
- // report it
- }
- }
-}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ServerStartupLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ServerStartupLaunchConfiguration.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ServerStartupLaunchConfiguration.java 2011-07-04 13:15:30 UTC (rev 32550)
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * 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.ide.eclipse.as.core.server.internal.v7;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.ILaunch;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.model.ILaunchConfigurationDelegate;
+import org.eclipse.debug.core.model.IProcess;
+import org.jboss.ide.eclipse.as.core.extensions.polling.WebPortPoller;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServerBehavior;
+import org.jboss.ide.eclipse.as.core.server.internal.LocalJBossBehaviorDelegate;
+import org.jboss.ide.eclipse.as.core.server.internal.launch.JBossServerStartupLaunchConfiguration;
+import org.jboss.ide.eclipse.as.core.util.JBossServerBehaviorUtils;
+import org.jboss.ide.eclipse.as.core.util.LaunchCommandPreferences;
+
+/**
+ * @author Rob Stryker
+ */
+public class JBoss7ServerStartupLaunchConfiguration extends JBossServerStartupLaunchConfiguration implements
+ ILaunchConfigurationDelegate {
+
+ public String[] getJavaLibraryPath(ILaunchConfiguration configuration) throws CoreException {
+ return new String[] {};
+ }
+
+ public boolean preLaunchCheck(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor)
+ throws CoreException {
+ JBossServerBehavior jbsBehavior = JBossServerBehaviorUtils.getServerBehavior(configuration);
+ if( LaunchCommandPreferences.ignoreLaunchCommand(jbsBehavior.getServer())) {
+ jbsBehavior.setServerStarting();
+ jbsBehavior.setServerStarted();
+ return false;
+ }
+ boolean started = WebPortPoller.onePing(jbsBehavior.getServer());
+ if( started ) {
+ jbsBehavior.setServerStarting();
+ jbsBehavior.setServerStarted();
+ return false;
+ }
+ return true;
+ }
+
+ public void preLaunch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor)
+ throws CoreException {
+ try {
+ JBossServerBehavior jbsBehavior = JBossServerBehaviorUtils.getServerBehavior(configuration);
+ jbsBehavior.setRunMode(mode);
+ jbsBehavior.serverStarting();
+ } catch (CoreException ce) {
+ // report it
+ }
+ }
+
+ public void postLaunch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor)
+ throws CoreException {
+ try {
+ JBoss7ServerBehavior behavior = JBossServerBehaviorUtils.getJBoss7ServerBehavior(configuration);
+ IProcess[] processes = launch.getProcesses();
+ if (processes != null && processes.length >= 1) {
+ behavior.setProcess(processes[0]);
+ ((LocalJBossBehaviorDelegate) (behavior.getDelegate())).setProcess(processes[0]);
+ }
+ behavior.setRunMode(mode);
+ } catch (CoreException ce) {
+ // report it
+ }
+ }
+}
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ServerStartupLaunchConfiguration.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 5 months
JBoss Tools SVN: r32549 - in trunk/forge: tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/preferences and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-07-04 08:57:07 -0400 (Mon, 04 Jul 2011)
New Revision: 32549
Modified:
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/preferences/ForgeRuntimesPreferences.java
trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/preferences/ForgeRuntimesPreferencesTest.java
Log:
implemented ForgeRuntimesPreferences
Modified: trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/preferences/ForgeRuntimesPreferences.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/preferences/ForgeRuntimesPreferences.java 2011-07-04 12:09:06 UTC (rev 32548)
+++ trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/preferences/ForgeRuntimesPreferences.java 2011-07-04 12:57:07 UTC (rev 32549)
@@ -2,6 +2,7 @@
import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
@@ -11,11 +12,18 @@
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.jboss.tools.forge.core.ForgeCorePlugin;
import org.jboss.tools.forge.core.process.ForgeEmbeddedRuntime;
+import org.jboss.tools.forge.core.process.ForgeExternalRuntime;
import org.jboss.tools.forge.core.process.ForgeRuntime;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -29,8 +37,8 @@
public static final ForgeRuntimesPreferences INSTANCE = new ForgeRuntimesPreferences();
- List<ForgeRuntime> runtimes = null;
- ForgeRuntime defaultRuntime = null;
+ private List<ForgeRuntime> runtimes = null;
+ private ForgeRuntime defaultRuntime = null;
private ForgeRuntimesPreferences() {}
@@ -80,6 +88,10 @@
ForgeRuntime runtime = null;
if ("embedded".equals(type)) {
runtime = ForgeEmbeddedRuntime.INSTANCE;
+ } else if ("external".equals(type)) {
+ String name = element.getAttribute("name");
+ String location = element.getAttribute("location");
+ runtime = new ForgeExternalRuntime(name, location);
}
if (runtime == null) continue;
runtimes.add(runtime);
@@ -120,73 +132,67 @@
return null;
}
}
+
+ public void setRuntimes(ForgeRuntime[] runtimes, ForgeRuntime defaultRuntime) {
+ this.runtimes.clear();
+ for (ForgeRuntime runtime : runtimes) {
+ this.runtimes.add(runtime);
+ }
+ this.defaultRuntime = defaultRuntime;
+ saveRuntimes();
+ }
-// private static Document createEmptyDocument() {
-// DocumentBuilder documentBuilder = newDocumentBuilder();
-// if (documentBuilder == null) {
-// return null;
-// } else {
-// return documentBuilder.newDocument();
-// }
-// }
-//
-// private static String serializeDocument(Document doc) throws TransformerException, IOException {
-// ByteArrayOutputStream s = new ByteArrayOutputStream();
-// TransformerFactory factory = TransformerFactory.newInstance();
-// Transformer transformer = factory.newTransformer();
-// transformer.setOutputProperty(OutputKeys.METHOD, "xml");
-// transformer.setOutputProperty(OutputKeys.INDENT, "yes");
-// DOMSource source = new DOMSource(doc);
-// StreamResult outputTarget = new StreamResult(s);
-// transformer.transform(source, outputTarget);
-// return s.toString("UTF8");
-// }
-//
-// private static void createInitialInstallations() {
-// try {
-// File file = FileLocator.getBundleFile(ForgeUIPlugin.getDefault().getBundle());
-// defaultInstallation = new ForgeInstallation("embedded", file.getAbsolutePath());
-// installations = new ArrayList<ForgeInstallation>();
-// installations.add(defaultInstallation);
-// saveInstallations();
-// } catch (IOException e) {
-// ForgeUIPlugin.log(e);
-// }
-// }
-//
-// public static void setInstallations(ForgeInstallation[] installs, ForgeInstallation defaultInstall) {
-// installations.clear();
-// for (ForgeInstallation install : installs) {
-// installations.add(install);
-// }
-// defaultInstallation = defaultInstall;
-// saveInstallations();
-// }
-//
-// private static void saveInstallations() {
-// try {
-// String xml = serializeDocument(createInstallationsDocument());
-// ForgeUIPlugin.getDefault().getPreferenceStore().setValue(PREF_FORGE_INSTALLATIONS, xml);
-// } catch (IOException e) {
-// ForgeUIPlugin.log(e);
-// } catch (TransformerException e) {
-// ForgeUIPlugin.log(e);
-// }
-// }
-//
-// private static Document createInstallationsDocument() {
-// Document document = createEmptyDocument();
-// if (document == null) return null;
-// Element main = document.createElement("forgeInstallations");
-// document.appendChild(main);
-// for (ForgeInstallation installation : installations) {
-// Element element = document.createElement("installation");
-// element.setAttribute("name", installation.getName());
-// element.setAttribute("location", installation.getLocation());
-// main.appendChild(element);
-// }
-// main.setAttribute("default", defaultInstallation.getName());
-// return document;
-// }
+ private void saveRuntimes() {
+ try {
+ String xml = serializeDocument(createRuntimesDocument());
+ InstanceScope.INSTANCE.getNode(ForgeCorePlugin.PLUGIN_ID).put(PREF_FORGE_RUNTIMES, xml);
+ } catch (IOException e) {
+ ForgeCorePlugin.log(e);
+ } catch (TransformerException e) {
+ ForgeCorePlugin.log(e);
+ }
+ }
+
+ private Document createRuntimesDocument() {
+ Document document = createEmptyDocument();
+ if (document == null)
+ return null;
+ Element main = document.createElement("forgeRuntimes");
+ document.appendChild(main);
+ for (ForgeRuntime runtime : runtimes) {
+ Element element = document.createElement("runtime");
+ element.setAttribute("name", runtime.getName());
+ if (!(runtime instanceof ForgeEmbeddedRuntime)) {
+ element.setAttribute("location", runtime.getLocation());
+ }
+ element.setAttribute("type", runtime.getType());
+ main.appendChild(element);
+ }
+ if (defaultRuntime != null) {
+ main.setAttribute("default", defaultRuntime.getName());
+ }
+ return document;
+ }
+
+ private Document createEmptyDocument() {
+ DocumentBuilder documentBuilder = newDocumentBuilder();
+ if (documentBuilder == null) {
+ return null;
+ } else {
+ return documentBuilder.newDocument();
+ }
+ }
+
+ private static String serializeDocument(Document doc) throws TransformerException, IOException {
+ ByteArrayOutputStream s = new ByteArrayOutputStream();
+ TransformerFactory factory = TransformerFactory.newInstance();
+ Transformer transformer = factory.newTransformer();
+ transformer.setOutputProperty(OutputKeys.METHOD, "xml");
+ transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+ DOMSource source = new DOMSource(doc);
+ StreamResult outputTarget = new StreamResult(s);
+ transformer.transform(source, outputTarget);
+ return s.toString("UTF8");
+ }
}
Modified: trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/preferences/ForgeRuntimesPreferencesTest.java
===================================================================
--- trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/preferences/ForgeRuntimesPreferencesTest.java 2011-07-04 12:09:06 UTC (rev 32548)
+++ trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/preferences/ForgeRuntimesPreferencesTest.java 2011-07-04 12:57:07 UTC (rev 32549)
@@ -1,8 +1,16 @@
package org.jboss.tools.forge.core.preferences;
+import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.jboss.tools.forge.core.ForgeCorePlugin;
import org.jboss.tools.forge.core.process.ForgeEmbeddedRuntime;
+import org.jboss.tools.forge.core.process.ForgeExternalRuntime;
+import org.jboss.tools.forge.core.process.ForgeRuntime;
import org.junit.Test;
public class ForgeRuntimesPreferencesTest {
@@ -13,7 +21,7 @@
" <runtime name=\"embedded\" type=\"embedded\"/>" +
" <runtime name=\"foo\" location=\"foofoo\" type=\"external\"/>" +
" <runtime name=\"bar\" location=\"barbar\" type=\"external\"/>" +
- "</forgeInstallations>";
+ "</forgeRuntimes>";
@Test
public void testGetDefaultInitialCase() {
@@ -25,18 +33,144 @@
assertEquals(1, ForgeRuntimesPreferences.INSTANCE.getRuntimes().length);
}
+ @Test
+ public void testSetRuntimes() {
+ ForgeRuntime[] runtimes = new ForgeRuntime[3];
+ runtimes[0] = ForgeEmbeddedRuntime.INSTANCE;
+ runtimes[1] = new ForgeExternalRuntime("foo", "foofoo");
+ runtimes[2] = new ForgeExternalRuntime("bar", "barbar");
+ ForgeRuntimesPreferences.INSTANCE.setRuntimes(runtimes, runtimes[1]);
+ assertArrayEquals(runtimes, ForgeRuntimesPreferences.INSTANCE.getRuntimes());
+ assertEquals(runtimes[1], ForgeRuntimesPreferences.INSTANCE.getDefault());
+ verifyForgeRuntimesPreferencesString();
+ }
+
+ private void verifyForgeRuntimesPreferencesString() {
+ String forgeRuntimesPrefs =
+ InstanceScope.INSTANCE.getNode(ForgeCorePlugin.PLUGIN_ID).get(
+ ForgeRuntimesPreferences.PREF_FORGE_RUNTIMES, null);
+ verifyDefaultRuntime(forgeRuntimesPrefs);
+ verifyRuntimes(forgeRuntimesPrefs);
+ }
+
+ private void verifyDefaultRuntime(String xml) {
+ String searchString = "default=\"";
+ int start = xml.indexOf(searchString);
+ assertTrue(start != -1);
+ start = start + searchString.length();
+ assertTrue(start < xml.length());
+ int end = xml.indexOf("\">", start);
+ assertTrue(end != -1);
+ assertEquals("foo", xml.substring(start, end));
+ }
+
+ private void verifyRuntimes(String xml) {
+ int startIndex = 0;
+ for (int i = 0; i < 3; i++) {
+ int start = xml.indexOf("<runtime ", startIndex);
+ assertTrue(start != -1);
+ int end = xml.indexOf("/>", start);
+ assertTrue(end != -1);
+ verifyRuntime(xml.substring(start, end + 2));
+ startIndex = end + 2;
+ }
+ }
+
+ private void verifyRuntime(String xml) {
+ int start = xml.indexOf("name=\"");
+ assertTrue(start != -1);
+ int end = xml.indexOf("\"", start);
+ assertTrue(end != -1);
+ String name = xml.substring(start, end);
+ if ("embedded".equals(name)) {
+ verifyEmbedded(xml);
+ } else if ("foo".equals(name)) {
+ verifyFoo(xml);
+ } else if ("bar".equals(name)) {
+ verifyBar(xml);
+ }
+ }
+
+ private void verifyEmbedded(String xml) {
+ verifyAttribute("name", "embedded", xml);
+ verifyAttribute("type", "embedded", xml);
+ verifyAttribute("location", null, xml);
+ }
+
+ private void verifyFoo(String xml) {
+ verifyAttribute("name", "foo", xml);
+ verifyAttribute("type", "external", xml);
+ verifyAttribute("location", "foofoo", xml);
+ }
+
+ private void verifyBar(String xml) {
+ verifyAttribute("name", "bar", xml);
+ verifyAttribute("type", "external", xml);
+ verifyAttribute("location", "barbar", xml);
+ }
+
+ private void verifyAttribute(String name, String expectedValue, String string) {
+ int start = string.indexOf(name + "=\"");
+ if (start == -1) {
+ assertNull(expectedValue);
+ } else {
+ start += name.length() + 2;
+ int end = string.indexOf('\"', start);
+ assertTrue(end != -1);
+ assertEquals(expectedValue, string.substring(start, end));
+ }
+ }
+
+ @Test
+ public void testGetDefaultAndGetInstallationsAlternativeCase() {
+ // trick the preferences into initializing from the alternative preference string
+ ForgeRuntimesPreferences.INSTANCE.setRuntimes(new ForgeRuntime[0], null);
+ InstanceScope.INSTANCE.getNode(ForgeCorePlugin.PLUGIN_ID).put(
+ ForgeRuntimesPreferences.PREF_FORGE_RUNTIMES,
+ ALTERNATIVE_FORGE_RUNTIMES);
+ // getDefault() will now trigger the initialization
+ ForgeRuntime runtime = ForgeRuntimesPreferences.INSTANCE.getDefault();
+ assertEquals("foo", runtime.getName());
+ assertEquals("foofoo", runtime.getLocation());
+ assertEquals("external", runtime.getType());
+ // getRuntimes() will return the list of runtimes from the alternative preference string
+ ForgeRuntime[] runtimes = ForgeRuntimesPreferences.INSTANCE.getRuntimes();
+ verifyEmbedded(runtimes);
+ verifyFoo(runtimes);
+ verifyBar(runtimes);
+ }
+
+ private ForgeRuntime getRuntimeToVerify(String name, ForgeRuntime[] runtimes) {
+ ForgeRuntime result = null;
+ for (int i = 0; i < runtimes.length; i++) {
+ if (name.equals(runtimes[i].getName())) {
+ result = runtimes[i];
+ }
+ }
+ return result;
+ }
+
+ private void verifyEmbedded(ForgeRuntime[] runtimes) {
+ assertEquals(ForgeEmbeddedRuntime.INSTANCE, getRuntimeToVerify("embedded", runtimes));
+ }
+
+ private void verifyFoo(ForgeRuntime[] runtimes) {
+ ForgeRuntime runtimeToVerify = getRuntimeToVerify("foo", runtimes);
+ assertNotNull(runtimeToVerify);
+ assertEquals("foo", runtimeToVerify.getName());
+ assertEquals("foofoo", runtimeToVerify.getLocation());
+ assertEquals("external", runtimeToVerify.getType());
+ }
+
+ private void verifyBar(ForgeRuntime[] runtimes) {
+ ForgeRuntime runtimeToVerify = getRuntimeToVerify("bar", runtimes);
+ assertNotNull(runtimeToVerify);
+ assertEquals("bar", runtimeToVerify.getName());
+ assertEquals("barbar", runtimeToVerify.getLocation());
+ assertEquals("external", runtimeToVerify.getType());
+ }
+
// @Test
-// public void testGetDefaultAlternativeCase() {
-// ForgeInstallations.INSTANCE.defaultInstallation = null;
-// InstanceScope.INSTANCE.getNode(ForgeCorePlugin.PLUGIN_ID).put(
-// ForgeInstallations.PREF_FORGE_INSTALLATIONS,
-// ALTERNATIVE_FORGE_INSTALLATIONS);
-// ForgeRuntime runtime = ForgeInstallations.INSTANCE.getDefault();
-// assertNotNull(ForgeInstallations.INSTANCE.defaultInstallation);
-// assertEquals("foo", runtime.getName());
-// }
-//
-// @Test
// public void testGetInstallationsAlternativeCase() {
// ForgeInstallations.INSTANCE.installations = null;
// InstanceScope.INSTANCE.getNode(ForgeCorePlugin.PLUGIN_ID).put(
13 years, 5 months
JBoss Tools SVN: r32548 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-07-04 08:09:06 -0400 (Mon, 04 Jul 2011)
New Revision: 32548
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java
Log:
[JBIDE-9054] added @Override to get class hierarchy asserts
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java 2011-07-04 10:34:40 UTC (rev 32547)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/LocalJBossServerRuntime.java 2011-07-04 12:09:06 UTC (rev 32548)
@@ -54,11 +54,14 @@
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
public class LocalJBossServerRuntime extends AbstractLocalJBossServerRuntime implements IJBossServerRuntime {
+
+ @Override
public void setDefaults(IProgressMonitor monitor) {
super.setDefaults(monitor);
setAttribute(IJBossServerRuntime.PROPERTY_CONFIGURATION_NAME, IJBossRuntimeResourceConstants.DEFAULT_CONFIGURATION);
}
+ @Override
protected String getNextRuntimeName() {
String rtVersion = getRuntime().getRuntimeType().getVersion();
String prefix = Messages.jboss;
@@ -78,6 +81,7 @@
return rt.getRuntimeType().getId().startsWith("org.jboss.ide.eclipse.as.runtime.eap."); //$NON-NLS-1$
}
+ @Override
public IStatus validate() {
IStatus s = super.validate();
if( !s.isOK()) return s;
@@ -89,18 +93,22 @@
return Status.OK_STATUS;
}
+ @Override
public String getJBossConfiguration() {
return getAttribute(PROPERTY_CONFIGURATION_NAME, (String)""); //$NON-NLS-1$
}
+ @Override
public void setJBossConfiguration(String config) {
setAttribute(IJBossServerRuntime.PROPERTY_CONFIGURATION_NAME, config);
}
+ @Override
public String getDefaultRunArgs() {
return STARTUP_ARG_CONFIG_LONG + "=" + getJBossConfiguration() + SPACE; //$NON-NLS-1$
}
+ @Override
public String getDefaultRunVMArgs() {
File sysJar = new File(getRuntime().getLocation().toFile(), JBossServerType.AS.getSystemJarPath());
String version = new ServerBeanLoader().getFullServerVersion(sysJar);
@@ -137,24 +145,29 @@
return ret;
}
+ @Override
public HashMap<String, String> getDefaultRunEnvVars(){
HashMap<String, String> envVars = new HashMap<String, String>(1);
envVars.put("Path", NATIVE); //$NON-NLS-1$
return envVars;
}
+ @Override
public String getConfigLocation() {
return getAttribute(PROPERTY_CONFIG_LOCATION, SERVER);
}
+ @Override
public void setConfigLocation(String configLocation) {
setAttribute(PROPERTY_CONFIG_LOCATION, configLocation);
}
+ @Override
public IPath getConfigurationFullPath() {
return getConfigLocationFullPath().append(getJBossConfiguration());
}
+ @Override
public IPath getConfigLocationFullPath() {
String cl = getConfigLocation();
if( new Path(cl).isAbsolute())
13 years, 5 months
JBoss Tools SVN: r32547 - in trunk/vpe: plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2011-07-04 06:34:40 -0400 (Mon, 04 Jul 2011)
New Revision: 32547
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/VpeResourcesDialogFactory.java
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/FolderReferenceComposite.java
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/Messages.java
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeResourcesDialog.java
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/messages.properties
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PageDesignOptionsHandler.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/dialog/VpeResourcesDialogTest.java
Log:
https://issues.jboss.org/browse/JBIDE-8719 : Show default root folder in Page Desigh Options Dialog on top of the Actual Run-Time Folders tab content
- updated actual runtime folders tab in the dialog
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2011-07-04 10:12:01 UTC (rev 32546)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2011-07-04 10:34:40 UTC (rev 32547)
@@ -69,6 +69,7 @@
import org.jboss.tools.vpe.editor.mozilla.listener.MozillaResizeListener;
import org.jboss.tools.vpe.editor.mozilla.listener.MozillaTooltipListener;
import org.jboss.tools.vpe.editor.preferences.VpeEditorPreferencesPage;
+import org.jboss.tools.vpe.editor.preferences.VpeResourcesDialogFactory;
import org.jboss.tools.vpe.editor.toolbar.IVpeToolBarManager;
import org.jboss.tools.vpe.editor.toolbar.VpeDropDownMenu;
import org.jboss.tools.vpe.editor.toolbar.VpeToolBarManager;
@@ -78,7 +79,6 @@
import org.jboss.tools.vpe.editor.util.FileUtil;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.messages.VpeUIMessages;
-import org.jboss.tools.vpe.resref.core.VpeResourcesDialog;
import org.jboss.tools.vpe.xulrunner.XulRunnerException;
import org.jboss.tools.vpe.xulrunner.browser.XulRunnerBrowser;
import org.jboss.tools.vpe.xulrunner.editor.XulRunnerEditor;
@@ -276,26 +276,7 @@
IAction.AS_PUSH_BUTTON) {
@Override
public void run() {
- IEditorInput input = getEditorInput();
- Object fileLocation = null;
- if (input instanceof IFileEditorInput) {
- IFile file = ((IFileEditorInput) input).getFile();
- fileLocation = file;
- } else if (input instanceof ILocationProvider) {
- ILocationProvider provider = (ILocationProvider) input;
- IPath path = provider.getPath(input);
- if (path != null) {
- fileLocation = path;
- }
- }
- if (null != fileLocation) {
- VpeResourcesDialog dialogNew =
- new VpeResourcesDialog(PlatformUI.getWorkbench().getDisplay()
- .getActiveShell(), fileLocation);
- dialogNew.open();
- } else {
- VpePlugin.getDefault().logError(VpeUIMessages.COULD_NOT_OPEN_VPE_RESOURCES_DIALOG);
- }
+ VpeResourcesDialogFactory.openVpeResourcesDialog(getEditorInput());
}
};
showResouceDialogAction.setImageDescriptor(ImageDescriptor.createFromFile(MozillaEditor.class,
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/VpeResourcesDialogFactory.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/VpeResourcesDialogFactory.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/preferences/VpeResourcesDialogFactory.java 2011-07-04 10:34:40 UTC (rev 32547)
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2011 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.editor.preferences;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.editors.text.ILocationProvider;
+import org.jboss.tools.common.resref.core.ResourceReference;
+import org.jboss.tools.vpe.VpePlugin;
+import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
+import org.jboss.tools.vpe.messages.VpeUIMessages;
+import org.jboss.tools.vpe.resref.core.VpeResourcesDialog;
+
+public class VpeResourcesDialogFactory {
+ public static void openVpeResourcesDialog(IEditorInput input) {
+ Object fileLocation = null;
+ if (input instanceof IFileEditorInput) {
+ IFile file = ((IFileEditorInput) input).getFile();
+ fileLocation = file;
+ } else if (input instanceof ILocationProvider) {
+ ILocationProvider provider = (ILocationProvider) input;
+ IPath path = provider.getPath(input);
+ if (path != null) {
+ fileLocation = path;
+ }
+ }
+ if (null != fileLocation) {
+ IPath absoluteDefaultPath = VpeStyleUtil.getRootPath(input);
+ IPath relativeDafaultPath = VpeStyleUtil.getInputParentPath(input);
+ VpeResourcesDialog dialogNew =
+ new VpeResourcesDialog(
+ PlatformUI.getWorkbench().getDisplay().getActiveShell(),
+ fileLocation,
+ new ResourceReference(absoluteDefaultPath != null ? absoluteDefaultPath.toOSString() : "", ResourceReference.PROJECT_SCOPE), //$NON-NLS-1$
+ new ResourceReference(relativeDafaultPath != null ? relativeDafaultPath.toOSString() : "", ResourceReference.FOLDER_SCOPE)); //$NON-NLS-1$
+ dialogNew.open();
+ } else {
+ VpePlugin.getDefault().logError(VpeUIMessages.COULD_NOT_OPEN_VPE_RESOURCES_DIALOG);
+ }
+ }
+}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PageDesignOptionsHandler.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PageDesignOptionsHandler.java 2011-07-04 10:12:01 UTC (rev 32546)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/handlers/PageDesignOptionsHandler.java 2011-07-04 10:34:40 UTC (rev 32547)
@@ -23,10 +23,14 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.editors.text.ILocationProvider;
import org.eclipse.ui.handlers.HandlerUtil;
+import org.jboss.tools.common.resref.core.ResourceReference;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.editor.VpeController;
+import org.jboss.tools.vpe.editor.mozilla.MozillaEditor;
+import org.jboss.tools.vpe.editor.preferences.VpeResourcesDialogFactory;
import org.jboss.tools.vpe.editor.util.FileUtil;
+import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
import org.jboss.tools.vpe.messages.VpeUIMessages;
import org.jboss.tools.vpe.resref.core.VpeResourcesDialog;
@@ -43,26 +47,8 @@
*/
public Object execute(ExecutionEvent event) throws ExecutionException {
IEditorPart activeEditor = HandlerUtil.getActiveEditorChecked(event);
- IEditorInput input = activeEditor.getEditorInput();
- Object fileLocation = null;
- if (input instanceof IFileEditorInput) {
- IFile file = ((IFileEditorInput) input).getFile();
- fileLocation = file;
- } else if (input instanceof ILocationProvider) {
- ILocationProvider provider = (ILocationProvider) input;
- IPath path = provider.getPath(input);
- if (path != null) {
- fileLocation = path;
- }
- }
- if (null != fileLocation) {
- VpeResourcesDialog dialogNew = new VpeResourcesDialog(PlatformUI
- .getWorkbench().getDisplay().getActiveShell(), fileLocation);
- dialogNew.open();
- } else {
- VpePlugin.getDefault().logError(
- VpeUIMessages.COULD_NOT_OPEN_VPE_RESOURCES_DIALOG);
- }
+ VpeResourcesDialogFactory.openVpeResourcesDialog(activeEditor.getEditorInput());
+
return null;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/FolderReferenceComposite.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/FolderReferenceComposite.java 2011-07-04 10:12:01 UTC (rev 32546)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/FolderReferenceComposite.java 2011-07-04 10:34:40 UTC (rev 32547)
@@ -12,6 +12,7 @@
import java.io.File;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import org.eclipse.core.resources.IFile;
@@ -21,7 +22,6 @@
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
@@ -35,41 +35,51 @@
import org.jboss.tools.common.resref.core.ResourceReference;
import org.jboss.tools.common.resref.core.ResourceReferenceList;
-public abstract class FolderReferenceComposite implements ModifyListener {
+public abstract class FolderReferenceComposite {
- private final String BROWSE_BUTTON_NAME = "&Browse...";//$NON-NLS-1$
- private Text text = null;
+ private Text pathText = null;
/*
* Object representing file location.
* Can be IFile or IPath.
*/
Object fileLocation = null;
- ResourceReference[] rs = null;
- ResourceReference current = null;
- private String browseDialogFilterPath = null;
+ private ResourceReference defaultReference;
+ List<ResourceReference> resourceReferences = new ArrayList<ResourceReference>();
+ private ResourceReference currentReference;
+ private boolean overrideDefaultPath;
+ private Combo scopeCombo = null;
+ private static final String[] scopeNames = { Messages.SCOPE_PAGE_SHORT,
+ Messages.SCOPE_FOLDER_SHORT, Messages.SCOPE_PROJECT_SHORT };
+ private static final int[] scopeValues = { ResourceReference.FILE_SCOPE,
+ ResourceReference.FOLDER_SCOPE, ResourceReference.PROJECT_SCOPE };
+ private Button browseButton;
+ private Button overrideDefaultPathCheckBox;
+ private Label pathLabel;
+ private Label scopeLabel;
+
+
public FolderReferenceComposite() {}
- public void setObject(Object fileLocation) {
+ public void setObject(Object fileLocation, ResourceReference defaultReference) {
+ this.defaultReference = defaultReference;
+
this.fileLocation = fileLocation;
+
if (fileLocation instanceof IFile) {
- browseDialogFilterPath = ((IFile)fileLocation).getProject().getLocation().toString();
+ resourceReferences.addAll(Arrays.asList(getReferenceList().getAllResources((IFile) fileLocation)));
+ } else if (fileLocation instanceof IPath) {
+ resourceReferences.addAll(Arrays.asList(getReferenceList().getAllResources((IPath) fileLocation)));
}
- if (null != fileLocation) {
- if (fileLocation instanceof IFile) {
- rs = getReferenceList().getAllResources((IFile) fileLocation);
- } else if (fileLocation instanceof IPath) {
- rs = getReferenceList().getAllResources((IPath) fileLocation);
- }
+
+ if (resourceReferences.size() != 0) {
+ overrideDefaultPath = true;
+ ResourceReference firstReference = resourceReferences.remove(0);
+ currentReference = new ResourceReference(firstReference.getLocation(), firstReference.getScope());
} else {
- rs = new ResourceReference[0];
+ overrideDefaultPath = false;
+ currentReference = new ResourceReference(defaultReference.getLocation(), defaultReference.getScope());
}
-
- if(rs.length == 0) {
- rs = new ResourceReference[1];
- rs[0] = new ResourceReference("", ResourceReference.FILE_SCOPE); //$NON-NLS-1$
- }
- current = rs[0];
}
protected abstract ResourceReferenceList getReferenceList();
@@ -86,40 +96,53 @@
groupControl.setLayoutData(gd);
groupControl.setText(getTitle());
- /*
- * Create label control
- */
- Label pathLabel = new Label(groupControl, SWT.RIGHT);
+
+ overrideDefaultPathCheckBox = new Button(groupControl, SWT.LEFT | SWT.CHECK);
+ overrideDefaultPathCheckBox.setText(Messages.OVERRIDE_DEFAULT_FOLDER);
+ gd = new GridData();
+ gd.horizontalSpan = 3;
+ overrideDefaultPathCheckBox.setLayoutData(gd);
+ overrideDefaultPathCheckBox.addSelectionListener(new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ overrideDefaultPath = overrideDefaultPathCheckBox.getSelection();
+ updateFieldsForOverrideDefaultPath();
+ }
+ });
+ overrideDefaultPathCheckBox.setSelection(overrideDefaultPath);
+
+ pathLabel = new Label(groupControl, SWT.RIGHT);
pathLabel.setText(Messages.FOLDER_PATH);
gd = new GridData();
+ gd.horizontalIndent = 20;
pathLabel.setLayoutData(gd);
/*
* Create text control.
*/
- text = new Text(groupControl, SWT.BORDER);
+ pathText = new Text(groupControl, SWT.BORDER);
/*
* Set location from stored resource reference
* if it presents.
*/
- text.setText(current.getLocation());
+ pathText.setText(currentReference.getLocation());
gd = new GridData(SWT.FILL, SWT.NONE, true, false);
- text.setLayoutData(gd);
- text.addModifyListener(this);
+ pathText.setLayoutData(gd);
+ pathText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ currentReference.setLocation(pathText.getText().trim());
+ }
+ });
- /*
- * Create browse control.
- */
- final Button button = new Button(groupControl, SWT.PUSH);
- button.setText(BROWSE_BUTTON_NAME);
+ browseButton = new Button(groupControl, SWT.PUSH);
+ browseButton.setText(Messages.BROWSE_BUTTON_NAME);
gd = new GridData();
- button.setLayoutData(gd);
- button.addSelectionListener(new SelectionAdapter() {
+ browseButton.setLayoutData(gd);
+ browseButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent evt) {
- DirectoryDialog dialog = new DirectoryDialog(button.getShell());
+ DirectoryDialog dialog = new DirectoryDialog(browseButton.getShell());
dialog.setMessage(Messages.SELECT_FOLDER_DIALOG_TITLE);
- if ((null != browseDialogFilterPath) && (new File(browseDialogFilterPath).exists()) ){
- dialog.setFilterPath(browseDialogFilterPath);
+ if (new File(currentReference.getLocation()).exists() ){
+ dialog.setFilterPath(currentReference.getLocation());
}
String newPath = dialog.open();
/*
@@ -127,73 +150,81 @@
* store it to current resref, filter, text field.
*/
if (newPath != null) {
- newPath = newPath.trim();
- browseDialogFilterPath = newPath;
- current.setLocation(newPath);
- text.setText(newPath);
+ currentReference.setLocation(newPath.trim());
+ pathText.setText(currentReference.getLocation());
}
}
});
- /*
- * Create scope label.
- */
- Label comboboxLabel = new Label(groupControl, SWT.RIGHT);
- comboboxLabel.setText(Messages.SCOPE_GROUP_NAME);
+ scopeLabel = new Label(groupControl, SWT.RIGHT);
+ scopeLabel.setText(Messages.SCOPE_GROUP_NAME);
gd = new GridData();
- comboboxLabel.setLayoutData(gd);
+ gd.horizontalIndent = 20;
+ scopeLabel.setLayoutData(gd);
- /*
- * Create scope combobox.
- */
- final Combo scopeCombo
- = new Combo(groupControl, SWT.BORDER | SWT.READ_ONLY);
- String[] items = { Messages.SCOPE_PAGE_SHORT,
- Messages.SCOPE_FOLDER_SHORT, Messages.SCOPE_PROJECT_SHORT };
- scopeCombo.setItems(items);
- scopeCombo.select(current.getScope());
+ scopeCombo = new Combo(groupControl, SWT.BORDER | SWT.READ_ONLY);
+ scopeCombo.setItems(scopeNames);
+ setScopeComboValue(currentReference.getScope());
+
gd = new GridData(SWT.FILL, SWT.NONE, true, false, 2, 1);
scopeCombo.setLayoutData(gd);
scopeCombo.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- current.setScope(scopeCombo.getSelectionIndex());
+ currentReference.setScope(getScopeComboValue());
}
});
+ updateFieldsForOverrideDefaultPath();
+
return groupControl;
}
public void commit() {
- List l = new ArrayList();
- for (int i = rs.length - 2; i >= 0; i--) {
- if(rs[i].getLocation().equals(current.getLocation())) {
- continue;
+ List<ResourceReference> newResourceReferencesList = new ArrayList<ResourceReference>();
+ for (int i = resourceReferences.size() - 1; i >= 0; i--) {
+ if(!resourceReferences.get(i).getLocation().equals(currentReference.getLocation())
+ && resourceReferences.get(i).getScope() != currentReference.getScope()) {
+ newResourceReferencesList.add(resourceReferences.get(i));
}
- if(rs[i].getScope() == current.getScope()) {
- continue;
- }
- l.add(rs[i]);
}
- l.add(current);
- rs = (ResourceReference[])l.toArray(new ResourceReference[0]);
- if (null != fileLocation) {
- if (fileLocation instanceof IFile) {
- getReferenceList().setAllResources((IFile) fileLocation, rs);
- } else if (fileLocation instanceof IPath) {
- getReferenceList().setAllResources((IPath) fileLocation, rs);
+ if (overrideDefaultPath) {
+ newResourceReferencesList.add(currentReference);
+ }
+
+ ResourceReference[] newResourceReferences = newResourceReferencesList.toArray(new ResourceReference[0]);
+ if (fileLocation instanceof IFile) {
+ getReferenceList().setAllResources((IFile) fileLocation, newResourceReferences);
+ } else if (fileLocation instanceof IPath) {
+ getReferenceList().setAllResources((IPath) fileLocation, newResourceReferences);
+ }
+ }
+
+ private int getScopeComboValue() {
+ return scopeValues[scopeCombo.getSelectionIndex()];
+ }
+
+ private void setScopeComboValue(int value) {
+ int i = 0;
+ for (int scopeValue : scopeValues) {
+ if (scopeValue == value) {
+ break;
}
+ i++;
}
+ scopeCombo.select(i);
}
-
- public void setFileLocation(Object fileLocation) {
- this.fileLocation = fileLocation;
+
+ private void updateFieldsForOverrideDefaultPath() {
+ for (Control control : new Control[] {pathLabel, pathText, browseButton,
+ scopeLabel, scopeCombo}) {
+ control.setEnabled(overrideDefaultPath);
+ }
+ if (!overrideDefaultPath) {
+ pathText.setText(defaultReference.getLocation());
+ setScopeComboValue(defaultReference.getScope());
+ }
}
- public void modifyText(ModifyEvent e) {
- browseDialogFilterPath = text.getText().trim();
- current.setLocation(browseDialogFilterPath);
- }
-
-}
\ No newline at end of file
+}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/Messages.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/Messages.java 2011-07-04 10:12:01 UTC (rev 32546)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/Messages.java 2011-07-04 10:34:40 UTC (rev 32547)
@@ -68,6 +68,7 @@
public static String VRD_ADD_EL_PREFERENCE;
public static String VRD_ADD_EL_PREFERENCE_MESSAGE;
public static String ADD_GLOBAL_EL_PREFERENCE_MESSAGE;
+ public static String BROWSE_BUTTON_NAME;
public static String VRD_PAGE_DESIGN_OPTIONS_ABOUT;
public static String VRD_ACTUAL_RUN_TIME_FOLDERS_ABOUT;
@@ -100,4 +101,5 @@
public static String INVALID_EL_EXPRESSION;
public static String CANNOT_PARSE_SCOPE_VALUE;
public static String EL_EXPRESSION_ALREADY_EXISTS;
+ public static String OVERRIDE_DEFAULT_FOLDER;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeResourcesDialog.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeResourcesDialog.java 2011-07-04 10:12:01 UTC (rev 32546)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeResourcesDialog.java 2011-07-04 10:34:40 UTC (rev 32547)
@@ -14,6 +14,7 @@
import java.net.URL;
import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.resource.ImageDescriptor;
@@ -31,6 +32,7 @@
import org.eclipse.swt.widgets.TabItem;
import org.jboss.tools.common.model.ui.ModelUIImages;
import org.jboss.tools.common.model.ui.action.CommandBar;
+import org.jboss.tools.common.resref.core.ResourceReference;
public class VpeResourcesDialog extends TitleAreaDialog {
@@ -46,24 +48,22 @@
private final int DIALOG_HEIGHT = 300;
- public VpeResourcesDialog(Shell parentShell, Object fileLocation) {
+ public VpeResourcesDialog(Shell parentShell, Object fileLocation,
+ ResourceReference defaultAbsReference, ResourceReference defaultRelReference) {
super(parentShell);
setHelpAvailable(false);
+
this.fileLocation = fileLocation;
- init(fileLocation);
- }
-
- private void init(Object fileLocation) {
absFolder = new AbsoluteFolderReferenceComposite();
relFolder = new RelativeFolderReferenceComposite();
css = new CssReferencesComposite();
el = new ElVariablesComposite();
tld = new TaglibReferencesComposite();
css.setObject(fileLocation);
- el.setObject(fileLocation);
- tld.setObject(fileLocation);
- absFolder.setObject(fileLocation);
- relFolder.setObject(fileLocation);
+ el.setObject(fileLocation);
+ tld.setObject(fileLocation);
+ absFolder.setObject(fileLocation, defaultAbsReference);
+ relFolder.setObject(fileLocation, defaultRelReference);
}
@Override
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/messages.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/messages.properties 2011-07-04 10:12:01 UTC (rev 32546)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/messages.properties 2011-07-04 10:34:40 UTC (rev 32547)
@@ -51,6 +51,7 @@
VRD_ADD_EL_PREFERENCE=Add EL Reference
VRD_ADD_EL_PREFERENCE_MESSAGE=Add El variable, which will be substituted in a visual part for generating a preview
ADD_GLOBAL_EL_PREFERENCE_MESSAGE=Add global El variable, which will be substituted in a visual part for generating a preview
+BROWSE_BUTTON_NAME=&Browse...
GLOBAL_EL_WIZARD_PAGE_NAME=Global EL Page
EL_WIZARD_PAGE_NAME=EL Page
EL_NAME=El Name*
@@ -70,4 +71,5 @@
# CSS Validation
CSS_FILE_DOES_NOT_EXIST=CSS file does not exist.
-CSS_FILE_PATH_SHOULD_BE_SET=CSS file path should be set.
\ No newline at end of file
+CSS_FILE_PATH_SHOULD_BE_SET=CSS file path should be set.
+OVERRIDE_DEFAULT_FOLDER=Override default folder
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/dialog/VpeResourcesDialogTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/dialog/VpeResourcesDialogTest.java 2011-07-04 10:12:01 UTC (rev 32546)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/dialog/VpeResourcesDialogTest.java 2011-07-04 10:34:40 UTC (rev 32547)
@@ -12,8 +12,10 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.jface.window.Window;
import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.common.resref.core.ResourceReference;
import org.jboss.tools.vpe.base.test.TestUtil;
import org.jboss.tools.vpe.base.test.VpeTest;
+import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
import org.jboss.tools.vpe.resref.core.VpeResourcesDialog;
import org.jboss.tools.vpe.ui.test.VpeUiTests;
@@ -33,7 +35,9 @@
+ "; projectName = " + VpeUiTests.IMPORT_PROJECT_NAME, file); //$NON-NLS-1$
VpeResourcesDialog dialog = new VpeResourcesDialog(PlatformUI
- .getWorkbench().getDisplay().getActiveShell(), file);
+ .getWorkbench().getDisplay().getActiveShell(), file,
+ new ResourceReference("", ResourceReference.PROJECT_SCOPE),
+ new ResourceReference("", ResourceReference.FOLDER_SCOPE));
dialog.setBlockOnOpen(false);
int code = dialog.open();
13 years, 5 months
JBoss Tools SVN: r32546 - in trunk/forge: tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-07-04 06:12:01 -0400 (Mon, 04 Jul 2011)
New Revision: 32546
Modified:
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeEmbeddedRuntime.java
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeExternalRuntime.java
trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeRuntime.java
trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeEmbeddedRuntimeTest.java
trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeExternalRuntimeTest.java
Log:
add getType() method to ForgeRuntime
Modified: trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeEmbeddedRuntime.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeEmbeddedRuntime.java 2011-07-04 07:16:04 UTC (rev 32545)
+++ trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeEmbeddedRuntime.java 2011-07-04 10:12:01 UTC (rev 32546)
@@ -27,5 +27,10 @@
}
return result;
}
+
+ @Override
+ public String getType() {
+ return "embedded";
+ }
}
Modified: trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeExternalRuntime.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeExternalRuntime.java 2011-07-04 07:16:04 UTC (rev 32545)
+++ trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeExternalRuntime.java 2011-07-04 10:12:01 UTC (rev 32546)
@@ -18,5 +18,10 @@
public String getLocation() {
return location;
}
+
+ @Override
+ public String getType() {
+ return "external";
+ }
}
Modified: 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 2011-07-04 07:16:04 UTC (rev 32545)
+++ trunk/forge/plugins/org.jboss.tools.forge.core/src/org/jboss/tools/forge/core/process/ForgeRuntime.java 2011-07-04 10:12:01 UTC (rev 32546)
@@ -4,5 +4,6 @@
String getName();
String getLocation();
+ String getType();
}
Modified: trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeEmbeddedRuntimeTest.java
===================================================================
--- trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeEmbeddedRuntimeTest.java 2011-07-04 07:16:04 UTC (rev 32545)
+++ trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeEmbeddedRuntimeTest.java 2011-07-04 10:12:01 UTC (rev 32546)
@@ -11,26 +11,24 @@
public class ForgeEmbeddedRuntimeTest {
- private String name = null;
private String location = null;
@Before
public void setUp() throws Exception {
- name = "embedded";
location = FileLocator.getBundleFile(Platform.getBundle("org.jboss.tools.forge.runtime")).getAbsolutePath();
}
@After
public void tearDown() {
- name = null;
location = null;
}
@Test
public void testForgeEmbeddedRuntime() {
assertNotNull(ForgeEmbeddedRuntime.INSTANCE);
- assertEquals(name, ForgeEmbeddedRuntime.INSTANCE.getName());
+ assertEquals("embedded", ForgeEmbeddedRuntime.INSTANCE.getName());
assertEquals(location, ForgeEmbeddedRuntime.INSTANCE.getLocation());
+ assertEquals("embedded", ForgeEmbeddedRuntime.INSTANCE.getType());
}
}
Modified: trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeExternalRuntimeTest.java
===================================================================
--- trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeExternalRuntimeTest.java 2011-07-04 07:16:04 UTC (rev 32545)
+++ trunk/forge/tests/org.jboss.tools.forge.core.test/src/org/jboss/tools/forge/core/process/ForgeExternalRuntimeTest.java 2011-07-04 10:12:01 UTC (rev 32546)
@@ -11,6 +11,7 @@
ForgeExternalRuntime runtime = new ForgeExternalRuntime("foo", "bar");
assertEquals("foo", runtime.getName());
assertEquals("bar", runtime.getLocation());
+ assertEquals("external", runtime.getType());
}
}
13 years, 5 months
JBoss Tools SVN: r32545 - trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2011-07-04 03:16:04 -0400 (Mon, 04 Jul 2011)
New Revision: 32545
Modified:
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BPMNResourcesChoicePage.java
Log:
JBIDE-8288: BPMN to jBPM export broken - NPE
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BPMNResourcesChoicePage.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BPMNResourcesChoicePage.java 2011-07-04 06:55:22 UTC (rev 32544)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/BPMNResourcesChoicePage.java 2011-07-04 07:16:04 UTC (rev 32545)
@@ -91,7 +91,7 @@
return currentSelection;
}
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public boolean checkSelectedResources(ISelection selectedResources) {
boolean res = true;
if (selectedResources instanceof IStructuredSelection
@@ -100,8 +100,7 @@
for (Iterator it = ss.iterator(); it.hasNext();) {
Object o = it.next();
if (o instanceof IFile) {
- if (!((IFile) o).getFileExtension()
- .equalsIgnoreCase("bpmn")) {
+ if (!"bpmn".equalsIgnoreCase(((IFile) o).getFileExtension())) {
res = false;
break;
}
@@ -125,7 +124,7 @@
boolean res = false;
if (element instanceof IFile) {
IFile file = (IFile) element;
- if (file.getFileExtension().equalsIgnoreCase(BPMN_FILE_EXT)) {
+ if (BPMN_FILE_EXT.equalsIgnoreCase(file.getFileExtension())) {
res = file.getProject().isAccessible();
}
}
@@ -144,8 +143,7 @@
IResource[] resources = container.members();
for (int i = 0; i < resources.length; i++) {
if (resources[i] instanceof IFile
- && ((IFile) resources[i]).getFileExtension()
- .equalsIgnoreCase(BPMN_FILE_EXT)) {
+ && BPMN_FILE_EXT.equalsIgnoreCase(((IFile) resources[i]).getFileExtension())) {
res = true;
break;
}
13 years, 5 months
JBoss Tools SVN: r32544 - trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2011-07-04 02:55:22 -0400 (Mon, 04 Jul 2011)
New Revision: 32544
Modified:
trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/GeneratedFileLocationPage.java
Log:
JBIDE-8720: fix the NPE error when no export folder selected
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/GeneratedFileLocationPage.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/GeneratedFileLocationPage.java 2011-07-02 02:04:40 UTC (rev 32543)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.convert/src/org/jboss/tools/jbpm/convert/bpmnto/wizard/GeneratedFileLocationPage.java 2011-07-04 06:55:22 UTC (rev 32544)
@@ -72,8 +72,7 @@
public void addOtherAreas(Composite composite) {
button = new Button(composite, SWT.CHECK | SWT.NONE);
- button
- .setText(B2JMessages.Bpmn_GeneratedFile_Location_WizardPage_CheckBox);
+ button.setText(B2JMessages.Bpmn_GeneratedFile_Location_WizardPage_CheckBox);
button.setFont(composite.getFont());
button.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent arg0) {
@@ -105,7 +104,8 @@
}
public boolean isPageComplete() {
- if (viewer == null || viewer.getSelection() == null) {
+ if (viewer == null || viewer.getSelection() == null
+ || viewer.getSelection().isEmpty()) {
return false;
}
return true;
13 years, 5 months
JBoss Tools SVN: r32543 - trunk/download.jboss.org/jbosstools/examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-07-01 22:04:40 -0400 (Fri, 01 Jul 2011)
New Revision: 32543
Modified:
trunk/download.jboss.org/jbosstools/examples/project-examples-community-3...
Log:
JBIDE-9221 booking3-mavenized is incorrectly imported
Modified: trunk/download.jboss.org/jbosstools/examples/project-examples-community-3...
===================================================================
--- trunk/download.jboss.org/jbosstools/examples/project-examples-community-3... 2011-07-01 23:17:30 UTC (rev 32542)
+++ trunk/download.jboss.org/jbosstools/examples/project-examples-community-3... 2011-07-02 02:04:40 UTC (rev 32543)
@@ -192,12 +192,12 @@
<fix type="plugin">
<property name="id">org.maven.ide.eclipse</property>
<property name="versions">0.9.9, 0.12.9</property>
- <property name="description">This project example requires m2eclipse <= 0.12.x. You can install it using the following update sites: http://m2eclipse.sonatype.org/sites/m2e and http://m2eclipse.sonatype.org/sites/m2e-extras</property>
+ <property name="description">This project example requires m2eclipse <= 0.12.x. You can install it using the following update sites: http://m2eclipse.sonatype.org/sites/m2e and http://m2eclipse.sonatype.org/sites/m2e-extras</property>
</fix>
<fix type="plugin">
<property name="id">org.maven.ide.eclipse.wtp</property>
<property name="versions">0.9.9, 0.12.9</property>
- <property name="description">This project example requires m2eclipse <= 0.12.x. You can install it using the following update sites: http://m2eclipse.sonatype.org/sites/m2e and http://m2eclipse.sonatype.org/sites/m2e-extras</property>
+ <property name="description">This project example requires m2eclipse <= 0.12.x. You can install it using the following update sites: http://m2eclipse.sonatype.org/sites/m2e and http://m2eclipse.sonatype.org/sites/m2e-extras</property>
</fix>
<fix type="plugin">
<property name="id">org.testng.eclipse</property>
@@ -278,12 +278,12 @@
<fix type="plugin">
<property name="id">org.maven.ide.eclipse</property>
<property name="versions">0.9.9, 0.12.9</property>
- <property name="description">This project example requires m2eclipse <= 0.12.x. You can install it using the following update sites: http://m2eclipse.sonatype.org/sites/m2e and http://m2eclipse.sonatype.org/sites/m2e-extras</property>
+ <property name="description">This project example requires m2eclipse <= 0.12.x. You can install it using the following update sites: http://m2eclipse.sonatype.org/sites/m2e and http://m2eclipse.sonatype.org/sites/m2e-extras</property>
</fix>
<fix type="plugin">
<property name="id">org.maven.ide.eclipse.wtp</property>
<property name="versions">0.9.9, 0.12.9</property>
- <property name="description">This project example requires m2eclipse <= 0.12.x. You can install it using the following update sites: http://m2eclipse.sonatype.org/sites/m2e and http://m2eclipse.sonatype.org/sites/m2e-extras</property>
+ <property name="description">This project example requires m2eclipse <= 0.12.x. You can install it using the following update sites: http://m2eclipse.sonatype.org/sites/m2e and http://m2eclipse.sonatype.org/sites/m2e-extras</property>
</fix>
<fix type="plugin">
<property name="id">org.testng.eclipse</property>
@@ -360,12 +360,12 @@
<fix type="plugin">
<property name="id">org.maven.ide.eclipse</property>
<property name="versions">0.9.9, 0.12.9</property>
- <property name="description">This project example requires m2eclipse <= 0.12.x. You can install it using the following update sites: http://m2eclipse.sonatype.org/sites/m2e and http://m2eclipse.sonatype.org/sites/m2e-extras</property>
+ <property name="description">This project example requires m2eclipse <= 0.12.x. You can install it using the following update sites: http://m2eclipse.sonatype.org/sites/m2e and http://m2eclipse.sonatype.org/sites/m2e-extras</property>
</fix>
<fix type="plugin">
<property name="id">org.maven.ide.eclipse.wtp</property>
<property name="versions">0.9.9, 0.12.9</property>
- <property name="description">This project example requires m2eclipse <= 0.12.x. You can install it using the following update sites: http://m2eclipse.sonatype.org/sites/m2e and http://m2eclipse.sonatype.org/sites/m2e-extras</property>
+ <property name="description">This project example requires m2eclipse <= 0.12.x. You can install it using the following update sites: http://m2eclipse.sonatype.org/sites/m2e and http://m2eclipse.sonatype.org/sites/m2e-extras</property>
</fix>
</fixes>
</project>
13 years, 6 months
JBoss Tools SVN: r32542 - trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-07-01 19:17:30 -0400 (Fri, 01 Jul 2011)
New Revision: 32542
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/WebContentTest.java
Log:
https://issues.jboss.org/browse/JBIDE-9286
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/WebContentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/WebContentTest.java 2011-07-01 22:51:01 UTC (rev 32541)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/WebContentTest.java 2011-07-01 23:17:30 UTC (rev 32542)
@@ -55,9 +55,9 @@
}
public void testWebContentValidation() throws CoreException {
- IFile file = project.getFile("WebContent/input.xhtml");
+ IFile file = project.getFile("WebContent/inputname.xhtml");
AbstractResourceMarkerTest.assertMarkerIsCreated(file, MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME, "broken"), 6);
- file = project.getFile("TestWebContent/input.xhtml");
+ file = project.getFile("TestWebContent/inputname.xhtml");
AbstractResourceMarkerTest.assertMarkerIsCreated(file, MessageFormat.format(ELValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME, "broken"), 6);
}
}
\ No newline at end of file
13 years, 6 months
JBoss Tools SVN: r32541 - trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/international/el.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-07-01 18:51:01 -0400 (Fri, 01 Jul 2011)
New Revision: 32541
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/international/el/CDIInternationalMessagesELResolver.java
Log:
JBIDE-9087
https://issues.jboss.org/browse/JBIDE-9087
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/international/el/CDIInternationalMessagesELResolver.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/international/el/CDIInternationalMessagesELResolver.java 2011-07-01 22:44:31 UTC (rev 32540)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/international/el/CDIInternationalMessagesELResolver.java 2011-07-01 22:51:01 UTC (rev 32541)
@@ -799,7 +799,7 @@
objects.add(o);
}
- if (o.hasChildren()) {
+ if (o.getFileType() > XModelObject.FILE && o.hasChildren()) {
XModelObject[] children = o.getChildren();
if (children != null) {
for (XModelObject c : children) {
13 years, 6 months