JBoss Tools SVN: r10559 - in trunk/birt/docs/en/images: BirtSupport and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2008-09-30 08:17:52 -0400 (Tue, 30 Sep 2008)
New Revision: 10559
Added:
trunk/birt/docs/en/images/BirtSupport/
Removed:
trunk/birt/docs/en/images/BirtSupport/01_esb_tree_view.png
trunk/birt/docs/en/images/BirtSupport/02_esb_source_view.png
trunk/birt/docs/en/images/BirtSupport/03_esb_outline_view.png
trunk/birt/docs/en/images/BirtSupport/04_esb_add_provider.png
trunk/birt/docs/en/images/BirtSupport/05_esb_add_service.png
trunk/birt/docs/en/images/BirtSupport/06_esb_add_listener.png
trunk/birt/docs/en/images/BirtSupport/08_esb_features.png
trunk/birt/docs/en/images/BirtSupport/09_esb_features.png
trunk/birt/docs/en/images/BirtSupport/10_esb_features.png
Log:
https://jira.jboss.org/jira/browse/JBDS-388 - deleted to be replaced by proper images
Copied: trunk/birt/docs/en/images/BirtSupport (from rev 10528, trunk/birt/docs/en/images/esb_editor)
Deleted: trunk/birt/docs/en/images/BirtSupport/01_esb_tree_view.png
===================================================================
(Binary files differ)
Deleted: trunk/birt/docs/en/images/BirtSupport/02_esb_source_view.png
===================================================================
(Binary files differ)
Deleted: trunk/birt/docs/en/images/BirtSupport/03_esb_outline_view.png
===================================================================
(Binary files differ)
Deleted: trunk/birt/docs/en/images/BirtSupport/04_esb_add_provider.png
===================================================================
(Binary files differ)
Deleted: trunk/birt/docs/en/images/BirtSupport/05_esb_add_service.png
===================================================================
(Binary files differ)
Deleted: trunk/birt/docs/en/images/BirtSupport/06_esb_add_listener.png
===================================================================
(Binary files differ)
Deleted: trunk/birt/docs/en/images/BirtSupport/08_esb_features.png
===================================================================
(Binary files differ)
Deleted: trunk/birt/docs/en/images/BirtSupport/09_esb_features.png
===================================================================
(Binary files differ)
Deleted: trunk/birt/docs/en/images/BirtSupport/10_esb_features.png
===================================================================
(Binary files differ)
16 years, 3 months
JBoss Tools SVN: r10558 - trunk/birt/docs/en/images.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2008-09-30 08:15:51 -0400 (Tue, 30 Sep 2008)
New Revision: 10558
Removed:
trunk/birt/docs/en/images/esb_editor/
Log:
renamed and deleted acc. to the Guide topic
16 years, 3 months
JBoss Tools SVN: r10557 - trunk/birt/docs/en/modules.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2008-09-30 08:09:58 -0400 (Tue, 30 Sep 2008)
New Revision: 10557
Modified:
trunk/birt/docs/en/modules/birt_support.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-388 - Support chapter updated: screenshots added
Modified: trunk/birt/docs/en/modules/birt_support.xml
===================================================================
--- trunk/birt/docs/en/modules/birt_support.xml 2008-09-30 10:28:39 UTC (rev 10556)
+++ trunk/birt/docs/en/modules/birt_support.xml 2008-09-30 12:09:58 UTC (rev 10557)
@@ -55,8 +55,8 @@
<para>We will show you how to use the Creation wizard for creating a new BIRT report.</para>
- <para>Select <emphasis><property>File >New > Other...</property>
- </emphasis> in the main menu bar or context menu for selected project and then <emphasis><property>ESB > ESB File</property></emphasis> in the New dialog:</para>
+ <para>First create a Report project. Select <emphasis><property>File >New > Project...</property>
+ </emphasis> in the main menu bar or context menu. The new project dialog appears. Choose <emphasis><property>Business Intelligence and Reporting Tools > Report Project</property></emphasis>. Click on the Next button.</para>
<figure>
<title>New Dialog</title>
16 years, 3 months
JBoss Tools SVN: r10556 - trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-09-30 06:28:39 -0400 (Tue, 30 Sep 2008)
New Revision: 10556
Modified:
trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css/tools.css
Log:
https://jira.jboss.org/jira/browse/JBDS-399 - applying colors for diffmk background;
Modified: trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css/tools.css
===================================================================
--- trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css/tools.css 2008-09-30 09:59:05 UTC (rev 10555)
+++ trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css/tools.css 2008-09-30 10:28:39 UTC (rev 10556)
@@ -28,7 +28,6 @@
}
*/
-
body {
background-image:url(../images/jbosstools_label2.png);
background-repeat:no-repeat;
@@ -91,6 +90,12 @@
background:transparent url(../images/updated.png) no-repeat scroll right top;
padding-right:70px;
}
-span.diffmkwrapper, div.diffmkwrapper p a{
- background-color: #ACE1AF;
+span.diffmkwrapper{
+ background-color: #cce2f6;
+}
+
+div.diffmkwrapper p{
+ background-color: #c8d7e4;
+ padding:0px;
+ margin-left:56px;
}
\ No newline at end of file
16 years, 3 months
JBoss Tools SVN: r10555 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-09-30 05:59:05 -0400 (Tue, 30 Sep 2008)
New Revision: 10555
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletsHtmlContentAssistProcessor.java
Log:
JBIDE-1497.
Old ELParser replaced.
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletsHtmlContentAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletsHtmlContentAssistProcessor.java 2008-09-30 09:58:19 UTC (rev 10554)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletsHtmlContentAssistProcessor.java 2008-09-30 09:59:05 UTC (rev 10555)
@@ -46,6 +46,11 @@
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
import org.eclipse.wst.xml.ui.internal.util.SharedXMLEditorPluginImageHelper;
+import org.jboss.tools.common.el.core.model.ELInstance;
+import org.jboss.tools.common.el.core.model.ELModel;
+import org.jboss.tools.common.el.core.model.ELUtil;
+import org.jboss.tools.common.el.core.parser.ELParser;
+import org.jboss.tools.common.el.core.parser.ELParserFactory;
import org.jboss.tools.common.kb.AttributeDescriptor;
import org.jboss.tools.common.kb.KbConnectorFactory;
import org.jboss.tools.common.kb.KbConnectorType;
@@ -56,7 +61,6 @@
import org.jboss.tools.common.kb.wtp.JspWtpKbConnector;
import org.jboss.tools.common.kb.wtp.TLDVersionHelper;
import org.jboss.tools.common.kb.wtp.WtpKbConnector;
-import org.jboss.tools.common.model.util.ELParser;
import org.jboss.tools.jst.jsp.JspEditorPlugin;
import org.jboss.tools.jst.jsp.editor.TLDRegisterHelper;
import org.jboss.tools.jst.jsp.outline.ValueHelper;
@@ -266,10 +270,14 @@
contentAssistRequest.addProposal(proposal);
}
}
- ELParser p = new ELParser();
- ELParser.Token root = p.parse(currentValue);
- ELParser.Token c = root == null ? null : ELParser.getTokenAt(root, offset);
- if(ELParser.getPrecedingOpen(c, offset) != null) return true;
+
+ // No JBoss parser ?
+ ELParser p = ELParserFactory.createDefaultParser();
+ ELModel model = p.parse(currentValue);
+ ELInstance instance = ELUtil.findInstance(model, offset);
+ if(instance != null && instance.getStartPosition() + 2 <= offset) {
+ return true;
+ }
}
return false;
}
16 years, 3 months
JBoss Tools SVN: r10554 - trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/model.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-09-30 05:58:19 -0400 (Tue, 30 Sep 2008)
New Revision: 10554
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/model/ELUtil.java
Log:
JBIDE-1497.
Minor improvements
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/model/ELUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/model/ELUtil.java 2008-09-30 09:19:15 UTC (rev 10553)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/model/ELUtil.java 2008-09-30 09:58:19 UTC (rev 10554)
@@ -12,8 +12,25 @@
import java.util.List;
+import org.jboss.tools.common.el.core.parser.LexicalToken;
+
public class ELUtil {
+ public static ELInstance findInstance(ELModel model, int offset) {
+ if(model == null) return null;
+ List<ELInstance> is = model.getInstances();
+ for (ELInstance i: is) {
+ if(i.getStartPosition() >= offset) continue;
+ LexicalToken c = i.getCloseInstanceToken();
+ if(c != null) {
+ if(c.getStart() >= offset) return i;
+ } else {
+ if(i.getEndPosition() >= offset) return i;
+ }
+ }
+ return null;
+ }
+
public static ELInvocationExpression findExpression(ELModel model, int offset) {
ELInvocationExpression result = null;
int off = -1;
16 years, 3 months
JBoss Tools SVN: r10553 - in trunk/documentation: jbosstools-jdocbook-style/src/main/org/css/css and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-09-30 05:19:15 -0400 (Tue, 30 Sep 2008)
New Revision: 10553
Modified:
trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/common.xsl
trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css/tools.css
Log:
https://jira.jboss.org/jira/browse/JBDS-399 - Background color (#ACE1AF) for mkdiff markers for admonitions, <diffmk:wrapper diffmk:change="changed">...</diffmk:wrapper> elements was added. Changes are made by Gleb Galkin
Modified: trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/common.xsl
===================================================================
--- trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/common.xsl 2008-09-29 20:11:03 UTC (rev 10552)
+++ trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/common.xsl 2008-09-30 09:19:15 UTC (rev 10553)
@@ -6,7 +6,7 @@
Author: Mark Newton <mark.newton(a)jboss.org>
-->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:diffmk="http://diffmk.sf.net/ns/diff" version="1.0">
<!-- XHTML settings -->
<xsl:param name="html.stylesheet" select="'css/tools.css'"/>
@@ -101,6 +101,17 @@
<xsl:value-of select="@role"/>
</xsl:attribute>
</xsl:when>
+ <!-- For mkdiff compatibility-->
+ <xsl:when test="@revisionflag='added'">
+ <xsl:attribute name="class">
+ <xsl:value-of select="@revisionflag"/>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:when test="@revisionflag='changed'">
+ <xsl:attribute name="class">
+ <xsl:value-of select="@revisionflag"/>
+ </xsl:attribute>
+ </xsl:when>
</xsl:choose>
<!-- * if $autotoc.label.in.hyperlink is non-zero, then output the label -->
@@ -120,5 +131,52 @@
</span>
</xsl:template>
<!-- XHTML and PDF -->
-
+ <xsl:template match="//node()[@diffmk:change]">
+ <xsl:choose>
+ <xsl:when test="local-name()='note' or local-name()='tip' or local-name()='important' or local-name()='warning' or local-name()='caution'">
+ <xsl:call-template name="my.graphical.admonition"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <span class="diffmkwrapper">
+ <xsl:value-of select="."/>
+ </span>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <xsl:template name="my.graphical.admonition">
+ <xsl:variable name="admon.type">
+ <xsl:choose>
+ <xsl:when test="local-name(.)='note'">Note</xsl:when>
+ <xsl:when test="local-name(.)='warning'">Warning</xsl:when>
+ <xsl:when test="local-name(.)='caution'">Caution</xsl:when>
+ <xsl:when test="local-name(.)='tip'">Tip</xsl:when>
+ <xsl:when test="local-name(.)='important'">Important</xsl:when>
+ <xsl:otherwise>Note</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+ <xsl:variable name="alt">
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="$admon.type"/>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <div xmlns="http://www.w3.org/1999/xhtml">
+ <xsl:apply-templates select="." mode="class.attribute"/>
+ <xsl:if test="$admon.style != ''">
+ <xsl:attribute name="style">
+ <xsl:value-of select="$admon.style"/>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:call-template name="anchor"/>
+ <xsl:if test="$admon.textlabel != 0 or title">
+ <h2>
+ <xsl:apply-templates select="." mode="object.title.markup"/>
+ </h2>
+ </xsl:if>
+ <div class="diffmkwrapper">
+ <xsl:apply-templates />
+ </div>
+ </div>
+ </xsl:template>
</xsl:stylesheet>
Modified: trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css/tools.css
===================================================================
--- trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css/tools.css 2008-09-29 20:11:03 UTC (rev 10552)
+++ trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css/tools.css 2008-09-30 09:19:15 UTC (rev 10553)
@@ -83,11 +83,14 @@
display:block;
}
-a.new {
+a.new, a.added {
background:transparent url(../images/new.png) no-repeat scroll right top;
padding-right:70px;
}
-a.updated {
+a.updated, a.changed {
background:transparent url(../images/updated.png) no-repeat scroll right top;
padding-right:70px;
+}
+span.diffmkwrapper, div.diffmkwrapper p a{
+ background-color: #ACE1AF;
}
\ No newline at end of file
16 years, 3 months
JBoss Tools SVN: r10552 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-09-29 16:11:03 -0400 (Mon, 29 Sep 2008)
New Revision: 10552
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.properties
Log:
nls
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-09-29 20:04:15 UTC (rev 10551)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2008-09-29 20:11:03 UTC (rev 10552)
@@ -199,21 +199,7 @@
public static String DescriptorXPathMatch;
- /* Filesets addition */
- public static String FilesetsCreateFilter;
- public static String FilesetsDeleteFilter;
- public static String FilesetsEditFilter;
- public static String FilesetsDeleteFile;
- public static String FilesetsEditFile;
- public static String FilesetsNewFileset;
- public static String FilesetsNewName;
- public static String FilesetsNewRootDir;
- public static String FilesetsNewBrowse;
- public static String FilesetsNewIncludes;
- public static String FilesetsNewExcludes;
- public static String FilesetsNewPreview;
-
/* Editor Strings */
public static String EditorSetDeployLabel;
public static String EditorSetTempDeployLabel;
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-09-29 20:04:15 UTC (rev 10551)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2008-09-29 20:11:03 UTC (rev 10552)
@@ -178,22 +178,6 @@
DescriptorXPathComplex=Show all details in properties view.
DescriptorXPathMatch=Match
-
-#Filesets
-FilesetsCreateFilter=Create File Filter
-FilesetsDeleteFilter=Delete File Filter
-FilesetsEditFilter=Edit File Filter
-FilesetsDeleteFile=Delete File
-FilesetsEditFile=Edit File
-FilesetsNewFileset=New File Filter
-FilesetsNewName=Name:
-FilesetsNewRootDir=Root Directory:
-FilesetsNewBrowse=Browse...
-FilesetsNewIncludes=Includes:
-FilesetsNewExcludes=Excludes:
-FilesetsNewPreview=Preview
-
-
#Editor
EditorSetDeployLabel=Set Deploy Directory
EditorSetTempDeployLabel=Set Temporary Deploy Directory
16 years, 3 months
JBoss Tools SVN: r10551 - in trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools: src/org/jboss/ide/eclipse/archives/webtools and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-09-29 16:04:15 -0400 (Mon, 29 Sep 2008)
New Revision: 10551
Added:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/.settings/org.eclipse.jdt.ui.prefs
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/Messages.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/Messages.properties
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/.settings/org.eclipse.jdt.core.prefs
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/IntegrationPlugin.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/EarArchiveType.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/EjbArchiveType.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/J2EEArchiveType.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/WarArchiveType.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/ArchivesModuleModelListener.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/ModulePackageTypeConverter.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/PackageModuleFactory.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/PackagesPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/ArchivePublishWizard.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetViewProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/NewEARAction.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/NewEJBJARAction.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/NewWARAction.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/PreviewPage.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/PublishAction.java
Log:
nls
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/.settings/org.eclipse.jdt.core.prefs 2008-09-29 19:05:48 UTC (rev 10550)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/.settings/org.eclipse.jdt.core.prefs 2008-09-29 20:04:15 UTC (rev 10551)
@@ -1,4 +1,4 @@
-#Tue Aug 26 18:57:30 CDT 2008
+#Mon Sep 29 15:27:01 EDT 2008
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
@@ -7,6 +7,64 @@
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.5
Added: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/.settings/org.eclipse.jdt.ui.prefs (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/.settings/org.eclipse.jdt.ui.prefs 2008-09-29 20:04:15 UTC (rev 10551)
@@ -0,0 +1,3 @@
+#Mon Sep 29 15:27:03 EDT 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/IntegrationPlugin.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/IntegrationPlugin.java 2008-09-29 19:05:48 UTC (rev 10550)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/IntegrationPlugin.java 2008-09-29 20:04:15 UTC (rev 10551)
@@ -10,11 +10,11 @@
public class IntegrationPlugin extends AbstractUIPlugin {
// The plug-in ID
- public static final String PLUGIN_ID = "org.jboss.ide.eclipse.archives.webtools";
+ public static final String PLUGIN_ID = "org.jboss.ide.eclipse.archives.webtools"; //$NON-NLS-1$
// The shared instance
private static IntegrationPlugin plugin;
-
+
/**
* The constructor
*/
Added: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/Messages.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/Messages.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/Messages.java 2008-09-29 20:04:15 UTC (rev 10551)
@@ -0,0 +1,55 @@
+package org.jboss.ide.eclipse.archives.webtools;
+
+import org.eclipse.osgi.util.NLS;
+import org.jboss.ide.eclipse.archives.core.ArchivesCoreMessages;
+
+public class Messages extends NLS {
+
+ public static String ExceptionCannotScanDirectory;
+ public static String ExceptionUnexpectedException;
+ public static String ExceptionCannotDeployFile;
+ public static String ErrorDuringPublish;
+ public static String ArchivePublishSettings;
+ public static String SelectServerWizard;
+ public static String SelectServerWizardDescription;
+ public static String SelectServerWizardTitle;
+ public static String AlwaysPublishToTheseServers;
+ public static String AutoDeployAfterBuild;
+ public static String DeleteFiles;
+ public static String DeleteFilesMessage;
+
+ /* Filesets addition */
+ public static String FilesetsCreateFilter;
+ public static String FilesetsDeleteFilter;
+ public static String FilesetsEditFilter;
+ public static String FilesetsDeleteFile;
+ public static String FilesetsEditFile;
+ public static String FilesetsNewFileset;
+ public static String FilesetsNewName;
+ public static String FilesetsNewRootDir;
+ public static String FilesetsNewBrowse;
+ public static String FilesetsNewIncludes;
+ public static String FilesetsNewExcludes;
+ public static String FilesetsNewPreview;
+ public static String FilesetsCannotOpenFile;
+ public static String FilesetsDialogTitle;
+ public static String FilesetsDialogMessage;
+
+
+ public static String NewEar;
+ public static String EarPreview;
+ public static String EarDescription;
+ public static String NewWar;
+ public static String WarPreview;
+ public static String WarDescription;
+ public static String NewEjbJar;
+ public static String Preview;
+ public static String BuildArchive;
+ public static String EjbJarPreview;
+ public static String EjbJarDescription;
+
+
+ static {
+ initializeMessages("org.jboss.ide.eclipse.archives.webtools.Messages", ArchivesCoreMessages.class); //$NON-NLS-1$
+ }
+}
Added: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/Messages.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/Messages.properties (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/Messages.properties 2008-09-29 20:04:15 UTC (rev 10551)
@@ -0,0 +1,43 @@
+ExceptionCannotScanDirectory=Cannot scan directory
+ExceptionUnexpectedException=Unexpected exception
+ExceptionCannotDeployFile=Cannot deploy file {0}
+ErrorDuringPublish=Error during publish
+ArchivePublishSettings=Archive Publish Settings
+SelectServerWizard=Select Server Wizard
+SelectServerWizardDescription=Select the server to publish the archive to.
+SelectServerWizardTitle=Publish archive to a server
+AlwaysPublishToTheseServers=Always publish to these servers
+AutoDeployAfterBuild=Auto-deploy to selected servers after builds
+DeleteFiles=Delete Files?
+DeleteFilesMessage=Are you sure you want to delete the selected files?
+
+
+
+#Filesets
+FilesetsCreateFilter=Create File Filter
+FilesetsDeleteFilter=Delete File Filter
+FilesetsEditFilter=Edit File Filter
+FilesetsDeleteFile=Delete File
+FilesetsEditFile=Edit File
+FilesetsNewFileset=New File Filter
+FilesetsNewName=Name:
+FilesetsNewRootDir=Root Directory:
+FilesetsNewBrowse=Browse...
+FilesetsNewIncludes=Includes:
+FilesetsNewExcludes=Excludes:
+FilesetsNewPreview=Preview
+FilesetsCannotOpenFile=Cannot open file
+FilesetsDialogTitle=File filter
+FilesetsDialogMessage=Creates a new file filter
+
+NewEar=New EAR
+EarPreview=EAR Preview
+EarDescription=Preview the EAR\nLater, you can customize this structure further.
+NewWar=New WAR
+WarPreview=WAR Preview
+WarDescription=Preview the WAR\nLater, you can customize this structure further.
+NewEjbJar=New EJB JAR
+Preview=Preview
+BuildArchive=Build Archive
+EjbJarPreview=EJB JAR Preview
+EjbJarDescription=Preview the EJB JAR\nLater, you can customize this structure further.
\ No newline at end of file
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/EarArchiveType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/EarArchiveType.java 2008-09-29 19:05:48 UTC (rev 10550)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/EarArchiveType.java 2008-09-29 20:04:15 UTC (rev 10551)
@@ -39,9 +39,12 @@
* @author rob.stryker(a)redhat.com
*/
public class EarArchiveType extends J2EEArchiveType {
- public final static String ID = "org.jboss.ide.eclipse.as.core.packages.earPackageType";
+ public final static String ID = "org.jboss.ide.eclipse.as.core.packages.earPackageType"; //$NON-NLS-1$
+ private static final String EXTENSION = ".ear"; //$NON-NLS-1$
+ private static final String JAR_EXTENSION = ".jar"; //$NON-NLS-1$
+
public String getAssociatedModuleType() {
- return "jst.ear";
+ return "jst.ear"; //$NON-NLS-1$
}
public String getId() {
@@ -49,25 +52,25 @@
}
public String getLabel() {
- return "EAR";
+ return "EAR"; //$NON-NLS-1$
}
-
+
public IArchive createDefaultConfiguration(String project, IProgressMonitor monitor) {
IModule mod = getModule(project);
- if( mod != null )
+ if( mod != null )
return createDefaultConfigFromModule(mod, monitor);
else
return createDefaultConfiguration2(project, monitor);
}
-
+
public IArchive createDefaultConfiguration2(String projectName,
IProgressMonitor monitor) {
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- IArchive topLevel = createGenericIArchive(project, null, project.getName() + ".ear");
+ IArchive topLevel = createGenericIArchive(project, null, project.getName() + EXTENSION);
topLevel.setDestinationPath(new Path(project.getName()));
topLevel.setInWorkspace(true);
-
+
fillDefaultConfiguration(projectName, topLevel, monitor);
return topLevel;
}
@@ -76,10 +79,10 @@
IProgressMonitor monitor) {
IProject project = module.getProject();
IContainer sourceContainer = project.getFolder(EARCONTENT);
- IArchive topLevel = createGenericIArchive(project, null, project.getName() + ".ear", sourceContainer);
+ IArchive topLevel = createGenericIArchive(project, null, project.getName() + EXTENSION, sourceContainer);
topLevel.setDestinationPath(new Path(project.getName()));
topLevel.setInWorkspace(true);
-
+
fillDefaultConfiguration(project.getName(), topLevel, monitor);
return topLevel;
}
@@ -93,10 +96,10 @@
// add fileset
IArchiveFolder metainf = addFolder(project, topLevel, METAINF);
addFileset(project, metainf, new Path(projectName).append(METAINF).toOSString(), null);
-
+
} else {
// now add children
- addFileset(project, topLevel, new Path(project.getName()).append(EARCONTENT).toOSString(), "**/*.*");
+ addFileset(project, topLevel, new Path(project.getName()).append(EARCONTENT).toOSString(), "**/*.*"); //$NON-NLS-1$
IEnterpriseApplication earModule = (IEnterpriseApplication)mod.loadAdapter(IEnterpriseApplication.class, monitor);
IModule[] childModules = earModule.getModules();
for( int i = 0; i < childModules.length; i++ ) {
@@ -104,7 +107,7 @@
IArchiveType type = ModulePackageTypeConverter.getPackageTypeFor(child);
IArchive childPack;
if( type == null ) {
- childPack = createGenericIArchive(child.getProject(), null, child.getProject().getName() + ".jar");
+ childPack = createGenericIArchive(child.getProject(), null, child.getProject().getName() + JAR_EXTENSION);
} else {
childPack = type.createDefaultConfiguration(child.getProject().getName(), new NullProgressMonitor());
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/EjbArchiveType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/EjbArchiveType.java 2008-09-29 19:05:48 UTC (rev 10550)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/EjbArchiveType.java 2008-09-29 20:04:15 UTC (rev 10551)
@@ -32,14 +32,14 @@
import org.jboss.ide.eclipse.archives.core.model.IArchive;
/**
- *
+ *
* @author rob.stryker(a)redhat.com
*/
public class EjbArchiveType extends J2EEArchiveType {
- public final static String ID = "org.jboss.ide.eclipse.as.core.packages.ejbPackageType";
+ public final static String ID = "org.jboss.ide.eclipse.as.core.packages.ejbPackageType"; //$NON-NLS-1$
public String getAssociatedModuleType() {
- return "jst.ejb";
+ return "jst.ejb"; //$NON-NLS-1$
}
public String getId() {
@@ -47,13 +47,13 @@
}
public String getLabel() {
- return "EJB JAR";
+ return "EJB JAR"; //$NON-NLS-1$
}
public IArchive createDefaultConfiguration(String projectName, IProgressMonitor monitor) {
IProject project = getProject(projectName);
- IArchive topLevel = createGenericIArchive(project, null, project.getName() + ".jar");
- return fillDefaultConfiguration(project, topLevel, monitor);
+ IArchive topLevel = createGenericIArchive(project, null, project.getName() + ".jar"); //$NON-NLS-1$
+ return fillDefaultConfiguration(project, topLevel, monitor);
}
public IArchive fillDefaultConfiguration(String projectName, IArchive topLevel, IProgressMonitor monitor) {
@@ -62,11 +62,11 @@
public IArchive fillDefaultConfiguration(IProject project, IArchive topLevel, IProgressMonitor monitor) {
IModule mod = getModule(project.getName());
-
+
if( mod == null ) {
// TODO fix me
} else {
- if( mod.getModuleType().getId().equals("jst.ejb") ) {
+ if( mod.getModuleType().getId().equals("jst.ejb") ) { //$NON-NLS-1$
try {
IJavaProject proj = JavaCore.create(project);
IPath outputLoc = proj.getOutputLocation();
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/J2EEArchiveType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/J2EEArchiveType.java 2008-09-29 19:05:48 UTC (rev 10550)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/J2EEArchiveType.java 2008-09-29 20:04:15 UTC (rev 10551)
@@ -46,22 +46,23 @@
import org.jboss.ide.eclipse.archives.core.model.IArchiveType;
import org.jboss.ide.eclipse.archives.core.model.DirectoryScannerFactory.DirectoryScannerExtension;
import org.jboss.ide.eclipse.archives.webtools.IntegrationPlugin;
+import org.jboss.ide.eclipse.archives.webtools.Messages;
/**
*
* @author rob.stryker(a)jboss.com
*/
public abstract class J2EEArchiveType implements IArchiveType {
- public static final String METAINF = "META-INF";
- public static final String WEBINF = "WEB-INF";
- public static final String CLASSES = "classes";
- public static final String LIB = "lib";
- public static final String WEBCONTENT = "WebContent";
- public static final String EARCONTENT = "EarContent";
- public static final String EJBMODULE = "ejbModule";
+ public static final String METAINF = "META-INF"; //$NON-NLS-1$
+ public static final String WEBINF = "WEB-INF";//$NON-NLS-1$
+ public static final String CLASSES = "classes";//$NON-NLS-1$
+ public static final String LIB = "lib";//$NON-NLS-1$
+ public static final String WEBCONTENT = "WebContent";//$NON-NLS-1$
+ public static final String EARCONTENT = "EarContent";//$NON-NLS-1$
+ public static final String EJBMODULE = "ejbModule";//$NON-NLS-1$
- protected boolean isModuleType(IModule module, String moduleTypeId){
+ protected boolean isModuleType(IModule module, String moduleTypeId){
if(module.getModuleType()!=null && moduleTypeId.equals(module.getModuleType().getId()))
return true;
return false;
@@ -69,12 +70,12 @@
protected IModule getModule(String projectName) {
IModuleArtifact moduleArtifacts[] = ServerPlugin.getModuleArtifacts(getProject(projectName));
-
+
if (moduleArtifacts != null && moduleArtifacts.length > 0)
return moduleArtifacts[0].getModule();
else return null;
}
-
+
protected IProject getProject(String projectName) {
return ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
}
@@ -83,7 +84,7 @@
try {
IJavaProject javaProject = JavaCore.create(project);
Assert.isNotNull(javaProject);
-
+
IPath sourcePath;
try {
sourcePath = javaProject.getOutputLocation();
@@ -92,21 +93,21 @@
}
sourcePath = sourcePath.removeFirstSegments(1);
IContainer sourcePathContainer;
- if( sourcePath.segmentCount() == 0 )
+ if( sourcePath.segmentCount() == 0 )
sourcePathContainer = project;
else
sourcePathContainer = project.getFolder(sourcePath);
return createGenericIArchive(project, deployDirectory, packageName, sourcePathContainer);
} catch( Exception e ) {
- IntegrationPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, IntegrationPlugin.PLUGIN_ID, "Unexpected Exception", e));
+ IntegrationPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, IntegrationPlugin.PLUGIN_ID, Messages.ExceptionUnexpectedException, e));
}
return null;
- }
-
+ }
+
// Create a detached package with some generic settings
public static IArchive createGenericIArchive(IProject project, String deployDirectory, String packageName, IContainer sourceContainer) {
IArchive jar = ArchiveNodeFactory.createArchive();
-
+
if( deployDirectory != null ) {
jar.setDestinationPath(new Path(deployDirectory));
jar.setInWorkspace(ResourcesPlugin.getWorkspace().getRoot().getLocation().isPrefixOf(new Path(deployDirectory)));
@@ -120,15 +121,15 @@
return jar;
}
-
- public static IArchiveFolder addFolder(IProject project,
+
+ public static IArchiveFolder addFolder(IProject project,
IArchiveNode parent, String name) throws ArchivesModelException {
IArchiveFolder folder = ArchiveNodeFactory.createFolder();
folder.setName(name);
parent.addChild(folder);
return folder;
}
- public static IArchiveFileSet addFileset(IProject project, IArchiveNode parent,
+ public static IArchiveFileSet addFileset(IProject project, IArchiveNode parent,
String sourcePath, String includePattern) throws ArchivesModelException {
IArchiveFileSet fs = ArchiveNodeFactory.createFileset();
Assert.isNotNull(project);
@@ -136,7 +137,7 @@
Assert.isNotNull(javaProject);
IContainer sourceContainer;
- if( sourcePath != null && !sourcePath.equals("")) {
+ if( sourcePath != null && !sourcePath.equals("")) { //$NON-NLS-1$
Path p = new Path(sourcePath);
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
sourceContainer = p.segmentCount() != 1 ? (IContainer)root.getFolder(p) : root.getProject(p.segment(0));
@@ -146,18 +147,18 @@
fs.setRawSourcePath(sourceContainer.getFullPath().toString());
fs.setInWorkspace(true);
- fs.setIncludesPattern( includePattern == null ? "**/*" : includePattern );
+ fs.setIncludesPattern( includePattern == null ? "**/*" : includePattern ); //$NON-NLS-1$
parent.addChild(fs);
return fs;
}
-
+
public abstract String getAssociatedModuleType();
-
+
/*
- * Creates a directory scanner for some global path
+ * Creates a directory scanner for some global path
*/
public static DirectoryScannerExtension createDirectoryScanner (String rawPath, String includes, String excludes, boolean scan) {
return DirectoryScannerFactory.createDirectoryScanner(rawPath, null, includes, excludes, null, false, 1, scan);
}
-
+
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/WarArchiveType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/WarArchiveType.java 2008-09-29 19:05:48 UTC (rev 10550)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/archivetypes/WarArchiveType.java 2008-09-29 20:04:15 UTC (rev 10551)
@@ -47,36 +47,37 @@
import org.jboss.ide.eclipse.archives.core.model.IArchiveFolder;
import org.jboss.ide.eclipse.archives.core.model.IArchiveNode;
import org.jboss.ide.eclipse.archives.webtools.IntegrationPlugin;
+import org.jboss.ide.eclipse.archives.webtools.Messages;
/**
*
* @author rob.stryker(a)jboss.com
*/
public class WarArchiveType extends J2EEArchiveType {
- public static final String WAR_PACKAGE_TYPE = "org.jboss.ide.eclipse.as.core.packages.warPackage";
+ public static final String WAR_PACKAGE_TYPE = "org.jboss.ide.eclipse.as.core.packages.warPackage"; //$NON-NLS-1$
public String getAssociatedModuleType() {
- return "jst.web";
+ return "jst.web"; //$NON-NLS-1$
}
public IArchive createDefaultConfiguration(String projectName, IProgressMonitor monitor) {
IModule mod = getModule(projectName);
- if( mod == null )
+ if( mod == null )
return createDefaultConfiguration2(projectName, monitor);
else
return createDefaultConfigFromModule(mod, monitor);
}
-
+
protected IArchive createDefaultConfiguration2(String projectName, IProgressMonitor monitor) {
IProject project = getProject(projectName);
- IArchive topLevel = createGenericIArchive(project, null, project.getName() + ".war");
+ IArchive topLevel = createGenericIArchive(project, null, project.getName() + ".war"); //$NON-NLS-1$
return fillDefaultConfiguration(project, topLevel, monitor);
}
-
+
public IArchive fillDefaultConfiguration(String projectName, IArchive topLevel, IProgressMonitor monitor) {
return fillDefaultConfiguration(getProject(projectName), topLevel, monitor);
}
- public IArchive fillDefaultConfiguration(IProject project, IArchive topLevel, IProgressMonitor monitor) {
+ public IArchive fillDefaultConfiguration(IProject project, IArchive topLevel, IProgressMonitor monitor) {
try {
IModule mod = getModule(project.getName());
IArchiveFolder webinf = addFolder(project, topLevel, WEBINF);
@@ -85,7 +86,7 @@
addReferencedProjectsAsLibs(project, lib);
addLibFileset(project, lib, true);
addClassesFileset(project, classes);
-
+
if( mod == null ) {
addWebinfFileset(project, webinf);
} else {
@@ -94,24 +95,24 @@
} catch( ArchivesModelException ame) {}
return topLevel;
}
-
+
// For modules only
protected void addWebContentFileset(IProject project, IArchiveNode packageRoot) throws ArchivesModelException {
try {
IPath projectPath = project.getLocation();
- DirectoryScanner scanner = createDirectoryScanner(projectPath.toString(), "**/WEB-INF/web.xml", null, true);
+ DirectoryScanner scanner = createDirectoryScanner(projectPath.toString(), "**/WEB-INF/web.xml", null, true); //$NON-NLS-1$
String[] files = scanner.getIncludedFiles();
// just take the first
if( files.length > 0 ) {
IPath path = new Path(files[0]);
path = path.removeLastSegments(2); // remove the file name
path = new Path(project.getName()).append(path); // pre-pend project name to make workspace-relative
- IArchiveFileSet fs = addFileset(project, packageRoot, path.toOSString(), "**/*");
+ IArchiveFileSet fs = addFileset(project, packageRoot, path.toOSString(), "**/*"); //$NON-NLS-1$
//If we have separate file set for libraries, we do not need to duplicate jars.
- fs.setExcludesPattern("**/WEB-INF/lib/*.jar");
+ fs.setExcludesPattern("**/WEB-INF/lib/*.jar"); //$NON-NLS-1$
}
} catch( IllegalStateException ise ) {
- IStatus status = new Status(IStatus.WARNING, IntegrationPlugin.PLUGIN_ID, "Directory could not be scanned", ise);
+ IStatus status = new Status(IStatus.WARNING, IntegrationPlugin.PLUGIN_ID, Messages.ExceptionCannotScanDirectory, ise);
IntegrationPlugin.getDefault().getLog().log(status);
}
}
@@ -122,7 +123,7 @@
try {
IPath outputLoc = project.getWorkspace().getRoot().getLocation();
outputLoc = outputLoc.append(jp.getOutputLocation());
- addFileset(project, folder, jp.getOutputLocation().toOSString(), "**/*");
+ addFileset(project, folder, jp.getOutputLocation().toOSString(), "**/*"); //$NON-NLS-1$
} catch( JavaModelException jme ) {
// no logging
}
@@ -131,39 +132,39 @@
protected void addWebinfFileset(IProject project, IArchiveFolder folder) throws ArchivesModelException {
try {
IPath projectPath = project.getLocation();
- DirectoryScanner scanner = createDirectoryScanner(projectPath.toString(), "**/web.xml", null, true);
+ DirectoryScanner scanner = createDirectoryScanner(projectPath.toString(), "**/web.xml", null, true); //$NON-NLS-1$
String[] files = scanner.getIncludedFiles();
// just take the first
if( files.length > 0 ) {
IPath path = new Path(files[0]);
path = path.removeLastSegments(1); // remove the file name
path = new Path(project.getName()).append(path); // pre-pend project name to make workspace-relative
- addFileset(project, folder, path.toOSString(), "**/*");
+ addFileset(project, folder, path.toOSString(), "**/*"); //$NON-NLS-1$
}
} catch( IllegalStateException ise ) {
- IStatus status = new Status(IStatus.WARNING, ArchivesCorePlugin.PLUGIN_ID, "Directory could not be scanned", ise);
+ IStatus status = new Status(IStatus.WARNING, ArchivesCorePlugin.PLUGIN_ID, Messages.ExceptionCannotScanDirectory, ise);
ArchivesCorePlugin.getDefault().getLog().log(status);
}
}
-
+
// Lib support
protected void addLibFileset(IProject project, IArchiveFolder folder, boolean includeTopLevelJars) throws ArchivesModelException {
// Let us find /WEB-INF/lib directory and set it as source for the file set.
String sourcePath = null;
-
+
IPath projectPath = project.getLocation();
- DirectoryScanner scanner = createDirectoryScanner(projectPath.toString(), "**/WEB-INF/web.xml", null, true);
+ DirectoryScanner scanner = createDirectoryScanner(projectPath.toString(), "**/WEB-INF/web.xml", null, true); //$NON-NLS-1$
String[] files = scanner.getIncludedFiles();
-
+
if(files != null && files.length > 0) {
IPath path = new Path(files[0]);
- path = path.removeLastSegments(1).append("lib");
+ path = path.removeLastSegments(1).append("lib"); //$NON-NLS-1$
sourcePath = project.getFullPath().append(path).toString();
- addFileset(project, folder, sourcePath, "*.jar"); // add default jars
+ addFileset(project, folder, sourcePath, "*.jar"); // add default jars //$NON-NLS-1$
} else {
//having failed to find 'lib' directory, let us make source of the project itself
sourcePath = project.getName();
- DirectoryScanner scanner2 = createDirectoryScanner(projectPath.toString(), "**/*.jar", null, true);
+ DirectoryScanner scanner2 = createDirectoryScanner(projectPath.toString(), "**/*.jar", null, true); //$NON-NLS-1$
String[] files2 = scanner2.getIncludedFiles();
IPath p;
ArrayList list = new ArrayList();
@@ -171,7 +172,7 @@
p = project.getFullPath().append(files2[i]).removeLastSegments(1);
if( !list.contains(p)) {
list.add(p);
- addFileset(project, folder, p.toString(), "*.jar"); // add default jars
+ addFileset(project, folder, p.toString(), "*.jar"); // add default jars //$NON-NLS-1$
}
}
}
@@ -195,10 +196,10 @@
}
}
}
-
-
+
+
protected void createLibFromProject(IProject project, IArchiveFolder folder) throws ArchivesModelException {
- IArchive pack = createGenericIArchive(project, null, project.getName() + ".jar");
+ IArchive pack = createGenericIArchive(project, null, project.getName() + ".jar");//$NON-NLS-1$
folder.addChild(pack);
}
@@ -207,31 +208,31 @@
IProject project = mod.getProject();
// create the stub
- IArchive topLevel = createGenericIArchive(project, null, project.getName() + ".war");
+ IArchive topLevel = createGenericIArchive(project, null, project.getName() + ".war");//$NON-NLS-1$
topLevel.setDestinationPath(new Path(project.getName()));
topLevel.setInWorkspace(true);
-
+
// add lib folder so we can add libraries
IArchiveFolder webinf = addFolder(project, topLevel, WEBINF);
IArchiveFolder lib = addFolder(project, webinf, LIB);
IArchiveFolder classes = addFolder(project, webinf, CLASSES);
-
+
IVirtualComponent vc = ComponentCore.createComponent(project);
IPath webContentPath = vc.getRootFolder().getUnderlyingFolder().getFullPath();
- addFileset(project, topLevel, webContentPath.toOSString(), "**/*");
+ addFileset(project, topLevel, webContentPath.toOSString(), "**/*");//$NON-NLS-1$
addClassesFileset(project, classes);
-
+
// package each child and add to lib folder
IWebModule webModule = (IWebModule)mod.loadAdapter(IWebModule.class, monitor);
IModule[] childModules = webModule.getModules();
for (int i = 0; i < childModules.length; i++) {
IModule child = childModules[i];
- lib.addChild(createGenericIArchive(child.getProject(), null, child.getProject().getName() + ".jar"));
+ lib.addChild(createGenericIArchive(child.getProject(), null, child.getProject().getName() + ".jar"));//$NON-NLS-1$
}
return topLevel;
} catch( Exception e ) {
- IntegrationPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, IntegrationPlugin.PLUGIN_ID, "Unexpected Exception", e));
+ IntegrationPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, IntegrationPlugin.PLUGIN_ID, Messages.ExceptionUnexpectedException, e));
}
return null;
}
@@ -241,6 +242,6 @@
}
public String getLabel() {
- return "WAR";
+ return "WAR";//$NON-NLS-1$
}
}
\ No newline at end of file
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/ArchivesModuleModelListener.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/ArchivesModuleModelListener.java 2008-09-29 19:05:48 UTC (rev 10550)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/ArchivesModuleModelListener.java 2008-09-29 20:04:15 UTC (rev 10551)
@@ -29,18 +29,19 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.IServerWorkingCopy;
import org.eclipse.wst.server.core.ServerCore;
import org.eclipse.wst.server.core.internal.ModuleFactory;
import org.eclipse.wst.server.core.internal.ServerPlugin;
-import org.jboss.ide.eclipse.archives.core.model.AbstractBuildListener;
import org.jboss.ide.eclipse.archives.core.model.ArchivesModel;
import org.jboss.ide.eclipse.archives.core.model.IArchive;
import org.jboss.ide.eclipse.archives.core.model.IArchiveModelListener;
import org.jboss.ide.eclipse.archives.core.model.IArchiveNodeDelta;
import org.jboss.ide.eclipse.archives.webtools.IntegrationPlugin;
+import org.jboss.ide.eclipse.archives.webtools.Messages;
import org.jboss.ide.eclipse.archives.webtools.modules.PackageModuleFactory.PackagedModuleDelegate;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
@@ -53,8 +54,8 @@
public class ArchivesModuleModelListener implements IArchiveModelListener {
public static ArchivesModuleModelListener instance;
- public static final String DEPLOY_SERVERS = "org.jboss.ide.eclipse.as.core.model.PackagesListener.DeployServers";
- public static final String DEPLOY_AFTER_BUILD = "org.jboss.ide.eclipse.as.core.model.PackagesListener.DeployAfterBuild";
+ public static final String DEPLOY_SERVERS = "org.jboss.ide.eclipse.as.core.model.PackagesListener.DeployServers";//$NON-NLS-1$
+ public static final String DEPLOY_AFTER_BUILD = "org.jboss.ide.eclipse.as.core.model.PackagesListener.DeployAfterBuild";//$NON-NLS-1$
public static ArchivesModuleModelListener getInstance() {
if( instance == null ) {
@@ -97,13 +98,13 @@
saved.publish(IServer.PUBLISH_INCREMENTAL, new NullProgressMonitor());
} catch( CoreException ce ) {
return new Status(Status.ERROR, IntegrationPlugin.PLUGIN_ID,
- "Cannot deploy file " + module[0].getName(), ce);
+ NLS.bind(Messages.ExceptionCannotDeployFile, module[0].getName()), ce);
}
return Status.OK_STATUS;
}
protected static IModule[] getModule(IArchive node) {
- ModuleFactory factory = ServerPlugin.findModuleFactory("org.jboss.ide.eclipse.as.core.PackageModuleFactory");
+ ModuleFactory factory = ServerPlugin.findModuleFactory(PackageModuleFactory.FACTORY_TYPE_ID);
IModule mod = factory.findModule(PackageModuleFactory.getId(node), new NullProgressMonitor());
return new IModule[] { mod };
}
@@ -119,10 +120,10 @@
}
public static DeployableServerBehavior[] getServers(String servers) {
- if( servers == null || "".equals(servers))
+ if( servers == null || "".equals(servers))//$NON-NLS-1$
return null;
ArrayList<DeployableServerBehavior> list = new ArrayList<DeployableServerBehavior>();
- String[] byId = servers.split(",");
+ String[] byId = servers.split(",");//$NON-NLS-1$
for( int i = 0; i < byId.length; i++ ) {
IServer server = ServerCore.findServer(byId[i]);
if( server != null ) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/ModulePackageTypeConverter.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/ModulePackageTypeConverter.java 2008-09-29 19:05:48 UTC (rev 10550)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/ModulePackageTypeConverter.java 2008-09-29 20:04:15 UTC (rev 10551)
@@ -35,11 +35,11 @@
public class ModulePackageTypeConverter {
public static IArchiveType getPackageTypeFor(IModule module) {
String modType = module.getModuleType().getId();
- if("jst.web".equals(modType)) {
+ if("jst.web".equals(modType)) {//$NON-NLS-1$
return ArchivesCore.getInstance().getExtensionManager().getArchiveType(WarArchiveType.WAR_PACKAGE_TYPE);
- } else if("jst.ear".equals(modType)) {
+ } else if("jst.ear".equals(modType)) {//$NON-NLS-1$
return ArchivesCore.getInstance().getExtensionManager().getArchiveType(EarArchiveType.ID);
- } else if("jst.ejb".equals(modType)) {
+ } else if("jst.ejb".equals(modType)) {//$NON-NLS-1$
return ArchivesCore.getInstance().getExtensionManager().getArchiveType(EjbArchiveType.ID);
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/PackageModuleFactory.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/PackageModuleFactory.java 2008-09-29 19:05:48 UTC (rev 10550)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/PackageModuleFactory.java 2008-09-29 20:04:15 UTC (rev 10551)
@@ -57,13 +57,13 @@
* @author rob.stryker(a)jboss.com
*/
public class PackageModuleFactory extends ModuleFactoryDelegate {
-
- public static final String FACTORY_TYPE_ID = "org.jboss.ide.eclipse.as.core.PackageModuleFactory";
- public static final String MODULE_TYPE = "jboss.package";
- public static final String VERSION = "1.0";
- public static final String MODULE_ID_PROPERTY_KEY = "org.jboss.ide.eclipse.as.core.packages.ModuleIDPropertyKey";
-
+ public static final String FACTORY_TYPE_ID = "org.jboss.ide.eclipse.as.core.PackageModuleFactory";//$NON-NLS-1$
+ public static final String MODULE_TYPE = "jboss.package";//$NON-NLS-1$
+ public static final String VERSION = "1.0";//$NON-NLS-1$
+
+ public static final String MODULE_ID_PROPERTY_KEY = "org.jboss.ide.eclipse.as.core.packages.ModuleIDPropertyKey";//$NON-NLS-1$
+
// the factory delegate and the factory respectively
private static PackageModuleFactory factDelegate;
private static ModuleFactory factory;
@@ -75,7 +75,7 @@
public static PackageModuleFactory getFactory() {
if( factDelegate == null ) {
ModuleFactory[] factories = ServerPlugin.getModuleFactories();
-
+
for( int i = 0; i < factories.length; i++ ) {
if( factories[i].getId().equals(PackageModuleFactory.FACTORY_TYPE_ID)) {
Object o = factories[i].getDelegate(new NullProgressMonitor());
@@ -91,7 +91,7 @@
}
/**
- * Get the module ID of this IArchive if it exists.
+ * Get the module ID of this IArchive if it exists.
* Do not create a new one otherwise
* @param pack
* @return
@@ -99,7 +99,7 @@
protected static String getStamp(IArchive pack) {
return getStamp(pack, false);
}
-
+
/**
* Get the module ID of this IArchive if it exists.
* If create is true, and the ID is not set, set a default ID.
@@ -110,16 +110,16 @@
protected static String getStamp(IArchive pack, boolean create) {
String propVal = pack.getProperty(MODULE_ID_PROPERTY_KEY);
if( propVal == null && create ) {
- propVal = "" + new Date().getTime();
+ propVal = "" + new Date().getTime();//$NON-NLS-1$
}
return propVal;
}
-
- protected static String getId(IArchive pack) {
+
+ protected static String getId(IArchive pack) {
IPath p = pack.getModelRootNode().getDescriptor().append(getStamp(pack));
return p.toString();
}
-
+
public IModule findModule(String id) {
IModule m = super.findModule(id);
IModule[] allModules = getModules();
@@ -130,7 +130,7 @@
}
return m;
}
-
+
/**
* Return the name of the project in the workspace
* @param node
@@ -145,23 +145,23 @@
return list[i].getName();
return null;
}
-
+
/**
* Get the visible name of this module
* @param pack
* @return
*/
public static String getName(IArchive pack) {
- return getProjectName(pack) + "/" + pack.getName();
+ return getProjectName(pack) + "/" + pack.getName();//$NON-NLS-1$
}
-
-
+
+
protected ArchivesModelModuleContributor moduleContributor;
public PackageModuleFactory() {
super();
}
-
+
public void initialize() {
moduleContributor = ArchivesModelModuleContributor.getInstance();
}
@@ -169,7 +169,7 @@
protected IModule createModule2(IArchive pack, IProject project) {
return createModule(getId(pack), getName(pack), MODULE_TYPE, VERSION, project);
}
-
+
public IModule[] getModules(IProject project) {
moduleContributor.refreshProject(project.getLocation());
return super.getModules(project);
@@ -177,17 +177,17 @@
public IModule[] getModules() {
return moduleContributor.getModules();
}
-
+
public ModuleDelegate getModuleDelegate(IModule module) {
return moduleContributor.getModuleDelegate(module);
}
-
+
public static interface IModuleContributor {
public IModule[] getModules();
public boolean containsModule(IModule module);
public PackagedModuleDelegate getModuleDelegate(IModule module);
}
-
+
public static interface IExtendedModuleResource extends IModuleResource {
public IPath getSourcePath();
public IArchiveNode getNode();
@@ -222,7 +222,7 @@
IArchiveNode parent = node.getParent();
ArchiveContainerResource parentAsResource = members.get(parent);
IPath rel = node.getRootArchiveRelativePath();
- members.put(node, new ArchiveContainerResource(name, node, rel));
+ members.put(node, new ArchiveContainerResource(name, node, rel));
pathToNode.put(rel, node);
parentAsResource.addChild(members.get(node));
} else if( type == IArchiveNode.TYPE_ARCHIVE_FILESET ) {
@@ -232,16 +232,16 @@
return true;
}
-
+
public IModuleResource getRootResource() {
return members.get(pack);
}
-
+
public IModuleResource getResourceForNode(IArchiveNode node) {
return members.get(node);
}
}
-
+
public static class ArchiveContainerResource implements IModuleFolder, IExtendedModuleResource {
protected IPath moduleRelativePath;
@@ -249,7 +249,7 @@
protected IArchiveNode node;
protected String name;
private HashMap<IPath, IModuleResource> members;
-
+
// represents source folder on disk. only used if node is fileset
// private IPath folderGlobalPath = null;
public ArchiveContainerResource(String name,IArchiveNode node,IPath moduleRelativePath ) {
@@ -261,7 +261,7 @@
fsRelative = moduleRelativePath.removeFirstSegments(node.getParent().getRootArchiveRelativePath().segmentCount());
}
}
-
+
public int hashCode() {
return name.hashCode() * 37 + moduleRelativePath.hashCode();
}
@@ -277,28 +277,28 @@
public void addChild(IModuleResource resource) {
members.put(resource.getModuleRelativePath(), resource);
}
-
+
public void removeChild(IPath moduleRelativePath) {
members.remove(moduleRelativePath);
}
public IModuleResource getChild(IPath path) {
return members.get(path);
}
-
+
public void addFilesetAsChild(IArchiveFileSet fs) {
FileWrapper[] files = fs.findMatchingPaths(); // file-system based source paths
for( int i = 0; i < files.length; i++ ) {
addFilesetPathAsChild(fs, files[i]);
}
}
-
+
public void addFilesetPathAsChild(IArchiveFileSet fs, FileWrapper file) {
IPath fsRelative = new Path(file.getFilesetRelative());
ArchiveContainerResource parent = find(fs, fsRelative.removeLastSegments(1), true);
ExtendedModuleFile emf = new ExtendedModuleFile(file, fs);
parent.addChild(emf);
}
-
+
protected ArchiveContainerResource find(IArchiveFileSet fs, IPath fsRelative, boolean create) {
ArchiveContainerResource resource = this;
ArchiveContainerResource tmpResource;
@@ -317,7 +317,7 @@
}
return resource;
}
-
+
public IModuleResource[] members() {
Collection<IModuleResource> c = members.values();
return c.toArray(new IModuleResource[c.size()]);
@@ -336,13 +336,13 @@
}
public IPath getDeepDestination() {
- IPath tmp = node.getNodeType() == IArchiveNode.TYPE_ARCHIVE_FILESET
+ IPath tmp = node.getNodeType() == IArchiveNode.TYPE_ARCHIVE_FILESET
? moduleRelativePath : node.getRootArchiveRelativePath();
return PathUtils.getGlobalLocation(node.getRootArchive()).append(tmp);
}
-
+
public IPath getConcreteDestFile() {
- if( node.getNodeType() == IArchiveNode.TYPE_ARCHIVE_FILESET )
+ if( node.getNodeType() == IArchiveNode.TYPE_ARCHIVE_FILESET )
return ModelUtil.getBaseDestinationFile((IArchiveFileSet)node,fsRelative);
else
return ModelUtil.getBaseDestinationFile((IArchiveFileSet)node);
@@ -354,7 +354,7 @@
public IPath getSourcePath() {
return null;
}
-
+
}
public static class ExtendedModuleFile extends ModuleFile implements IExtendedModuleResource {
@@ -368,7 +368,7 @@
public int hashCode() {
return getName().hashCode() * 37 + getPath().hashCode();
}
-
+
public IPath getPath() { return new Path(wrapper.getAbsolutePath()); }
public IArchiveNode getNode() { return node; }
public IPath getDeepDestination() {
@@ -389,9 +389,9 @@
}
return false;
}
-
+
}
-
+
public static class PackagedModuleDelegate extends ModuleDelegate {
private IArchive pack;
private IModuleResource rootResource;
@@ -400,14 +400,14 @@
this.pack = pack;
initVisitor = new DelegateInitVisitor(pack);
}
-
+
public IArchive getPackage() {
return pack;
}
public IModule[] getChildModules() {
return new IModule[0];
}
-
+
protected void init() {
initVisitor.reset();
pack.accept(initVisitor);
@@ -418,10 +418,9 @@
init();
return new IModuleResource[] { rootResource };
}
-
+
public IStatus validate() {
- return new Status(IStatus.OK, IntegrationPlugin.PLUGIN_ID,
- 0, "", null);
+ return Status.OK_STATUS;
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/PackagesPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/PackagesPublisher.java 2008-09-29 19:05:48 UTC (rev 10550)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/PackagesPublisher.java 2008-09-29 20:04:15 UTC (rev 10551)
@@ -39,6 +39,7 @@
import org.jboss.ide.eclipse.archives.core.model.IArchive;
import org.jboss.ide.eclipse.archives.core.util.PathUtils;
import org.jboss.ide.eclipse.archives.webtools.IntegrationPlugin;
+import org.jboss.ide.eclipse.archives.webtools.Messages;
import org.jboss.ide.eclipse.archives.webtools.modules.PackageModuleFactory.ExtendedModuleFile;
import org.jboss.ide.eclipse.archives.webtools.modules.PackageModuleFactory.IExtendedModuleResource;
import org.jboss.ide.eclipse.archives.webtools.modules.PackageModuleFactory.PackagedModuleDelegate;
@@ -55,21 +56,21 @@
* @author rob.stryker(a)jboss.com
*/
public class PackagesPublisher implements IJBossServerPublisher {
-
+
protected IDeployableServer server;
protected IModuleResourceDelta[] delta;
protected EventLogTreeItem eventRoot;
-
+
public PackagesPublisher() {
}
-
+
public int getPublishState() {
return IServer.PUBLISH_STATE_NONE;
}
public boolean accepts(IServer server, IModule[] module) {
- if( module != null && module.length > 0
- && "jboss.package".equals(module[0].getModuleType().getId()))
+ if( module != null && module.length > 0
+ && "jboss.package".equals(module[0].getModuleType().getId()))//$NON-NLS-1$
return true;
return false;
}
@@ -80,7 +81,7 @@
this.server = ServerConverter.getDeployableServer(server);
eventRoot = log;
this.delta = delta;
-
+
try {
IModule module2 = module[0];
// if it's being removed
@@ -92,7 +93,7 @@
publishModule(module2, true, monitor);
}
}catch(Exception e) {
- IStatus status = new Status(IStatus.ERROR, IntegrationPlugin.PLUGIN_ID, "Error during publish", e);
+ IStatus status = new Status(IStatus.ERROR, IntegrationPlugin.PLUGIN_ID, Messages.ErrorDuringPublish, e);
IntegrationPlugin.getDefault().getLog().log(status);
}
return null;
@@ -109,14 +110,14 @@
FileUtil.safeDelete(destPath.toFile(), listener);
}
}
-
-
+
+
protected void publishModule(IModule module, boolean incremental, IProgressMonitor monitor) {
IArchive pack = getPackage(module);
IPath sourcePath = pack.getArchiveFilePath();
IPath destPathRoot = new Path(server.getDeployDirectory());
-
+
// if destination is deploy directory... no need to re-copy!
if( destPathRoot.toOSString().equals(PathUtils.getGlobalLocation(pack).toOSString())) {
// fire null publish event
@@ -133,14 +134,14 @@
}
}
- protected void publishFromDelta(IModule module, IPath destPathRoot, IPath sourcePrefix,
+ protected void publishFromDelta(IModule module, IPath destPathRoot, IPath sourcePrefix,
IModuleResourceDelta[] delta, PublisherFileUtilListener listener) {
ArrayList<IPath> changedFiles = new ArrayList<IPath>();
for( int i = 0; i < delta.length; i++ ) {
publishFromDeltaHandle(delta[i], destPathRoot, sourcePrefix, changedFiles, listener);
}
}
-
+
protected int countChanges(IModuleResourceDelta[] deltas) {
IModuleResource res;
int count = 0;
@@ -153,7 +154,7 @@
}
return count;
}
-
+
protected int countConcreteFiles(IModule module) {
PackagedModuleDelegate delegate = (PackagedModuleDelegate)module.loadAdapter(PackagedModuleDelegate.class, new NullProgressMonitor());
try {
@@ -161,7 +162,7 @@
countConcreteFiles(delegate.members()[0], list);
return list.size();
} catch( CoreException ce ) {
-
+
}
return -1;
}
@@ -170,7 +171,7 @@
IExtendedModuleResource emr = ((IExtendedModuleResource)mr);
if( mr instanceof IModuleFile ) {
IPath p = emr.getConcreteDestFile();
- if( !list.contains(p))
+ if( !list.contains(p))
list.add(p);
}
if( mr instanceof IModuleFolder) {
@@ -180,8 +181,8 @@
}
}
}
-
- protected void publishFromDeltaHandle(IModuleResourceDelta delta, IPath destRoot,
+
+ protected void publishFromDeltaHandle(IModuleResourceDelta delta, IPath destRoot,
IPath sourcePrefix, ArrayList<IPath> changedFiles, PublisherFileUtilListener listener) {
switch( delta.getKind()) {
case IModuleResourceDelta.REMOVED:
@@ -190,17 +191,17 @@
if( imr instanceof IExtendedModuleResource) {
IExtendedModuleResource emr = ((IExtendedModuleResource)imr);
IPath concrete = emr.getConcreteDestFile();
- if( !changedFiles.contains(concrete)) {
+ if( !changedFiles.contains(concrete)) {
IPath destPath = destRoot.append(concrete.removeFirstSegments(sourcePrefix.segmentCount()));
- // file hasnt been updated yet.
- // But we don't know whether to delete or copy this file.
- // depends where it is in the tree and what's exploded.
+ // file hasnt been updated yet.
+ // But we don't know whether to delete or copy this file.
+ // depends where it is in the tree and what's exploded.
changedFiles.add(concrete);
IPath concreteRelative = concrete.removeFirstSegments(sourcePrefix.segmentCount()).setDevice(null);
IPath emrModRelative = emr.getModuleRelativePath();
boolean delete = concreteRelative.equals(emrModRelative);
-
+
if( delete ) {
FileUtil.safeDelete(destPath.toFile(), listener);
} else {
@@ -237,9 +238,9 @@
FileUtil.fileSafeCopy(concrete.toFile(), destPath.toFile(), listener);
}
}
- break;
+ break;
}
-
+
IModuleResourceDelta[] children = delta.getAffectedChildren();
if( children != null ) {
for( int i = 0; i < children.length; i++ ) {
@@ -247,7 +248,7 @@
}
}
}
-
+
protected IArchive getPackage(IModule module) {
PackagedModuleDelegate delegate = (PackagedModuleDelegate)module.loadAdapter(PackagedModuleDelegate.class, new NullProgressMonitor());
return delegate == null ? null : delegate.getPackage();
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/ArchivePublishWizard.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/ArchivePublishWizard.java 2008-09-29 19:05:48 UTC (rev 10550)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/ArchivePublishWizard.java 2008-09-29 20:04:15 UTC (rev 10551)
@@ -27,6 +27,7 @@
import org.eclipse.wst.server.ui.internal.ImageResource;
import org.jboss.ide.eclipse.archives.core.build.SaveArchivesJob;
import org.jboss.ide.eclipse.archives.core.model.IArchive;
+import org.jboss.ide.eclipse.archives.webtools.Messages;
import org.jboss.ide.eclipse.archives.webtools.modules.ArchivesModuleModelListener;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
@@ -37,7 +38,7 @@
private IArchive pack;
public ArchivePublishWizard(IArchive pack) {
this.pack = pack;
- setWindowTitle("Archive Publish Settings");
+ setWindowTitle(Messages.ArchivePublishSettings);
}
public boolean performFinish() {
boolean alwaysPublish = new Boolean(page.getAlwaysPublish()).booleanValue();
@@ -62,19 +63,19 @@
return page.getAlwaysPublish();
}
-
+
public class ArchivePublishWizardPage extends WizardPage {
protected IArchive pack;
protected TableViewer viewer;
protected Button autoDeploy, alwaysPublish;
- protected String viewerResult = "";
+ protected String viewerResult = ""; //$NON-NLS-1$
protected String deployResult = Boolean.toString(false);
protected String alwaysPublishResult = Boolean.toString(false);
-
+
protected ArchivePublishWizardPage(IArchive pack) {
- super("Select Server Wizard");
- setDescription("Select the server to publish the archive to.");
- setTitle("Publish archive to a server");
+ super(Messages.SelectServerWizard);
+ setDescription(Messages.SelectServerWizardDescription);
+ setTitle(Messages.SelectServerWizardTitle);
this.pack = pack;
}
@@ -82,7 +83,7 @@
Composite mainComposite = new Composite(parent, SWT.NONE);
mainComposite.setLayout(new FormLayout());
mainComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
+
fillComposite(mainComposite);
addListeners();
setControl(mainComposite);
@@ -97,23 +98,23 @@
if( servers != null ) {
alwaysPublish.setSelection(true);
alwaysPublishSelected();
- boolean depAfterBld = !(deployAfterBuild == null || new Boolean(deployAfterBuild).booleanValue() == false);
+ boolean depAfterBld = !(deployAfterBuild == null || new Boolean(deployAfterBuild).booleanValue() == false);
autoDeploy.setSelection(depAfterBld);
autoDeploySelected();
-
+
IDeployableServer[] depServers = ServerConverter.getAllDeployableServers();
- String[] serverList = servers.split(",");
+ String[] serverList = servers.split(","); //$NON-NLS-1$
final ArrayList<IDeployableServer> selected = new ArrayList<IDeployableServer>();
for(int i = 0; i < serverList.length; i++ ) {
for( int j = 0; j < depServers.length; j++ ) {
- if( serverList[i].equals(depServers[j].getServer().getId()))
+ if( serverList[i].equals(depServers[j].getServer().getId()))
selected.add(depServers[j]);
}
}
viewer.setSelection(new StructuredSelection(selected.toArray()));
}
}
-
+
protected void fillComposite(Composite mainComposite) {
viewer = new TableViewer(mainComposite);
FormData viewerData = new FormData();
@@ -122,20 +123,20 @@
viewerData.top = new FormAttachment(0,10);
viewerData.bottom = new FormAttachment(80,0);
viewer.getTable().setLayoutData(viewerData);
-
+
this.alwaysPublish = new Button(mainComposite, SWT.CHECK);
FormData always = new FormData();
always.left = new FormAttachment(15,0);
always.top = new FormAttachment(viewer.getTable(), 5);
alwaysPublish.setLayoutData(always);
- alwaysPublish.setText("Always publish to these servers");
-
+ alwaysPublish.setText(Messages.AlwaysPublishToTheseServers);
+
autoDeploy = new Button(mainComposite, SWT.CHECK);
FormData add = new FormData();
add.left = new FormAttachment(15,0);
add.top = new FormAttachment(alwaysPublish, 5);
autoDeploy.setLayoutData(add);
- autoDeploy.setText("Auto-deploy to selected servers after builds");
+ autoDeploy.setText(Messages.AutoDeployAfterBuild);
}
protected void addListeners() {
@@ -150,42 +151,42 @@
viewer.addPostSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
viewerSelected();
- }
+ }
} );
-
+
alwaysPublish.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
widgetSelected(e);
}
public void widgetSelected(SelectionEvent e) {
alwaysPublishSelected();
- }
+ }
});
-
+
viewer.setContentProvider(new ArrayContentProvider());
viewer.setLabelProvider(new ArchivePublishLabelProvider());
viewer.setInput(ServerConverter.getAllDeployableServers());
autoDeploy.setEnabled(false);
}
-
+
protected void autoDeploySelected() {
deployResult = Boolean.toString(autoDeploy.getSelection() && autoDeploy.getEnabled());
}
-
+
protected void alwaysPublishSelected() {
autoDeploy.setEnabled(alwaysPublish.getSelection());
deployResult = Boolean.toString(autoDeploy.getSelection() && autoDeploy.getEnabled());
alwaysPublishResult = Boolean.toString(alwaysPublish.getSelection());
}
-
+
protected void viewerSelected() {
ISelection sel = viewer.getSelection();
if( sel instanceof IStructuredSelection ) {
IStructuredSelection sel2 = (IStructuredSelection)sel;
Object[] os = sel2.toArray();
- String tmp = "";
+ String tmp = ""; //$NON-NLS-1$
for( int i = 0; i < os.length; i++ ) {
- tmp += ((IDeployableServer)os[i]).getServer().getId() + ",";
+ tmp += ((IDeployableServer)os[i]).getServer().getId() + ","; //$NON-NLS-1$
}
viewerResult = tmp;
}
@@ -200,7 +201,7 @@
return alwaysPublishResult;
}
}
-
+
protected class ArchivePublishLabelProvider extends LabelProvider {
public Image getImage(Object element) {
if( element instanceof IDeployableServer ) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetViewProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetViewProvider.java 2008-09-29 19:05:48 UTC (rev 10550)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetViewProvider.java 2008-09-29 20:04:15 UTC (rev 10551)
@@ -85,11 +85,11 @@
import org.jboss.ide.eclipse.archives.core.asf.DirectoryScanner;
import org.jboss.ide.eclipse.archives.core.model.DirectoryScannerFactory;
import org.jboss.ide.eclipse.archives.ui.util.composites.FilesetPreviewComposite;
+import org.jboss.ide.eclipse.archives.webtools.Messages;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
import org.jboss.ide.eclipse.as.core.util.FileUtil;
import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
-import org.jboss.ide.eclipse.as.ui.Messages;
import org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerViewProvider;
import org.jboss.ide.eclipse.as.ui.views.server.extensions.SimplePropertiesViewExtension;
@@ -100,8 +100,8 @@
*/
public class FilesetViewProvider extends SimplePropertiesViewExtension {
- private static final String FILESET_KEY = "org.jboss.ide.eclipse.as.ui.views.server.providers.FilesetViewProvider.PropertyKey";
-
+ private static final String FILESET_KEY = "org.jboss.ide.eclipse.as.ui.views.server.providers.FilesetViewProvider.PropertyKey"; //$NON-NLS-1$
+ private static final String HASH_SEPARATOR = "::_::"; //$NON-NLS-1$
private Action createFilter, deleteFilter, editFilter, deleteFileAction, editFileAction;
private FilesetContentProvider contentProvider;
@@ -180,8 +180,8 @@
Shell shell = Workbench.getInstance().getActiveWorkbenchWindow().getShell();
File[] files = getSelectedFiles();
MessageBox mb = new MessageBox(shell,SWT.ICON_QUESTION | SWT.OK | SWT.CANCEL);
- mb.setText("Delete Files?");
- mb.setMessage("Are you sure you want to delete the selected files?");
+ mb.setText(Messages.DeleteFiles);
+ mb.setMessage(Messages.DeleteFilesMessage);
if( mb.open() == SWT.OK) {
for( int i = 0; i < files.length; i++ )
FileUtil.safeDelete(files[i]);
@@ -216,7 +216,7 @@
page.openEditor(input, desc.getId());
}
} catch( Exception e ) {
- IStatus status = new Status(IStatus.ERROR, JBossServerUIPlugin.PLUGIN_ID, "Cannot open file", e);
+ IStatus status = new Status(IStatus.ERROR, JBossServerUIPlugin.PLUGIN_ID, Messages.FilesetsCannotOpenFile, e);
JBossServerUIPlugin.getDefault().getLog().log(status);
}
}
@@ -381,8 +381,8 @@
}
public Fileset(String string) {
try {
- name = folder = includesPattern =excludesPattern = "";
- String[] parts = string.split("\n");
+ name = folder = includesPattern =excludesPattern = ""; //$NON-NLS-1$
+ String[] parts = string.split("\n"); //$NON-NLS-1$
name = parts[0];
folder = parts[1];
includesPattern = parts[2];
@@ -397,31 +397,31 @@
excludesPattern = exc;
}
public String toString() {
- return name + "\n" + folder + "\n" + includesPattern + "\n" + excludesPattern;
+ return name + "\n" + folder + "\n" + includesPattern + "\n" + excludesPattern; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
}
/**
* @return the folder
*/
public String getFolder() {
- return folder == null ? "" : folder;
+ return folder == null ? "" : folder; //$NON-NLS-1$
}
/**
* @return the name
*/
public String getName() {
- return name == null ? "" : name;
+ return name == null ? "" : name; //$NON-NLS-1$
}
/**
* @return the excludesPattern
*/
public String getExcludesPattern() {
- return excludesPattern == null ? "" : excludesPattern;
+ return excludesPattern == null ? "" : excludesPattern; //$NON-NLS-1$
}
/**
* @return the includesPattern
*/
public String getIncludesPattern() {
- return includesPattern == null ? "" : includesPattern;
+ return includesPattern == null ? "" : includesPattern; //$NON-NLS-1$
}
/**
@@ -467,7 +467,7 @@
&& o.getIncludesPattern().equals(getIncludesPattern()) && o.getExcludesPattern().equals(getExcludesPattern());
}
public int hashCode() {
- return (name + "::_::" + folder + "::_::" + includesPattern + "::_::" + excludesPattern + "::_::").hashCode();
+ return (name + HASH_SEPARATOR + folder + HASH_SEPARATOR + includesPattern + HASH_SEPARATOR + excludesPattern + HASH_SEPARATOR).hashCode();
}
}
@@ -505,7 +505,7 @@
public String getText(Object element) {
if( element instanceof PathWrapper ) return ((PathWrapper)element).getLocalizedResourceName();
- if( element instanceof Fileset ) return ((Fileset)element).getName() + " " + ((Fileset)element).getFolder();
+ if( element instanceof Fileset ) return ((Fileset)element).getName() + " " + ((Fileset)element).getFolder(); //$NON-NLS-1$
return element == null ? "" : element.toString();//$NON-NLS-1$
}
@@ -640,8 +640,8 @@
}
protected Control createDialogArea(Composite parent) {
- setTitle("File filter");
- setMessage("Creates a new file filter");
+ setTitle(Messages.FilesetsDialogTitle);
+ setMessage(Messages.FilesetsDialogMessage);
Composite sup = (Composite) super.createDialogArea(parent);
main = new Composite(sup, SWT.NONE);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/NewEARAction.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/NewEARAction.java 2008-09-29 19:05:48 UTC (rev 10550)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/NewEARAction.java 2008-09-29 20:04:15 UTC (rev 10551)
@@ -36,6 +36,7 @@
import org.jboss.ide.eclipse.archives.core.model.IArchiveType;
import org.jboss.ide.eclipse.archives.ui.ArchivesSharedImages;
import org.jboss.ide.eclipse.archives.ui.wizards.AbstractArchiveWizard;
+import org.jboss.ide.eclipse.archives.webtools.Messages;
import org.jboss.ide.eclipse.archives.webtools.archivetypes.EarArchiveType;
public class NewEARAction implements IActionDelegate {
@@ -48,7 +49,7 @@
dialog.open();
}
-
+
public void run(IAction action) {
run();
}
@@ -57,25 +58,25 @@
if( selection instanceof IStructuredSelection)
this.selection = (IStructuredSelection)selection;
}
-
+
public void init(IViewPart view) {
}
public static class NewEARWizard extends AbstractArchiveWizard {
private EARPreviewPage earInfoPage;
-
+
public NewEARWizard () {
- setWindowTitle("New EAR");
+ setWindowTitle(Messages.NewEar);
}
-
+
public ImageDescriptor getImageDescriptor() {
return ArchivesSharedImages.getImageDescriptor(ArchivesSharedImages.IMG_EAR);
}
public WizardPage[] createWizardPages() {
earInfoPage = new EARPreviewPage(this);
-
+
return new WizardPage[] { earInfoPage };
}
@@ -83,16 +84,16 @@
pkg.setArchiveType(ArchivesCore.getInstance().getExtensionManager().getArchiveType(EarArchiveType.ID));
return true;
}
-
+
public String getArchiveExtension() {
- return "ear";
+ return "ear"; //$NON-NLS-1$
}
}
protected static class EARPreviewPage extends PreviewPage {
protected EARPreviewPage(NewEARWizard wiz) {
- super(wiz, "EAR Preview", "EAR Preview",
+ super(wiz, Messages.EarPreview, Messages.EarPreview,
ArchivesSharedImages.getImageDescriptor(ArchivesSharedImages.IMG_EAR));
}
protected void addToPackage() {
@@ -101,8 +102,7 @@
}
protected String getDescriptionMessage() {
- return "Preview the EAR\n" +
- "Later, you can customize this structure further.";
+ return Messages.EarDescription;
}
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/NewEJBJARAction.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/NewEJBJARAction.java 2008-09-29 19:05:48 UTC (rev 10550)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/NewEJBJARAction.java 2008-09-29 20:04:15 UTC (rev 10551)
@@ -35,6 +35,7 @@
import org.jboss.ide.eclipse.archives.core.model.IArchiveType;
import org.jboss.ide.eclipse.archives.ui.ArchivesSharedImages;
import org.jboss.ide.eclipse.archives.ui.wizards.AbstractArchiveWizard;
+import org.jboss.ide.eclipse.archives.webtools.Messages;
import org.jboss.ide.eclipse.archives.webtools.archivetypes.EjbArchiveType;
public class NewEJBJARAction implements IActionDelegate {
@@ -58,18 +59,18 @@
public static class NewEJBWizard extends AbstractArchiveWizard {
private EjbJarPreviewPage ejbInfoPage;
-
+
public NewEJBWizard () {
- setWindowTitle("New EJB JAR");
+ setWindowTitle(Messages.NewEjbJar);
}
-
+
public ImageDescriptor getImageDescriptor() {
return ArchivesSharedImages.getImageDescriptor(ArchivesSharedImages.IMG_EJB_JAR);
}
public WizardPage[] createWizardPages() {
ejbInfoPage = new EjbJarPreviewPage(this);
-
+
return new WizardPage[] { ejbInfoPage };
}
@@ -77,16 +78,16 @@
pkg.setArchiveType(ArchivesCore.getInstance().getExtensionManager().getArchiveType(EjbArchiveType.ID));
return true;
}
-
+
public String getArchiveExtension() {
- return "jar";
+ return "jar"; //$NON-NLS-1$
}
}
protected static class EjbJarPreviewPage extends PreviewPage {
protected EjbJarPreviewPage(NewEJBWizard wiz) {
- super(wiz, "EJB JAR Preview", "EJB JAR Preview",
+ super(wiz, Messages.EjbJarPreview, Messages.EjbJarPreview,
ArchivesSharedImages.getImageDescriptor(ArchivesSharedImages.IMG_NEW_JAR_WIZARD));
}
protected void addToPackage() {
@@ -95,8 +96,7 @@
}
protected String getDescriptionMessage() {
- return "Preview the EJB JAR \n" +
- "Later, you can customize this structure further.";
+ return Messages.EjbJarDescription;
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/NewWARAction.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/NewWARAction.java 2008-09-29 19:05:48 UTC (rev 10550)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/NewWARAction.java 2008-09-29 20:04:15 UTC (rev 10551)
@@ -35,6 +35,7 @@
import org.jboss.ide.eclipse.archives.core.model.IArchiveType;
import org.jboss.ide.eclipse.archives.ui.ArchivesSharedImages;
import org.jboss.ide.eclipse.archives.ui.wizards.AbstractArchiveWizard;
+import org.jboss.ide.eclipse.archives.webtools.Messages;
import org.jboss.ide.eclipse.archives.webtools.archivetypes.WarArchiveType;
public class NewWARAction implements IActionDelegate {
@@ -55,23 +56,22 @@
this.selection = (IStructuredSelection)selection;
}
-
+
public static class NewWARWizard extends AbstractArchiveWizard {
private WarPreviewPage warInfoPage;
-
- public NewWARWizard ()
- {
- setWindowTitle("New WAR");
+
+ public NewWARWizard () {
+ setWindowTitle(Messages.NewWar);
}
-
+
public ImageDescriptor getImageDescriptor() {
return null;
}
public WizardPage[] createWizardPages() {
warInfoPage = new WarPreviewPage(this);
-
+
return new WizardPage[] { warInfoPage };
}
@@ -79,15 +79,15 @@
pkg.setArchiveType(ArchivesCore.getInstance().getExtensionManager().getArchiveType(WarArchiveType.WAR_PACKAGE_TYPE));
return true;
}
-
+
public String getArchiveExtension() {
- return "war";
+ return "war"; //$NON-NLS-1$
}
}
protected static class WarPreviewPage extends PreviewPage {
protected WarPreviewPage(NewWARWizard wiz) {
- super(wiz, "WAR Archive Stub", "WAR Archive Stub",
+ super(wiz, Messages.WarPreview, Messages.WarPreview,
ArchivesSharedImages.getImageDescriptor(ArchivesSharedImages.IMG_NEW_WAR_WIZARD));
}
protected void addToPackage() {
@@ -96,8 +96,7 @@
}
protected String getDescriptionMessage() {
- return "Below is a stub archive configuration for your project. \n" +
- "You can customize this structure further after pressing finish.";
+ return Messages.WarDescription;
}
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/PreviewPage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/PreviewPage.java 2008-09-29 19:05:48 UTC (rev 10550)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/PreviewPage.java 2008-09-29 20:04:15 UTC (rev 10551)
@@ -58,6 +58,7 @@
import org.jboss.ide.eclipse.archives.ui.providers.ArchivesLabelProvider;
import org.jboss.ide.eclipse.archives.ui.wizards.AbstractArchiveWizard;
import org.jboss.ide.eclipse.archives.ui.wizards.WizardPageWithNotification;
+import org.jboss.ide.eclipse.archives.webtools.Messages;
public abstract class PreviewPage extends WizardPageWithNotification {
@@ -69,22 +70,22 @@
super( name, title, descriptor);
this.wizard = wizard;
}
-
+
protected abstract String getDescriptionMessage();
public void createControl(Composite parent) {
-
+
setMessage(getDescriptionMessage());
Composite main = new Composite(parent, SWT.NONE);
main.setLayout(new FormLayout());
-
+
layoutGroups(main);
fillGroups();
-
+
setControl(main);
}
protected void layoutGroups(Composite main) {
previewGroup = new Group(main, SWT.NONE);
- previewGroup.setText("Preview");
+ previewGroup.setText(Messages.Preview);
FormData previewData = new FormData();
previewData.left = new FormAttachment(0,5);
previewData.right = new FormAttachment(100,-5);
@@ -101,7 +102,7 @@
warPreviewData.top = new FormAttachment(0,5);
warPreviewData.bottom = new FormAttachment(100,-5);
previewViewer.getTree().setLayoutData(warPreviewData);
-
+
}
protected void fillGroups() {
@@ -115,7 +116,7 @@
hasCreated = true;
}
fillWidgets(wizard.getArchive());
-
+
// if it's already a module type project, hide the meta inf stuff
IModuleArtifact moduleArtifacts[] = ServerPlugin.getModuleArtifacts(wizard.getProject());
if( moduleArtifacts != null && moduleArtifacts.length > 0) {
@@ -126,13 +127,13 @@
}
getWizard().getContainer().updateButtons();
}
-
+
protected abstract void addToPackage();
protected void fillWidgets(IArchive pkg) {
previewViewer.setInput(pkg);
previewViewer.expandAll();
}
-
+
protected IArchiveFolder getFolder(IArchive pkg, String folderName) {
IArchiveFolder result = null;
IArchiveFolder[] folders = pkg.getFolders();
@@ -144,29 +145,29 @@
}
return result;
}
-
+
public void pageExited(int button) {}
-
-
-
+
+
+
// stuff that can be extracted
public static class WorkspaceFolderSelectionDialog extends ElementTreeSelectionDialog {
-
+
public WorkspaceFolderSelectionDialog(Shell parent, boolean allowMultiple, String selectedPaths) {
super(parent, new FolderLabelProvider(), new FolderContentProvider());
setAllowMultiple(allowMultiple);
setupDestinationList();
setupInitialSelections(selectedPaths);
}
-
+
private void setupDestinationList () {
List projects = Arrays.asList(ResourcesPlugin.getWorkspace().getRoot().getProjects());
setInput(projects);
}
private void setupInitialSelections(String initialSelection) {
ArrayList resources = new ArrayList();
- String[] paths = initialSelection.split(",");
+ String[] paths = initialSelection.split(","); //$NON-NLS-1$
// find IResources
IResource res;
for( int i = 0; i < paths.length; i++ ) {
@@ -175,7 +176,7 @@
}
setInitialSelections((IResource[]) resources.toArray(new IResource[resources.size()]));
}
-
+
private static class FolderContentProvider implements ITreeContentProvider {
private static final Object[] NO_CHILDREN = new Object[0];
public Object[] getChildren(Object parentElement) {
@@ -210,14 +211,14 @@
public Object[] getElements(Object inputElement) {
if (inputElement instanceof Collection)
return ((Collection)inputElement).toArray();
-
+
return NO_CHILDREN;
}
public void dispose() {}
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
}
-
+
public static class FolderLabelProvider implements ILabelProvider {
public FolderLabelProvider () {}
public Image getImage(Object element) {
@@ -233,7 +234,7 @@
if (element instanceof IContainer) {
return ((IContainer)element).getName();
}
- return "";
+ return ""; //$NON-NLS-1$
}
public void addListener(ILabelProviderListener listener) {
@@ -248,7 +249,7 @@
public void removeListener(ILabelProviderListener listener) {
}
-
+
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/PublishAction.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/PublishAction.java 2008-09-29 19:05:48 UTC (rev 10550)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/PublishAction.java 2008-09-29 20:04:15 UTC (rev 10551)
@@ -33,25 +33,26 @@
import org.jboss.ide.eclipse.archives.core.model.IArchive;
import org.jboss.ide.eclipse.archives.core.model.IArchiveNode;
import org.jboss.ide.eclipse.archives.ui.actions.INodeActionDelegate;
+import org.jboss.ide.eclipse.archives.webtools.Messages;
import org.jboss.ide.eclipse.archives.webtools.modules.ArchivesModuleModelListener;
public class PublishAction implements INodeActionDelegate {
-
+
public PublishAction() {
}
public void run (IArchiveNode node) {
- if (node.getNodeType() == IArchiveNode.TYPE_ARCHIVE
+ if (node.getNodeType() == IArchiveNode.TYPE_ARCHIVE
&& ((IArchive)node).isTopLevel()) {
final IArchive pkg = (IArchive)node;
String servers = node.getProperty(ArchivesModuleModelListener.DEPLOY_SERVERS);
- if( servers == null || "".equals(servers) || anyServerDoesntExist(servers)){
+ if( servers == null || "".equals(servers) || anyServerDoesntExist(servers)){ //$NON-NLS-1$
servers = showSelectServersDialog(pkg);
}
final String servers2 = servers;
if( servers != null ) {
- Job j = new Job("Build Archive") {
+ Job j = new Job(Messages.BuildArchive) {
protected IStatus run(IProgressMonitor monitor) {
ArchivesModuleModelListener.publish(pkg, servers2, IServer.PUBLISH_FULL);
return Status.OK_STATUS;
@@ -60,11 +61,11 @@
}
}
}
-
+
protected boolean anyServerDoesntExist(String servers) {
- String[] asArray = servers.split(",");
- for( int i = 0; i < asArray.length; i++ )
- if( ServerCore.findServer(asArray[i]) == null )
+ String[] asArray = servers.split(","); //$NON-NLS-1$
+ for( int i = 0; i < asArray.length; i++ )
+ if( ServerCore.findServer(asArray[i]) == null )
return true;
return false;
}
@@ -77,7 +78,7 @@
}
return false;
}
-
+
protected String showSelectServersDialog(IArchive node) {
ArchivePublishWizard wiz = new ArchivePublishWizard(node);
int result = new WizardDialog(new Shell(), wiz).open();
16 years, 3 months
JBoss Tools SVN: r10550 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-09-29 15:05:48 -0400 (Mon, 29 Sep 2008)
New Revision: 10550
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
Log:
fix for exception:
java.lang.RuntimeException: Can't get path for ve/unresolved_image.gif
[java] at org.jboss.tools.vpe.editor.util.VpeStyleUtil.getAbsoluteResourcePath(VpeStyleUtil.java:715)
[java] at org.jboss.tools.vpe.editor.util.VpeStyleUtil.addFullPathToImgSrc(VpeStyleUtil.java:613)
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2008-09-29 18:39:59 UTC (rev 10549)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeStyleUtil.java 2008-09-29 19:05:48 UTC (rev 10550)
@@ -38,7 +38,7 @@
public class VpeStyleUtil {
- public static final String UNRESOLVED_IMAGE_PATH = "ve/unresolved_image.gif"; //$NON-NLS-1$
+ public static final String UNRESOLVED_IMAGE_PATH = "unresolved_image.gif"; //$NON-NLS-1$
public static final String ATTRIBUTE_STYLE = "style"; //$NON-NLS-1$
16 years, 3 months