JBoss Tools SVN: r4446 - in trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors: xmleditor and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2007-10-23 07:35:33 -0400 (Tue, 23 Oct 2007)
New Revision: 4446
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLTextEditorComponent.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/xmleditor/XMLTextEditor.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1124 hibernate tools code completion are no longer available in hbm.xml editing
The org.hibernate.eclipse.mapper dependency is excluded from org.jboss.tools.hibernate.xml.ui.
This also fixes the build issue described in letter:
> -----Original Message-----
> From: jbosstools-dev-bounces(a)lists.jboss.org
> [mailto:jbosstools-dev-bounces@lists.jboss.org]On Behalf Of Denis
> Golovin
> Sent: Tuesday, October 23, 2007 2:17 AM
> To: Max Rydahl Andersen; JBoss Tools Dev
> Subject: [jbosstools-dev] http://jira.jboss.org/jira/browse/JBIDE-498
>
>
> Max,
>
> we have to decide what component will contain hbm.xml editor. Now I have
> problem to build RHDS ether it just my local config problem or something
> has not been updated in CVN.
>
> Here is an error during richfaces component buld where hbm.xml editor
> was included. It requires org.hibernate.eclipse.mapper, that is not
> included into richfaces component.
>...
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLTextEditorComponent.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLTextEditorComponent.java 2007-10-23 11:35:22 UTC (rev 4445)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/XMLTextEditorComponent.java 2007-10-23 11:35:33 UTC (rev 4446)
@@ -64,15 +64,14 @@
protected boolean isStandAlone = false;
public XMLTextEditorComponent() {
- support.setProvider(this);
-/// XmlDocumentProvider p = (XmlDocumentProvider)getDocumentProvider();
-/// p.disableElementContentChange();
- ModelPlugin.getWorkspace().addResourceChangeListener(changeListener = new ICL());
+ this(true);
}
- public XMLTextEditorComponent(SourceViewerConfiguration configuration) {
- super(configuration);
+ public XMLTextEditorComponent(boolean useUseRHDSConfig) {
+ super(useUseRHDSConfig);
support.setProvider(this);
+ /// XmlDocumentProvider p = (XmlDocumentProvider)getDocumentProvider();
+ /// p.disableElementContentChange();
ModelPlugin.getWorkspace().addResourceChangeListener(changeListener = new ICL());
}
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/xmleditor/XMLTextEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/xmleditor/XMLTextEditor.java 2007-10-23 11:35:22 UTC (rev 4445)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/texteditors/xmleditor/XMLTextEditor.java 2007-10-23 11:35:33 UTC (rev 4446)
@@ -92,31 +92,24 @@
XModelObject object = null;
public XMLTextEditor() {
- XmlEditorPlugin.getDefault().initDefaultPluginPreferences();
-/// dnd.setTextEditorDropProvider(new TextEditorDropProviderImpl());
- super.setSourceViewerConfiguration(new RedHatStructuredTextViewerConfigurationXML());
+ this (true);
}
- public XMLTextEditor(SourceViewerConfiguration config) {
- super.setSourceViewerConfiguration(config);
+ public XMLTextEditor(final boolean useRHDSConfig) {
+ this.useRHDSConfig = useRHDSConfig;
+
XmlEditorPlugin.getDefault().initDefaultPluginPreferences();
/// dnd.setTextEditorDropProvider(new TextEditorDropProviderImpl());
- if (config != null) {
- if (!(config instanceof RedHatStructuredTextViewerConfigurationXML)) {
- rhsvcEnabled = false;
- }
- super.setSourceViewerConfiguration(config);
+
+ if (useRHDSConfig) {
+ super.setSourceViewerConfiguration(new RedHatStructuredTextViewerConfigurationXML());
}
}
- private boolean rhsvcEnabled = true;
+ private boolean useRHDSConfig = true;
- protected boolean isRedHatSourceViewerConfigurationEnabled() {
- return rhsvcEnabled;
- }
-
protected void setSourceViewerConfiguration(SourceViewerConfiguration config) {
- if( isRedHatSourceViewerConfigurationEnabled()
+ if( useRHDSConfig
&& !(config instanceof RedHatStructuredTextViewerConfigurationXML)
&& (config instanceof StructuredTextViewerConfigurationXML
|| !(config instanceof StructuredTextViewerConfiguration)
17 years, 2 months
JBoss Tools SVN: r4445 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui: src/org/jboss/tools/hibernate/ui/xml/editor and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2007-10-23 07:35:22 -0400 (Tue, 23 Oct 2007)
New Revision: 4445
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/META-INF/MANIFEST.MF
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/editor/HibConfig3CompoundEditor.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/editor/Hibernate3CompoundEditor.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1124 hibernate tools code completion are no longer available in hbm.xml editing
The org.hibernate.eclipse.mapper dependency is excluded from org.jboss.tools.hibernate.xml.ui.
This also fixes the build issue described in letter:
> -----Original Message-----
> From: jbosstools-dev-bounces(a)lists.jboss.org
> [mailto:jbosstools-dev-bounces@lists.jboss.org]On Behalf Of Denis
> Golovin
> Sent: Tuesday, October 23, 2007 2:17 AM
> To: Max Rydahl Andersen; JBoss Tools Dev
> Subject: [jbosstools-dev] http://jira.jboss.org/jira/browse/JBIDE-498
>
>
> Max,
>
> we have to decide what component will contain hbm.xml editor. Now I have
> problem to build RHDS ether it just my local config problem or something
> has not been updated in CVN.
>
> Here is an error during richfaces component buld where hbm.xml editor
> was included. It requires org.hibernate.eclipse.mapper, that is not
> included into richfaces component.
>...
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/META-INF/MANIFEST.MF 2007-10-23 11:22:42 UTC (rev 4444)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/META-INF/MANIFEST.MF 2007-10-23 11:35:22 UTC (rev 4445)
@@ -25,7 +25,6 @@
org.jboss.tools.common.model,
org.jboss.tools.common.model.ui,
org.jboss.tools.hibernate.xml,
- org.hibernate.eclipse.mapper,
org.eclipse.wst.xml.ui
Bundle-Version: 2.0.0
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/editor/HibConfig3CompoundEditor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/editor/HibConfig3CompoundEditor.java 2007-10-23 11:22:42 UTC (rev 4444)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/editor/HibConfig3CompoundEditor.java 2007-10-23 11:35:22 UTC (rev 4445)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.hibernate.ui.xml.editor;
-import org.hibernate.eclipse.mapper.editors.CFGXMLStructuredTextViewerConfiguration;
import org.jboss.tools.common.editor.TreeFormPage;
import org.jboss.tools.common.model.ui.editor.EditorDescriptor;
import org.jboss.tools.common.model.ui.editors.multipage.DefaultMultipageEditor;
@@ -97,8 +96,7 @@
}
protected XMLTextEditorComponent createTextEditorComponent() {
- final CFGXMLStructuredTextViewerConfiguration svc = new CFGXMLStructuredTextViewerConfiguration();
- return new XMLTextEditorComponent(svc);
+ return new XMLTextEditorComponent(false);
}
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/editor/Hibernate3CompoundEditor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/editor/Hibernate3CompoundEditor.java 2007-10-23 11:22:42 UTC (rev 4444)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.xml.ui/src/org/jboss/tools/hibernate/ui/xml/editor/Hibernate3CompoundEditor.java 2007-10-23 11:35:22 UTC (rev 4445)
@@ -14,7 +14,6 @@
import org.eclipse.ui.editors.text.TextEditor;
import org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration;
import org.eclipse.wst.xml.ui.StructuredTextViewerConfigurationXML;
-import org.hibernate.eclipse.mapper.editors.HBMXMLStructuredTextViewerConfiguration;
import org.jboss.tools.common.editor.TreeFormPage;
import org.jboss.tools.common.model.ui.editor.EditorDescriptor;
import org.jboss.tools.common.model.ui.editors.multipage.DefaultMultipageEditor;
@@ -45,8 +44,7 @@
}
protected XMLTextEditorComponent createTextEditorComponent() {
- final HBMXMLStructuredTextViewerConfiguration svc = new HBMXMLStructuredTextViewerConfiguration();
- return new XMLTextEditorComponent(svc);
+ return new XMLTextEditorComponent(false);
}
}
\ No newline at end of file
17 years, 2 months
JBoss Tools SVN: r4444 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2007-10-23 07:22:42 -0400 (Tue, 23 Oct 2007)
New Revision: 4444
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java
Log:
fixed wrong message bundle name
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java 2007-10-23 08:09:23 UTC (rev 4443)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java 2007-10-23 11:22:42 UTC (rev 4444)
@@ -6,7 +6,7 @@
import org.eclipse.osgi.util.NLS;
public class SeamCoreMessages {
- private static final String BUNDLE_NAME = "messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.jboss.tools.seam.core.messages"; //$NON-NLS-1$
static {
NLS.initializeMessages(BUNDLE_NAME, SeamCoreMessages.class);
}
17 years, 2 months
JBoss Tools SVN: r4443 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2007-10-23 04:09:23 -0400 (Tue, 23 Oct 2007)
New Revision: 4443
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1138
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2007-10-23 07:17:34 UTC (rev 4442)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2007-10-23 08:09:23 UTC (rev 4443)
@@ -467,41 +467,44 @@
if (contentAreaEventListener != null) {
contentAreaEventListener.setVisualEditor(xulRunnerEditor);
contentAreaEventTarget = (nsIDOMEventTarget) contentArea.queryInterface(nsIDOMEventTarget.NS_IDOMEVENTTARGET_IID);
- // TODO Max Areshkau add DnD support
-// contentAreaEventListener.getLocalDnD().Init(visualEditor.getDOMDocument(),visualEditor.getPresShell(), contentAreaEventListener.getDropListener());
- contentAreaEventTarget.addEventListener("click", contentAreaEventListener, false); //$NON-NLS-1$
- contentAreaEventTarget.addEventListener("mousedown", contentAreaEventListener, false); //$NON-NLS-1$
- contentAreaEventTarget.addEventListener("mouseup", contentAreaEventListener, false); //$NON-NLS-1$
- contentAreaEventTarget.addEventListener(MozillaDomEventListener.MOUSEMOVEEVENTTYPE, contentAreaEventListener, false); //$NON-NLS-1$
-
- //context menu event handler(add by Max Areshkau)
- contentAreaEventTarget.addEventListener(MozillaDomEventListener.CONTEXTMENUEVENTTYPE, contentAreaEventListener, false);
- //drag drop event handlers
- contentAreaEventTarget.addEventListener(MozillaDomEventListener.DRAGDROPEVENT, contentAreaEventListener, false);
- contentAreaEventTarget.addEventListener(MozillaDomEventListener.DRAGENTEREVENT, contentAreaEventListener, false);
- contentAreaEventTarget.addEventListener(MozillaDomEventListener.DRAGEXITEVENT, contentAreaEventListener, false);
- contentAreaEventTarget.addEventListener(MozillaDomEventListener.DRAGGESTUREEVENT, contentAreaEventListener, false);
- contentAreaEventTarget.addEventListener(MozillaDomEventListener.DRAGOVEREVENT, contentAreaEventListener, false);
+ //add mozilla event handlers
+ contentAreaEventTarget.addEventListener(MozillaDomEventListener.CLICKEVENTTYPE, contentAreaEventListener, false); //$NON-NLS-1$
+ contentAreaEventTarget.addEventListener(MozillaDomEventListener.MOUSEDOWNEVENTTYPE, contentAreaEventListener, false); //$NON-NLS-1$
+ contentAreaEventTarget.addEventListener(MozillaDomEventListener.MOUSEUPEVENTTYPE, contentAreaEventListener, false); //$NON-NLS-1$
+ contentAreaEventTarget.addEventListener(MozillaDomEventListener.MOUSEMOVEEVENTTYPE, contentAreaEventListener, false); //$NON-NLS-1$
+ contentAreaEventTarget.addEventListener(MozillaDomEventListener.CONTEXTMENUEVENTTYPE, contentAreaEventListener, false);//$NON-NLS-1$
+ contentAreaEventTarget.addEventListener(MozillaDomEventListener.DRAGDROPEVENT, contentAreaEventListener, false);//$NON-NLS-1$
+ contentAreaEventTarget.addEventListener(MozillaDomEventListener.DRAGENTEREVENT, contentAreaEventListener, false);//$NON-NLS-1$
+ contentAreaEventTarget.addEventListener(MozillaDomEventListener.DRAGEXITEVENT, contentAreaEventListener, false);//$NON-NLS-1$
+ contentAreaEventTarget.addEventListener(MozillaDomEventListener.DRAGGESTUREEVENT, contentAreaEventListener, false);//$NON-NLS-1$
+ contentAreaEventTarget.addEventListener(MozillaDomEventListener.DRAGOVEREVENT, contentAreaEventListener, false);//$NON-NLS-1$
+ contentAreaEventTarget.addEventListener(MozillaDomEventListener.DBLCLICK, contentAreaEventListener, false);//$NON-NLS-1$
documentEventTarget = (nsIDOMEventTarget) getDomDocument().queryInterface(nsIDOMEventTarget.NS_IDOMEVENTTARGET_IID);
- documentEventTarget.addEventListener("keypress", contentAreaEventListener, false); //$NON-NLS-1$
+ documentEventTarget.addEventListener(MozillaDomEventListener.KEYPRESS, contentAreaEventListener, false); //$NON-NLS-1$
} else {
baseEventListener = new MozillaBaseEventListener();
- // TODO Max Areshkau add DnD support
-// baseEventListener.getLocalDnD().Init(visualEditor.getDOMDocument(),visualEditor.getPresShell(), baseEventListener.getDropListener());
}
}
}
private void removeDomEventListeners() {
if (contentAreaEventTarget != null && contentAreaEventListener != null) {
- contentAreaEventTarget.removeEventListener("click", contentAreaEventListener, false); //$NON-NLS-1$
- contentAreaEventTarget.removeEventListener("mousedown", contentAreaEventListener, false); //$NON-NLS-1$
- contentAreaEventTarget.removeEventListener("mouseup", contentAreaEventListener, false); //$NON-NLS-1$
- contentAreaEventTarget.removeEventListener("mousemove", contentAreaEventListener, false); //$NON-NLS-1$
+ contentAreaEventTarget.removeEventListener(MozillaDomEventListener.CLICKEVENTTYPE, contentAreaEventListener, false); //$NON-NLS-1$
+ contentAreaEventTarget.removeEventListener(MozillaDomEventListener.MOUSEDOWNEVENTTYPE, contentAreaEventListener, false); //$NON-NLS-1$
+ contentAreaEventTarget.removeEventListener(MozillaDomEventListener.MOUSEUPEVENTTYPE, contentAreaEventListener, false); //$NON-NLS-1$
+ contentAreaEventTarget.removeEventListener(MozillaDomEventListener.MOUSEMOVEEVENTTYPE, contentAreaEventListener, false); //$NON-NLS-1$
+ contentAreaEventTarget.removeEventListener(MozillaDomEventListener.CONTEXTMENUEVENTTYPE, contentAreaEventListener, false);//$NON-NLS-1$
+ contentAreaEventTarget.removeEventListener(MozillaDomEventListener.DRAGDROPEVENT, contentAreaEventListener, false);//$NON-NLS-1$
+ contentAreaEventTarget.removeEventListener(MozillaDomEventListener.DRAGENTEREVENT, contentAreaEventListener, false);//$NON-NLS-1$
+ contentAreaEventTarget.removeEventListener(MozillaDomEventListener.DRAGEXITEVENT, contentAreaEventListener, false);//$NON-NLS-1$
+ contentAreaEventTarget.removeEventListener(MozillaDomEventListener.DRAGGESTUREEVENT, contentAreaEventListener, false);//$NON-NLS-1$
+ contentAreaEventTarget.removeEventListener(MozillaDomEventListener.DRAGOVEREVENT, contentAreaEventListener, false);//$NON-NLS-1$
+ contentAreaEventTarget.removeEventListener(MozillaDomEventListener.DBLCLICK, contentAreaEventListener, false);//$NON-NLS-1$
+
}
if (domDocument != null && documentEventTarget != null) {
- documentEventTarget.removeEventListener("keypress", contentAreaEventListener, false); //$NON-NLS-1$
+ documentEventTarget.removeEventListener(MozillaDomEventListener.KEYPRESS, contentAreaEventListener, false); //$NON-NLS-1$
}
}
@@ -548,26 +551,6 @@
}
}
- private void addClipboardDragDropHooks() {
- if (contentAreaEventListener != null) {
- nsIClipboardDragDropHookList hookList = xulRunnerEditor.getClipboardDragDropHookList();
-// hookList.addClipboardDragDropHooks(contentAreaEventListener);
- } else if (baseEventListener != null) {
- nsIClipboardDragDropHookList hookList = xulRunnerEditor.getClipboardDragDropHookList();
- hookList.addClipboardDragDropHooks(baseEventListener);
- }
- }
-
- private void removeClipboardDragDropHooks() {
- if (contentAreaEventListener != null) {
- nsIClipboardDragDropHookList hookList = xulRunnerEditor.getClipboardDragDropHookList();
-// hookList.removeClipboardDragDropHooks(contentAreaEventListener);
- } else if (baseEventListener != null) {
- nsIClipboardDragDropHookList hookList = xulRunnerEditor.getClipboardDragDropHookList();
- hookList.removeClipboardDragDropHooks(baseEventListener);
- }
- }
-
/**
* @return the xulRunnerEditor
*/
17 years, 2 months
JBoss Tools SVN: r4442 - trunk/vpe/plugins/org.jboss.tools.vpe/templates.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2007-10-23 03:17:34 -0400 (Tue, 23 Oct 2007)
New Revision: 4442
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-html.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-1137
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-html.xml
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-html.xml 2007-10-23 01:40:35 UTC (rev 4441)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/templates/vpe-templates-html.xml 2007-10-23 07:17:34 UTC (rev 4442)
@@ -366,6 +366,12 @@
</vpe:template>
</vpe:tag>
+ <vpe:tag name="br" case-sensitive="no">
+ <vpe:template children="no" modify="yes">
+ <vpe:copy attrs="id,style,class,clear" />
+ </vpe:template>
+ </vpe:tag>
+
<vpe:tag name="button" case-sensitive="no">
<vpe:template children="yes" modify="no">
<vpe:copy attrs="id,style,class,value">
17 years, 2 months
JBoss Tools SVN: r4441 - in trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam: core/project/facet and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-10-22 21:40:35 -0400 (Mon, 22 Oct 2007)
New Revision: 4441
Added:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntimeListConverter.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeampProjectPreferences.java
Removed:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/Messages.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamFacetPreference.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntimeListConverter1.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/messages.properties
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreBuilder.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamProjectsSet.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntimeManager.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamVersion.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/AntCopyUtils.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/DataSourceXmlDeployer.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPreferenceInitializer.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetProjectCreationDataModelProvider.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/JavaScanner.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/SeamAnnotations.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/LibraryScanner.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationContext.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationHelper.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties
Log:
http://jira.jboss.org/jira/browse/JBIDE-1141
not copy utils check for copying file to itself.
some cleanup and refactoring has been done for I18N.
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreBuilder.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreBuilder.java 2007-10-23 01:40:21 UTC (rev 4440)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreBuilder.java 2007-10-23 01:40:35 UTC (rev 4441)
@@ -20,6 +20,7 @@
import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.osgi.util.NLS;
import org.jboss.tools.seam.internal.core.SeamProject;
import org.jboss.tools.seam.internal.core.SeamResourceVisitor;
import org.jboss.tools.seam.internal.core.scanner.IFileScanner;
@@ -102,7 +103,7 @@
try {
sp.store();
} catch (IOException e) {
- SeamCorePlugin.getPluginLog().logError(SeamCoreMessages.getString("SeamCoreBuilder.1") + sp.getProject().getName(), e); //$NON-NLS-1$
+ SeamCorePlugin.getPluginLog().logError(NLS.bind(SeamCoreMessages.SeamCoreBuilder_1,sp.getProject().getName()), e); //$NON-NLS-1$
}
return null;
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java 2007-10-23 01:40:21 UTC (rev 4440)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamCoreMessages.java 2007-10-23 01:40:35 UTC (rev 4441)
@@ -3,20 +3,51 @@
import java.util.MissingResourceException;
import java.util.ResourceBundle;
+import org.eclipse.osgi.util.NLS;
+
public class SeamCoreMessages {
- private static final String BUNDLE_NAME = "org.jboss.tools.seam.core.messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- private SeamCoreMessages() {
+ private static final String BUNDLE_NAME = "messages"; //$NON-NLS-1$
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, SeamCoreMessages.class);
}
+
+ public static String SeamCoreBuilder_1;
+ public static String ANT_COPY_UTILS_COPY_FAILED;
+ public static String ANT_COPY_UTILS_COULD_NOT_FIND_FOLDER;
+ public static String ANT_COPY_UTILS_IN;
+ public static String ANT_COPY_UTILS_CANNOT_COPY_JDBC_DRIVER_JAR;
+ public static String DATA_SOURCE_XML_DEPLOYER_DEPLOYING_DATASOURCE_TO_SERVER;
+ public static String DATA_SOURCE_XML_DEPLOYER_NO_SERVER_SELECTED_TO_DEPLOY_DATASOURCE_TO;
+ public static String DATA_SOURCE_XML_DEPLOYER_SERVER_DID_NOT_SUPPORT_DEPLOY_OF_DATASOURCE;
+ public static String DATA_SOURCE_XML_DEPLOYER_COULD_NOT_DEPLOY_DATASOURCE;
+ public static String JAVA_SCANNER_CANNOT_GET_COMPILATION_UNIT_FOR;
+ public static String SEAM_ANNOTATIONS_NAME;
+ public static String SEAM_ANNOTATIONS_SCOPE;
+ public static String SEAM_ANNOTATIONS_INSTALL;
+ public static String SEAM_ANNOTATIONS_IN;
+ public static String SEAM_ANNOTATIONS_OUT;
+ public static String SEAM_ANNOTATIONS_CREATE;
+ public static String SEAM_ANNOTATIONS_DESTROY;
+ public static String SEAM_ANNOTATIONS_UNWRAP;
+ public static String SEAM_ANNOTATIONS_OBSERVER;
+ public static String SEAM_ANNOTATIONS_FACTORY;
+ public static String SEAM_EL_VALIDATOR_SETTER;
+ public static String SEAM_EL_VALIDATOR_GETTER;
+ public static String SEAM_ANNOTATIONS_ROLES;
+ public static String SEAM_ANNOTATIONS_ROLE;
+ public static String LIBRARY_SCANNER_CANNOT_PROCESS_JAVA_CLASSES;
+ public static String SEAM_VALIDATION_CONTEXT_LINKED_RESOURCE_PATH_MUST_NOT_BE_NULL;
+ public static String SEAM_VALIDATION_CONTEXT_VARIABLE_NAME_MUST_NOT_BE_NULL;
+ public static String SEAM_VALIDATION_HELPER_CANNOT_GET_SEAM_PROJECT;
+ public static String SEAM_CORE_VALIDATOR_ERROR_VALIDATING_SEAM_CORE;
+ public static String SEAM_VALIDATION_HELPER_RESOURCE_MUST_NOT_BE_NULL;
+ public static String SEAM_CORE_VALIDATOR_FACTORY_METHOD_MUST_HAVE_NAME;
+ public static String SEAM_EL_VALIDATOR_ERROR_VALIDATING_SEAM_EL;
+ public static String ERROR_JBOSS_AS_TARGET_SERVER_IS_EMPTY;
+ public static String ERROR_JBOSS_AS_TARGET_SERVER_UNKNOWN;
+ public static String ERROR_JBOSS_AS_TARGET_SERVER_NO_SERVERS_DEFINED;
+ public static String ERROR_JBOSS_AS_TARGET_SERVER_INCOMPATIBLE;
+ public static String ERROR_JBOSS_AS_TARGET_RUNTIME_IS_EMPTY;
+ public static String ERROR_JBOSS_AS_TARGET_RUNTIME_UNKNOWN;
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamProjectsSet.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamProjectsSet.java 2007-10-23 01:40:21 UTC (rev 4440)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamProjectsSet.java 2007-10-23 01:40:35 UTC (rev 4441)
@@ -31,7 +31,7 @@
import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
-import org.jboss.tools.seam.core.project.facet.SeamFacetPreference;
+import org.jboss.tools.seam.core.project.facet.SeampProjectPreferences;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
/**
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties 2007-10-23 01:40:21 UTC (rev 4440)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/messages.properties 2007-10-23 01:40:35 UTC (rev 4441)
@@ -1,16 +1,14 @@
-SeamCoreBuilder.1=Error storing build results for
-ANT_COPY_UTILS_INCLUDED=included:
-ANT_COPY_UTILS_EXCLUDED=\ excluded:
-ANT_COPY_UTILS_COPY_FAILED=Copy failed -
-ANT_COPY_UTILS_DOES_NOT_EXIST=\ does not exist
-ANT_COPY_UTILS_COULD_NOT_FIND=Could not find
+SeamCoreBuilder.1=Error storing build results for ''{0}''
+ANT_COPY_UTILS_COPY_FAILED=Copy failed - ''{0}'' does not exist
+ANT_COPY_UTILS_COULD_NOT_FIND_FOLDER=Could not find ''{0}''
+ANT_COPY_UTILS_COULD_NOT_FIND_=Could not find
ANT_COPY_UTILS_IN=\ in
-ANT_COPY_UTILS_CANNOT_COPY_JDBC_DRIVER_JAR=Cannot copy JDBC driver jar '
+ANT_COPY_UTILS_CANNOT_COPY_JDBC_DRIVER_JAR=Cannot copy JDBC driver jar ''{0}''
DATA_SOURCE_XML_DEPLOYER_DEPLOYING_DATASOURCE_TO_SERVER=Deploying datasource to server
DATA_SOURCE_XML_DEPLOYER_NO_SERVER_SELECTED_TO_DEPLOY_DATASOURCE_TO=No server selected to deploy datasource to
DATA_SOURCE_XML_DEPLOYER_SERVER_DID_NOT_SUPPORT_DEPLOY_OF_DATASOURCE=Server did not support deploy of datasource.
DATA_SOURCE_XML_DEPLOYER_COULD_NOT_DEPLOY_DATASOURCE=Could not deploy datasource
-JAVA_SCANNER_CANNOT_GET_COMPILATION_UNIT_FOR=Cannot get compilation unit for
+JAVA_SCANNER_CANNOT_GET_COMPILATION_UNIT_FOR=Cannot get compilation unit for ''{0}''
SEAM_ANNOTATIONS_NAME=Name
SEAM_ANNOTATIONS_SCOPE=Scope
SEAM_ANNOTATIONS_INSTALL=Install
@@ -31,7 +29,7 @@
SEAM_VALIDATION_HELPER_CANNOT_GET_SEAM_PROJECT=Can't get Seam Project
SEAM_CORE_VALIDATOR_ERROR_VALIDATING_SEAM_CORE=Error validating Seam Core
SEAM_VALIDATION_HELPER_RESOURCE_MUST_NOT_BE_NULL=Resource must not be null
-SEAM_CORE_VALIDATOR_FACTORY_METHOD_MUST_HAVE_NAME=Factory method must have name:
+SEAM_CORE_VALIDATOR_FACTORY_METHOD_MUST_HAVE_NAME=Factory method must have name: ''{0}''
SEAM_EL_VALIDATOR_ERROR_VALIDATING_SEAM_EL=Error validating Seam EL
ERROR_JBOSS_AS_TARGET_SERVER_IS_EMPTY=Target Server cannot be empty
ERROR_JBOSS_AS_TARGET_SERVER_UNKNOWN=Unknown Target Server
Deleted: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/Messages.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/Messages.java 2007-10-23 01:40:21 UTC (rev 4440)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/Messages.java 2007-10-23 01:40:35 UTC (rev 4441)
@@ -1,22 +0,0 @@
-package org.jboss.tools.seam.core.project.facet;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-public class Messages {
- private static final String BUNDLE_NAME = "org.jboss.tools.seam.core.project.facet.messages"; //$NON-NLS-1$
-
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
- .getBundle(BUNDLE_NAME);
-
- private Messages() {
- }
-
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-}
Deleted: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamFacetPreference.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamFacetPreference.java 2007-10-23 01:40:21 UTC (rev 4440)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamFacetPreference.java 2007-10-23 01:40:35 UTC (rev 4441)
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-
-package org.jboss.tools.seam.core.project.facet;
-
-import org.jboss.tools.seam.core.SeamCorePlugin;
-
-/**
- * @author eskimo
- *
- */
-public class SeamFacetPreference {
- public static final String SEAM_DEFAULT_RUNTIME_NAME
- = SeamCorePlugin.PLUGIN_ID + ".project.facet.default.runtime.name"; //$NON-NLS-1$
- public static final String SEAM_DEFAULT_CONNECTION_PROFILE
- = SeamCorePlugin.PLUGIN_ID + ".project.facet.default.conn.profile"; //$NON-NLS-1$
- public static final String RUNTIME_CONFIG_FORMAT_VERSION
- = SeamCorePlugin.PLUGIN_ID + ".runtime.config.format.version"; //$NON-NLS-1$
- public static final String RUNTIME_LIST
- = SeamCorePlugin.PLUGIN_ID+".runtime.list"; //$NON-NLS-1$
- public static final String RUNTIME_DEFAULT
- = SeamCorePlugin.PLUGIN_ID+".runtime.default"; //$NON-NLS-1$
- public static final String JBOSS_AS_DEFAULT_DEPLOY_AS
- = SeamCorePlugin.PLUGIN_ID + ".project.default.deployment.type"; //$NON-NLS-1$
- public static final String HIBERNATE_DEFAULT_DB_TYPE
- = SeamCorePlugin.PLUGIN_ID + ".hibernate.default.db.type"; //$NON-NLS-1$
- public static final String SEAM_LAST_SERVER_NAME
- = SeamCorePlugin.PLUGIN_ID + ".project.facet.last.server.name"; //$NON-NLS-1$
-
- public static String getStringPreference(final String name) {
- return SeamCorePlugin.getDefault().getPreferenceStore().getString(name);
- }
-}
Copied: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntimeListConverter.java (from rev 4306, trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntimeListConverter1.java)
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntimeListConverter.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntimeListConverter.java 2007-10-23 01:40:35 UTC (rev 4441)
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.core.project.facet;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+/**
+ * @author eskimo
+ *
+ */
+public class SeamRuntimeListConverter {
+
+ public Map<String,SeamRuntime> getMap(String input) {
+
+ Map<String,SeamRuntime> result = new HashMap<String,SeamRuntime>();
+ if(input==null || "".equals(input.trim())) { //$NON-NLS-1$
+ return result;
+ }
+
+ StringTokenizer runtimes = new StringTokenizer(input,","); //$NON-NLS-1$
+ while (runtimes.hasMoreTokens()) {
+ String runtime = runtimes.nextToken();
+ String[] map = runtime.split("\\|"); //$NON-NLS-1$
+ SeamRuntime rt = new SeamRuntime();
+ for (int i=0;i<map.length;i+=2) {
+ String name = map[i];
+ String value = i+1<map.length?map[i+1]:""; //$NON-NLS-1$
+ if("name".equals(name)) { //$NON-NLS-1$
+ rt.setName(value);
+ } else if("homeDir".equals(name)) { //$NON-NLS-1$
+ rt.setHomeDir(value);
+ } else if ("version".equals(name)) { //$NON-NLS-1$
+ rt.setVersion(SeamVersion.parseFromString(value));
+ } else if("default".equals(name)) { //$NON-NLS-1$
+ rt.setDefault(Boolean.parseBoolean(value));
+ }
+ }
+ result.put(rt.getName(),rt);
+ }
+
+ return result;
+ }
+
+ public String getString(Map<String,SeamRuntime> runtimeMap) {
+ StringBuffer buffer = new StringBuffer();
+ SeamRuntime[] runtimes = runtimeMap.values().toArray(new SeamRuntime[runtimeMap.size()]);
+ for (int i=0;i<runtimes.length;i++) {
+ buffer.append("name|"); //$NON-NLS-1$
+ buffer.append(runtimes[i].getName());
+ buffer.append("|version|"); //$NON-NLS-1$
+ buffer.append(runtimes[i].getVersion().toString());
+ buffer.append("|homeDir|"); //$NON-NLS-1$
+ buffer.append(runtimes[i].getHomeDir());
+ buffer.append("|default|"); //$NON-NLS-1$
+ buffer.append(runtimes[i].isDefault());
+ if(i!=runtimes.length-1) buffer.append(","); //$NON-NLS-1$
+ }
+ return buffer.toString();
+ }
+}
Deleted: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntimeListConverter1.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntimeListConverter1.java 2007-10-23 01:40:21 UTC (rev 4440)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntimeListConverter1.java 2007-10-23 01:40:35 UTC (rev 4441)
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.seam.core.project.facet;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.StringTokenizer;
-
-/**
- * @author eskimo
- *
- */
-public class SeamRuntimeListConverter1 {
-
- public Map<String,SeamRuntime> getMap(String input) {
-
- Map<String,SeamRuntime> result = new HashMap<String,SeamRuntime>();
- if(input==null || "".equals(input.trim())) { //$NON-NLS-1$
- return result;
- }
-
- StringTokenizer runtimes = new StringTokenizer(input,","); //$NON-NLS-1$
- while (runtimes.hasMoreTokens()) {
- String runtime = runtimes.nextToken();
- String[] map = runtime.split("\\|"); //$NON-NLS-1$
- SeamRuntime rt = new SeamRuntime();
- for (int i=0;i<map.length;i+=2) {
- String name = map[i];
- String value = i+1<map.length?map[i+1]:""; //$NON-NLS-1$
- if("name".equals(name)) { //$NON-NLS-1$
- rt.setName(value);
- } else if("homeDir".equals(name)) { //$NON-NLS-1$
- rt.setHomeDir(value);
- } else if ("version".equals(name)) { //$NON-NLS-1$
- rt.setVersion(SeamVersion.parseFromString(value));
- } else if("default".equals(name)) { //$NON-NLS-1$
- rt.setDefault(Boolean.parseBoolean(value));
- }
- }
- result.put(rt.getName(),rt);
- }
-
- return result;
- }
-
- public String getString(Map<String,SeamRuntime> runtimeMap) {
- StringBuffer buffer = new StringBuffer();
- SeamRuntime[] runtimes = runtimeMap.values().toArray(new SeamRuntime[runtimeMap.size()]);
- for (int i=0;i<runtimes.length;i++) {
- buffer.append("name|"); //$NON-NLS-1$
- buffer.append(runtimes[i].getName());
- buffer.append("|version|"); //$NON-NLS-1$
- buffer.append(runtimes[i].getVersion().toString());
- buffer.append("|homeDir|"); //$NON-NLS-1$
- buffer.append(runtimes[i].getHomeDir());
- buffer.append("|default|"); //$NON-NLS-1$
- buffer.append(runtimes[i].isDefault());
- if(i!=runtimes.length-1) buffer.append(","); //$NON-NLS-1$
- }
- return buffer.toString();
- }
-}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntimeManager.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntimeManager.java 2007-10-23 01:40:21 UTC (rev 4440)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamRuntimeManager.java 2007-10-23 01:40:35 UTC (rev 4441)
@@ -33,7 +33,7 @@
*/
public class SeamRuntimeManager {
- private static SeamRuntimeListConverter1 converter = new SeamRuntimeListConverter1();
+ private static SeamRuntimeListConverter converter = new SeamRuntimeListConverter();
private Map<String, SeamRuntime> runtimes = new HashMap<String, SeamRuntime>();
@@ -60,10 +60,10 @@
*
*/
private SeamRuntimeManager() {
- String configVersion = SeamFacetPreference.getStringPreference(
- SeamFacetPreference.RUNTIME_CONFIG_FORMAT_VERSION);
- String runtimeListString = SeamFacetPreference.getStringPreference(
- SeamFacetPreference.RUNTIME_LIST);
+ String configVersion = SeampProjectPreferences.getStringPreference(
+ SeampProjectPreferences.RUNTIME_CONFIG_FORMAT_VERSION);
+ String runtimeListString = SeampProjectPreferences.getStringPreference(
+ SeampProjectPreferences.RUNTIME_LIST);
runtimes = converter.getMap(runtimeListString);
}
@@ -160,7 +160,7 @@
*/
public void save() {
SeamCorePlugin.getDefault().getPluginPreferences().setValue(
- SeamFacetPreference.RUNTIME_LIST, converter.getString(runtimes));
+ SeampProjectPreferences.RUNTIME_LIST, converter.getString(runtimes));
IPreferenceStore store = SeamCorePlugin.getDefault().getPreferenceStore();
if(store instanceof IPersistentPreferenceStore) {
try {
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamVersion.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamVersion.java 2007-10-23 01:40:21 UTC (rev 4440)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamVersion.java 2007-10-23 01:40:35 UTC (rev 4441)
@@ -10,11 +10,13 @@
******************************************************************************/
package org.jboss.tools.seam.core.project.facet;
+import org.eclipse.osgi.util.NLS;
+
/**
* @author eskimo
*
*/
-public enum SeamVersion {
+public enum SeamVersion{
SEAM_1_2("1.2"), SEAM_2_0("2.0"); //$NON-NLS-1$ //$NON-NLS-2$
String version = ""; //$NON-NLS-1$
@@ -37,6 +39,7 @@
} else if(V_2_0.equals(version)) {
return SEAM_2_0;
}
- throw new IllegalArgumentException(Messages.getString("SeamVersion.5") + version + Messages.getString("SeamVersion.6")); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new IllegalArgumentException(NLS.bind("Seam version ''{0}'' is not supported",version)); //$NON-NLS-1$ //$NON-NLS-2$
}
+
}
Copied: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeampProjectPreferences.java (from rev 4306, trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeamFacetPreference.java)
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeampProjectPreferences.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/SeampProjectPreferences.java 2007-10-23 01:40:35 UTC (rev 4441)
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.seam.core.project.facet;
+
+import org.jboss.tools.seam.core.SeamCorePlugin;
+
+/**
+ * @author eskimo
+ *
+ */
+public class SeampProjectPreferences {
+ public static final String SEAM_DEFAULT_RUNTIME_NAME
+ = SeamCorePlugin.PLUGIN_ID + ".project.facet.default.runtime.name"; //$NON-NLS-1$
+ public static final String SEAM_DEFAULT_CONNECTION_PROFILE
+ = SeamCorePlugin.PLUGIN_ID + ".project.facet.default.conn.profile"; //$NON-NLS-1$
+ public static final String RUNTIME_CONFIG_FORMAT_VERSION
+ = SeamCorePlugin.PLUGIN_ID + ".runtime.config.format.version"; //$NON-NLS-1$
+ public static final String RUNTIME_LIST
+ = SeamCorePlugin.PLUGIN_ID+".runtime.list"; //$NON-NLS-1$
+ public static final String RUNTIME_DEFAULT
+ = SeamCorePlugin.PLUGIN_ID+".runtime.default"; //$NON-NLS-1$
+ public static final String JBOSS_AS_DEFAULT_DEPLOY_AS
+ = SeamCorePlugin.PLUGIN_ID + ".project.default.deployment.type"; //$NON-NLS-1$
+ public static final String HIBERNATE_DEFAULT_DB_TYPE
+ = SeamCorePlugin.PLUGIN_ID + ".hibernate.default.db.type"; //$NON-NLS-1$
+ public static final String SEAM_LAST_SERVER_NAME
+ = SeamCorePlugin.PLUGIN_ID + ".project.facet.last.server.name"; //$NON-NLS-1$
+
+ public static String getStringPreference(final String name) {
+ return SeamCorePlugin.getDefault().getPreferenceStore().getString(name);
+ }
+}
Deleted: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/messages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/messages.properties 2007-10-23 01:40:21 UTC (rev 4440)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/project/facet/messages.properties 2007-10-23 01:40:35 UTC (rev 4441)
@@ -1,2 +0,0 @@
-SeamVersion.5=Seam version
-SeamVersion.6=is not supported
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2007-10-23 01:40:21 UTC (rev 4440)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2007-10-23 01:40:35 UTC (rev 4441)
@@ -53,7 +53,7 @@
import org.jboss.tools.seam.core.event.Change;
import org.jboss.tools.seam.core.event.ISeamProjectChangeListener;
import org.jboss.tools.seam.core.event.SeamProjectChangeEvent;
-import org.jboss.tools.seam.core.project.facet.SeamFacetPreference;
+import org.jboss.tools.seam.core.project.facet.SeampProjectPreferences;
import org.jboss.tools.seam.core.project.facet.SeamRuntime;
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
import org.jboss.tools.seam.internal.core.scanner.LoadedDeclarations;
@@ -263,7 +263,7 @@
}
SeamCorePlugin.getDefault().getPluginPreferences().addPropertyChangeListener(new Preferences.IPropertyChangeListener() {
public void propertyChange(Preferences.PropertyChangeEvent event) {
- if(SeamFacetPreference.RUNTIME_LIST.equals(event.getProperty())) {
+ if(SeampProjectPreferences.RUNTIME_LIST.equals(event.getProperty())) {
SeamRuntime d = SeamRuntimeManager.getInstance().getDefaultRuntime();
if(d != null && d.getName().equals(runtimeName)) {
// runtimeName = null;
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/AntCopyUtils.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/AntCopyUtils.java 2007-10-23 01:40:21 UTC (rev 4440)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/AntCopyUtils.java 2007-10-23 01:40:35 UTC (rev 4441)
@@ -20,6 +20,7 @@
import org.apache.tools.ant.types.FilterSetCollection;
import org.apache.tools.ant.util.FileUtils;
+import org.eclipse.osgi.util.NLS;
import org.jboss.tools.seam.core.SeamCoreMessages;
import org.jboss.tools.seam.core.SeamCorePlugin;
@@ -129,11 +130,6 @@
public boolean accept(File pathname){
return set.isIncluded(pathname.getAbsolutePath());
}
-
- @Override
- public String toString() {
- return SeamCoreMessages.getString("ANT_COPY_UTILS_INCLUDED") + set.getIncluded() + SeamCoreMessages.getString("ANT_COPY_UTILS_EXCLUDED") + set.getExcluded(); //$NON-NLS-1$ //$NON-NLS-2$
- }
}
public static void copyFilesAndFolders(File sourceFolder, File destinationFolder, FilterSetCollection set, boolean override) {
@@ -144,15 +140,13 @@
AntCopyUtils.FileSetFileFilter fileSetFilter,
FilterSetCollection filterSetCollection, boolean override) {
if(!sourceFolder.exists()) {
- throw new IllegalArgumentException(SeamCoreMessages.getString("ANT_COPY_UTILS_COPY_FAILED") + sourceFolder + SeamCoreMessages.getString("ANT_COPY_UTILS_DOES_NOT_EXIST")); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new IllegalArgumentException(NLS.bind(SeamCoreMessages.ANT_COPY_UTILS_COPY_FAILED,sourceFolder));
}
File[] files = fileSetFilter==null?sourceFolder.listFiles():sourceFolder.listFiles(fileSetFilter);
if(files==null) {
if(fileSetFilter==null) {
- throw new IllegalArgumentException(SeamCoreMessages.getString("ANT_COPY_UTILS_COULD_NOT_FIND") + sourceFolder); //$NON-NLS-1$
- } else {
- throw new IllegalArgumentException(SeamCoreMessages.getString("ANT_COPY_UTILS_COULD_NOT_FIND") + fileSetFilter + SeamCoreMessages.getString("ANT_COPY_UTILS_IN")+ sourceFolder); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new IllegalArgumentException(NLS.bind(SeamCoreMessages.ANT_COPY_UTILS_COULD_NOT_FIND_FOLDER,sourceFolder));
}
}
for (File file : files) {
@@ -179,7 +173,10 @@
public static void copyFileToFolder(File source, File dest, FilterSetCollection filterSetCollection, boolean override ) {
try {
- FileUtils.getFileUtils().copyFile(source, new File(dest,source.getName()),filterSetCollection,override);
+ File destFile = new File(dest,source.getName());
+ if(!source.equals(destFile)) {
+ FileUtils.getFileUtils().copyFile(source, destFile ,filterSetCollection,override);
+ }
} catch (IOException e) {
SeamCorePlugin.getPluginLog().logError(e);
}
@@ -194,20 +191,11 @@
}
public static void copyFiles(File source, File dest, FileFilter filter) {
-
dest.mkdir();
- if(!source.exists()) {
- throw new IllegalArgumentException(SeamCoreMessages.getString("ANT_COPY_UTILS_COPY_FAILED") + source + SeamCoreMessages.getString("ANT_COPY_UTILS_DOES_NOT_EXIST")); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
File[] listFiles = source.listFiles(filter);
if(listFiles==null) {
- if(filter==null) {
- throw new IllegalArgumentException(SeamCoreMessages.getString("ANT_COPY_UTILS_COULD_NOT_FIND") + source); //$NON-NLS-1$
- } else {
- throw new IllegalArgumentException(SeamCoreMessages.getString("ANT_COPY_UTILS_COULD_NOT_FIND") + filter + SeamCoreMessages.getString("ANT_COPY_UTILS_IN")+ source); //$NON-NLS-1$ //$NON-NLS-2$
- }
+ throw new IllegalArgumentException(NLS.bind(SeamCoreMessages.ANT_COPY_UTILS_COULD_NOT_FIND_FOLDER,source));
}
for (File file:listFiles) {
if(file.isDirectory())continue;
@@ -230,7 +218,7 @@
copyFileToFolder(file, dest, null, override);
} else {
try {
- SeamCorePlugin.getPluginLog().logError(SeamCoreMessages.getString("ANT_COPY_UTILS_CANNOT_COPY_JDBC_DRIVER_JAR") + file.getCanonicalPath() + "'"); //$NON-NLS-1$ //$NON-NLS-2$
+ SeamCorePlugin.getPluginLog().logError(NLS.bind(SeamCoreMessages.ANT_COPY_UTILS_CANNOT_COPY_JDBC_DRIVER_JAR,file.getCanonicalPath()));
} catch (IOException e) {
SeamCorePlugin.getPluginLog().logError(e);
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/DataSourceXmlDeployer.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/DataSourceXmlDeployer.java 2007-10-23 01:40:21 UTC (rev 4440)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/DataSourceXmlDeployer.java 2007-10-23 01:40:35 UTC (rev 4441)
@@ -45,7 +45,7 @@
IProject project = null;
public DataSourceXmlDeployer(IProject project) {
- super(SeamCoreMessages.getString("DATA_SOURCE_XML_DEPLOYER_DEPLOYING_DATASOURCE_TO_SERVER")); //$NON-NLS-1$
+ super(SeamCoreMessages.DATA_SOURCE_XML_DEPLOYER_DEPLOYING_DATASOURCE_TO_SERVER);
this.project = project;
}
@@ -57,7 +57,7 @@
facetedProject = ProjectFacetsManager.create(project);
} catch (CoreException e) {
return new Status(Status.WARNING, SeamCorePlugin.PLUGIN_ID,
- SeamCoreMessages.getString("DATA_SOURCE_XML_DEPLOYER_NO_SERVER_SELECTED_TO_DEPLOY_DATASOURCE_TO")); //$NON-NLS-1$
+ SeamCoreMessages.DATA_SOURCE_XML_DEPLOYER_NO_SERVER_SELECTED_TO_DEPLOY_DATASOURCE_TO);
}
org.eclipse.wst.common.project.facet.core.runtime.IRuntime primaryRuntime = facetedProject
.getPrimaryRuntime();
@@ -76,9 +76,8 @@
if (s == null) {
return new Status(Status.WARNING, SeamCorePlugin.PLUGIN_ID,
- SeamCoreMessages.getString("DATA_SOURCE_XML_DEPLOYER_NO_SERVER_SELECTED_TO_DEPLOY_DATASOURCE_TO")); //$NON-NLS-1$
+ SeamCoreMessages.DATA_SOURCE_XML_DEPLOYER_NO_SERVER_SELECTED_TO_DEPLOY_DATASOURCE_TO);
}
-
// convert it to a DeployableServer instance
DeployableServerBehavior deployer = (DeployableServerBehavior) s
.loadAdapter(DeployableServerBehavior.class, null);
@@ -86,7 +85,7 @@
// if its not null, the adaptation worked.
if (deployer == null) {
return new Status(Status.WARNING, SeamCorePlugin.PLUGIN_ID,
- SeamCoreMessages.getString("DATA_SOURCE_XML_DEPLOYER_SERVER_DID_NOT_SUPPORT_DEPLOY_OF_DATASOURCE")); //$NON-NLS-1$
+ SeamCoreMessages.DATA_SOURCE_XML_DEPLOYER_SERVER_DID_NOT_SUPPORT_DEPLOY_OF_DATASOURCE);
}
IVirtualComponent com = ComponentCore.createComponent(project);
@@ -112,7 +111,7 @@
return t;
} else {
return new Status(Status.WARNING, SeamCorePlugin.PLUGIN_ID,
- SeamCoreMessages.getString("DATA_SOURCE_XML_DEPLOYER_COULD_NOT_DEPLOY_DATASOURCE") + append); //$NON-NLS-1$
+ SeamCoreMessages.DATA_SOURCE_XML_DEPLOYER_COULD_NOT_DEPLOY_DATASOURCE + append); //$NON-NLS-1$
}
}
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPreferenceInitializer.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPreferenceInitializer.java 2007-10-23 01:40:21 UTC (rev 4440)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPreferenceInitializer.java 2007-10-23 01:40:35 UTC (rev 4441)
@@ -16,17 +16,19 @@
import java.util.HashMap;
import java.util.Map;
+import org.eclipse.core.internal.preferences.PreferencesService;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.core.runtime.preferences.DefaultScope;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.IScopeContext;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.SeamPreferences;
-import org.jboss.tools.seam.core.project.facet.SeamFacetPreference;
+import org.jboss.tools.seam.core.project.facet.SeampProjectPreferences;
import org.jboss.tools.seam.core.project.facet.SeamRuntime;
-import org.jboss.tools.seam.core.project.facet.SeamRuntimeListConverter1;
+import org.jboss.tools.seam.core.project.facet.SeamRuntimeListConverter;
import org.jboss.tools.seam.core.project.facet.SeamVersion;
import org.osgi.service.prefs.BackingStoreException;
@@ -46,12 +48,16 @@
@Override
public void initializeDefaultPreferences() {
- IScopeContext context = new DefaultScope();
- IEclipsePreferences node = context.getNode(SeamCorePlugin.PLUGIN_ID);
- node.put(SeamFacetPreference.RUNTIME_CONFIG_FORMAT_VERSION, RUNTIME_CONFIG_FORMAT_VERSION);
- node.put(SeamFacetPreference.SEAM_DEFAULT_CONNECTION_PROFILE, "DefaultDS"); //$NON-NLS-1$
- node.put(SeamFacetPreference.JBOSS_AS_DEFAULT_DEPLOY_AS, "war"); //$NON-NLS-1$
- node.put(SeamFacetPreference.HIBERNATE_DEFAULT_DB_TYPE, "HSQL"); //$NON-NLS-1$
+ IEclipsePreferences node = (IEclipsePreferences)
+ Platform.getPreferencesService()
+ .getRootNode()
+ .node(DefaultScope.SCOPE)
+ .node(SeamCorePlugin.PLUGIN_ID);
+
+ node.put(SeampProjectPreferences.RUNTIME_CONFIG_FORMAT_VERSION, RUNTIME_CONFIG_FORMAT_VERSION);
+ node.put(SeampProjectPreferences.SEAM_DEFAULT_CONNECTION_PROFILE, "DefaultDS"); //$NON-NLS-1$
+ node.put(SeampProjectPreferences.JBOSS_AS_DEFAULT_DEPLOY_AS, "war"); //$NON-NLS-1$
+ node.put(SeampProjectPreferences.HIBERNATE_DEFAULT_DB_TYPE, "HSQL"); //$NON-NLS-1$
initializeDefault(node,getSeamGenBuildPath());
try {
node.flush();
@@ -95,6 +101,6 @@
rt.setVersion(SeamVersion.SEAM_1_2);
map.put(rt.getName(), rt);
}
- node.put(SeamFacetPreference.RUNTIME_LIST, new SeamRuntimeListConverter1().getString(map));
+ node.put(SeampProjectPreferences.RUNTIME_LIST, new SeamRuntimeListConverter().getString(map));
}
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetProjectCreationDataModelProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetProjectCreationDataModelProvider.java 2007-10-23 01:40:21 UTC (rev 4440)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetProjectCreationDataModelProvider.java 2007-10-23 01:40:35 UTC (rev 4441)
@@ -174,13 +174,13 @@
private IStatus validateServer(Object serverObject) {
if (serverObject == null) {
- return SeamCorePlugin.createErrorStatus(SeamCoreMessages.getString("ERROR_JBOSS_AS_TARGET_SERVER_IS_EMPTY"), null);
+ return SeamCorePlugin.createErrorStatus(SeamCoreMessages.ERROR_JBOSS_AS_TARGET_SERVER_IS_EMPTY, null);
}
IServer s = (serverObject instanceof IServer ? (IServer)serverObject : null);
if (s == null) {
- return SeamCorePlugin.createErrorStatus(SeamCoreMessages.getString("ERROR_JBOSS_AS_TARGET_SERVER_UNKNOWN"), null);
+ return SeamCorePlugin.createErrorStatus(SeamCoreMessages.ERROR_JBOSS_AS_TARGET_SERVER_UNKNOWN, null);
}
Object rt = getProperty(ISeamFacetDataModelProperties.JBOSS_AS_TARGET_RUNTIME);
@@ -188,7 +188,7 @@
List<IServer> servers = getServers(primaryRuntimeName);
if (servers.isEmpty()) {
- return SeamCorePlugin.createErrorStatus(SeamCoreMessages.getString("ERROR_JBOSS_AS_TARGET_SERVER_NO_SERVERS_DEFINED"), null);
+ return SeamCorePlugin.createErrorStatus(SeamCoreMessages.ERROR_JBOSS_AS_TARGET_SERVER_NO_SERVERS_DEFINED, null);
}
for (IServer server : servers) {
@@ -197,7 +197,7 @@
}
}
- return SeamCorePlugin.createErrorStatus(SeamCoreMessages.getString("ERROR_JBOSS_AS_TARGET_SERVER_INCOMPATIBLE"), null);
+ return SeamCorePlugin.createErrorStatus(SeamCoreMessages.ERROR_JBOSS_AS_TARGET_SERVER_INCOMPATIBLE, null);
}
private String getRuntimeName(Object rt) {
@@ -212,10 +212,10 @@
IStatus validateRuntime(Object runtimeObject) {
if (runtimeObject == null) {
- return SeamCorePlugin.createErrorStatus(SeamCoreMessages.getString("ERROR_JBOSS_AS_TARGET_RUNTIME_IS_EMPTY"), null);
+ return SeamCorePlugin.createErrorStatus(SeamCoreMessages.ERROR_JBOSS_AS_TARGET_RUNTIME_IS_EMPTY, null);
}
if (getRuntimeName(runtimeObject) == null) {
- return SeamCorePlugin.createErrorStatus(SeamCoreMessages.getString("ERROR_JBOSS_AS_TARGET_RUNTIME_UNKNOWN"), null);
+ return SeamCorePlugin.createErrorStatus(SeamCoreMessages.ERROR_JBOSS_AS_TARGET_RUNTIME_UNKNOWN, null);
}
return OK_STATUS;
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/JavaScanner.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/JavaScanner.java 2007-10-23 01:40:21 UTC (rev 4440)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/JavaScanner.java 2007-10-23 01:40:35 UTC (rev 4441)
@@ -25,6 +25,7 @@
import org.eclipse.jdt.core.dom.ASTParser;
import org.eclipse.jdt.core.dom.ASTRequestor;
import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.osgi.util.NLS;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.util.FileUtil;
import org.jboss.tools.seam.core.SeamCoreMessages;
@@ -80,7 +81,8 @@
try {
u = getCompilationUnit(f);
} catch (CoreException e) {
- throw new ScannerException(SeamCoreMessages.getString("JAVA_SCANNER_CANNOT_GET_COMPILATION_UNIT_FOR") + f, e); //$NON-NLS-1$
+ throw new ScannerException(
+ NLS.bind(SeamCoreMessages.JAVA_SCANNER_CANNOT_GET_COMPILATION_UNIT_FOR,f), e);
}
if(u == null) return null;
ASTRequestorImpl requestor = new ASTRequestorImpl(f);
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/SeamAnnotations.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/SeamAnnotations.java 2007-10-23 01:40:21 UTC (rev 4440)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/SeamAnnotations.java 2007-10-23 01:40:35 UTC (rev 4441)
@@ -20,26 +20,26 @@
public interface SeamAnnotations {
public static final String SEAM_ANNOTATION_TYPE_PREFIX = "org.jboss.seam.annotations."; //$NON-NLS-1$
- public static final String NAME_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + SeamCoreMessages.getString("SEAM_ANNOTATIONS_NAME"); //$NON-NLS-1$
- public static final String SCOPE_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + SeamCoreMessages.getString("SEAM_ANNOTATIONS_SCOPE"); //$NON-NLS-1$
- public static final String INSTALL_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + SeamCoreMessages.getString("SEAM_ANNOTATIONS_INSTALL"); //$NON-NLS-1$
+ public static final String NAME_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + SeamCoreMessages.SEAM_ANNOTATIONS_NAME;
+ public static final String SCOPE_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + SeamCoreMessages.SEAM_ANNOTATIONS_SCOPE;
+ public static final String INSTALL_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + SeamCoreMessages.SEAM_ANNOTATIONS_INSTALL;
- public static final String IN_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + SeamCoreMessages.getString("SEAM_ANNOTATIONS_IN"); //$NON-NLS-1$
- public static final String OUT_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + SeamCoreMessages.getString("SEAM_ANNOTATIONS_OUT"); //$NON-NLS-1$
+ public static final String IN_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + SeamCoreMessages.SEAM_ANNOTATIONS_IN;
+ public static final String OUT_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + SeamCoreMessages.SEAM_ANNOTATIONS_OUT;
public static final String DATA_MODEL_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + "datamodel.DataModel"; //$NON-NLS-1$
public static final String DATA_MODEL_SELECTION_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + "datamodel.DataModelSelection"; //$NON-NLS-1$
public static final String DATA_MODEL_SELECTION_INDEX_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + "datamodel.DataModelSelectionIndex"; //$NON-NLS-1$
- public static final String CREATE_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + SeamCoreMessages.getString("SEAM_ANNOTATIONS_CREATE"); //$NON-NLS-1$
- public static final String DESTROY_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + SeamCoreMessages.getString("SEAM_ANNOTATIONS_DESTROY"); //$NON-NLS-1$
- public static final String UNWRAP_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + SeamCoreMessages.getString("SEAM_ANNOTATIONS_UNWRAP"); //$NON-NLS-1$
- public static final String OBSERVER_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + SeamCoreMessages.getString("SEAM_ANNOTATIONS_OBSERVER"); //$NON-NLS-1$
+ public static final String CREATE_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + SeamCoreMessages.SEAM_ANNOTATIONS_CREATE;
+ public static final String DESTROY_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + SeamCoreMessages.SEAM_ANNOTATIONS_DESTROY;
+ public static final String UNWRAP_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + SeamCoreMessages.SEAM_ANNOTATIONS_UNWRAP;
+ public static final String OBSERVER_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + SeamCoreMessages.SEAM_ANNOTATIONS_OBSERVER;
public static final String REMOVE_ANNOTATION_TYPE = "javax.ejb.Remove"; //$NON-NLS-1$
- public static final String FACTORY_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + SeamCoreMessages.getString("SEAM_ANNOTATIONS_FACTORY"); //$NON-NLS-1$
+ public static final String FACTORY_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + SeamCoreMessages.SEAM_ANNOTATIONS_FACTORY;
- public static final String ROLES_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + SeamCoreMessages.getString("SEAM_ANNOTATIONS_ROLES"); //$NON-NLS-1$
- public static final String ROLE_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + SeamCoreMessages.getString("SEAM_ANNOTATIONS_ROLE"); //$NON-NLS-1$
+ public static final String ROLES_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + SeamCoreMessages.SEAM_ANNOTATIONS_ROLES;
+ public static final String ROLE_ANNOTATION_TYPE = SEAM_ANNOTATION_TYPE_PREFIX + SeamCoreMessages.SEAM_ANNOTATIONS_ROLE;
public static final String ENTITY_ANNOTATION_TYPE = "javax.persistence.Entity"; //$NON-NLS-1$
public static final String STATEFUL_ANNOTATION_TYPE = "javax.ejb.Stateful"; //$NON-NLS-1$
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/LibraryScanner.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/LibraryScanner.java 2007-10-23 01:40:21 UTC (rev 4440)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/lib/LibraryScanner.java 2007-10-23 01:40:35 UTC (rev 4441)
@@ -107,7 +107,7 @@
try {
processJavaClasses(o, ds);
} catch (JavaModelException e) {
- throw new ScannerException(SeamCoreMessages.getString("LIBRARY_SCANNER_CANNOT_PROCESS_JAVA_CLASSES"), e); //$NON-NLS-1$
+ throw new ScannerException(SeamCoreMessages.LIBRARY_SCANNER_CANNOT_PROCESS_JAVA_CLASSES, e);
}
if(componentsXML != null) {
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java 2007-10-23 01:40:21 UTC (rev 4440)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java 2007-10-23 01:40:35 UTC (rev 4441)
@@ -27,6 +27,7 @@
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.validation.internal.core.ValidationException;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
@@ -235,7 +236,7 @@
private void validateXmlFactory(ISeamXmlFactory factory, Set<String> markedDuplicateFactoryNames) {
String name = factory.getName();
if(name==null) {
- SeamCorePlugin.getDefault().logError(SeamCoreMessages.getString("SEAM_CORE_VALIDATOR_FACTORY_METHOD_MUST_HAVE_NAME") + factory.getResource()); //$NON-NLS-1$
+ SeamCorePlugin.getDefault().logError(NLS.bind(SeamCoreMessages.SEAM_CORE_VALIDATOR_FACTORY_METHOD_MUST_HAVE_NAME,factory.getResource()));
return;
}
validateFactoryName(factory, name, markedDuplicateFactoryNames, false);
@@ -257,7 +258,7 @@
factoryName = methodName.substring(3);
} else {
// Unknown factory name
- SeamCorePlugin.getDefault().logError(SeamCoreMessages.getString("SEAM_CORE_VALIDATOR_FACTORY_METHOD_MUST_HAVE_NAME") + factory.getResource()); //$NON-NLS-1$
+ SeamCorePlugin.getDefault().logError(NLS.bind(SeamCoreMessages.SEAM_CORE_VALIDATOR_FACTORY_METHOD_MUST_HAVE_NAME,factory.getResource()));
//factoryName = methodName;
return;
}
@@ -265,7 +266,7 @@
validateFactoryName(factory, factoryName, markedDuplicateFactoryNames, true);
}
} catch (JavaModelException e) {
- SeamCorePlugin.getDefault().logError(SeamCoreMessages.getString("SEAM_CORE_VALIDATOR_ERROR_VALIDATING_SEAM_CORE"), e); //$NON-NLS-1$
+ SeamCorePlugin.getDefault().logError(SeamCoreMessages.SEAM_CORE_VALIDATOR_ERROR_VALIDATING_SEAM_CORE, e);
}
} else {
// factory must be java method!
@@ -433,7 +434,7 @@
validationContext.addLinkedCoreResource(componentName, type.getResource().getFullPath());
}
} catch (JavaModelException e) {
- SeamCorePlugin.getDefault().logError(SeamCoreMessages.getString("SEAM_CORE_VALIDATOR_ERROR_VALIDATING_SEAM_CORE"), e); //$NON-NLS-1$
+ SeamCorePlugin.getDefault().logError(SeamCoreMessages.SEAM_CORE_VALIDATOR_ERROR_VALIDATING_SEAM_CORE, e);
}
// validate properties
Collection<ISeamProperty> properties = declaration.getProperties();
@@ -482,7 +483,7 @@
length = declaration.getSourceMember().getNameRange().getLength();
offset = declaration.getSourceMember().getNameRange().getOffset();
} catch (JavaModelException e) {
- SeamCorePlugin.getDefault().logError(SeamCoreMessages.getString("SEAM_CORE_VALIDATOR_ERROR_VALIDATING_SEAM_CORE"), e); //$NON-NLS-1$
+ SeamCorePlugin.getDefault().logError(SeamCoreMessages.SEAM_CORE_VALIDATOR_ERROR_VALIDATING_SEAM_CORE, e);
}
return new SeamTextSourceReference(length, offset);
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java 2007-10-23 01:40:21 UTC (rev 4440)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java 2007-10-23 01:40:35 UTC (rev 4441)
@@ -126,7 +126,7 @@
try {
content = FileUtil.readStream(file.getContents());
} catch (CoreException e) {
- SeamCorePlugin.getDefault().logError(SeamCoreMessages.getString("SEAM_EL_VALIDATOR_ERROR_VALIDATING_SEAM_EL"), e); //$NON-NLS-1$
+ SeamCorePlugin.getDefault().logError(SeamCoreMessages.SEAM_EL_VALIDATOR_ERROR_VALIDATING_SEAM_EL, e);
return;
}
if(ext.equalsIgnoreCase("java")) { //$NON-NLS-1$
@@ -154,7 +154,7 @@
token = scaner.nextToken();
}
} catch (BadLocationException e) {
- SeamCorePlugin.getDefault().logError(SeamCoreMessages.getString("SEAM_EL_VALIDATOR_ERROR_VALIDATING_SEAM_EL"), e); //$NON-NLS-1$
+ SeamCorePlugin.getDefault().logError(SeamCoreMessages.SEAM_EL_VALIDATOR_ERROR_VALIDATING_SEAM_EL, e);
}
}
@@ -184,9 +184,9 @@
}
}
} catch (CoreException e) {
- SeamCorePlugin.getDefault().logError(SeamCoreMessages.getString("SEAM_EL_VALIDATOR_ERROR_VALIDATING_SEAM_EL"), e); //$NON-NLS-1$
+ SeamCorePlugin.getDefault().logError(SeamCoreMessages.SEAM_EL_VALIDATOR_ERROR_VALIDATING_SEAM_EL, e);
} catch (IOException e) {
- SeamCorePlugin.getDefault().logError(SeamCoreMessages.getString("SEAM_EL_VALIDATOR_ERROR_VALIDATING_SEAM_EL"), e); //$NON-NLS-1$
+ SeamCorePlugin.getDefault().logError(SeamCoreMessages.SEAM_EL_VALIDATOR_ERROR_VALIDATING_SEAM_EL, e);
} finally {
if (model != null) {
model.releaseFromRead();
@@ -290,11 +290,11 @@
IMethod unpairedMethod = unpairedGettersOrSetters.values().iterator().next();
String methodName = unpairedMethod.getElementName();
String propertyName = unpairedGettersOrSetters.keySet().iterator().next();
- String missingMethodName = SeamCoreMessages.getString("SEAM_EL_VALIDATOR_SETTER"); //$NON-NLS-1$
- String existedMethodName = SeamCoreMessages.getString("SEAM_EL_VALIDATOR_GETTER"); //$NON-NLS-1$
+ String missingMethodName = SeamCoreMessages.SEAM_EL_VALIDATOR_SETTER;
+ String existedMethodName = SeamCoreMessages.SEAM_EL_VALIDATOR_GETTER;
if(methodName.startsWith("s")) { //$NON-NLS-1$
missingMethodName = existedMethodName;
- existedMethodName = SeamCoreMessages.getString("SEAM_EL_VALIDATOR_SETTER"); //$NON-NLS-1$
+ existedMethodName = SeamCoreMessages.SEAM_EL_VALIDATOR_SETTER;
}
addError(UNPAIRED_GETTER_OR_SETTER_MESSAGE_ID, SeamPreferences.UNPAIRED_GETTER_OR_SETTER, new String[]{propertyName, existedMethodName, missingMethodName}, operand.length(), documnetOffset, file);
}
@@ -319,9 +319,9 @@
}
}
} catch (BadLocationException e) {
- SeamCorePlugin.getDefault().logError(SeamCoreMessages.getString("SEAM_EL_VALIDATOR_ERROR_VALIDATING_SEAM_EL"), e); //$NON-NLS-1$
+ SeamCorePlugin.getDefault().logError(SeamCoreMessages.SEAM_EL_VALIDATOR_ERROR_VALIDATING_SEAM_EL, e);
} catch (StringIndexOutOfBoundsException e) {
- SeamCorePlugin.getDefault().logError(SeamCoreMessages.getString("SEAM_EL_VALIDATOR_ERROR_VALIDATING_SEAM_EL"), e); //$NON-NLS-1$
+ SeamCorePlugin.getDefault().logError(SeamCoreMessages.SEAM_EL_VALIDATOR_ERROR_VALIDATING_SEAM_EL, e);
}
// Mark invalid EL
addError(INVALID_EXPRESSION_MESSAGE_ID, SeamPreferences.INVALID_EXPRESSION, new String[]{varName}, lengthOfVarName, offsetOfVarName, file);
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationContext.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationContext.java 2007-10-23 01:40:21 UTC (rev 4440)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationContext.java 2007-10-23 01:40:35 UTC (rev 4441)
@@ -260,10 +260,10 @@
*/
public void addLinkedResource(String variableName, IPath linkedResourcePath) {
if(linkedResourcePath==null) {
- throw new RuntimeException(SeamCoreMessages.getString("SEAM_VALIDATION_CONTEXT_LINKED_RESOURCE_PATH_MUST_NOT_BE_NULL")); //$NON-NLS-1$
+ throw new RuntimeException(SeamCoreMessages.SEAM_VALIDATION_CONTEXT_LINKED_RESOURCE_PATH_MUST_NOT_BE_NULL);
}
if(variableName==null) {
- throw new RuntimeException(SeamCoreMessages.getString("SEAM_VALIDATION_CONTEXT_VARIABLE_NAME_MUST_NOT_BE_NULL")); //$NON-NLS-1$
+ throw new RuntimeException(SeamCoreMessages.SEAM_VALIDATION_CONTEXT_VARIABLE_NAME_MUST_NOT_BE_NULL);
}
Set<IPath> linkedResources = resourcesByVariableName.get(variableName);
if(linkedResources==null) {
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationHelper.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationHelper.java 2007-10-23 01:40:21 UTC (rev 4440)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationHelper.java 2007-10-23 01:40:35 UTC (rev 4441)
@@ -53,7 +53,7 @@
try {
project = SeamCorePlugin.getSeamProject(getProject(), true);
} catch (Exception e) {
- SeamCorePlugin.getDefault().logError(SeamCoreMessages.getString("SEAM_VALIDATION_HELPER_CANNOT_GET_SEAM_PROJECT"), e); //$NON-NLS-1$
+ SeamCorePlugin.getDefault().logError(SeamCoreMessages.SEAM_VALIDATION_HELPER_CANNOT_GET_SEAM_PROJECT, e);
}
return project;
}
@@ -121,7 +121,7 @@
*/
public boolean isJar(IPath path) {
if(path == null) {
- throw new IllegalArgumentException(SeamCoreMessages.getString("SEAM_VALIDATION_HELPER_RESOURCE_MUST_NOT_BE_NULL")); //$NON-NLS-1$
+ throw new IllegalArgumentException(SeamCoreMessages.SEAM_VALIDATION_HELPER_RESOURCE_MUST_NOT_BE_NULL);
}
String ext = path.getFileExtension();
return ext != null && ext.equalsIgnoreCase("jar"); //$NON-NLS-1$
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties 2007-10-23 01:40:21 UTC (rev 4440)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/messages.properties 2007-10-23 01:40:35 UTC (rev 4441)
@@ -1,13 +1,13 @@
- /*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+#*******************************************************************************
+#* Copyright (c) 2007 Red Hat, Inc.
+#* Distributed under license by Red Hat, Inc. All rights reserved.
+#* This program is made available under the terms of the
+#* Eclipse Public License v1.0 which accompanies this distribution,
+#* and is available at http://www.eclipse.org/legal/epl-v10.html
+#*
+#* Contributors:
+#* Red Hat, Inc. - initial API and implementation
+#******************************************************************************/
#Components
NONUNIQUE_COMPONENT_NAME_MESSAGE=Duplicate component name: {0}
STATEFUL_COMPONENT_DOES_NOT_CONTAIN_REMOVE=Stateful component "{0}" must have a method marked @Remove
17 years, 2 months
JBoss Tools SVN: r4440 - in trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui: wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-10-22 21:40:21 -0400 (Mon, 22 Oct 2007)
New Revision: 4440
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1141
not copy utils check for copying file to itself.
some cleanup and refactoring has been done for I18N.
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2007-10-23 01:40:16 UTC (rev 4439)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2007-10-23 01:40:21 UTC (rev 4440)
@@ -53,7 +53,7 @@
import org.eclipse.wst.web.ui.internal.wizards.NewProjectDataModelFacetWizard;
import org.hibernate.eclipse.console.utils.DriverClassHelpers;
import org.jboss.tools.seam.core.SeamCorePlugin;
-import org.jboss.tools.seam.core.project.facet.SeamFacetPreference;
+import org.jboss.tools.seam.core.project.facet.SeampProjectPreferences;
import org.jboss.tools.seam.core.project.facet.SeamRuntime;
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
import org.jboss.tools.seam.core.project.facet.SeamVersion;
@@ -190,24 +190,24 @@
*/
private String getDefaultDbType() {
// TODO Auto-generated method stub
- return SeamFacetPreference.getStringPreference(
- SeamFacetPreference.HIBERNATE_DEFAULT_DB_TYPE);
+ return SeampProjectPreferences.getStringPreference(
+ SeampProjectPreferences.HIBERNATE_DEFAULT_DB_TYPE);
}
/**
* @return
*/
private Object getDeployAsDefaultValue() {
- return SeamFacetPreference.getStringPreference(
- SeamFacetPreference.JBOSS_AS_DEFAULT_DEPLOY_AS);
+ return SeampProjectPreferences.getStringPreference(
+ SeampProjectPreferences.JBOSS_AS_DEFAULT_DEPLOY_AS);
}
/**
* @return
*/
private Object getConnectionProfileDefaultValue() {
- String defaultDs = SeamFacetPreference.getStringPreference(
- SeamFacetPreference.SEAM_DEFAULT_CONNECTION_PROFILE);
+ String defaultDs = SeampProjectPreferences.getStringPreference(
+ SeampProjectPreferences.SEAM_DEFAULT_CONNECTION_PROFILE);
return getProfileNameList().contains(defaultDs)?defaultDs:""; //$NON-NLS-1$
}
@@ -216,12 +216,12 @@
* @return
*/
private Object getSeamRuntimeDefaultValue() {
- return ("".equals(SeamFacetPreference //$NON-NLS-1$
- .getStringPreference(SeamFacetPreference.SEAM_DEFAULT_RUNTIME_NAME)) ?
+ return ("".equals(SeampProjectPreferences //$NON-NLS-1$
+ .getStringPreference(SeampProjectPreferences.SEAM_DEFAULT_RUNTIME_NAME)) ?
(SeamRuntimeManager.getInstance().getDefaultRuntime()==null?
"":SeamRuntimeManager.getInstance().getDefaultRuntime().getName()) : //$NON-NLS-1$
- SeamFacetPreference
- .getStringPreference(SeamFacetPreference.SEAM_DEFAULT_RUNTIME_NAME));
+ SeampProjectPreferences
+ .getStringPreference(SeampProjectPreferences.SEAM_DEFAULT_RUNTIME_NAME));
}
/**
@@ -252,19 +252,19 @@
public void transferStateToConfig() {
SeamCorePlugin.getDefault().getPluginPreferences().setValue(
- SeamFacetPreference.SEAM_DEFAULT_RUNTIME_NAME,
+ SeampProjectPreferences.SEAM_DEFAULT_RUNTIME_NAME,
jBossSeamHomeEditor.getValueAsString());
SeamCorePlugin.getDefault().getPluginPreferences().setValue(
- SeamFacetPreference.SEAM_DEFAULT_CONNECTION_PROFILE,
+ SeampProjectPreferences.SEAM_DEFAULT_CONNECTION_PROFILE,
connProfileSelEditor.getValueAsString());
SeamCorePlugin.getDefault().getPluginPreferences().setValue(
- SeamFacetPreference.JBOSS_AS_DEFAULT_DEPLOY_AS,
+ SeampProjectPreferences.JBOSS_AS_DEFAULT_DEPLOY_AS,
this.jBossAsDeployAsEditor.getValueAsString());
SeamCorePlugin.getDefault().getPluginPreferences().setValue(
- SeamFacetPreference.HIBERNATE_DEFAULT_DB_TYPE,
+ SeampProjectPreferences.HIBERNATE_DEFAULT_DB_TYPE,
this.jBossHibernateDbTypeEditor.getValueAsString());
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java 2007-10-23 01:40:16 UTC (rev 4439)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java 2007-10-23 01:40:21 UTC (rev 4440)
@@ -38,7 +38,7 @@
import org.eclipse.wst.common.project.facet.core.runtime.IRuntime;
import org.eclipse.wst.server.ui.ServerUIUtil;
import org.jboss.tools.seam.core.SeamCorePlugin;
-import org.jboss.tools.seam.core.project.facet.SeamFacetPreference;
+import org.jboss.tools.seam.core.project.facet.SeampProjectPreferences;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.jboss.tools.seam.internal.core.project.facet.SeamFacetProjectCreationDataModelProvider;
import org.jboss.tools.seam.ui.SeamUIMessages;
@@ -245,8 +245,8 @@
public void restoreDefaultSettings() {
super.restoreDefaultSettings();
- String lastServerName = SeamFacetPreference
- .getStringPreference(SeamFacetPreference.SEAM_LAST_SERVER_NAME);
+ String lastServerName = SeampProjectPreferences
+ .getStringPreference(SeampProjectPreferences.SEAM_LAST_SERVER_NAME);
if (lastServerName != null && lastServerName.length() > 0) {
SeamFacetProjectCreationDataModelProvider.setServerName(model,lastServerName);
@@ -258,7 +258,7 @@
String serverName = SeamFacetProjectCreationDataModelProvider.getServerName(model);
if (serverName != null && serverName.length() > 0) {
SeamCorePlugin.getDefault().getPluginPreferences().setValue(
- SeamFacetPreference.SEAM_LAST_SERVER_NAME,
+ SeampProjectPreferences.SEAM_LAST_SERVER_NAME,
serverName);
}
}
17 years, 2 months
JBoss Tools SVN: r4439 - trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-10-22 21:40:16 -0400 (Mon, 22 Oct 2007)
New Revision: 4439
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamRuntimeListConverterTest.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1141
not copy utils check for copying file to itself.
some cleanup and refactoring has been done for I18N.
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamRuntimeListConverterTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamRuntimeListConverterTest.java 2007-10-23 01:33:50 UTC (rev 4438)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamRuntimeListConverterTest.java 2007-10-23 01:40:16 UTC (rev 4439)
@@ -17,7 +17,7 @@
import junit.framework.TestCase;
import org.jboss.tools.seam.core.project.facet.SeamRuntime;
-import org.jboss.tools.seam.core.project.facet.SeamRuntimeListConverter1;
+import org.jboss.tools.seam.core.project.facet.SeamRuntimeListConverter;
import org.jboss.tools.seam.core.project.facet.SeamVersion;
/**
@@ -27,7 +27,7 @@
public class SeamRuntimeListConverterTest extends TestCase {
/**
- * Test method for {@link org.jboss.tools.seam.core.project.facet.SeamRuntimeListConverter1#getMap(java.lang.String)}.
+ * Test method for {@link org.jboss.tools.seam.core.project.facet.SeamRuntimeListConverter#getMap(java.lang.String)}.
*/
public void testSerializeSeamRuntimeListToString() {
Map<String,SeamRuntime> runtimes = new HashMap<String,SeamRuntime>();
@@ -41,7 +41,7 @@
rt2.setHomeDir("homeDir");
rt2.setVersion(SeamVersion.parseFromString("1.2"));
runtimes.put(rt2.getName(),rt2);
- SeamRuntimeListConverter1 converter = new SeamRuntimeListConverter1();
+ SeamRuntimeListConverter converter = new SeamRuntimeListConverter();
String config = converter.getString(runtimes);
assertNotNull("Saved runtime list cannot be null", config);
assertTrue("Saved list of runtimes cannot be empty.", !"".equals(config.trim()));
@@ -55,10 +55,10 @@
}
/**
- * Test method for {@link org.jboss.tools.seam.core.project.facet.SeamRuntimeListConverter1#getString(java.util.List)}.
+ * Test method for {@link org.jboss.tools.seam.core.project.facet.SeamRuntimeListConverter#getString(java.util.List)}.
*/
public void testLoadingSeamRuntimeListFromString() {
- SeamRuntimeListConverter1 converter = new SeamRuntimeListConverter1();
+ SeamRuntimeListConverter converter = new SeamRuntimeListConverter();
Map<String,SeamRuntime> runtimes =
converter.getMap("name|rt1|homeDir|homeDirPath1|version|1.2|default|true," +
"name|rt2|homeDir|homeDirPath2|version|1.2|default|false");
17 years, 2 months
JBoss Tools SVN: r4438 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-22 21:33:50 -0400 (Mon, 22 Oct 2007)
New Revision: 4438
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java
Log:
Somewhat but not really related to JBIDE-414
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java 2007-10-23 01:24:31 UTC (rev 4437)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java 2007-10-23 01:33:50 UTC (rev 4438)
@@ -231,14 +231,16 @@
if( xpath != null ) xpathText.setText(xpath);
proposalProvider = new XPathProposalProvider(repository);
- proposalProvider.setPath(getConfigFolder(server));
+ if( server != null )
+ proposalProvider.setPath(getConfigFolder(server));
ContentProposalAdapter adapter = new
ContentProposalAdapter(xpathText, new TextContentAdapter(),
proposalProvider, null, null);
adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
XPathAttributeProposalProvider provider2 = new XPathAttributeProposalProvider(repository, xpathText);
- provider2.setPath(getConfigFolder(server));
+ if( server != null )
+ provider2.setPath(getConfigFolder(server));
ContentProposalAdapter adapter2 = new
ContentProposalAdapter(attributeText, new TextContentAdapter(),
provider2, null, null);
17 years, 2 months
JBoss Tools SVN: r4437 - trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-22 21:24:31 -0400 (Mon, 22 Oct 2007)
New Revision: 4437
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.properties
Log:
JBIDE-829
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.properties
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.properties 2007-10-23 01:21:59 UTC (rev 4436)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.properties 2007-10-23 01:24:31 UTC (rev 4437)
@@ -11,7 +11,7 @@
ProjectPackagesView_editPackageAction_label=Edit Archive
ProjectPackagesView_editFolderAction_label=Edit Folder
ProjectPackagesView_editFilesetAction_label=Edit Fileset
-ProjectPackagesView_buildArchiveAction_label=Build Archive
+ProjectPackagesView_buildArchiveAction_label=Build Archive (Full)
ProjectPackagesView_buildProjectAction_label=Build Project (Full)
ProjectPackagesView_createFolderDialog_title=Create a folder
ProjectPackagesView_createFolderDialog_message=Name of the folder to create
17 years, 2 months