JBoss Tools SVN: r12063 - trunk/i18n.
by jbosstools-commits@lists.jboss.org
Author: sflanigan
Date: 2008-11-26 01:33:55 -0500 (Wed, 26 Nov 2008)
New Revision: 12063
Modified:
trunk/i18n/build.xml
trunk/i18n/feature.xsl
trunk/i18n/i18n.properties
Log:
Tidied up i18n.properties and handling of PLUGIN_VERSION/FEATURE_VERSION. Changed plugins task so that it can generate an empty plugin even if there are no files to include (so that features won't reference non-existent plugins).
Modified: trunk/i18n/build.xml
===================================================================
--- trunk/i18n/build.xml 2008-11-26 05:05:39 UTC (rev 12062)
+++ trunk/i18n/build.xml 2008-11-26 06:33:55 UTC (rev 12063)
@@ -220,26 +220,32 @@
<delete dir="${jardir}/plugins" />
<mkdir dir="${jardir}/plugins" />
<!-- for each plugin directory -->
- <for param="plugindir">
+ <for param="pluginsrcdir">
<path>
- <dirset dir="${propdir}" includes="*/*" />
+ <dirset dir="${jbt.srcdir}" includes="*/plugins/*" />
</path>
<sequential>
- <echo message="@{plugindir}" />
+ <echo message="@{pluginsrcdir}" />
<!-- TODO avoid property override if possible -->
<!-- work out the plugin ID -->
+ <var name="module" unset="true" />
+ <propertyregex override="true" property="module"
+ input="@{pluginsrcdir}"
+ regexp="^${jbt.srcdir}[/\\]([^/\\]+)[/\\].*"
+ select="\1" />
+ <checkprop name="module"/>
<var name="plugin" unset="true" />
<propertyregex override="true" property="plugin"
- input="@{plugindir}"
- regexp="^${propdir}[/\\][^/\\]+[/\\]([^/\\]+).*"
+ input="@{pluginsrcdir}"
+ regexp="^${jbt.srcdir}[/\\][^/\\]+[/\\]plugins[/\\]([^/\\]+).*"
select="\1" />
<checkprop name="plugin"/>
- <echo level="verbose" message="@{plugindir} contains props for plugin ${plugin}"/>
+ <echo level="verbose" message="@{pluginsrcdir} contains source for plugin ${plugin} in module ${module}"/>
<!-- making sure these values are available to -plugin -->
<checkprop name="PLUGIN_VERSION"/>
<checkprop name="PLUGIN_VENDOR"/>
- <var name="plugindir" value="@{plugindir}" />
+ <var name="plugindir" value="${propdir}/${module}/${plugin}" />
<foreachlocale task="-plugin"/>
</sequential>
</for>
@@ -247,14 +253,14 @@
<target name="-plugin" >
<!-- Jars up one fragment plugin. -->
+ <echo message="${plugindir}"/>
<jar
destfile="${jardir}/plugins/${plugin}.nl-${locale}_${PLUGIN_VERSION}.jar"
filesonly="true"
update="false"
whenmanifestonly="create"
- basedir="${plugindir}"
- duplicate="fail"
- includes="**/*_${locale}.properties">
+ duplicate="fail">
+ <fileset dir="${plugindir}" includes="**/*_${locale}.properties" erroronmissingdir="false"/>
<manifest>
<attribute name="Manifest-Version"
value="1.0"/>
@@ -346,13 +352,13 @@
<!-- create langpack feature element for site.xml -->
<!-- ugly -->
<echo append="true" file="${temp.file.sitefeatures}"
- message="<feature url="features/${feature}.nl-${locale}_${PLUGIN_VERSION}.jar"
- id="${feature}.nl-${locale}" version="${PLUGIN_VERSION}">
+ message="<feature url="features/${feature}.nl-${locale}_${FEATURE_VERSION}.jar"
+ id="${feature}.nl-${locale}" version="${FEATURE_VERSION}">
<category name="${locale}"/>
</feature>" />
<!-- demunged, that looks like:
- <feature url="features/${feature}.nl-${locale}_${PLUGIN_VERSION}.jar"
- id="${feature}.nl-${locale}" version="${PLUGIN_VERSION}">
+ <feature url="features/${feature}.nl-${locale}_${FEATURE_VERSION}.jar"
+ id="${feature}.nl-${locale}" version="${FEATURE_VERSION}">
<category name="${locale}"/>
</feature>
-->
@@ -360,11 +366,12 @@
<xslt
style="feature.xsl"
in="${featurexml}"
- out="${propdir}/features/${feature}.nl-${locale}_${PLUGIN_VERSION}/feature.xml"
+ out="${propdir}/features/${feature}.nl-${locale}_${FEATURE_VERSION}/feature.xml"
>
- <param name="feature" expression="${feature}" />
<param name="locale" expression="${locale}" />
<param name="localename" expression="${localename}" />
+ <param name="feature" expression="${feature}" />
+ <param name="featureversion" expression="${FEATURE_VERSION}" />
<param name="pluginversion" expression="${PLUGIN_VERSION}" />
</xslt>
Modified: trunk/i18n/feature.xsl
===================================================================
--- trunk/i18n/feature.xsl 2008-11-26 05:05:39 UTC (rev 12062)
+++ trunk/i18n/feature.xsl 2008-11-26 06:33:55 UTC (rev 12063)
@@ -5,8 +5,9 @@
<xsl:param name="feature">FEATURE</xsl:param>
<xsl:param name="locale">LOCALE</xsl:param>
- <xsl:param name="localename">LOCNAME</xsl:param>
- <xsl:param name="pluginversion">VERSION</xsl:param>
+ <xsl:param name="localename">LOCALE_NAME</xsl:param>
+ <xsl:param name="featureversion">FEATURE_VERSION</xsl:param>
+ <xsl:param name="pluginversion">PLUGIN_VERSION</xsl:param>
<xsl:template match="/feature">
<feature provider-name="%providerName">
@@ -22,7 +23,7 @@
<xsl:attribute name="label">JBoss Tools Language Pack for <xsl:value-of select="@label" /> in <xsl:value-of select="$localename" />
</xsl:attribute>
<xsl:attribute name="version">
- <xsl:value-of select="$pluginversion" />
+ <xsl:value-of select="$featureversion" />
</xsl:attribute>
<copyright>
%copyright
Modified: trunk/i18n/i18n.properties
===================================================================
--- trunk/i18n/i18n.properties 2008-11-26 05:05:39 UTC (rev 12062)
+++ trunk/i18n/i18n.properties 2008-11-26 06:33:55 UTC (rev 12063)
@@ -2,7 +2,7 @@
# (assuming their po directories exist).
# Please separate locale IDs with commas (",") and no spaces.
#
-#locales: en,qps,zh_CN,pt_BR,es_ES,fr_FR,de_DE
+#locales: en,en_AA,qps,zh_CN,pt_BR,es_ES,fr_FR,de_DE
locales: en,en_AA,qps
#we don't care about .properties/.meta in these places:
@@ -27,11 +27,8 @@
BUILD_NUMBER=0
PLUGIN_VERSION=0.1.${BUILD_NUMBER}
-LANGPACK_VERSION=${PLUGIN_VERSION}
+FEATURE_VERSION=${PLUGIN_VERSION}
PLUGIN_VENDOR=JBoss
-WORK=${basedir}
-FRAGDIR=${WORK}/prop
-JARDIR=${WORK}/plugins
NAME_en=English
NAME_qps=Pseudo Locale (qps)
15 years, 5 months
JBoss Tools SVN: r12062 - trunk/i18n.
by jbosstools-commits@lists.jboss.org
Author: sflanigan
Date: 2008-11-26 00:05:39 -0500 (Wed, 26 Nov 2008)
New Revision: 12062
Modified:
trunk/i18n/build.xml
Log:
Added optional task to run native msgmerge (from gettext-tools) against po/pot files.
Modified: trunk/i18n/build.xml
===================================================================
--- trunk/i18n/build.xml 2008-11-26 03:43:01 UTC (rev 12061)
+++ trunk/i18n/build.xml 2008-11-26 05:05:39 UTC (rev 12062)
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
-<project name="org.jboss.tools.translations" default="debug" basedir="." xmlns:artifact="urn:maven-artifact-ant">
+<project name="JBoss Tools i18n" default="debug" basedir="." xmlns:artifact="urn:maven-artifact-ant">
<path id="jbtdir" path=".." />
<property name="jbt.srcdir" value="${toString:jbtdir}" />
@@ -140,6 +140,23 @@
<pot2en srcDir="po" dstDir="target/po" locale="en_AA" pseudo="true" />
</target>
+ <target name="msgmerge">
+ <apply executable="msgmerge" failonerror="true" failifexecutionfails="true" dest="po">
+ <arg value="--quiet"/>
+ <arg value="--update"/>
+ <targetfile />
+ <srcfile />
+
+ <fileset dir="po" includes="**/*.po" />
+<!-- Only for testing:
+ <fileset dir="target/po" includes="**/*.po" />
+-->
+ <!-- Turns module/org.jboss.package-org.jboss.Messages/*.po into
+ module/org.jboss.package-org.jboss.Messages/org.jboss.Messages.pot -->
+ <mapper type="regexp" from="^(.*[/\\][^-]+-([^/\\]+))[/\\][^/\\]+[.]po$$" to="\1/\2.pot" />
+ </apply>
+ </target>
+
<target name="po2prop" depends="init" description="Generate Java properties files from translated PO files">
<delete dir="${propdir}" />
<mkdir dir="${propdir}" />
@@ -393,10 +410,12 @@
</exec>
</target>
- <target name="most" depends="clean, prop2pot, en, qps, en_AA, po2prop, plugins, features"
+ <target name="po" depends="en, qps, en_AA"/>
+
+ <target name="most" depends="clean, prop2pot, po, po2prop, plugins, features"
description="Generates langpacks and metadata" />
- <target name="all" depends="clean, prop2pot, en, qps, en_AA, po2prop, plugins, features, p2"
+ <target name="all" depends="clean, prop2pot, po, po2prop, plugins, features, p2"
description="Runs all targets in an appropriate order"/>
15 years, 5 months
JBoss Tools SVN: r12061 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-11-25 22:43:01 -0500 (Tue, 25 Nov 2008)
New Revision: 12061
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java
Log:
JBIDE-2627 - allowing any value set in the editor to be automatically added to the deployment scanner before each publish. Also, separated out into metadata the default deploy location, giving each server its own folder.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java 2008-11-26 02:58:48 UTC (rev 12060)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java 2008-11-26 03:43:01 UTC (rev 12061)
@@ -337,12 +337,15 @@
oldDir = deployText.getText();
oldTemp = tempDeployText.getText();
+ String type;
+
if( newSelection == metadataRadio ) {
newDir = IJBossServerConstants.PLUGIN_LOCATION.append(name).
append(IJBossServerConstants.DEPLOY).makeAbsolute().toString();
newTemp = IJBossServerConstants.PLUGIN_LOCATION.append(name).
append(IJBossServerConstants.TEMP_DEPLOY).makeAbsolute().toString();
+ type = IDeployableServer.DEPLOY_METADATA;
new File(newDir).mkdirs();
new File(newTemp).mkdirs();
} else if( newSelection == serverRadio ) {
@@ -355,9 +358,11 @@
newTemp = new Path(IJBossServerConstants.SERVER).append(config)
.append(IJBossServerConstants.TMP)
.append(IJBossServerConstants.JBOSSTOOLS_TMP).makeRelative().toString();
+ type = IDeployableServer.DEPLOY_SERVER;
} else {
newDir = lastCustomDeploy;
newTemp = lastCustomTemp;
+ type = IDeployableServer.DEPLOY_CUSTOM;
}
newDir = newDir == null ? oldDir : newDir;
@@ -372,6 +377,8 @@
helper.setAttribute(IDeployableServer.TEMP_DEPLOY_DIRECTORY, newTemp);
tempDeployText.setText(newTemp);
tempDeployText.addModifyListener(tempDeployListener);
+
+ helper.setAttribute(IDeployableServer.DEPLOY_DIRECTORY_TYPE, type);
getSaveStatus();
}
public void undo() {
@@ -388,6 +395,11 @@
oldSelection.removeSelectionListener(radioListener);
oldSelection.setSelection(true);
oldSelection.addSelectionListener(radioListener);
+
+ String oldType = oldSelection == customRadio ? IDeployableServer.DEPLOY_CUSTOM :
+ oldSelection == serverRadio ? IDeployableServer.DEPLOY_SERVER :
+ IDeployableServer.DEPLOY_METADATA;
+ helper.setAttribute(IDeployableServer.DEPLOY_DIRECTORY_TYPE, oldType);
getSaveStatus();
}
}
15 years, 5 months
JBoss Tools SVN: r12060 - trunk/jmx/tests/org.jboss.tools.jmx.ui.test.interactive/src/org/jboss/tools/jmx/ui/test/interactive.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-11-25 21:58:48 -0500 (Tue, 25 Nov 2008)
New Revision: 12060
Modified:
trunk/jmx/tests/org.jboss.tools.jmx.ui.test.interactive/src/org/jboss/tools/jmx/ui/test/interactive/Activator.java
Log:
JBIDE-3281 - there don't seem to actually be any tests here
Modified: trunk/jmx/tests/org.jboss.tools.jmx.ui.test.interactive/src/org/jboss/tools/jmx/ui/test/interactive/Activator.java
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.ui.test.interactive/src/org/jboss/tools/jmx/ui/test/interactive/Activator.java 2008-11-26 02:51:18 UTC (rev 12059)
+++ trunk/jmx/tests/org.jboss.tools.jmx.ui.test.interactive/src/org/jboss/tools/jmx/ui/test/interactive/Activator.java 2008-11-26 02:58:48 UTC (rev 12060)
@@ -32,7 +32,7 @@
// The shared instance
private static Activator plugin;
- private JMXConnectorServer cs;
+ //private JMXConnectorServer cs;
/**
* The constructor
@@ -44,53 +44,53 @@
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
- MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
- mbs.registerMBean(new ArrayType(), ObjectName
- .getInstance("org.jboss.tools.jmx.test:type=ArrayType")); //$NON-NLS-1$
- mbs.registerMBean(new WritableAttributes(), ObjectName
- .getInstance("org.jboss.tools.jmx.test:type=WritableAttributes")); //$NON-NLS-1$
- mbs.registerMBean(new ComplexType(), ObjectName
- .getInstance("org.jboss.tools.jmx.test:type=ComplexType")); //$NON-NLS-1$
- mbs.registerMBean(new OperationResults(), ObjectName
- .getInstance("org.jboss.tools.jmx.test:type=OperationResults")); //$NON-NLS-1$
- mbs.registerMBean(new Registration(), ObjectName
- .getInstance("org.jboss.tools.jmx.test:type=Registration")); //$NON-NLS-1$
- mbs.registerMBean(new CustomizedAttributes(), ObjectName
- .getInstance("org.jboss.tools.jmx.test:type=CustomizedAttributes")); //$NON-NLS-1$
- mbs.registerMBean(new NotifEmitter(), ObjectName
- .getInstance("org.jboss.tools.jmx.test:type=NotifEmitter")); //$NON-NLS-1$
- try {
- System.setProperty("java.rmi.server.randomIDs", "true"); //$NON-NLS-1$ //$NON-NLS-2$
- LocateRegistry.createRegistry(3000);
- JMXServiceURL url = new JMXServiceURL(
- "service:jmx:rmi:///jndi/rmi://:3000/jmxrmi"); //$NON-NLS-1$
- cs = JMXConnectorServerFactory
- .newJMXConnectorServer(url, null, mbs);
- cs.start();
- } catch (Exception e) {
- e.printStackTrace();
- }
+// MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
+// mbs.registerMBean(new ArrayType(), ObjectName
+// .getInstance("org.jboss.tools.jmx.test:type=ArrayType")); //$NON-NLS-1$
+// mbs.registerMBean(new WritableAttributes(), ObjectName
+// .getInstance("org.jboss.tools.jmx.test:type=WritableAttributes")); //$NON-NLS-1$
+// mbs.registerMBean(new ComplexType(), ObjectName
+// .getInstance("org.jboss.tools.jmx.test:type=ComplexType")); //$NON-NLS-1$
+// mbs.registerMBean(new OperationResults(), ObjectName
+// .getInstance("org.jboss.tools.jmx.test:type=OperationResults")); //$NON-NLS-1$
+// mbs.registerMBean(new Registration(), ObjectName
+// .getInstance("org.jboss.tools.jmx.test:type=Registration")); //$NON-NLS-1$
+// mbs.registerMBean(new CustomizedAttributes(), ObjectName
+// .getInstance("org.jboss.tools.jmx.test:type=CustomizedAttributes")); //$NON-NLS-1$
+// mbs.registerMBean(new NotifEmitter(), ObjectName
+// .getInstance("org.jboss.tools.jmx.test:type=NotifEmitter")); //$NON-NLS-1$
+// try {
+// System.setProperty("java.rmi.server.randomIDs", "true"); //$NON-NLS-1$ //$NON-NLS-2$
+// LocateRegistry.createRegistry(3000);
+// JMXServiceURL url = new JMXServiceURL(
+// "service:jmx:rmi:///jndi/rmi://:3000/jmxrmi"); //$NON-NLS-1$
+// cs = JMXConnectorServerFactory
+// .newJMXConnectorServer(url, null, mbs);
+// cs.start();
+// } catch (Exception e) {
+// e.printStackTrace();
+// }
}
@Override
public void stop(BundleContext context) throws Exception {
plugin = null;
- MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
- mbs.unregisterMBean(ObjectName
- .getInstance("org.jboss.tools.jmx.test:type=ArrayType")); //$NON-NLS-1$
- mbs.unregisterMBean(ObjectName
- .getInstance("org.jboss.tools.jmx.test:type=WritableAttributes")); //$NON-NLS-1$
- mbs.unregisterMBean(ObjectName
- .getInstance("org.jboss.tools.jmx.test:type=ComplexType")); //$NON-NLS-1$
- mbs.unregisterMBean(ObjectName
- .getInstance("org.jboss.tools.jmx.test:type=OperationResults")); //$NON-NLS-1$
- mbs.unregisterMBean(ObjectName
- .getInstance("org.jboss.tools.jmx.test:type=Registration")); //$NON-NLS-1$
- mbs.unregisterMBean(ObjectName
- .getInstance("org.jboss.tools.jmx.test:type=CustomizedAttributes")); //$NON-NLS-1$
- mbs.unregisterMBean(ObjectName
- .getInstance("org.jboss.tools.jmx.test:type=NotifEmitter")); //$NON-NLS-1$
- cs.stop();
+// MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
+// mbs.unregisterMBean(ObjectName
+// .getInstance("org.jboss.tools.jmx.test:type=ArrayType")); //$NON-NLS-1$
+// mbs.unregisterMBean(ObjectName
+// .getInstance("org.jboss.tools.jmx.test:type=WritableAttributes")); //$NON-NLS-1$
+// mbs.unregisterMBean(ObjectName
+// .getInstance("org.jboss.tools.jmx.test:type=ComplexType")); //$NON-NLS-1$
+// mbs.unregisterMBean(ObjectName
+// .getInstance("org.jboss.tools.jmx.test:type=OperationResults")); //$NON-NLS-1$
+// mbs.unregisterMBean(ObjectName
+// .getInstance("org.jboss.tools.jmx.test:type=Registration")); //$NON-NLS-1$
+// mbs.unregisterMBean(ObjectName
+// .getInstance("org.jboss.tools.jmx.test:type=CustomizedAttributes")); //$NON-NLS-1$
+// mbs.unregisterMBean(ObjectName
+// .getInstance("org.jboss.tools.jmx.test:type=NotifEmitter")); //$NON-NLS-1$
+// cs.stop();
super.stop(context);
}
15 years, 5 months
JBoss Tools SVN: r12059 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-11-25 21:51:18 -0500 (Tue, 25 Nov 2008)
New Revision: 12059
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java
Log:
JBIDE-2627 - allowing any value set in the editor to be automatically added to the deployment scanner before each publish. Also, separated out into metadata the default deploy location, giving each server its own folder.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java 2008-11-26 02:45:14 UTC (rev 12058)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java 2008-11-26 02:51:18 UTC (rev 12059)
@@ -174,6 +174,9 @@
tempDeployText.setText(makeRelative(x));
}
});
+
+ deployText.setEnabled(customRadio.getSelection());
+ tempDeployText.setEnabled(customRadio.getSelection());
FormData descriptionLabelData = new FormData();
descriptionLabelData.left = new FormAttachment(0,5);
15 years, 5 months
JBoss Tools SVN: r12058 - in trunk/as/plugins: org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-11-25 21:45:14 -0500 (Tue, 25 Nov 2008)
New Revision: 12058
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/events/ServerLogger.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerConstants.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java
Log:
JBIDE-2627 - allowing any value set in the editor to be automatically added to the deployment scanner before each publish. Also, separated out into metadata the default deploy location, giving each server its own folder.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/events/ServerLogger.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/events/ServerLogger.java 2008-11-26 02:21:52 UTC (rev 12057)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/events/ServerLogger.java 2008-11-26 02:45:14 UTC (rev 12058)
@@ -25,20 +25,16 @@
import java.util.ArrayList;
import java.util.HashMap;
-import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
-public class ServerLogger {
- private static final IPath LOG_LOCATION = JBossServerCorePlugin.getDefault().getStateLocation().append("logs");
+public class ServerLogger implements IJBossServerConstants {
private static ServerLogger instance;
public static ServerLogger getDefault() {
if( instance == null ) {
instance = new ServerLogger();
- if( !LOG_LOCATION.toFile().exists())
- LOG_LOCATION.toFile().mkdirs();
}
return instance;
}
@@ -81,6 +77,10 @@
}
public File getServerLogFile(IServer server) {
- return server == null ? LOG_LOCATION.toFile() : LOG_LOCATION.append(server.getId()).toFile();
+ File f = server == null ? PLUGIN_LOCATION.toFile() :
+ PLUGIN_LOCATION.append(server.getId()).append(LOG).toFile();
+ if( !f.getParentFile().exists() )
+ f.getParentFile().mkdirs();
+ return f;
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServer.java 2008-11-26 02:21:52 UTC (rev 12057)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServer.java 2008-11-26 02:45:14 UTC (rev 12058)
@@ -28,15 +28,23 @@
*
* @author rob.stryker(a)jboss.com
*/
-public interface IDeployableServer {
+public interface IDeployableServer extends IJBossServerConstants {
public static final String DEPLOY_DIRECTORY = "org.jboss.ide.eclipse.as.core.server.deployDirectory";
public static final String TEMP_DEPLOY_DIRECTORY = "org.jboss.ide.eclipse.as.core.server.tempDeployDirectory";
+ public static final String DEPLOY_DIRECTORY_TYPE = "org.jboss.ide.eclipse.as.core.server.deployDirectoryType";
+
+ public static final String DEPLOY_METADATA = "metadata";
+ public static final String DEPLOY_CUSTOM = "custom";
+ public static final String DEPLOY_SERVER = "server";
public String getDeployFolder();
public void setDeployFolder(String folder);
public String getTempDeployFolder();
public void setTempDeployFolder(String folder);
-
+ public String getDeployLocationType();
+ public void setDeployLocationType(String type);
+
+
public String getConfigDirectory();
public ServerAttributeHelper getAttributeHelper();
public IServer getServer();
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerConstants.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerConstants.java 2008-11-26 02:21:52 UTC (rev 12057)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IJBossServerConstants.java 2008-11-26 02:45:14 UTC (rev 12058)
@@ -21,7 +21,9 @@
*/
package org.jboss.ide.eclipse.as.core.server;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
+import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
/**
*
@@ -29,6 +31,11 @@
*
*/
public interface IJBossServerConstants {
+ public static final IPath PLUGIN_LOCATION = JBossServerCorePlugin.getDefault().getStateLocation();
+ public static final String LOG = "log";
+ public static final String TEMP_DEPLOY = "tempDeploy";
+ public static final String JBOSSTOOLS_TMP = "jbosstoolsTemp";
+ public static final String TMP = "tmp";
// Launch configuration constants
public static final String JBOSS_SERVER_HOME_DIR = "jboss.server.home.dir";
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java 2008-11-26 02:21:52 UTC (rev 12057)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java 2008-11-26 02:45:14 UTC (rev 12058)
@@ -122,6 +122,14 @@
setAttribute(TEMP_DEPLOY_DIRECTORY, makeRelative(getRuntime(), new Path(folder)).toString());
}
+ public void setDeployLocationType(String type) {
+ setAttribute(DEPLOY_DIRECTORY_TYPE, type);
+ }
+
+ public String getDeployLocationType() {
+ return getAttribute(DEPLOY_DIRECTORY_TYPE, DEPLOY_CUSTOM);
+ }
+
/*
* (non-Javadoc)
* @see org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer#getAttributeHelper()
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2008-11-26 02:21:52 UTC (rev 12057)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2008-11-26 02:45:14 UTC (rev 12058)
@@ -201,8 +201,12 @@
/* Editor Strings */
+ public static String EditorUseWorkspaceMetadata;
+ public static String EditorUseServersDeployFolder;
+ public static String EditorUseCustomDeployFolder;
public static String EditorSetDeployLabel;
public static String EditorSetTempDeployLabel;
+ public static String EditorSetRadioClicked;
public static String EditorDeployDNE;
public static String EditorTempDeployDNE;
public static String EditorStartupPollerLabel;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2008-11-26 02:21:52 UTC (rev 12057)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2008-11-26 02:45:14 UTC (rev 12058)
@@ -179,8 +179,12 @@
DescriptorXPathMatch=Match
#Editor
+EditorUseWorkspaceMetadata=Use workspace metadata (does not modify JBoss deploy folder)
+EditorUseServersDeployFolder=Use the JBoss deploy folder
+EditorUseCustomDeployFolder=Use a custom deploy folder
EditorSetDeployLabel=Set Deploy Directory
EditorSetTempDeployLabel=Set Temporary Deploy Directory
+EditorSetRadioClicked=Set Deploy Location
EditorDeployDNE=The deploy directory "{0}" does not exist.
EditorTempDeployDNE=The temporary deploy directory "{0}" does not exist.
EditorStartupPollerLabel=Startup Poller
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java 2008-11-26 02:21:52 UTC (rev 12057)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java 2008-11-26 02:45:14 UTC (rev 12058)
@@ -39,6 +39,7 @@
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.DirectoryDialog;
@@ -47,6 +48,7 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.forms.IFormColors;
import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;
@@ -56,8 +58,10 @@
import org.eclipse.wst.server.ui.internal.command.ServerCommand;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.DeployableServer;
+import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
import org.jboss.ide.eclipse.as.ui.Messages;
@@ -69,8 +73,13 @@
public class DeploySection extends ServerEditorSection {
private Text deployText, tempDeployText;
+ private Button metadataRadio, serverRadio, customRadio, currentSelection;
+ private Button deployButton, tempDeployButton;
private ModifyListener deployListener, tempDeployListener;
+ private SelectionListener radioListener;
private ServerAttributeHelper helper;
+
+ private String lastCustomDeploy, lastCustomTemp;
public DeploySection() {
}
@@ -94,18 +103,42 @@
Label descriptionLabel = toolkit.createLabel(composite, Messages.swf_DeploymentDescription);
+ Composite inner = toolkit.createComposite(composite);
+ inner.setLayout(new GridLayout(1, false));
+ metadataRadio = toolkit.createButton(inner, Messages.EditorUseWorkspaceMetadata, SWT.RADIO);
+ serverRadio = toolkit.createButton(inner, Messages.EditorUseServersDeployFolder, SWT.RADIO);
+ customRadio = toolkit.createButton(inner, Messages.EditorUseCustomDeployFolder, SWT.RADIO);
+
+ metadataRadio.setSelection(getDeployType().equals(IDeployableServer.DEPLOY_METADATA));
+ serverRadio.setSelection(getDeployType().equals(IDeployableServer.DEPLOY_SERVER));
+ customRadio.setSelection(getDeployType().equals(IDeployableServer.DEPLOY_CUSTOM));
+
+ radioListener = new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ widgetSelected(e);
+ }
+ public void widgetSelected(SelectionEvent e) {
+ if( e.getSource() == currentSelection )
+ return; // do nothing
+ execute(new RadioClickedCommand((Button)e.getSource(), currentSelection));
+ currentSelection = (Button)e.getSource();
+ } };
+ metadataRadio.addSelectionListener(radioListener);
+ serverRadio.addSelectionListener(radioListener);
+ customRadio.addSelectionListener(radioListener);
+
Label label = toolkit.createLabel(composite, Messages.swf_DeployDirectory);
+ label.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
deployText = toolkit.createText(composite, getDeployDir(), SWT.BORDER);
deployListener = new ModifyListener() {
public void modifyText(ModifyEvent e) {
execute(new SetDeployDirCommand());
- getSaveStatus();
}
};
deployText.addModifyListener(deployListener);
- Button button = toolkit.createButton(composite, Messages.browse, SWT.PUSH);
- button.addSelectionListener(new SelectionListener() {
+ deployButton = toolkit.createButton(composite, Messages.browse, SWT.PUSH);
+ deployButton.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
public void widgetSelected(SelectionEvent e) {
@@ -119,16 +152,17 @@
});
Label tempDeployLabel = toolkit.createLabel(composite, Messages.swf_TempDeployDirectory);
+ tempDeployLabel.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
+
tempDeployText = toolkit.createText(composite, getTempDeployDir(), SWT.BORDER);
tempDeployListener = new ModifyListener() {
public void modifyText(ModifyEvent e) {
execute(new SetTempDeployDirCommand());
- getSaveStatus();
}
};
tempDeployText.addModifyListener(tempDeployListener);
- Button tempDeployButton = toolkit.createButton(composite, Messages.browse, SWT.PUSH);
+ tempDeployButton = toolkit.createButton(composite, Messages.browse, SWT.PUSH);
tempDeployButton.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
}
@@ -141,30 +175,36 @@
}
});
-
FormData descriptionLabelData = new FormData();
descriptionLabelData.left = new FormAttachment(0,5);
descriptionLabelData.top = new FormAttachment(0,5);
descriptionLabel.setLayoutData(descriptionLabelData);
+ FormData radios = new FormData();
+ radios.top = new FormAttachment(descriptionLabel,5);
+ radios.left = new FormAttachment(0,5);
+ radios.right = new FormAttachment(100,-5);
+ inner.setLayoutData(radios);
+
+
// first row
FormData labelData = new FormData();
labelData.left = new FormAttachment(0,5);
labelData.right = new FormAttachment(deployText,-5);
- labelData.top = new FormAttachment(descriptionLabel,5);
+ labelData.top = new FormAttachment(inner,5);
label.setLayoutData(labelData);
FormData textData = new FormData();
- textData.left = new FormAttachment(button, -305);
- textData.top = new FormAttachment(descriptionLabel,5);
- textData.right = new FormAttachment(button, -5);
+ textData.left = new FormAttachment(deployButton, -305);
+ textData.top = new FormAttachment(inner,5);
+ textData.right = new FormAttachment(deployButton, -5);
deployText.setLayoutData(textData);
FormData buttonData = new FormData();
buttonData.right = new FormAttachment(100,-5);
buttonData.left = new FormAttachment(100, -100);
- buttonData.top = new FormAttachment(descriptionLabel,2);
- button.setLayoutData(buttonData);
+ buttonData.top = new FormAttachment(inner,2);
+ deployButton.setLayoutData(buttonData);
// second row
FormData tempLabelData = new FormData();
@@ -189,6 +229,10 @@
section.setClient(composite);
}
+ private String getDeployType() {
+ return helper.getAttribute(IDeployableServer.DEPLOY_DIRECTORY_TYPE, IDeployableServer.DEPLOY_CUSTOM);
+ }
+
private String getDeployDir() {
return helper.getAttribute(IDeployableServer.DEPLOY_DIRECTORY, "");
}
@@ -232,12 +276,15 @@
}
public void execute() {
helper.setAttribute(IDeployableServer.DEPLOY_DIRECTORY, newDir);
+ lastCustomDeploy = newDir;
+ getSaveStatus();
}
public void undo() {
text.removeModifyListener(listener);
helper.setAttribute(IDeployableServer.DEPLOY_DIRECTORY, oldDir);
text.setText(oldDir);
text.addModifyListener(listener);
+ getSaveStatus();
}
}
@@ -255,15 +302,93 @@
}
public void execute() {
helper.setAttribute(IDeployableServer.TEMP_DEPLOY_DIRECTORY, newDir);
+ lastCustomTemp = newDir;
+ getSaveStatus();
}
public void undo() {
text.removeModifyListener(listener);
helper.setAttribute(IDeployableServer.TEMP_DEPLOY_DIRECTORY, oldDir);
text.setText(oldDir);
text.addModifyListener(listener);
+ getSaveStatus();
}
}
+ public class RadioClickedCommand extends ServerCommand {
+ private Button newSelection, oldSelection;
+ private String oldDir, newDir;
+ private String oldTemp, newTemp;
+ private String name;
+ public RadioClickedCommand(Button clicked, Button previous) {
+ super(DeploySection.this.server, Messages.EditorSetRadioClicked);
+ newSelection = clicked;
+ oldSelection = previous;
+ name = DeploySection.this.server.getName();
+ }
+ public void execute() {
+ boolean custom = newSelection == customRadio;
+ deployText.setEnabled(custom);
+ tempDeployText.setEnabled(custom);
+ deployButton.setEnabled(custom);
+ tempDeployButton.setEnabled(custom);
+ oldDir = deployText.getText();
+ oldTemp = tempDeployText.getText();
+
+
+ if( newSelection == metadataRadio ) {
+ newDir = IJBossServerConstants.PLUGIN_LOCATION.append(name).
+ append(IJBossServerConstants.DEPLOY).makeAbsolute().toString();
+ newTemp = IJBossServerConstants.PLUGIN_LOCATION.append(name).
+ append(IJBossServerConstants.TEMP_DEPLOY).makeAbsolute().toString();
+ new File(newDir).mkdirs();
+ new File(newTemp).mkdirs();
+ } else if( newSelection == serverRadio ) {
+ IRuntime rt = DeploySection.this.server.getRuntime();
+ IJBossServerRuntime jbsrt = (IJBossServerRuntime)rt.loadAdapter(IJBossServerRuntime.class, new NullProgressMonitor());
+ String config = jbsrt.getJBossConfiguration();
+ newDir = new Path(IJBossServerConstants.SERVER)
+ .append(config)
+ .append(IJBossServerConstants.DEPLOY).makeRelative().toString();
+ newTemp = new Path(IJBossServerConstants.SERVER).append(config)
+ .append(IJBossServerConstants.TMP)
+ .append(IJBossServerConstants.JBOSSTOOLS_TMP).makeRelative().toString();
+ } else {
+ newDir = lastCustomDeploy;
+ newTemp = lastCustomTemp;
+ }
+
+ newDir = newDir == null ? oldDir : newDir;
+ newTemp = newTemp == null ? oldTemp : newTemp;
+
+ deployText.removeModifyListener(deployListener);
+ helper.setAttribute(IDeployableServer.DEPLOY_DIRECTORY, newDir);
+ deployText.setText(newDir);
+ deployText.addModifyListener(deployListener);
+
+ tempDeployText.removeModifyListener(tempDeployListener);
+ helper.setAttribute(IDeployableServer.TEMP_DEPLOY_DIRECTORY, newTemp);
+ tempDeployText.setText(newTemp);
+ tempDeployText.addModifyListener(tempDeployListener);
+ getSaveStatus();
+ }
+ public void undo() {
+ deployText.removeModifyListener(deployListener);
+ helper.setAttribute(IDeployableServer.DEPLOY_DIRECTORY, oldDir);
+ deployText.setText(oldDir);
+ deployText.addModifyListener(deployListener);
+
+ tempDeployText.removeModifyListener(tempDeployListener);
+ helper.setAttribute(IDeployableServer.TEMP_DEPLOY_DIRECTORY, oldTemp);
+ tempDeployText.setText(oldTemp);
+ tempDeployText.addModifyListener(tempDeployListener);
+
+ oldSelection.removeSelectionListener(radioListener);
+ oldSelection.setSelection(true);
+ oldSelection.addSelectionListener(radioListener);
+ getSaveStatus();
+ }
+ }
+
public void dispose() {
// ignore
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java 2008-11-26 02:21:52 UTC (rev 12057)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java 2008-11-26 02:45:14 UTC (rev 12058)
@@ -24,29 +24,21 @@
import java.io.File;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.launching.IVMInstall;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.DirectoryDialog;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.IServer;
@@ -55,8 +47,9 @@
import org.eclipse.wst.server.core.TaskModel;
import org.eclipse.wst.server.ui.wizard.IWizardHandle;
import org.eclipse.wst.server.ui.wizard.WizardFragment;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
-import org.jboss.ide.eclipse.as.core.server.internal.DeployableServer;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
import org.jboss.ide.eclipse.as.ui.Messages;
@@ -68,17 +61,15 @@
*/
public class JBossServerWizardFragment extends WizardFragment {
private IWizardHandle handle;
- private String name, authUser, authPass, deployVal, deployTmpFolderVal;
+ private String name;
private Label nameLabel, serverExplanationLabel,
- runtimeExplanationLabel, authenticationExplanationLabel;
+ runtimeExplanationLabel;
private Label homeDirLabel, installedJRELabel, configLabel;
private Label homeValLabel, jreValLabel, configValLabel;
- private Label usernameLabel, passLabel, deployLabel;
private Composite nameComposite;
- private Group runtimeGroup, authenticationGroup, deployGroup;
- private Text nameText, userText, passText, deployText;
- private Button deployBrowseButton;
+ private Group runtimeGroup;
+ private Text nameText;
public Composite createComposite(Composite parent, IWizardHandle handle) {
this.handle = handle;
@@ -89,9 +80,7 @@
createExplanationLabel(main);
createNameComposite(main);
createRuntimeGroup(main);
- createAuthenticationGroup(main);
- createDeployGroup(main);
-
+
// make modifications to parent
handle.setTitle(Messages.swf_Title);
handle.setDescription(Messages.swf_Description);
@@ -225,100 +214,6 @@
configValLabel.setLayoutData(d);
}
- protected void createAuthenticationGroup(Composite main) {
- authenticationGroup = new Group(main, SWT.NONE);
- authenticationGroup.setText(Messages.swf_AuthenticationGroup);
- FormData groupData = new FormData();
- groupData.left = new FormAttachment(0,5);
- groupData.right = new FormAttachment(100, -5);
- groupData.top = new FormAttachment(runtimeGroup, 5);
- authenticationGroup.setLayoutData(groupData);
-
- authenticationGroup.setLayout(new GridLayout(2, false));
- GridData d;
-
- authenticationExplanationLabel = new Label(authenticationGroup, SWT.NONE);
- authenticationExplanationLabel.setText("JMX Console Access");
- d = new GridData(SWT.BEGINNING, SWT.CENTER, true, false);
- d.horizontalSpan = 2;
- authenticationExplanationLabel.setLayoutData(d);
-
- d = new GridData(SWT.BEGINNING, SWT.CENTER, true, false);
- d.minimumWidth = 200;
- usernameLabel = new Label(authenticationGroup, SWT.NONE);
- usernameLabel.setText(Messages.swf_Username);
- userText = new Text(authenticationGroup, SWT.BORDER);
- userText.setLayoutData(d);
-
- d = new GridData(SWT.BEGINNING, SWT.CENTER, true, false);
- d.minimumWidth = 200;
- passLabel = new Label(authenticationGroup, SWT.NONE);
- passLabel.setText(Messages.swf_Password);
- passText = new Text(authenticationGroup, SWT.BORDER);
- passText.setLayoutData(d);
-
- // listeners
- passText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- authPass = passText.getText();
- }
- });
- userText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- authUser = userText.getText();
- }
- });
- }
-
- protected void createDeployGroup(Composite main) {
- deployGroup = new Group(main, SWT.NONE);
- deployGroup.setText(Messages.swf_DeployGroup);
- FormData groupData = new FormData();
- groupData.left = new FormAttachment(0,5);
- groupData.right = new FormAttachment(100, -5);
- groupData.top = new FormAttachment(authenticationGroup, 5);
- deployGroup.setLayoutData(groupData);
-
- deployGroup.setLayout(new GridLayout(3, false));
- deployLabel = new Label(deployGroup, SWT.NONE);
- deployText = new Text(deployGroup, SWT.BORDER);
- deployLabel.setText(Messages.swf_DeployDirectory);
-
- deployBrowseButton = new Button(deployGroup, SWT.PUSH);
- deployBrowseButton.setText(Messages.browse);
-
- deployBrowseButton.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {}
- public void widgetSelected(SelectionEvent e) {
- String directory = getDirectory(deployText.getText(), deployGroup.getShell());
- if (directory != null) {
- deployText.setText(directory);
- deployVal = deployText.getText();
- }
- }
- });
-
- deployText.setEditable(false);
- }
-
- protected String getDirectory(String startingDirectory, Shell shell) {
- DirectoryDialog fileDialog = new DirectoryDialog(shell, SWT.OPEN);
-
- if( startingDirectory == null )
- startingDirectory = getRuntime().getRuntime().getLocation().toString();
- IPath sp = DeployableServer.makeGlobal(getRuntime(), new Path(startingDirectory));
- fileDialog.setFilterPath(sp.toString());
-
- String dir = fileDialog.open();
- if (dir != null) {
- dir = dir.trim();
- if (dir.length() > 0) {
- return DeployableServer.makeRelative(getRuntime(), new Path(dir)).toString();
- }
- }
- return null;
- }
-
private void updateErrorMessage() {
String error = getErrorString();
if( error == null ) {
@@ -331,15 +226,6 @@
private String getErrorString() {
if( findServer(name) != null )
return Messages.swf_NameInUse;
-
- if(deployVal==null || deployVal.trim().length()==0) {
- return "Deploy folder not specified";
- }
-
- if(deployTmpFolderVal==null || deployTmpFolderVal.trim().length()==0) {
- return "Temporary deploy folder not specified";
- }
-
return null;
}
@@ -353,14 +239,8 @@
nameText.setText(name);
homeValLabel.setText(srt.getRuntime().getLocation().toOSString());
configValLabel.setText(srt.getJBossConfiguration());
- IVMInstall install = srt.getVM();
- jreValLabel.setText(install.getInstallLocation().getAbsolutePath() + " (" + install.getName() + ")");
- String deployFolder = new Path("server").append(configValLabel.getText()).append("deploy").toString();
- deployTmpFolderVal = srt.getRuntime().getLocation().append( "server").append(configValLabel.getText()).append("tmp").append("jbosstoolsTemp").toOSString();
- deployText.setText(deployFolder);
- deployVal = deployFolder;
+ jreValLabel.setText(srt.getVM().getInstallLocation().getAbsolutePath() + " (" + srt.getVM().getName() + ")");
runtimeGroup.layout();
- deployGroup.layout();
updateErrorMessage();
}
@@ -372,11 +252,23 @@
serverWC.setRuntime((IRuntime)getTaskModel().getObject(TaskModel.TASK_RUNTIME));
serverWC.setName(name);
serverWC.setServerConfiguration(null); // no inside jboss folder
- JBossServer jbs = (JBossServer)serverWC.loadAdapter(JBossServer.class, new NullProgressMonitor());
- jbs.setUsername(authUser);
- jbs.setPassword(authPass);
+ handleDefaults(serverWC);
+ }
+
+ protected void handleDefaults(IServerWorkingCopy wc) {
+ String deployVal = IJBossServerConstants.PLUGIN_LOCATION.append(name).
+ append(IJBossServerConstants.DEPLOY).makeAbsolute().toString();
+ String deployTmpFolderVal = IJBossServerConstants.PLUGIN_LOCATION.append(name).
+ append(IJBossServerConstants.TEMP_DEPLOY).makeAbsolute().toString();
+
+
+ JBossServer jbs = (JBossServer)wc.loadAdapter(JBossServer.class, new NullProgressMonitor());
+ jbs.setUsername("admin");
+ jbs.setPassword("admin");
+ jbs.setDeployLocationType(IDeployableServer.DEPLOY_METADATA);
jbs.setDeployFolder(deployVal);
jbs.setTempDeployFolder(deployTmpFolderVal);
+ new File(deployVal).mkdirs();
new File(deployTmpFolderVal).mkdirs();
}
15 years, 5 months
JBoss Tools SVN: r12057 - trunk/i18n.
by jbosstools-commits@lists.jboss.org
Author: sflanigan
Date: 2008-11-25 21:21:52 -0500 (Tue, 25 Nov 2008)
New Revision: 12057
Modified:
trunk/i18n/build.xml
trunk/i18n/feature.xsl
trunk/i18n/pom.xml
Log:
Created <foreachlocale> macro and extracted -fragment, -categorydef and -plugin tasks to be called from the macro.
Modified: trunk/i18n/build.xml
===================================================================
--- trunk/i18n/build.xml 2008-11-26 00:40:35 UTC (rev 12056)
+++ trunk/i18n/build.xml 2008-11-26 02:21:52 UTC (rev 12057)
@@ -50,13 +50,6 @@
<!-- pick up the "for" task from ant-contrib -->
<taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="dependency.classpath" />
-<!-- xpath and groovy tasks currently unused:
- <taskdef resource="net/uworks/andariel/andariel.properties" classpathref="dependency.classpath" />
-
- <taskdef name="groovy"
- classname="org.codehaus.groovy.ant.Groovy"
- classpathref="dependency.classpath"/>
--->
<!-- ant-gettext tasks -->
<taskdef name="prop2pot" classname="org.fedorahosted.tennera.antgettext.Prop2PotTask" classpathref="dependency.classpath" />
<taskdef name="pot2en" classname="org.fedorahosted.tennera.antgettext.Pot2EnTask" classpathref="dependency.classpath" />
@@ -103,11 +96,11 @@
<target name="prop2pot" depends="init"
description="Extract translation templates (POT) from the JBoss Tools English properties files">
<!-- paths under jbt.srcdir look like: ${module}/plugins/${plugin}/{src,main,...} -->
- <!-- TODO includes should be just plugins/*/src/**/*.properties.
- See https://jira.jboss.org/jira/browse/JBIDE-2972 includes="plugins/*/*/**/*.properties" -->
+ <!-- TODO properties *should* be found in exactly one place, but aren't.
+ See https://jira.jboss.org/jira/browse/JBIDE-2972 -->
<prop2pot srcDir="${jbt.srcdir}" dstDir="po" includes="*/plugins/*/src/**/*.properties" >
<!-- next two are Maven style, not currently used in JBT: -->
-<!--
+<!-- These filesets were used in a <jar> call, not supported by <prop2pot>
<fileset erroronmissingdir="false" dir="${plugindir}/src/main/java"/>
<fileset erroronmissingdir="false" dir="${plugindir}/src/main/resources"/>
@@ -162,25 +155,54 @@
macrodef: checkprop checks that specified property has been set
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
<macrodef name="checkprop">
- <attribute name="propname" />
+ <attribute name="name" />
<sequential>
<if>
- <!-- TODO fail on empty value -->
<not>
- <isset property="@{propname}"/>
+ <isset property="@{name}"/>
</not>
<then>
- <fail message="property '@{propname}' is not set"/>
+ <fail message="property '@{name}' is not set"/>
</then>
</if>
+ <if>
+ <length string="${@{name}}" length="0"/>
+ <then>
+ <fail message="property '@{name}' has an empty value"/>
+ </then>
+ </if>
</sequential>
</macrodef>
+ <!-- = = = = = = = = = = = = = = = = =
+ macrodef: foreachlocale
+ = = = = = = = = = = = = = = = = = -->
+ <macrodef name="foreachlocale">
+ <attribute name="task" />
+ <sequential>
+ <!-- for each configured locale (in i18n.properties) -->
+ <for param="locale" list="${locales}">
+ <sequential>
+ <antcall target="@{task}" inheritall="true">
+ <param name="locale" value="@{locale}"/>
+ <param name="localename" value="${NAME_@{locale}}"/>
+
+ <!-- Having these task-specific params is ugly, but
+ otherwise <var>s don't get passed through: -->
+ <param name="plugindir" value="${plugindir}"/>
+ <param name="featurexml" value="${featurexml}"/>
+ </antcall>
+ </sequential>
+ </for>
+ </sequential>
+ </macrodef>
+
<!-- Processes the generated props directory, one plugin at a time,
generating manifests and jars -->
<target name="plugins" depends="init" description="Generate fragment manifests and jars for langpack plugins">
<delete dir="${jardir}/plugins" />
<mkdir dir="${jardir}/plugins" />
+ <!-- for each plugin directory -->
<for param="plugindir">
<path>
<dirset dir="${propdir}" includes="*/*" />
@@ -188,50 +210,52 @@
<sequential>
<echo message="@{plugindir}" />
<!-- TODO avoid property override if possible -->
+ <!-- work out the plugin ID -->
+ <var name="plugin" unset="true" />
<propertyregex override="true" property="plugin"
input="@{plugindir}"
regexp="^${propdir}[/\\][^/\\]+[/\\]([^/\\]+).*"
select="\1" />
- <checkprop propname="plugin"/>
+ <checkprop name="plugin"/>
<echo level="verbose" message="@{plugindir} contains props for plugin ${plugin}"/>
- <checkprop propname="PLUGIN_VERSION"/>
- <checkprop propname="PLUGIN_VENDOR"/>
- <for param="locale" list="${locales}">
- <sequential>
- <!-- TODO avoid property override if possible -->
- <propertycopy override="true" property="localename" from="NAME_@{locale}"/>
- <checkprop propname="localename"/>
-
- <!-- Jars up one fragment plugin. -->
- <jar
- destfile="${jardir}/plugins/${plugin}.nl-(a){locale}_${PLUGIN_VERSION}.jar"
- update="no"
- basedir="@{plugindir}"
- duplicate="fail"
- includes="**/*_(a){locale}.properties">
- <manifest>
- <attribute name="Manifest-Version"
- value="1.0"/>
- <attribute name="Created-By"
- value="JBoss Tools i18n (build.xml)"/>
- <attribute name="Bundle-Name"
- value="${plugin} ${localename} NLS Support"/>
- <attribute name="Bundle-SymbolicName"
- value="${plugin}.nl_@{locale} ;singleton=true"/>
- <attribute name="Bundle-Version"
- value="${PLUGIN_VERSION}"/>
- <attribute name="Bundle-Vendor"
- value="${PLUGIN_VENDOR}"/>
- <attribute name="Fragment-Host"
- value="${plugin}"/>
- </manifest>
- </jar>
- </sequential>
- </for>
+ <!-- making sure these values are available to -plugin -->
+ <checkprop name="PLUGIN_VERSION"/>
+ <checkprop name="PLUGIN_VENDOR"/>
+ <var name="plugindir" value="@{plugindir}" />
+ <foreachlocale task="-plugin"/>
</sequential>
</for>
</target>
+
+ <target name="-plugin" >
+ <!-- Jars up one fragment plugin. -->
+ <jar
+ destfile="${jardir}/plugins/${plugin}.nl-${locale}_${PLUGIN_VERSION}.jar"
+ filesonly="true"
+ update="false"
+ whenmanifestonly="create"
+ basedir="${plugindir}"
+ duplicate="fail"
+ includes="**/*_${locale}.properties">
+ <manifest>
+ <attribute name="Manifest-Version"
+ value="1.0"/>
+ <attribute name="Created-By"
+ value="JBoss Tools i18n (build.xml)"/>
+ <attribute name="Bundle-Name"
+ value="${plugin} ${localename} NLS Support"/>
+ <attribute name="Bundle-SymbolicName"
+ value="${plugin}.nl_${locale} ;singleton=true"/>
+ <attribute name="Bundle-Version"
+ value="${PLUGIN_VERSION}"/>
+ <attribute name="Bundle-Vendor"
+ value="${PLUGIN_VENDOR}"/>
+ <attribute name="Fragment-Host"
+ value="${plugin}"/>
+ </manifest>
+ </jar>
+ </target>
<target name="features" depends="init"
description="Generate langpack feature manifests (one per locale) for each JBT feature, and corresponding site.xml">
@@ -246,84 +270,36 @@
suffix=".tmp"
createfile="true"
deleteonexit="false" />
- <sequential>
- <for param="featurexml">
- <path>
- <fileset dir="${jbt.srcdir}" includes="*/features/*/feature.xml"/>
- </path>
- <sequential>
- <!-- TODO avoid property override if possible -->
- <propertyregex
- override="true"
- property="feature"
- input="@{featurexml}"
- regexp="^${jbt.srcdir}[/\\][^/\\]+[/\\]features[/\\]([^/\\]+)[/\\]feature.xml"
- select="\1" />
- <checkprop propname="feature"/>
- <echo level="verbose" message="Processing feature ${feature}"/>
- <for param="locale" list="${locales}">
- <sequential>
- <!-- TODO avoid property override if possible -->
- <propertycopy override="true" property="localename" from="NAME_@{locale}"/>
- <!-- TODO use a macro for this -->
- <echo append="true" file="${temp.file.sitefeatures}"
- message="<feature url="features/${feature}.nl-(a){locale}_${PLUGIN_VERSION}.jar"
- id="${feature}.nl-@{locale}" version="${PLUGIN_VERSION}">
- <category name="@{locale}"/>
- </feature>" />
- <!-- demunged, that looks like:
- <feature url="features/${feature}.nl-(a){locale}_${PLUGIN_VERSION}.jar"
- id="${feature}.nl-@{locale}" version="${PLUGIN_VERSION}">
- <category name="@{locale}"/>
- </feature>
- -->
- <!-- Process feature.xml with <xslt> -->
- <!-- consider: using groovy instead to eliminate empty plugin fragments -->
- <xslt
- style="feature.xsl"
- in="@{featurexml}"
- out="${propdir}/features/${feature}.nl-(a){locale}_${PLUGIN_VERSION}/feature.xml"
- >
- <param name="feature" expression="${feature}" />
- <param name="locale" expression="@{locale}" />
- <param name="localename" expression="${localename}" />
- <param name="pluginversion" expression="${PLUGIN_VERSION}" />
- </xslt>
-
- <copy overwrite="true"
- todir="${propdir}/features/${feature}.nl-@{locale}_${PLUGIN_VERSION}">
- <fileset dir="feature-template/FEATURE.nl-LOCALE_VERSION" />
- </copy>
- <jar destfile="${jardir}/features/${feature}.nl-(a){locale}_${PLUGIN_VERSION}.jar"
- basedir="${propdir}/features/${feature}.nl-@{locale}_${PLUGIN_VERSION}" />
- <!-- might want to keep around for debugging: -->
- <delete dir="${propdir}/features/${feature}.nl-@{locale}_${PLUGIN_VERSION}" />
- </sequential>
- </for>
- </sequential>
- </for>
- </sequential>
- <!--
- Generate a list of features for each locale, so that the update
- site can have a category for each locale:
- -->
- <for param="locale" list="${locales}">
+ <!-- for each feature manifest -->
+ <for param="featurexml">
+ <path>
+ <fileset dir="${jbt.srcdir}" includes="*/features/*/feature.xml"/>
+ </path>
<sequential>
<!-- TODO avoid property override if possible -->
- <propertycopy override="true" property="localename" from="NAME_@{locale}"/>
- <echo append="true" file="${temp.file.sitefeatures}"
- message="<category-def name="@{locale}" label="JBoss Tools Localization (${localename})"/>" />
- <!-- demunged, that looks like:
- <category-def
- name="@{locale}"
- label="JBoss Tools Localization (${localename})"/>
- -->
+ <!-- work out the feature ID -->
+ <var name="feature" unset="true" />
+ <propertyregex
+ override="true"
+ property="feature"
+ input="@{featurexml}"
+ regexp="^${jbt.srcdir}[/\\][^/\\]+[/\\]features[/\\]([^/\\]+)[/\\]feature.xml"
+ select="\1" />
+ <checkprop name="feature"/>
+ <echo level="verbose" message="Processing feature ${feature}"/>
+
+ <!-- making sure this value is available to -feature -->
+ <var name="featurexml" value="@{featurexml}" />
+ <foreachlocale task="-feature"/>
</sequential>
</for>
+
+ <foreachlocale task="-categorydef"/>
-
- <!-- Read in the above list of features -->
- <!-- FIXME var features (loading list of features) -->
+ <!-- Read in the list of <feature>s and <category-def>s created by
+ the targets -categorydef and -feature -->
+ <!-- TODO this is an ugly way to build XML
+ (see also the <echo>s in above-mentioned targets) -->
<var name="features" unset="true" />
<loadfile property="features" srcFile="${temp.file.sitefeatures}"/>
<delete file="${temp.file.sitefeatures}"/>
@@ -336,6 +312,55 @@
</copy>
</target>
+ <!-- Create a <category-def> for ${locale} for site.xml -->
+ <target name="-categorydef">
+ <!-- ugly -->
+ <echo append="true" file="${temp.file.sitefeatures}"
+ message="<category-def name="${locale}" label="JBoss Tools Localization (${localename})"/>" />
+ <!-- demunged, that looks like:
+ <category-def
+ name="${locale}"
+ label="JBoss Tools Localization (${localename})"/>
+ -->
+ </target>
+
+ <!-- Create feature jar including manifest. Also create a <feature> for site.xml -->
+ <target name="-feature">
+ <!-- create langpack feature element for site.xml -->
+ <!-- ugly -->
+ <echo append="true" file="${temp.file.sitefeatures}"
+ message="<feature url="features/${feature}.nl-${locale}_${PLUGIN_VERSION}.jar"
+ id="${feature}.nl-${locale}" version="${PLUGIN_VERSION}">
+ <category name="${locale}"/>
+ </feature>" />
+ <!-- demunged, that looks like:
+ <feature url="features/${feature}.nl-${locale}_${PLUGIN_VERSION}.jar"
+ id="${feature}.nl-${locale}" version="${PLUGIN_VERSION}">
+ <category name="${locale}"/>
+ </feature>
+ -->
+ <!-- Process feature.xml with <xslt> -->
+ <xslt
+ style="feature.xsl"
+ in="${featurexml}"
+ out="${propdir}/features/${feature}.nl-${locale}_${PLUGIN_VERSION}/feature.xml"
+ >
+ <param name="feature" expression="${feature}" />
+ <param name="locale" expression="${locale}" />
+ <param name="localename" expression="${localename}" />
+ <param name="pluginversion" expression="${PLUGIN_VERSION}" />
+ </xslt>
+
+ <copy overwrite="true"
+ todir="${propdir}/features/${feature}.nl-${locale}_${PLUGIN_VERSION}">
+ <fileset dir="feature-template/FEATURE.nl-LOCALE_VERSION" />
+ </copy>
+ <jar destfile="${jardir}/features/${feature}.nl-${locale}_${PLUGIN_VERSION}.jar"
+ basedir="${propdir}/features/${feature}.nl-${locale}_${PLUGIN_VERSION}" />
+ <!-- might want to keep around for debugging: -->
+ <delete dir="${propdir}/features/${feature}.nl-${locale}_${PLUGIN_VERSION}" />
+ </target>
+
<target name="p2" description="Generate metadata for Eclipse 3.4's update manager (P2)" >
<!-- Generate P2 metadata so that update manager won't take forever.
http://wiki.eclipse.org/Equinox_p2_Metadata_Generator
Modified: trunk/i18n/feature.xsl
===================================================================
--- trunk/i18n/feature.xsl 2008-11-26 00:40:35 UTC (rev 12056)
+++ trunk/i18n/feature.xsl 2008-11-26 02:21:52 UTC (rev 12057)
@@ -12,6 +12,13 @@
<feature provider-name="%providerName">
<xsl:attribute name="id"><xsl:value-of select="$feature" />-<xsl:value-of select="$locale" />
</xsl:attribute>
+ <!-- NB A few feature labels (eg org.jboss.tools.birt.feature)
+ use %featureName, which is then replicated in the langpack
+ feature (bad).
+ TODO change affected feature manifests to inline those feature
+ names (since they shouldn't be translated anyway) or use @id
+ here, not @label.
+ -->
<xsl:attribute name="label">JBoss Tools Language Pack for <xsl:value-of select="@label" /> in <xsl:value-of select="$localename" />
</xsl:attribute>
<xsl:attribute name="version">
Modified: trunk/i18n/pom.xml
===================================================================
--- trunk/i18n/pom.xml 2008-11-26 00:40:35 UTC (rev 12056)
+++ trunk/i18n/pom.xml 2008-11-26 02:21:52 UTC (rev 12057)
@@ -35,17 +35,5 @@
<!-- 1.0b3 is not in the central/jboss maven repos -->
<version>1.0b2</version>
</dependency>
-<!--
- <dependency>
- <groupId>net.uworks</groupId>
- <artifactId>andariel</artifactId>
- <version>1.2.3</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-all</artifactId>
- <version>1.5.6</version>
- </dependency>
--->
</dependencies>
</project>
15 years, 5 months
JBoss Tools SVN: r12056 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-11-25 19:40:35 -0500 (Tue, 25 Nov 2008)
New Revision: 12056
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java
Log:
random color change ;)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java 2008-11-25 23:14:02 UTC (rev 12055)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java 2008-11-26 00:40:35 UTC (rev 12056)
@@ -30,6 +30,7 @@
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.forms.IFormColors;
import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;
@@ -70,11 +71,13 @@
GridData d = new GridData(); d.horizontalSpan = 2;
explanation.setLayoutData(d);
- toolkit.createLabel(composite, Messages.swf_Username);
+ Label username = toolkit.createLabel(composite, Messages.swf_Username);
+ username.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
String n = helper.getAttribute(JBossServer.SERVER_USERNAME, "");
String p = helper.getAttribute(JBossServer.SERVER_PASSWORD, "");
nameText = toolkit.createText(composite, n);
- toolkit.createLabel(composite, Messages.swf_Password);
+ Label password = toolkit.createLabel(composite, Messages.swf_Password);
+ password.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
passText = toolkit.createText(composite, p);
d = new GridData(); d.grabExcessHorizontalSpace = true; d.widthHint = 100;
15 years, 5 months
JBoss Tools SVN: r12055 - trunk/as/features/org.jboss.ide.eclipse.as.feature.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-11-25 18:14:02 -0500 (Tue, 25 Nov 2008)
New Revision: 12055
Modified:
trunk/as/features/org.jboss.ide.eclipse.as.feature/feature.xml
Log:
JBIDE-3283 - fileset icon wasn't showing
Modified: trunk/as/features/org.jboss.ide.eclipse.as.feature/feature.xml
===================================================================
--- trunk/as/features/org.jboss.ide.eclipse.as.feature/feature.xml 2008-11-25 22:40:21 UTC (rev 12054)
+++ trunk/as/features/org.jboss.ide.eclipse.as.feature/feature.xml 2008-11-25 23:14:02 UTC (rev 12055)
@@ -527,7 +527,6 @@
id="org.jboss.ide.eclipse.archives.webtools"
download-size="0"
install-size="0"
- version="0.0.0"
- unpack="false"/>
+ version="0.0.0"/>
</feature>
15 years, 5 months
JBoss Tools SVN: r12054 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-11-25 17:40:21 -0500 (Tue, 25 Nov 2008)
New Revision: 12054
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JMXProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathActionProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathDecorator.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathTreeLabelProvider.java
Log:
JBIDE-3278 - ensuring all elements work for tomcat servers and other servers as well. JMX does not and so does not show.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JMXProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JMXProvider.java 2008-11-25 20:59:12 UTC (rev 12053)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JMXProvider.java 2008-11-25 22:40:21 UTC (rev 12054)
@@ -18,8 +18,11 @@
delegate = new MBeanExplorerContentProvider();
}
public Object[] getChildren(Object parentElement) {
- if( parentElement instanceof IServer )
- return new Object[] { JBossServerConnectionProvider.getConnection((IServer)parentElement)};
+ if( parentElement instanceof IServer ) {
+ Object sel = JBossServerConnectionProvider.getConnection((IServer)parentElement);
+ if( sel != null )
+ return new Object[] { sel };
+ }
return delegate.getChildren(parentElement);
}
public Object getParent(Object element) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathActionProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathActionProvider.java 2008-11-25 20:59:12 UTC (rev 12053)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathActionProvider.java 2008-11-25 22:40:21 UTC (rev 12054)
@@ -218,12 +218,14 @@
return;
if (first instanceof ServerWrapper) {
+ selectedNode = first;
menu.add(newXPathCategoryAction);
menu.add(new Separator());
return;
}
if (first instanceof XPathCategory) {
+ selectedNode = first;
menu.add(newXPathAction);
menu.add(deleteXPathCategoryAction);
menu.add(new Separator());
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathDecorator.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathDecorator.java 2008-11-25 20:59:12 UTC (rev 12053)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathDecorator.java 2008-11-25 22:40:21 UTC (rev 12054)
@@ -31,7 +31,7 @@
}
if( element instanceof XPathResultNode ) {
- return ((XPathResultNode)element).getText();
+ return " " + ((XPathResultNode)element).getText();
}
return null;
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathTreeLabelProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathTreeLabelProvider.java 2008-11-25 20:59:12 UTC (rev 12053)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathTreeLabelProvider.java 2008-11-25 22:40:21 UTC (rev 12054)
@@ -49,6 +49,9 @@
if( element instanceof XPathFileResult )
return ((XPathFileResult)element).getFileLocation();
+ if( element instanceof XPathResultNode )
+ return "Match " + ((XPathResultNode)element).getIndex();
+
return "";
}
15 years, 5 months