Author: sflanigan
Date: 2009-07-10 03:56:03 -0400 (Fri, 10 Jul 2009)
New Revision: 16525
Modified:
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/CssPlugin.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/Messages.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/WebDevelopmentPerspectiveFactory.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/WebUiPlugin.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddOrm2NatureActionHandler.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/RegisterInServerXmlActionDelegate.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/RunPageActionDelegate.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/SaveProjectAsTemplateActionDelegate.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/ServerXmlActionDelegate.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/UnregisterFromServerXmlActionDelegate.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/adf/AddADFSupportHelper.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/attribute/adapter/WebRoleListContentProvider.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/TLDEditorMessages.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/WebCompoundEditor.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/forms/TLDFormLayoutData.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/webapp/form/WebAppFileFormLayoutData.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/webapp/form/WebAppFoldersFormLayoutData.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/AbstractPagesPreferencesPage.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/messages.properties
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/WebProjectsLabelProvider.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/decorator/TLDAttributeDecorator.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/TemplatePreprocessor.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectCreationOperation.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterComponent.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterWizard.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/NewProjectRegisterPage.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewCSSFileWizard.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewJSFileWizard.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewTLD20FileWizard.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewTLD21FileWizard.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewTLDFileWizard.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewWebFileWizard.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/palette/ImportTLDPage.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplateNameView.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplatePropertiesView.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplateResourcesView.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplateVelocityView.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/CustomCheckboxTreeAndListGroup.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/EditProjectTemplateView.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizardPage.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebWarWizard.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebWarWizardPage.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizard.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizardPage.java
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckClass.java
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckFilterMappingName.java
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckResource.java
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckRoleReferenceName.java
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckServletMappingName.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3557 Externalize English strings
Modified:
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/CssPlugin.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/CssPlugin.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/CssPlugin.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -21,7 +21,7 @@
public class CssPlugin extends AbstractUIPlugin {
// The plug-in ID
- public static final String PLUGIN_ID = "org.jboss.tools.jst.css";
+ public static final String PLUGIN_ID = "org.jboss.tools.jst.css";
//$NON-NLS-1$
// The shared instance
private static CssPlugin plugin;
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/Messages.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/Messages.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/Messages.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -4,8 +4,34 @@
public class Messages extends NLS {
private static final String BUNDLE_NAME =
"org.jboss.tools.jst.web.ui.messages"; //$NON-NLS-1$
+ public static String AddADFSupportHelper_AddADFSupport;
+ public static String AddADFSupportHelper_LibraryIsEmpty;
+ public static String AddADFSupportHelper_ProjectDoesNotHaveLibFolder;
+ public static String AddOrm2NatureActionHandler_Add;
+ public static String AddOrm2NatureActionHandler_Remove;
+ public static String AppRegisterComponent_NewServerRuntime;
public static String HiddenLinksWizardView_HideAll;
public static String HiddenLinksWizardView_ShowAll;
+ public static String NewProjectRegisterPage_Register;
+ public static String RunPageActionDelegate_PleaseEnterURL;
+ public static String RunPageActionDelegate_RunMenuItem;
+ public static String RunPageActionDelegate_RunTitle;
+ public static String RunPageActionDelegate_RunURL;
+ public static String ServerXmlActionDelegate_PrefixServerSuffix;
+ public static String TLDFormLayoutData_DefinedTags;
+ public static String TLDFormLayoutData_Functions;
+ public static String TLDFormLayoutData_InitParams;
+ public static String TLDFormLayoutData_Listeners;
+ public static String TLDFormLayoutData_TagAttributes;
+ public static String TLDFormLayoutData_TagDescription;
+ public static String TLDFormLayoutData_TagLibraryDescription;
+ public static String TLDFormLayoutData_TagVariables;
+ public static String TLDFormLayoutData_Validator;
+ public static String WebAppFileFormLayoutData_ContextParams;
+ public static String WebAppFileFormLayoutData_WebDesc23;
+ public static String WebAppFileFormLayoutData_WebDesc24;
+ public static String WebAppFileFormLayoutData_WebDesc25;
+ public static String WebCompoundEditor_WebXMLEditor;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/WebDevelopmentPerspectiveFactory.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/WebDevelopmentPerspectiveFactory.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/WebDevelopmentPerspectiveFactory.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -21,7 +21,7 @@
*/
public class WebDevelopmentPerspectiveFactory implements IPerspectiveFactory {
- public static final String PERSPECTIVE_ID =
"org.jboss.tools.jst.web.ui.WebDevelopmentPerspective";
+ public static final String PERSPECTIVE_ID =
"org.jboss.tools.jst.web.ui.WebDevelopmentPerspective"; //$NON-NLS-1$
/* (non-Javadoc)
* @see
org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
@@ -31,12 +31,12 @@
IFolderLayout leftTop = layout.createFolder("leftTop", IPageLayout.LEFT,
(float)0.2, editorArea); //$NON-NLS-1$
leftTop.addView(JavaUI.ID_PACKAGES);
- leftTop.addView("org.jboss.tools.jst.web.ui.navigator.WebProjectsView");
- leftTop.addView("org.jboss.tools.seam.ui.views.SeamComponentsNavigator");
+ leftTop.addView("org.jboss.tools.jst.web.ui.navigator.WebProjectsView");
//$NON-NLS-1$
+ leftTop.addView("org.jboss.tools.seam.ui.views.SeamComponentsNavigator");
//$NON-NLS-1$
leftTop.addPlaceholder(IPageLayout.ID_RES_NAV);
- IFolderLayout leftBottom = layout.createFolder("leftBottom",
IPageLayout.BOTTOM, 0.64f, "leftTop");
+ IFolderLayout leftBottom = layout.createFolder("leftBottom",
IPageLayout.BOTTOM, 0.64f, "leftTop"); //$NON-NLS-1$ //$NON-NLS-2$
//leftBottom.addView(IPageLayout.ID_OUTLINE);
leftBottom.addView(IPageLayout.ID_PROP_SHEET);
@@ -44,11 +44,11 @@
IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM,
(float)0.78, editorArea); //$NON-NLS-1$
bottom.addView(IPageLayout.ID_PROBLEM_VIEW);
bottom.addView(IPageLayout.ID_TASK_LIST);
- bottom.addView("org.jboss.ide.eclipse.as.ui.views.JBossServerView");
+ bottom.addView("org.jboss.ide.eclipse.as.ui.views.JBossServerView");
//$NON-NLS-1$
IFolderLayout rightTop = layout.createFolder("right", IPageLayout.RIGHT,
(float)0.8, editorArea); //$NON-NLS-1$
- rightTop.addView("org.jboss.tools.common.model.ui.views.palette.PaletteView");
- IFolderLayout rightBottom = layout.createFolder("rightBottom",
IPageLayout.BOTTOM, (float)0.64, "right"); //$NON-NLS-1$
+ rightTop.addView("org.jboss.tools.common.model.ui.views.palette.PaletteView");
//$NON-NLS-1$
+ IFolderLayout rightBottom = layout.createFolder("rightBottom",
IPageLayout.BOTTOM, (float)0.64, "right"); //$NON-NLS-1$ //$NON-NLS-2$
rightBottom.addView(IPageLayout.ID_OUTLINE);
layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
@@ -57,7 +57,7 @@
layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);
// views - seam
- layout.addShowViewShortcut("org.jboss.tools.seam.ui.views.SeamComponentsNavigator");
+ layout.addShowViewShortcut("org.jboss.tools.seam.ui.views.SeamComponentsNavigator");
//$NON-NLS-1$
// views - java
layout.addShowViewShortcut(JavaUI.ID_PACKAGES);
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/WebUiPlugin.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/WebUiPlugin.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/WebUiPlugin.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -17,7 +17,7 @@
import org.osgi.framework.BundleContext;
public class WebUiPlugin extends BaseUIPlugin {
- public static final String PLUGIN_ID = "org.jboss.tools.jst.web.ui";
+ public static final String PLUGIN_ID = "org.jboss.tools.jst.web.ui";
//$NON-NLS-1$
static WebUiPlugin INSTANCE;
public WebUiPlugin() {
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddOrm2NatureActionHandler.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddOrm2NatureActionHandler.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/AddOrm2NatureActionHandler.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -21,20 +21,21 @@
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.plugin.ModelPlugin;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.jst.web.ui.Messages;
public class AddOrm2NatureActionHandler extends AbstractHandler {
- static final String PLUGIN_ID = "TODO" ;
- static final String ORM2NATURE_ID = "TODO";
+ static final String PLUGIN_ID = "TODO" ; //$NON-NLS-1$
+ static final String ORM2NATURE_ID = "TODO"; //$NON-NLS-1$
- static final String ADD_CLASS_NAME = "TODO.view.AddOrmNatureActionDelegate";
- static final String REMOVE_CLASS_NAME =
"TODO.view.RemoveOrmNatureActionDelegate";
+ static final String ADD_CLASS_NAME = "TODO.view.AddOrmNatureActionDelegate";
//$NON-NLS-1$
+ static final String REMOVE_CLASS_NAME =
"TODO.view.RemoveOrmNatureActionDelegate"; //$NON-NLS-1$
public AddOrm2NatureActionHandler() {}
public boolean isEnabled(XModelObject object) {
if(object == null || EclipseResourceUtil.getProject(object) == null ||
Platform.getBundle(PLUGIN_ID) == null) return false;
boolean hasNature = EclipseResourceUtil.hasNature(object.getModel(),
ORM2NATURE_ID);
- String displayName = hasNature ? "Remove Hibernate Capabilities" :
"Add Hibernate Capabilities...";
+ String displayName = hasNature ? Messages.AddOrm2NatureActionHandler_Remove :
Messages.AddOrm2NatureActionHandler_Add;
((XActionImpl)action).setDisplayName(displayName);
return true;
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/RegisterInServerXmlActionDelegate.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/RegisterInServerXmlActionDelegate.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/RegisterInServerXmlActionDelegate.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -18,7 +18,7 @@
public class RegisterInServerXmlActionDelegate extends ServerXmlActionDelegate {
protected String getActionPath() {
- return "Registration.RegisterInServerXML";
+ return "Registration.RegisterInServerXML"; //$NON-NLS-1$
}
protected boolean isRelevantProject(IProject project) {
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/RunPageActionDelegate.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/RunPageActionDelegate.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/RunPageActionDelegate.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.jst.web.ui.action;
+import java.text.MessageFormat;
import java.util.Properties;
import java.util.Set;
import java.util.TreeSet;
@@ -51,6 +52,7 @@
import org.jboss.tools.jst.web.browser.wtp.RunOnServerContext;
import org.jboss.tools.jst.web.server.ServerManager;
import org.jboss.tools.jst.web.server.ServerManagerListener;
+import org.jboss.tools.jst.web.ui.Messages;
import org.jboss.tools.jst.web.ui.WebUiPlugin;
public class RunPageActionDelegate extends AbstractModelActionDelegate implements
IWorkbenchWindowPulldownDelegate {
@@ -72,7 +74,7 @@
public void init(IWorkbenchWindow window) {
super.init(window);
- new Thread(new R(), "Update Run Page Action").start();
+ new Thread(new R(), "Update Run Page Action").start(); //$NON-NLS-1$
}
protected void safeSelectionChanged(IAction action, ISelection selection) {
@@ -84,7 +86,7 @@
adapter = EclipseResourceUtil.createObjectForResource(p);
} else {
if(context.lastRunObject != null) {
- p =
(IProject)context.lastRunObject.getModel().getProperties().get("project");
+ p =
(IProject)context.lastRunObject.getModel().getProperties().get("project");
//$NON-NLS-1$
if(p == null || !p.isOpen() || !p.exists()) {
context.setLastRunObject(null);
update();
@@ -134,8 +136,8 @@
String tip = defaultToolTip;
if(object != null) {
String lastRunURL = context.getLastRunURL();
- if(lastRunURL != null && !lastRunURL.startsWith("%server%")) {
- tip = "Run " + lastRunURL;
+ if(lastRunURL != null && !lastRunURL.startsWith("%server%")) {
//$NON-NLS-1$
+ tip = MessageFormat.format(Messages.RunPageActionDelegate_RunURL, lastRunURL);
}
}
action.setToolTipText(tip);
@@ -167,7 +169,7 @@
} else if(object != null && DnDUtil.getEnabledAction(object, null,
getModelActionPath()) != null) {
if(!saveAllEditors()) return;
Properties p = new Properties();
- p.put("shell", window.getShell());
+ p.put("shell", window.getShell()); //$NON-NLS-1$
XActionInvoker.invoke(getModelActionPath(), object, p);
} else {
getMenu(window.getShell()).setVisible(true);
@@ -214,7 +216,7 @@
class XModelTreeListenerImpl implements XModelTreeListener {
public void nodeChanged(XModelTreeEvent event) {
- if("FileSystems".equals(event.getModelObject().getPath())) {
+ if("FileSystems".equals(event.getModelObject().getPath())) { //$NON-NLS-1$
context.setLastRunObject(context.lastRunObject);
}
}
@@ -227,7 +229,7 @@
String lastRunURL = context.getLastRunURL();
if(lastRunURL == null) {
//do nothing
- } else if(!lastRunURL.startsWith("%server%")) {
+ } else if(!lastRunURL.startsWith("%server%")) { //$NON-NLS-1$
item = new MenuItem(menu, SWT.PUSH);
item.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
@@ -238,11 +240,11 @@
widgetSelected(e);
}
});
- item.setText("" + context.getLastRunURL());
+ item.setText("" + context.getLastRunURL()); //$NON-NLS-1$
} else {
item = new MenuItem(menu, SWT.PUSH);
- String message = lastRunURL.substring("%server%".length());
- int i = message.indexOf("/");
+ String message = lastRunURL.substring("%server%".length()); //$NON-NLS-1$
+ int i = message.indexOf("/"); //$NON-NLS-1$
if(i >= 0) message = message.substring(0, i);
item.setText(message);
}
@@ -271,7 +273,7 @@
item = new MenuItem(menu, SWT.SEPARATOR);
}
item = new MenuItem(menu, SWT.PUSH);
- item.setText("Run...");
+ item.setText(Messages.RunPageActionDelegate_RunMenuItem);
item.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
runSelector();
@@ -285,11 +287,11 @@
private void runSelector() {
if(!saveAllEditors()) return;
- XEntityData data = XEntityDataImpl.create(new String[][]{{"RunPageHelper"},
{"url", "yes"}});
- XModelObject dummy =
PreferenceModelUtilities.getPreferenceModel().createModelObject("RunPageHelper",
null);
+ XEntityData data = XEntityDataImpl.create(new String[][]{{"RunPageHelper"},
{"url", "yes"}}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ XModelObject dummy =
PreferenceModelUtilities.getPreferenceModel().createModelObject("RunPageHelper",
null); //$NON-NLS-1$
int i = RunSelectorSupport.run(dummy, data, null);
if(i != 0) return;
- String url = data.getValue("url");
+ String url = data.getValue("url"); //$NON-NLS-1$
context.activateJustUrl(url);
update();
run(action);
@@ -321,27 +323,27 @@
IModelNature mn = EclipseResourceUtil.getModelNature(ps[i]);
if(mn == null) continue;
String url = RunPageActionDelegate.context.computeURL(mn.getModel().getRoot());
- if(url != null && !url.startsWith("%server%")) {
+ if(url != null && !url.startsWith("%server%")) { //$NON-NLS-1$
set.add(url);
}
}
String lastRunUrl = RunPageActionDelegate.context.getLastRunURL();
- if(lastRunUrl != null && !lastRunUrl.startsWith("%server%")) {
+ if(lastRunUrl != null && !lastRunUrl.startsWith("%server%")) {
//$NON-NLS-1$
set.add(lastRunUrl);
}
String[] urls = RunPageActionDelegate.context.getHistory();
for (int i = 0; i < urls.length; i++) set.add(urls[i]);
urls = (String[])set.toArray(new String[0]);
- setValueList(0, "url", urls);
- setAttributeValue(0, "url", "");
+ setValueList(0, "url", urls); //$NON-NLS-1$
+ setAttributeValue(0, "url", ""); //$NON-NLS-1$ //$NON-NLS-2$
}
public String getTitle() {
- return "Run";
+ return Messages.RunPageActionDelegate_RunTitle;
}
public String getMessage(int stepId) {
- return "Please enter URL.";
+ return Messages.RunPageActionDelegate_PleaseEnterURL;
}
public String[] getActionNames(int stepId) {
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/SaveProjectAsTemplateActionDelegate.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/SaveProjectAsTemplateActionDelegate.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/SaveProjectAsTemplateActionDelegate.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -25,7 +25,7 @@
}
protected void doRun() {
- XActionInvoker.invoke("WebWorkspace", "SaveAsTemplate", object,
null);
+ XActionInvoker.invoke("WebWorkspace", "SaveAsTemplate", object,
null); //$NON-NLS-1$ //$NON-NLS-2$
}
protected void safeSelectionChanged(IAction action, ISelection selection) {
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/ServerXmlActionDelegate.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/ServerXmlActionDelegate.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/ServerXmlActionDelegate.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -10,9 +10,11 @@
******************************************************************************/
package org.jboss.tools.jst.web.ui.action;
+import java.text.MessageFormat;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.jboss.tools.common.model.ui.action.file.ProjectRootActionDelegate;
+import org.jboss.tools.jst.web.ui.Messages;
public class ServerXmlActionDelegate extends ProjectRootActionDelegate {
protected String textTemplate = null;
@@ -24,9 +26,11 @@
}
if(textTemplate == null) return;
String t = textTemplate;
- int i = t.indexOf("server.xml");
+ int i = t.indexOf("server.xml"); //$NON-NLS-1$
if(i >= 0) {
- t = t.substring(0, i) + "Server" + t.substring(i +
"server.xml".length());
+ String prefix = t.substring(0, i);
+ String suffix = t.substring(i + "server.xml".length()); //$NON-NLS-1$
+ t = MessageFormat.format(Messages.ServerXmlActionDelegate_PrefixServerSuffix, prefix,
suffix);
action.setText(t);
}
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/UnregisterFromServerXmlActionDelegate.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/UnregisterFromServerXmlActionDelegate.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/UnregisterFromServerXmlActionDelegate.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -17,7 +17,7 @@
public class UnregisterFromServerXmlActionDelegate extends ServerXmlActionDelegate {
protected String getActionPath() {
- return "Registration.UnregisterInServerXML";
+ return "Registration.UnregisterInServerXML"; //$NON-NLS-1$
}
protected boolean isRelevantProject(IProject project) {
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/adf/AddADFSupportHelper.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/adf/AddADFSupportHelper.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/action/adf/AddADFSupportHelper.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -12,6 +12,7 @@
import java.io.File;
import java.lang.reflect.InvocationTargetException;
+import java.text.MessageFormat;
import java.util.Properties;
import org.eclipse.core.resources.IProject;
@@ -29,16 +30,17 @@
import org.jboss.tools.jst.web.WebModelPlugin;
import org.jboss.tools.jst.web.project.WebProject;
import org.jboss.tools.jst.web.project.helpers.*;
+import org.jboss.tools.jst.web.ui.Messages;
import org.jboss.tools.jst.web.ui.WebUiPlugin;
public class AddADFSupportHelper {
- static String ORACLE_ADF_LIB_FOLDER_NAME = "OracleADF";
+ static String ORACLE_ADF_LIB_FOLDER_NAME = "OracleADF"; //$NON-NLS-1$
String adfLibPath;
XModelObject object;
public AddADFSupportHelper() {
try {
- adfLibPath = LibrarySets.getInstance().getLibrarySetsPath() + "/" +
ORACLE_ADF_LIB_FOLDER_NAME;
+ adfLibPath = LibrarySets.getInstance().getLibrarySetsPath() + "/" +
ORACLE_ADF_LIB_FOLDER_NAME; //$NON-NLS-1$
} catch (Exception e) {
WebModelPlugin.getPluginLog().logError(e);
}
@@ -59,8 +61,8 @@
if(fs == null || fs.length == 0) return false;
for (int i = 0; i < fs.length; i++) {
String n = fs[i].getName();
- if(!n.endsWith(".jar")) continue;
- if(fss.getChildByPath("lib-" + n) == null) return true;
+ if(!n.endsWith(".jar")) continue; //$NON-NLS-1$
+ if(fss.getChildByPath("lib-" + n) == null) return true; //$NON-NLS-1$
}
return false;
}
@@ -72,7 +74,7 @@
class RunImpl implements IRunnableWithProgress {
public void run(IProgressMonitor monitor) throws InvocationTargetException,
InterruptedException {
- monitor.beginTask("Add ADF Support", 100);
+ monitor.beginTask(Messages.AddADFSupportHelper_AddADFSupport, 100);
XModel model = object.getModel();
XModelObject fss = FileSystemsHelper.getFileSystems(model);
@@ -84,29 +86,29 @@
File[] fs = adfLibFile.listFiles();
if(fs == null || fs.length == 0) {
monitor.setCanceled(true);
- throw new InterruptedException("Library " + ORACLE_ADF_LIB_FOLDER_NAME +
" is empty.");
+ throw new
InterruptedException(MessageFormat.format(Messages.AddADFSupportHelper_LibraryIsEmpty,
ORACLE_ADF_LIB_FOLDER_NAME));
}
String libLocation = NewWebProjectHelper.getLibLocation(model);
if(libLocation == null || libLocation.length() == 0) {
monitor.setCanceled(true);
- throw new InterruptedException("Project does not have lib folder.");
+ throw new
InterruptedException(Messages.AddADFSupportHelper_ProjectDoesNotHaveLibFolder);
}
String libName = null;
XModelObject webinf = FileSystemsHelper.getWebInf(model);
File webInfDir =
((IResource)webinf.getAdapter(IResource.class)).getLocation().toFile();
libName = (new File(libLocation).getParentFile().equals(webInfDir))
- ? XModelConstants.WORKSPACE_REF + "/lib/" :
libLocation.replace('\\', '/')+"/";
+ ? XModelConstants.WORKSPACE_REF + "/lib/" :
libLocation.replace('\\', '/')+"/"; //$NON-NLS-1$ //$NON-NLS-2$
for (int i = 0; i < fs.length; i++) {
String jarName = fs[i].getName();
- if(!jarName.endsWith(".jar")) continue;
- FileUtil.copyFile(fs[i], new File(libLocation + "/" + jarName), true,
false);
- String fsName = "lib-" + jarName;
+ if(!jarName.endsWith(".jar")) continue; //$NON-NLS-1$
+ FileUtil.copyFile(fs[i], new File(libLocation + "/" + jarName), true,
false); //$NON-NLS-1$
+ String fsName = "lib-" + jarName; //$NON-NLS-1$
if(fss.getChildByPath(fsName) == null) {
Properties fsProp = new Properties();
- fsProp.setProperty("name", fsName);
- fsProp.setProperty("location", libName + jarName);
- fsProp.setProperty("info", "hidden=yes");
- XModelObject fsJar = XModelObjectLoaderUtil.createValidObject(model,
"FileSystemJar", fsProp);
+ fsProp.setProperty("name", fsName); //$NON-NLS-1$
+ fsProp.setProperty("location", libName + jarName);
//$NON-NLS-1$
+ fsProp.setProperty("info", "hidden=yes");
//$NON-NLS-1$ //$NON-NLS-2$
+ XModelObject fsJar = XModelObjectLoaderUtil.createValidObject(model,
"FileSystemJar", fsProp); //$NON-NLS-1$
if(fss.getChildByPath(fsJar.getPathPart()) == null) {
try {
DefaultCreateHandler.addCreatedObject(fss, fsJar, false, -1);
@@ -122,7 +124,7 @@
String webRoot = WebProject.getInstance(model).getWebRootLocation();
for (int i = 0; i < fs.length; i++) {
String n = fs[i].getName();
- if(!n.endsWith(".zip")) continue;
+ if(!n.endsWith(".zip")) continue; //$NON-NLS-1$
try {
FileUtil.unzip(new File(webRoot), fs[i].getAbsolutePath());
} catch (Exception e) {
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/attribute/adapter/WebRoleListContentProvider.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/attribute/adapter/WebRoleListContentProvider.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/attribute/adapter/WebRoleListContentProvider.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -29,7 +29,7 @@
if(webxml == null) return;
XModelObject[] os = WebAppHelper.getRoles(webxml);
tags = new String[os.length];
- for (int i = 0; i < tags.length; i++) tags[i] =
os[i].getAttributeValue("role-name");
+ for (int i = 0; i < tags.length; i++) tags[i] =
os[i].getAttributeValue("role-name"); //$NON-NLS-1$
}
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/TLDEditorMessages.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/TLDEditorMessages.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/TLDEditorMessages.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -21,7 +21,7 @@
*/
public class TLDEditorMessages {
- private static final String RESOURCE_BUNDLE=
"org.jboss.tools.jst.web.ui.editors.TLDEditorMessages";
+ private static final String RESOURCE_BUNDLE=
"org.jboss.tools.jst.web.ui.editors.TLDEditorMessages"; //$NON-NLS-1$
private static ResourceBundle resourceBundle=
ResourceBundle.getBundle(RESOURCE_BUNDLE);
@@ -32,7 +32,7 @@
return resourceBundle.getString(key);
} catch (MissingResourceException e) {
WebUiPlugin.getPluginLog().logError(e);
- return "%" + key + "%";
+ return "%" + key + "%"; //$NON-NLS-1$ //$NON-NLS-2$
}
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/WebCompoundEditor.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/WebCompoundEditor.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/WebCompoundEditor.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -15,15 +15,16 @@
import org.jboss.tools.common.model.ui.editor.EditorDescriptor;
import org.jboss.tools.common.model.ui.editors.multipage.DefaultMultipageEditor;
import org.jboss.tools.jst.web.tld.model.EditorTreeConstraint;
+import org.jboss.tools.jst.web.ui.Messages;
public class WebCompoundEditor extends DefaultMultipageEditor {
protected void doCreatePages() {
if(isAppropriateNature()) {
treeFormPage = createTreeFormPage();
- String title = "Web XML Editor";
+ String title = Messages.WebCompoundEditor_WebXMLEditor;
if(object != null) {
- String key = object.getModelEntity().getName() + ".editorTitle";
+ String key = object.getModelEntity().getName() + ".editorTitle";
//$NON-NLS-1$
String s = WizardKeys.getString(key);
if(s != null) title = s;
}
@@ -34,13 +35,13 @@
}
createTextPage();
initEditors();
- if(treeFormPage != null) selectionProvider.addHost("treeEditor",
treeFormPage.getSelectionProvider());
- if(textEditor != null) selectionProvider.addHost("textEditor",
getTextSelectionProvider());
+ if(treeFormPage != null) selectionProvider.addHost("treeEditor",
treeFormPage.getSelectionProvider()); //$NON-NLS-1$
+ if(textEditor != null) selectionProvider.addHost("textEditor",
getTextSelectionProvider()); //$NON-NLS-1$
}
public Object getAdapter(Class adapter) {
if (adapter == EditorDescriptor.class)
- return new EditorDescriptor("web.xml");
+ return new EditorDescriptor("web.xml"); //$NON-NLS-1$
return super.getAdapter(adapter);
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/forms/TLDFormLayoutData.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/forms/TLDFormLayoutData.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/forms/TLDFormLayoutData.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -27,6 +27,7 @@
import org.jboss.tools.common.model.ui.forms.IFormData;
import org.jboss.tools.common.model.ui.forms.IFormLayoutData;
import org.jboss.tools.common.model.ui.forms.InfoLayoutDataFactory;
+import org.jboss.tools.jst.web.ui.Messages;
/**
* @author Igels
@@ -36,11 +37,11 @@
*/
public class TLDFormLayoutData implements IFormLayoutData {
- private static final FormActionData REMOVE_ACTION = new
FormActionData(TableStructuredEditor.REMOVE_ACTION, "DeleteActions.Delete");
- private static final FormActionData EDIT_ACTION = new
FormActionData(TableStructuredEditor.EDIT_ACTION, "Properties.Properties");
- private static final FormActionData UP_ACTION = new
FormActionData(TableStructuredEditor.UP_ACTION, "%internal%");
- private static final FormActionData DOWN_ACTION = new
FormActionData(TableStructuredEditor.DOWN_ACTION, "%internal%");
- private static final FormActionData SELECT_ACTION = new
FormActionData(TableStructuredEditor.EDIT_ACTION, "%SelectIt%");
+ private static final FormActionData REMOVE_ACTION = new
FormActionData(TableStructuredEditor.REMOVE_ACTION, "DeleteActions.Delete");
//$NON-NLS-1$
+ private static final FormActionData EDIT_ACTION = new
FormActionData(TableStructuredEditor.EDIT_ACTION, "Properties.Properties");
//$NON-NLS-1$
+ private static final FormActionData UP_ACTION = new
FormActionData(TableStructuredEditor.UP_ACTION, "%internal%"); //$NON-NLS-1$
+ private static final FormActionData DOWN_ACTION = new
FormActionData(TableStructuredEditor.DOWN_ACTION, "%internal%"); //$NON-NLS-1$
+ private static final FormActionData SELECT_ACTION = new
FormActionData(TableStructuredEditor.EDIT_ACTION, "%SelectIt%"); //$NON-NLS-1$
/* private final static IFormActionData[] DEFAULT_TABLE_ACTION_TYPE = new
IFormActionData[] {
new FormActionData(TableStructuredEditor.ADD_ACTION,
"CreateActions.CreateTag"),
@@ -50,17 +51,18 @@
new FormActionData(TableStructuredEditor.DOWN_ACTION, "%internal%")
};*/
- private final static String STBFE_CLASS_NAME =
"org.jboss.tools.common.model.ui.attribute.editor.JavaHyperlinkLineFieldEditor";
+ private final static String STBFE_CLASS_NAME =
"org.jboss.tools.common.model.ui.attribute.editor.JavaHyperlinkLineFieldEditor";
//$NON-NLS-1$
+ @SuppressWarnings("nls")
private static FormAttributeData[] getFileTagAttributes(String entityName) {
ArrayList<FormAttributeData> list = new ArrayList<FormAttributeData>();
XModelEntity entity = XModelMetaDataImpl.getInstance().getEntity(entityName);
if(entity != null) {
- String[] attributes = {"tlibversion", "jspversion",
"shortname", "uri", "display-name", "small-icon",
"large-icon"};
+ String[] attributes = {"tlibversion", "jspversion",
"shortname", "uri", "display-name", "small-icon",
"large-icon"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
//$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
for (int i = 0; i < attributes.length; i++) {
if(entity.getAttribute(attributes[i]) != null) list.add(new
FormAttributeData(attributes[i]));
}
- list.add(new FormAttributeData("description",
InfoLayoutDataFactory.getHighInstance()));
+ list.add(new FormAttributeData("description",
InfoLayoutDataFactory.getHighInstance())); //$NON-NLS-1$
}
return list.toArray(new FormAttributeData[0]);
@@ -69,44 +71,44 @@
return new IFormData[] {
// Tiles Config Description Form
new FormData(
- "Tag Library Description",
- "", // "Description, description, description",
+ Messages.TLDFormLayoutData_TagLibraryDescription,
+ "", // "Description, description, description", //$NON-NLS-1$
getFileTagAttributes(entity)
),
// Tiles PutLists Form
new FormData(
- "Defined Tags",
- "",
- new FormAttributeData[]{new FormAttributeData("name", 50), new
FormAttributeData("tagclass", 50)},
+ Messages.TLDFormLayoutData_DefinedTags,
+ "", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 50), new
FormAttributeData("tagclass", 50)}, //$NON-NLS-1$ //$NON-NLS-2$
new String[]{tagEntity},
- new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION,
"CreateActions.CreateTag"), REMOVE_ACTION, SELECT_ACTION, UP_ACTION, DOWN_ACTION
}
+ new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION,
"CreateActions.CreateTag"), REMOVE_ACTION, SELECT_ACTION, UP_ACTION, DOWN_ACTION
} //$NON-NLS-1$
)
};
}
static IFormData TAG_VARIABLE_LIST = new FormData(
- "Tag Variables",
- "",
- new FormAttributeData[]{new FormAttributeData("name-given", 25), new
FormAttributeData("name-from-attribute", 25), new
FormAttributeData("variable-class", 25), new
FormAttributeData("scope", 25)},
- new String[]{"TLDVariable"},
- new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION,
"CreateActions.CreateVariable"), REMOVE_ACTION, EDIT_ACTION, UP_ACTION,
DOWN_ACTION }
+ Messages.TLDFormLayoutData_TagVariables,
+ "", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name-given", 25), new
FormAttributeData("name-from-attribute", 25), new
FormAttributeData("variable-class", 25), new
FormAttributeData("scope", 25)}, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
//$NON-NLS-4$
+ new String[]{"TLDVariable"}, //$NON-NLS-1$
+ new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION,
"CreateActions.CreateVariable"), REMOVE_ACTION, EDIT_ACTION, UP_ACTION,
DOWN_ACTION } //$NON-NLS-1$
);
static IFormData TAG_GENERAL = new FormData(
- "Tag Descriptio",
- "", // "Description, description, description",
- new FormAttributeData[]{new FormAttributeData("name"), new
FormAttributeData("tagclass", null, STBFE_CLASS_NAME), new
FormAttributeData("teiclass", null, STBFE_CLASS_NAME), new
FormAttributeData("bodycontent"), new
FormAttributeData("display-name"), new
FormAttributeData("small-icon"), new FormAttributeData("large-icon"),
new FormAttributeData("description", InfoLayoutDataFactory.getHighInstance()),
new FormAttributeData("example", InfoLayoutDataFactory.getInstance())}
+ Messages.TLDFormLayoutData_TagDescription,
+ "", // "Description, description, description", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name"), new
FormAttributeData("tagclass", null, STBFE_CLASS_NAME), new
FormAttributeData("teiclass", null, STBFE_CLASS_NAME), new
FormAttributeData("bodycontent"), new
FormAttributeData("display-name"), new
FormAttributeData("small-icon"), new FormAttributeData("large-icon"),
new FormAttributeData("description", InfoLayoutDataFactory.getHighInstance()),
new FormAttributeData("example", InfoLayoutDataFactory.getInstance())}
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
//$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
);
static IFormData[] TAG_DEFINITIONS = new IFormData[] {
TAG_GENERAL,
new FormData(
- "Tag Attributes",
- "",
- new FormAttributeData[]{new FormAttributeData("name", 25), new
FormAttributeData("required", 25), new
FormAttributeData("rtexprvalue", 25), new FormAttributeData("type",
25)},
- new String[]{"TLDAttribute12"},
- new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION,
"CreateActions.CreateAttribute"), REMOVE_ACTION, EDIT_ACTION, UP_ACTION,
DOWN_ACTION }
+ Messages.TLDFormLayoutData_TagAttributes,
+ "", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 25), new
FormAttributeData("required", 25), new
FormAttributeData("rtexprvalue", 25), new FormAttributeData("type",
25)}, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ new String[]{"TLDAttribute12"}, //$NON-NLS-1$
+ new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION,
"CreateActions.CreateAttribute"), REMOVE_ACTION, EDIT_ACTION, UP_ACTION,
DOWN_ACTION } //$NON-NLS-1$
),
TAG_VARIABLE_LIST
};
@@ -114,11 +116,11 @@
static IFormData[] TAG_DEFINITIONS_20 = new IFormData[] {
TAG_GENERAL,
new FormData(
- "Tag Attributes",
- "",
- new FormAttributeData[]{new FormAttributeData("name", 70), new
FormAttributeData("required", 30)},
- new String[]{"TLDAttribute20", "TLDAttribute2F"},
- new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION,
"CreateActions.CreateAttribute"), REMOVE_ACTION, SELECT_ACTION, UP_ACTION,
DOWN_ACTION }
+ Messages.TLDFormLayoutData_TagAttributes,
+ "", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 70), new
FormAttributeData("required", 30)}, //$NON-NLS-1$ //$NON-NLS-2$
+ new String[]{"TLDAttribute20", "TLDAttribute2F"}, //$NON-NLS-1$
//$NON-NLS-2$
+ new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION,
"CreateActions.CreateAttribute"), REMOVE_ACTION, SELECT_ACTION, UP_ACTION,
DOWN_ACTION } //$NON-NLS-1$
),
TAG_VARIABLE_LIST
};
@@ -126,11 +128,11 @@
static IFormData[] TAG_DEFINITIONS_21 = new IFormData[] {
TAG_GENERAL,
new FormData(
- "Tag Attributes",
- "",
- new FormAttributeData[]{new FormAttributeData("name", 70), new
FormAttributeData("required", 30)},
- new String[]{"TLDAttribute21", "TLDAttribute2F"},
- new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION,
"CreateActions.CreateAttribute"), REMOVE_ACTION, SELECT_ACTION, UP_ACTION,
DOWN_ACTION }
+ Messages.TLDFormLayoutData_TagAttributes,
+ "", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 70), new
FormAttributeData("required", 30)}, //$NON-NLS-1$ //$NON-NLS-2$
+ new String[]{"TLDAttribute21", "TLDAttribute2F"}, //$NON-NLS-1$
//$NON-NLS-2$
+ new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION,
"CreateActions.CreateAttribute"), REMOVE_ACTION, SELECT_ACTION, UP_ACTION,
DOWN_ACTION } //$NON-NLS-1$
),
TAG_VARIABLE_LIST
};
@@ -138,96 +140,96 @@
private final static IFormData[] FORM_LAYOUT_DEFINITIONS =
new IFormData[] {
new FormData(
- "FileTLD_PRO",
+ "FileTLD_PRO", //$NON-NLS-1$
new IFormData[] {
// Tiles Config Description Form
new FormData(
- "Tag Library Description",
- "", // "Description, description, description",
- new FormAttributeData[]{new FormAttributeData("tlibversion"), new
FormAttributeData("jspversion"), new FormAttributeData("shortname"),
new FormAttributeData("uri"), new FormAttributeData("info",
InfoLayoutDataFactory.getInstance())}
+ Messages.TLDFormLayoutData_TagLibraryDescription,
+ "", // "Description, description, description", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("tlibversion"), new
FormAttributeData("jspversion"), new FormAttributeData("shortname"),
new FormAttributeData("uri"), new FormAttributeData("info",
InfoLayoutDataFactory.getInstance())} //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
//$NON-NLS-4$ //$NON-NLS-5$
),
// Tiles PutLists Form
new FormData(
- "Defined Tags",
- "",
- new FormAttributeData[]{new FormAttributeData("name", 50), new
FormAttributeData("tagclass", 50)},
- new String[]{"TLDTag"},
- new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION,
"CreateActions.CreateTag"), REMOVE_ACTION, SELECT_ACTION, UP_ACTION, DOWN_ACTION
}
+ Messages.TLDFormLayoutData_DefinedTags,
+ "", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 50), new
FormAttributeData("tagclass", 50)}, //$NON-NLS-1$ //$NON-NLS-2$
+ new String[]{"TLDTag"}, //$NON-NLS-1$
+ new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION,
"CreateActions.CreateTag"), REMOVE_ACTION, SELECT_ACTION, UP_ACTION, DOWN_ACTION
} //$NON-NLS-1$
)
}
),
new FormData(
- "TLDTag",
+ "TLDTag", //$NON-NLS-1$
new IFormData[] {
// Tiles Basic Definition Form
new FormData(
- "Tag Description",
- "", // "Description, description, description",
- new FormAttributeData[]{new FormAttributeData("name"), new
FormAttributeData("tagclass", null, STBFE_CLASS_NAME), new
FormAttributeData("teiclass", null, STBFE_CLASS_NAME), new
FormAttributeData("bodycontent"), new FormAttributeData("info",
InfoLayoutDataFactory.getInstance())}
+ Messages.TLDFormLayoutData_TagDescription,
+ "", // "Description, description, description", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name"), new
FormAttributeData("tagclass", null, STBFE_CLASS_NAME), new
FormAttributeData("teiclass", null, STBFE_CLASS_NAME), new
FormAttributeData("bodycontent"), new FormAttributeData("info",
InfoLayoutDataFactory.getInstance())} //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
//$NON-NLS-4$ //$NON-NLS-5$
),
// Tiles Advanced Definition Form
new FormData(
- "Tag Attributes",
- "",
- new FormAttributeData[]{new FormAttributeData("name", 33), new
FormAttributeData("required", 33), new
FormAttributeData("rtexprvalue", 33)},
- new String[]{"TLDAttribute"},
- new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION,
"CreateActions.CreateAttribute"), REMOVE_ACTION, EDIT_ACTION, UP_ACTION,
DOWN_ACTION }
+ Messages.TLDFormLayoutData_TagAttributes,
+ "", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 33), new
FormAttributeData("required", 33), new
FormAttributeData("rtexprvalue", 33)}, //$NON-NLS-1$ //$NON-NLS-2$
//$NON-NLS-3$
+ new String[]{"TLDAttribute"}, //$NON-NLS-1$
+ new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION,
"CreateActions.CreateAttribute"), REMOVE_ACTION, EDIT_ACTION, UP_ACTION,
DOWN_ACTION } //$NON-NLS-1$
)
}
),
// Tiles Basic Put Form
new FormData(
- "Listeners",
- "", // "Description, description, description",
- "TLDListeners",
- new FormAttributeData[]{new FormAttributeData("listener-class", 100)},
- new String[]{"TLDListener"},
- new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION,
"CreateActions.CreateListener"), REMOVE_ACTION, SELECT_ACTION, UP_ACTION,
DOWN_ACTION }
+ Messages.TLDFormLayoutData_Listeners,
+ "", // "Description, description, description", //$NON-NLS-1$
+ "TLDListeners", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("listener-class", 100)},
//$NON-NLS-1$
+ new String[]{"TLDListener"}, //$NON-NLS-1$
+ new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION,
"CreateActions.CreateListener"), REMOVE_ACTION, SELECT_ACTION, UP_ACTION,
DOWN_ACTION } //$NON-NLS-1$
),
new FormData(
- "Functions",
- "", // "Description, description, description",
- "TLDFunctions",
- new FormAttributeData[]{new FormAttributeData("name", 40), new
FormAttributeData("function-class", 60)},
- new String[]{"TLDFunction"},
- new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION,
"CreateActions.CreateFunction"), REMOVE_ACTION, EDIT_ACTION, UP_ACTION,
DOWN_ACTION }
+ Messages.TLDFormLayoutData_Functions,
+ "", // "Description, description, description", //$NON-NLS-1$
+ "TLDFunctions", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 40), new
FormAttributeData("function-class", 60)}, //$NON-NLS-1$ //$NON-NLS-2$
+ new String[]{"TLDFunction"}, //$NON-NLS-1$
+ new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION,
"CreateActions.CreateFunction"), REMOVE_ACTION, EDIT_ACTION, UP_ACTION,
DOWN_ACTION } //$NON-NLS-1$
),
new FormData(
- "TLDValidator",
+ "TLDValidator", //$NON-NLS-1$
new IFormData[] {
// Tiles Put List Attributes Form
new FormData(
- "Validator",
- "", // "Description, description, description",
- new FormAttributeData[]{new FormAttributeData("validator-class", null,
STBFE_CLASS_NAME), new FormAttributeData("description",
InfoLayoutDataFactory.getHighInstance())}
+ Messages.TLDFormLayoutData_Validator,
+ "", // "Description, description, description", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("validator-class", null,
STBFE_CLASS_NAME), new FormAttributeData("description",
InfoLayoutDataFactory.getHighInstance())} //$NON-NLS-1$ //$NON-NLS-2$
),
// Tiles Put List Adds Form
new FormData(
- "Init Params",
- "",
- new FormAttributeData[]{new FormAttributeData("param-name", 50), new
FormAttributeData("param-value", 50)},
- new String[]{"WebAppInitParam"},
- new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION,
"CreateActions.CreateInitParam"), REMOVE_ACTION, EDIT_ACTION, UP_ACTION,
DOWN_ACTION }
+ Messages.TLDFormLayoutData_InitParams,
+ "", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("param-name", 50), new
FormAttributeData("param-value", 50)}, //$NON-NLS-1$ //$NON-NLS-2$
+ new String[]{"WebAppInitParam"}, //$NON-NLS-1$
+ new IFormActionData[] {new FormActionData(TableStructuredEditor.ADD_ACTION,
"CreateActions.CreateInitParam"), REMOVE_ACTION, EDIT_ACTION, UP_ACTION,
DOWN_ACTION } //$NON-NLS-1$
)
}
),
new FormData(
- "FileTLD_1_2", createFileTagDefinitions("FileTLD_1_2",
"TLDTag12")
+ "FileTLD_1_2", createFileTagDefinitions("FileTLD_1_2",
"TLDTag12") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
),
new FormData(
- "FileTLD_2_0", createFileTagDefinitions("FileTLD_2_0",
"TLDTag20")
+ "FileTLD_2_0", createFileTagDefinitions("FileTLD_2_0",
"TLDTag20") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
),
new FormData(
- "FileTLD_2_1", createFileTagDefinitions("FileTLD_2_1",
"TLDTag21")
+ "FileTLD_2_1", createFileTagDefinitions("FileTLD_2_1",
"TLDTag21") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
),
new FormData(
- "TLDTag12", TAG_DEFINITIONS
+ "TLDTag12", TAG_DEFINITIONS //$NON-NLS-1$
),
new FormData(
- "TLDTag20", TAG_DEFINITIONS_20
+ "TLDTag20", TAG_DEFINITIONS_20 //$NON-NLS-1$
),
new FormData(
- "TLDTag21", TAG_DEFINITIONS_21
+ "TLDTag21", TAG_DEFINITIONS_21 //$NON-NLS-1$
)
};
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/webapp/form/WebAppFileFormLayoutData.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/webapp/form/WebAppFileFormLayoutData.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/webapp/form/WebAppFileFormLayoutData.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -13,14 +13,15 @@
import org.jboss.tools.common.model.ui.forms.*;
import org.jboss.tools.jst.web.messages.xpl.WebUIMessages;
import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
+import org.jboss.tools.jst.web.ui.Messages;
public class WebAppFileFormLayoutData {
- static String FILE_23_ENTITY = "FileWebApp";
- static String FILE_24_ENTITY = "FileWebApp24";
- static String FILE_25_ENTITY = "FileWebApp25";
+ static String FILE_23_ENTITY = "FileWebApp"; //$NON-NLS-1$
+ static String FILE_24_ENTITY = "FileWebApp24"; //$NON-NLS-1$
+ static String FILE_25_ENTITY = "FileWebApp25"; //$NON-NLS-1$
static IFormData CONTEXT_PARAM_FOLDER_DEFINITION = new FormData(
- "Context Params",
+ Messages.WebAppFileFormLayoutData_ContextParams,
WebAppJspConfigFormLayoutData.EMPTY_DESCRIPTION,
"Context Params", //$NON-NLS-1$
new FormAttributeData[]{new FormAttributeData("param-name", 40), new
FormAttributeData("param-value", 60)}, //$NON-NLS-1$ //$NON-NLS-2$
@@ -45,15 +46,15 @@
}
public static IFormData FILE_WEB_APP_23_DEFINITION = new FormData(
- FILE_23_ENTITY, new String[]{null}, createFileDefinitions("Web Descriptor
2.3", FILE_23_ENTITY)
+ FILE_23_ENTITY, new String[]{null},
createFileDefinitions(Messages.WebAppFileFormLayoutData_WebDesc23, FILE_23_ENTITY)
);
public static IFormData FILE_WEB_APP_24_DEFINITION = new FormData(
- FILE_24_ENTITY, new String[]{null}, createFileDefinitions("Web Descriptor
2.4", FILE_24_ENTITY)
+ FILE_24_ENTITY, new String[]{null},
createFileDefinitions(Messages.WebAppFileFormLayoutData_WebDesc24, FILE_24_ENTITY)
);
public static IFormData FILE_WEB_APP_25_DEFINITION = new FormData(
- FILE_25_ENTITY, new String[]{null}, createFileDefinitions("Web Descriptor
2.5", FILE_25_ENTITY)
+ FILE_25_ENTITY, new String[]{null},
createFileDefinitions(Messages.WebAppFileFormLayoutData_WebDesc25, FILE_25_ENTITY)
);
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/webapp/form/WebAppFoldersFormLayoutData.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/webapp/form/WebAppFoldersFormLayoutData.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/editors/webapp/form/WebAppFoldersFormLayoutData.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -236,7 +236,7 @@
"Services",
EMPTY_DESCRIPTION,
new FormAttributeData[]{new FormAttributeData("service-ref-name", 40), new
FormAttributeData("service-interface", 60)}, //$NON-NLS-1$ //$NON-NLS-2$
- new String[]{"WebAppServiceRef"},
+ new String[]{"WebAppServiceRef"}, //$NON-NLS-1$
FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateServiceRef")
//$NON-NLS-1$
);
@@ -248,7 +248,7 @@
"Message Destination Ref List",
EMPTY_DESCRIPTION,
new FormAttributeData[]{new FormAttributeData("message-destination-ref-name",
100)}, //$NON-NLS-1$
- new String[]{"WebAppMessageDestinationRef"},
+ new String[]{"WebAppMessageDestinationRef"}, //$NON-NLS-1$
FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateServiceMessageDestinationRef")
//$NON-NLS-1$
);
@@ -256,7 +256,7 @@
"Message Destination List",
EMPTY_DESCRIPTION,
new FormAttributeData[]{new FormAttributeData("message-destination-name",
100)}, //$NON-NLS-1$
- new String[]{"WebAppMessageDestination"},
+ new String[]{"WebAppMessageDestination"}, //$NON-NLS-1$
FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateServiceMessageDestination")
//$NON-NLS-1$
);
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/AbstractPagesPreferencesPage.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/AbstractPagesPreferencesPage.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/AbstractPagesPreferencesPage.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -37,11 +37,11 @@
/**
* @deprecated use bundle via Messages.getString()
*/
- public static final String BUNDLE_NAME = "preferences";
+ public static final String BUNDLE_NAME = "preferences"; //$NON-NLS-1$
/**
* @deprecated use bundle via Messages.getString()
*/
- public static ResourceBundle BUNDLE =
ResourceBundle.getBundle(AbstractPagesPreferencesPage.class.getPackage().getName() +
"." + BUNDLE_NAME);
+ public static ResourceBundle BUNDLE =
ResourceBundle.getBundle(AbstractPagesPreferencesPage.class.getPackage().getName() +
"." + BUNDLE_NAME); //$NON-NLS-1$
protected AbstractWebProjectTemplate helper;
protected String[] pages;
protected String[] pageLabels;
@@ -83,7 +83,7 @@
String[] pageLabels = new String[pages == null ? 0 : pages.length];
for (int i = 0; pageLabels != null && i < pageLabels.length; i++) {
pageLabels[i] = pages[i];
- if (pages[i].equals(defaultPage)) pageLabels[i] += " " +
Messages.AbstractPagesPreferencePage_3;
+ if (pages[i].equals(defaultPage)) pageLabels[i] += " " +
Messages.AbstractPagesPreferencePage_3; //$NON-NLS-1$
}
return pageLabels;
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/messages.properties
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/messages.properties 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/messages.properties 2009-07-10
07:56:03 UTC (rev 16525)
@@ -1,2 +1,28 @@
+AddADFSupportHelper_AddADFSupport=Add ADF Support
+AddADFSupportHelper_LibraryIsEmpty=Library {0} is empty.
+AddADFSupportHelper_ProjectDoesNotHaveLibFolder=Project does not have lib folder.
+AddOrm2NatureActionHandler_Add=Add Hibernate Capabilities...
+AddOrm2NatureActionHandler_Remove=Remove Hibernate Capabilities
+AppRegisterComponent_NewServerRuntime=New Server Runtime
HiddenLinksWizardView_HideAll=Hide All
HiddenLinksWizardView_ShowAll=Show All
+NewProjectRegisterPage_Register=Register
+RunPageActionDelegate_PleaseEnterURL=Please enter URL.
+RunPageActionDelegate_RunMenuItem=Run...
+RunPageActionDelegate_RunTitle=Run
+RunPageActionDelegate_RunURL=Run {0}
+ServerXmlActionDelegate_PrefixServerSuffix={0}Server{1}
+TLDFormLayoutData_DefinedTags=Defined Tags
+TLDFormLayoutData_Functions=Functions
+TLDFormLayoutData_InitParams=Init Params
+TLDFormLayoutData_Listeners=Listeners
+TLDFormLayoutData_TagAttributes=Tag Attributes
+TLDFormLayoutData_TagDescription=Tag Description
+TLDFormLayoutData_TagLibraryDescription=Tag Library Description
+TLDFormLayoutData_TagVariables=Tag Variables
+TLDFormLayoutData_Validator=Validator
+WebAppFileFormLayoutData_ContextParams=Context Params
+WebAppFileFormLayoutData_WebDesc23=Web Descriptor 2.3
+WebAppFileFormLayoutData_WebDesc24=Web Descriptor 2.4
+WebAppFileFormLayoutData_WebDesc25=Web Descriptor 2.5
+WebCompoundEditor_WebXMLEditor=Web XML Editor
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/WebProjectsLabelProvider.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/WebProjectsLabelProvider.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/WebProjectsLabelProvider.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -22,6 +22,7 @@
public WebProjectsLabelProvider() {
}
+ @SuppressWarnings("nls")
public String getText(Object element) {
if(!(element instanceof XModelObject)) return "";
XModelObject o = (XModelObject)element;
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/decorator/TLDAttributeDecorator.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/decorator/TLDAttributeDecorator.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/navigator/decorator/TLDAttributeDecorator.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -5,6 +5,7 @@
public class TLDAttributeDecorator implements ICustomVariable {
+ @SuppressWarnings("nls")
public String getLabelPart(XModelObject object, String parameters) {
if(object == null) return "";
String required = object.getAttributeValue("required");
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/TemplatePreprocessor.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/TemplatePreprocessor.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/TemplatePreprocessor.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -52,7 +52,7 @@
File preprocessing = new File(sourceDir, ProjectTemplate.PREPROCESSING);
if(!preprocessing.isFile()) return;
String content = FileUtil.readFile(preprocessing);
- StringTokenizer st = new StringTokenizer(content, "\r\n,;");
+ StringTokenizer st = new StringTokenizer(content, "\r\n,;"); //$NON-NLS-1$
while(st.hasMoreTokens()) {
String path = st.nextToken().trim();
if(path.length() > 0) process(path);
@@ -67,9 +67,9 @@
if(!sourceFile.exists()) return;
Properties properties = new Properties();
- properties.put("file.resource.loader.path", sourceDir.getCanonicalPath());
- String logFileName =
Platform.getLocation().append(".metadata").append(".plugins").append(WebUiPlugin.PLUGIN_ID).append("velocity.log").toFile().getAbsolutePath();
- properties.put("runtime.log", logFileName);
+ properties.put("file.resource.loader.path", sourceDir.getCanonicalPath());
//$NON-NLS-1$
+ String logFileName =
Platform.getLocation().append(".metadata").append(".plugins").append(WebUiPlugin.PLUGIN_ID).append("velocity.log").toFile().getAbsolutePath();
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ properties.put("runtime.log", logFileName); //$NON-NLS-1$
Velocity.init(properties);
@@ -78,18 +78,18 @@
File file = targetFile;
if (file.exists()) {
if (!file.delete()) {
- throw new RuntimeException("Unable to delete file
"+file.getAbsolutePath());
+ throw new RuntimeException("Unable to delete file
"+file.getAbsolutePath()); //$NON-NLS-1$
}
}
File folder = file.getParentFile();
folder.mkdirs();
if (!folder.exists() || !folder.isDirectory()) {
- throw new RuntimeException("Unable to create folder
"+folder.getAbsolutePath());
+ throw new RuntimeException("Unable to create folder
"+folder.getAbsolutePath()); //$NON-NLS-1$
}
Writer writer = new BufferedWriter(new FileWriter(file));
Reader reader = new BufferedReader(new FileReader(sourceFile));
- Velocity.evaluate(context, writer, "", reader);
+ Velocity.evaluate(context, writer, "", reader); //$NON-NLS-1$
writer.flush();
writer.close();
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -76,42 +76,42 @@
*/
public abstract class WebNatureOperation implements IRunnableWithProgress {
- public static final String DEFAULT_WEB_CONTENT = "WebContent";
- public static final String DEFAULT_WEB_INF = "WEB-INF";
- public static final String DEFAULT_JAVA_SOURCES = "JavaSource";
- public static final String DEFAULT_JAVA_CLASSES = "classes";
- public static final String DEFAULT_WEB_INF_LIBRARY = "lib";
+ public static final String DEFAULT_WEB_CONTENT = "WebContent"; //$NON-NLS-1$
+ public static final String DEFAULT_WEB_INF = "WEB-INF"; //$NON-NLS-1$
+ public static final String DEFAULT_JAVA_SOURCES = "JavaSource"; //$NON-NLS-1$
+ public static final String DEFAULT_JAVA_CLASSES = "classes"; //$NON-NLS-1$
+ public static final String DEFAULT_WEB_INF_LIBRARY = "lib"; //$NON-NLS-1$
- public static final String PROJECT_NAME_ID =
"WebNatureOperation.PROJECT_NAME_ID";
- public static final String PROJECT_LOCATION_ID =
"WebNatureOperation.PROJECT_LOCATION_ID";
- public static final String WEB_CONTENT_ID =
"WebNatureOperation.WEB_CONTENT_ID";
- public static final String WEB_CONTENT_LOCATION_ID =
"WebNatureOperation.WEB_CONTENT_LOCATION_ID";
- public static final String WEB_INF_ID = "WebNatureOperation.WEB_INF_ID";
- public static final String WEB_INF_LOCATION_ID =
"WebNatureOperation.WEB_INF_LOCATION_ID";
- public static final String WEB_XML_ID = "WebNatureOperation.WEB_XML_ID";
- public static final String WEB_XML_LOCATION_ID =
"WebNatureOperation.WEB_XML_ID";
- public static final String WEB_INF_LIBRARY_ID =
"WebNatureOperation.WEB_INF_LIBRARY_ID";
- public static final String WEB_INF_LIBRARY_LOCATION_ID =
"WebNatureOperation.WEB_INF_LIBRARY_LOCATION_ID";
- public static final String JAVA_SOURCES_ID =
"WebNatureOperation.JAVA_SOURCES_ID";
- public static final String JAVA_SOURCES_LOCATION_ID =
"WebNatureOperation.JAVA_SOURCES_LOCATION_ID";
- public static final String JAVA_CREATE_SOURCE_FOLDERS_ID =
"WebNatureOperation.JAVA_CREATE_SOURCE_FOLDERS_ID";
- public static final String JAVA_CLASSES_ID =
"WebNatureOperation.JAVA_CLASSES_ID";
- public static final String JAVA_CLASSES_LOCATION_ID =
"WebNatureOperation.JAVA_CLASSES_LOCATION_ID";
- public static final String JAVA_CLASSPATH_ID =
"WebNatureOperation.JAVA_CLASSPATH_ID";
- public static final String SERVLET_VERSION_ID =
"WebNatureOperation.SERVLET_VERSION_ID";
- public static final String JSP_VERSION_ID =
"WebNatureOperation.JSP_VERSION_ID";
- public static final String WEB_VERSION_ID =
"WebNatureOperation.WEB_VERSION_ID";
- public static final String ANT_BUILD_XML_ID =
"WebNatureOperation.ANT_BUILD_XML_ID";
- public static final String USE_DEFAULT_LOCATION_ID =
"WebNatureOperation.USE_DEFAULT_LOCATION_ID";
- public static final String REGISTER_WEB_CONTEXT_ID =
"WebNatureOperation.REGISTER_WEB_CONTEXT_ID";
- public static final String TEMPLATE_ID = "WebNatureOperation.TEMPLATE_ID";
- public static final String TEMPLATE_VERSION_ID =
"WebNatureOperation.TEMPLATE_VERSION_ID";
- public static final String RUNTIME_NAME = "WebNatureOperation.RUNTIME_NAME";
+ public static final String PROJECT_NAME_ID =
"WebNatureOperation.PROJECT_NAME_ID"; //$NON-NLS-1$
+ public static final String PROJECT_LOCATION_ID =
"WebNatureOperation.PROJECT_LOCATION_ID"; //$NON-NLS-1$
+ public static final String WEB_CONTENT_ID =
"WebNatureOperation.WEB_CONTENT_ID"; //$NON-NLS-1$
+ public static final String WEB_CONTENT_LOCATION_ID =
"WebNatureOperation.WEB_CONTENT_LOCATION_ID"; //$NON-NLS-1$
+ public static final String WEB_INF_ID = "WebNatureOperation.WEB_INF_ID";
//$NON-NLS-1$
+ public static final String WEB_INF_LOCATION_ID =
"WebNatureOperation.WEB_INF_LOCATION_ID"; //$NON-NLS-1$
+ public static final String WEB_XML_ID = "WebNatureOperation.WEB_XML_ID";
//$NON-NLS-1$
+ public static final String WEB_XML_LOCATION_ID =
"WebNatureOperation.WEB_XML_ID"; //$NON-NLS-1$
+ public static final String WEB_INF_LIBRARY_ID =
"WebNatureOperation.WEB_INF_LIBRARY_ID"; //$NON-NLS-1$
+ public static final String WEB_INF_LIBRARY_LOCATION_ID =
"WebNatureOperation.WEB_INF_LIBRARY_LOCATION_ID"; //$NON-NLS-1$
+ public static final String JAVA_SOURCES_ID =
"WebNatureOperation.JAVA_SOURCES_ID"; //$NON-NLS-1$
+ public static final String JAVA_SOURCES_LOCATION_ID =
"WebNatureOperation.JAVA_SOURCES_LOCATION_ID"; //$NON-NLS-1$
+ public static final String JAVA_CREATE_SOURCE_FOLDERS_ID =
"WebNatureOperation.JAVA_CREATE_SOURCE_FOLDERS_ID"; //$NON-NLS-1$
+ public static final String JAVA_CLASSES_ID =
"WebNatureOperation.JAVA_CLASSES_ID"; //$NON-NLS-1$
+ public static final String JAVA_CLASSES_LOCATION_ID =
"WebNatureOperation.JAVA_CLASSES_LOCATION_ID"; //$NON-NLS-1$
+ public static final String JAVA_CLASSPATH_ID =
"WebNatureOperation.JAVA_CLASSPATH_ID"; //$NON-NLS-1$
+ public static final String SERVLET_VERSION_ID =
"WebNatureOperation.SERVLET_VERSION_ID"; //$NON-NLS-1$
+ public static final String JSP_VERSION_ID =
"WebNatureOperation.JSP_VERSION_ID"; //$NON-NLS-1$
+ public static final String WEB_VERSION_ID =
"WebNatureOperation.WEB_VERSION_ID"; //$NON-NLS-1$
+ public static final String ANT_BUILD_XML_ID =
"WebNatureOperation.ANT_BUILD_XML_ID"; //$NON-NLS-1$
+ public static final String USE_DEFAULT_LOCATION_ID =
"WebNatureOperation.USE_DEFAULT_LOCATION_ID"; //$NON-NLS-1$
+ public static final String REGISTER_WEB_CONTEXT_ID =
"WebNatureOperation.REGISTER_WEB_CONTEXT_ID"; //$NON-NLS-1$
+ public static final String TEMPLATE_ID = "WebNatureOperation.TEMPLATE_ID";
//$NON-NLS-1$
+ public static final String TEMPLATE_VERSION_ID =
"WebNatureOperation.TEMPLATE_VERSION_ID"; //$NON-NLS-1$
+ public static final String RUNTIME_NAME = "WebNatureOperation.RUNTIME_NAME";
//$NON-NLS-1$
// for STRUTS
- public static final String TLDS_ID = "WebNatureOperation.TLDS_ID";
+ public static final String TLDS_ID = "WebNatureOperation.TLDS_ID";
//$NON-NLS-1$
- private static final String PROJECT_ID = "WebNatureOperation.PROJECT_ID";
+ private static final String PROJECT_ID = "WebNatureOperation.PROJECT_ID";
//$NON-NLS-1$
protected XModel model;
private HashMap propertyValue = new HashMap();
@@ -165,8 +165,8 @@
XModelObject object = (XModelObject)o;
XModelObject[] cs = object.getChildren();
for (int i = 0; i < cs.length; i++) {
- String n = cs[i].getAttributeValue("name");
- String v = cs[i].getAttributeValue("value");
+ String n = cs[i].getAttributeValue("name"); //$NON-NLS-1$
+ String v = cs[i].getAttributeValue("value"); //$NON-NLS-1$
if(n != null && v != null) {
wizardPropertiesForVelocity.put(n.replace(' ', '_'), v);
}
@@ -202,7 +202,7 @@
*/
public void run(IProgressMonitor monitor) throws InvocationTargetException,
InterruptedException {
if (monitor == null) monitor = new NullProgressMonitor();
- monitor.beginTask("", 25);
+ monitor.beginTask("", 25); //$NON-NLS-1$
try {
// clear all .-files
clearProjectRoot(monitor);
@@ -259,7 +259,7 @@
}
protected String[] dotFilesList = {
- ".classpath", ".project", IModelNature.PROJECT_FILE,
".runtime", ".wtpmodules", ".settings"
+ ".classpath", ".project", IModelNature.PROJECT_FILE,
".runtime", ".wtpmodules", ".settings" //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
};
/*
@@ -301,7 +301,7 @@
private void registerServer2(IProgressMonitor monitor) throws InvocationTargetException,
InterruptedException {
XModelObject fs = FileSystemsHelper.getFileSystems(model);
try {
- model.changeObjectAttribute(fs, "application name",
registry.getApplicationName());
+ model.changeObjectAttribute(fs, "application name",
registry.getApplicationName()); //$NON-NLS-1$
} catch (XModelException e) {
throw new InvocationTargetException(e);
}
@@ -328,7 +328,7 @@
*/
private void createLockFile() {
try {
- getProject().setSessionProperty(WatcherLoader.LOCK, "true");
+ getProject().setSessionProperty(WatcherLoader.LOCK, "true"); //$NON-NLS-1$
} catch (CoreException e) {
WebUiPlugin.getPluginLog().logError(e);
}
@@ -339,7 +339,7 @@
*/
private void deleteLockFile() {
try {
- boolean lock =
"true".equals(getProject().getSessionProperty(WatcherLoader.LOCK));
+ boolean lock =
"true".equals(getProject().getSessionProperty(WatcherLoader.LOCK));
//$NON-NLS-1$
if(lock) {
getProject().setSessionProperty(WatcherLoader.LOCK, null);
if(model != null) {
@@ -357,10 +357,10 @@
private void updateJavaNature() throws CoreException {
// JavaCore.create(getProject());
EclipseResourceUtil.addNatureToProject(getProject(), JavaCore.NATURE_ID);
- SpecialWizard w =
SpecialWizardFactory.createSpecialWizard("org.jboss.tools.common.model.project.ClassPathUpdateWizard");
+ SpecialWizard w =
SpecialWizardFactory.createSpecialWizard("org.jboss.tools.common.model.project.ClassPathUpdateWizard");
//$NON-NLS-1$
Properties p = new Properties();
- p.put("model", model);
- p.put("classes", new Path(getProperty(JAVA_CLASSES_LOCATION_ID)));
+ p.put("model", model); //$NON-NLS-1$
+ p.put("classes", new Path(getProperty(JAVA_CLASSES_LOCATION_ID)));
//$NON-NLS-1$
//webInfLocation.append("classes"));
w.setObject(p);
w.execute();
@@ -388,30 +388,30 @@
IDataModel dataModel = DataModelFactory.createDataModel(modelProvider);
FacetDataModelMap map = (FacetDataModelMap)
dataModel.getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP);
- IDataModel configDM = (IDataModel) map.get("jst.web");
+ IDataModel configDM = (IDataModel) map.get("jst.web"); //$NON-NLS-1$
if(exists) {
IFacetedProject fp0 = ProjectFacetsManager.create(getProject());
exists = fp0 != null;
}
- if(sv != null && (sv.indexOf("2.3") >= 0 ||
sv.indexOf("2.5") >= 0)) {
+ if(sv != null && (sv.indexOf("2.3") >= 0 ||
sv.indexOf("2.5") >= 0)) { //$NON-NLS-1$ //$NON-NLS-2$
configDM.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, sv);
}
if(webroot != null) {
- int i = webroot.lastIndexOf("/");
+ int i = webroot.lastIndexOf("/"); //$NON-NLS-1$
String webRootName = webroot.substring(i + 1);
- if(webroot.startsWith(projectLocation.replace('\\', '/') +
"/")) {
+ if(webroot.startsWith(projectLocation.replace('\\', '/') +
"/")) { //$NON-NLS-1$
webRootName = webroot.substring(projectLocation.length() + 1);
}
configDM.setProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER,
webRootName);
}
if(javaRoot != null && javaRoot.length > 0 && javaRoot[0].length()
> 0) {
String jr = javaRoot[0].replace('\\', '/');
- int i = jr.lastIndexOf("/");
+ int i = jr.lastIndexOf("/"); //$NON-NLS-1$
String javaRootName = javaRoot[0].substring(i + 1);
- if(jr.startsWith(projectLocation.replace('\\', '/') + "/"))
{
+ if(jr.startsWith(projectLocation.replace('\\', '/') + "/"))
{ //$NON-NLS-1$
javaRootName = jr.substring(projectLocation.length() + 1);
}
configDM.setProperty(IWebFacetInstallDataModelProperties.SOURCE_FOLDER,
javaRootName);
@@ -439,7 +439,7 @@
}
if(getProject().exists()) {
ModuleCoreNature.addModuleCoreNatureIfNecessary(getProject(), monitor);
- String emfNature = "org.eclipse.jem.workbench.JavaEMFNature";
+ String emfNature = "org.eclipse.jem.workbench.JavaEMFNature";
//$NON-NLS-1$
if(!getProject().hasNature(emfNature)) {
ProjectUtilities.addNatureToProject(getProject(), emfNature);
}
@@ -473,19 +473,19 @@
private boolean isDefaultLocation(String projectLocation) {
String root =
ModelPlugin.getWorkspace().getRoot().getLocation().toString().replace('\\',
'/');
- return (projectLocation.replace('\\','/') + "/").equals(root
+ "/" + getProject().getName() + "/");
+ return (projectLocation.replace('\\','/') + "/").equals(root
+ "/" + getProject().getName() + "/"); //$NON-NLS-1$ //$NON-NLS-2$
//$NON-NLS-3$
// return (projectLocation.replace('\\','/') +
"/").startsWith(root + "/" + getProject().getName() + "/");
}
private String createLinks(String projectLocation) throws CoreException {
IProject project = getProject();
String root =
ModelPlugin.getWorkspace().getRoot().getLocation().toString().replace('\\',
'/');
- if((projectLocation.replace('\\','/') + "/").startsWith(root
+ "/" + project.getName() + "/")) return projectLocation;
+ if((projectLocation.replace('\\','/') + "/").startsWith(root
+ "/" + project.getName() + "/")) return projectLocation;
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
String webroot = getProperty(WEB_CONTENT_LOCATION_ID);
String[] javaRoot = (String[])getPropertyObject(JAVA_SOURCES_LOCATION_ID);
- String wsProjectLocation = root + "/" + project.getName();
+ String wsProjectLocation = root + "/" + project.getName(); //$NON-NLS-1$
if(!project.exists()) {
IProjectDescription pd =
ModelPlugin.getWorkspace().newProjectDescription(project.getName());
project.create(pd, null);
@@ -493,22 +493,22 @@
JavaCore.create(getProject());
EclipseResourceUtil.addNatureToProject(getProject(), JavaCore.NATURE_ID);
IJavaProject jp = EclipseResourceUtil.getJavaProject(project);
- IClasspathEntry entry = new
ClassPathUpdate().createNewClasspathEntry(project.getFullPath().append("src"),
IClasspathEntry.CPE_SOURCE);
+ IClasspathEntry entry = new
ClassPathUpdate().createNewClasspathEntry(project.getFullPath().append("src"),
IClasspathEntry.CPE_SOURCE); //$NON-NLS-1$
try {
- jp.setRawClasspath(new IClasspathEntry[]{entry},
project.getFullPath().append("classes"), null);
+ jp.setRawClasspath(new IClasspathEntry[]{entry},
project.getFullPath().append("classes"), null); //$NON-NLS-1$
} catch (CoreException e) {
WebUiPlugin.getPluginLog().logError(e);
}
}
if(webroot != null) {
- IFolder f = project.getFolder("WEB-ROOT");
+ IFolder f = project.getFolder("WEB-ROOT"); //$NON-NLS-1$
if(!f.exists()) f.createLink(new Path(webroot), IFolder.FORCE, null);
- setProperty(WEB_CONTENT_LOCATION_ID, "/WEB-ROOT");
+ setProperty(WEB_CONTENT_LOCATION_ID, "/WEB-ROOT"); //$NON-NLS-1$
}
if(javaRoot != null && javaRoot.length > 0 && javaRoot[0].length()
> 0) {
- IFolder f = project.getFolder("src");
+ IFolder f = project.getFolder("src"); //$NON-NLS-1$
if(!f.exists()) f.createLink(new Path(javaRoot[0]), IFolder.FORCE, null);
- javaRoot[0] = "/src";
+ javaRoot[0] = "/src"; //$NON-NLS-1$
}
return wsProjectLocation;
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -95,7 +95,7 @@
protected void copyLibraries() {}
protected String getDefaultServletVersion() {
- return "";
+ return ""; //$NON-NLS-1$
}
protected abstract void execute() throws XModelException;
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectCreationOperation.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectCreationOperation.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectCreationOperation.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -125,7 +125,7 @@
FileUtil.copyFile(sf, new File(tf), true);
projectFile = new File(tf);
} else {
- throw new RuntimeException("Project template must have model configuration
file");
+ throw new RuntimeException("Project template must have model configuration
file"); //$NON-NLS-1$
}
}
@@ -148,7 +148,7 @@
try {
return new File(fileName).getCanonicalPath();
} catch (IOException e) {
- WebUiPlugin.getPluginLog().logError("Cannot find folder '" + fileName +
"'", null);
+ WebUiPlugin.getPluginLog().logError("Cannot find folder '" + fileName +
"'", null); //$NON-NLS-1$ //$NON-NLS-2$
return fileName;
}
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterComponent.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterComponent.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterComponent.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -44,15 +44,16 @@
import org.jboss.tools.common.model.util.XModelObjectUtil;
import org.jboss.tools.jst.web.context.RegisterServerContext;
import org.jboss.tools.jst.web.server.*;
+import org.jboss.tools.jst.web.ui.Messages;
public class AppRegisterComponent {
- static String ENTITY = "WebPrjRegisterApplication";
- static String ATTR_REGISTER = "register";
- static String ATTR_LOCATION = "location";
- static String ATTR_APP_NAME = "application name";
- static String ATTR_RUNTIME = "runtime";
- static String ATTR_TARGET_SERVER = "target server";
- static String ATTR_SEPARATOR = "separator";
+ static String ENTITY = "WebPrjRegisterApplication"; //$NON-NLS-1$
+ static String ATTR_REGISTER = "register"; //$NON-NLS-1$
+ static String ATTR_LOCATION = "location"; //$NON-NLS-1$
+ static String ATTR_APP_NAME = "application name"; //$NON-NLS-1$
+ static String ATTR_RUNTIME = "runtime"; //$NON-NLS-1$
+ static String ATTR_TARGET_SERVER = "target server"; //$NON-NLS-1$
+ static String ATTR_SEPARATOR = "separator"; //$NON-NLS-1$
RegisterServerContext context;
boolean isEnabling = true;
@@ -93,7 +94,7 @@
XModelObject dummy = PreferenceModelUtilities.getPreferenceModel().getRoot();
String[][] attInfo = null;
attInfo = new String[][] {
- {ENTITY, ""}, {ATTR_APP_NAME, "yes"}, {ATTR_RUNTIME,
"yes"}, {ATTR_SEPARATOR, "no"}, {ATTR_TARGET_SERVER, "no"}
+ {ENTITY, ""}, {ATTR_APP_NAME, "yes"}, {ATTR_RUNTIME,
"yes"}, {ATTR_SEPARATOR, "no"}, {ATTR_TARGET_SERVER, "no"}
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
};
XEntityData entityData = XEntityDataImpl.create(attInfo);
support = new XAttributeSupport() {
@@ -102,7 +103,7 @@
}
};
support.init(dummy, entityData);
- entityData = XEntityDataImpl.create(new String[][] {{ENTITY, ""},
{ATTR_REGISTER, "no"}});
+ entityData = XEntityDataImpl.create(new String[][] {{ENTITY, ""},
{ATTR_REGISTER, "no"}}); //$NON-NLS-1$ //$NON-NLS-2$
if(isEnabling()) {
enableSupport = new XAttributeSupport();
enableSupport.init(dummy, entityData);
@@ -121,7 +122,7 @@
}
public void loadApplicationName() {
- String n = context.getApplicationName() == null ? "" :
context.getApplicationName();
+ String n = context.getApplicationName() == null ? "" :
context.getApplicationName(); //$NON-NLS-1$
support.getPropertyEditorAdapterByName(ATTR_APP_NAME).setValue(n);
}
@@ -140,7 +141,7 @@
c.setLayout(layout);
enableSupport.setLayout(getEnablingLayout());
enableSupport.createControl(c);
- setLableText(enableSupport, "register");
+ setLableText(enableSupport, "register"); //$NON-NLS-1$
Group group = new Group(c, SWT.SHADOW_ETCHED_IN);
group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
group.setLayout(new GridLayout());
@@ -153,14 +154,14 @@
ExtendedFieldEditor f = (ExtendedFieldEditor)s.getFieldEditorByName(field);
if(f == null) return;
String t = f.getLabelText();
- int i = (t.indexOf("%1"));
+ int i = (t.indexOf("%1")); //$NON-NLS-1$
if(i < 0) return;
- String insert = "";
+ String insert = ""; //$NON-NLS-1$
IServer server = ServerManager.getInstance().getSelectedServer();
if(server != null) {
insert = server.getServerType().getName();
} else {
- insert = "server";
+ insert = "server"; //$NON-NLS-1$
}
t = t.substring(0, i) + insert + t.substring(i + 2);
f.setLabelText(t);
@@ -175,7 +176,7 @@
private Control createSupportControl(Composite parent) {
if(supportLayout != null) support.setLayout(supportLayout);
Control sc = support.createControl(parent);
- setLableText(support, "location");
+ setLableText(support, "location"); //$NON-NLS-1$
supportControl = (Composite)sc;
GridData g2 = new GridData(GridData.FILL_HORIZONTAL);
g2.horizontalIndent = 0;
@@ -198,10 +199,10 @@
private void initValues() {
if(isEnabling()) {
- enableSupport.getEntityData().setValue(ATTR_REGISTER, context.isEnabled() ?
"yes" : "no");
+ enableSupport.getEntityData().setValue(ATTR_REGISTER, context.isEnabled() ?
"yes" : "no"); //$NON-NLS-1$ //$NON-NLS-2$
enableSupport.load();
}
- String n = context.getApplicationName() == null ? "" :
context.getApplicationName();
+ String n = context.getApplicationName() == null ? "" :
context.getApplicationName(); //$NON-NLS-1$
support.getEntityData().setValue(ATTR_APP_NAME, n);
initRuntimeValue();
@@ -220,7 +221,7 @@
if(rs[i] == selectedRuntime || selectedRuntime1 == null) selectedRuntime1 = rs[i];
}
HUtil.hackAttributeConstraintList(new XEntityData[]{support.getEntityData()}, 0,
ATTR_RUNTIME, ns);
- String runtimeName = (selectedRuntime1 != null) ? selectedRuntime1.getName() :
"";
+ String runtimeName = (selectedRuntime1 != null) ? selectedRuntime1.getName() :
""; //$NON-NLS-1$
context.setRuntimeName(runtimeName);
support.getEntityData().setValue(ATTR_RUNTIME, runtimeName);
}
@@ -250,7 +251,7 @@
support.getEntityData().setValue(ATTR_TARGET_SERVER, selected.getName());
} else {
context.setTargetServers(new IServer[]{});
- support.getEntityData().setValue(ATTR_TARGET_SERVER, "");
+ support.getEntityData().setValue(ATTR_TARGET_SERVER, ""); //$NON-NLS-1$
}
}
@@ -268,7 +269,7 @@
}
boolean isRegisterEnabled() {
- return !isEnabling() || ("yes".equals(enableAdapter.getValue()));
+ return !isEnabling() || ("yes".equals(enableAdapter.getValue()));
//$NON-NLS-1$
}
public String getErrorMessage() {
@@ -300,12 +301,12 @@
}
void onRuntimeChange(String value) {
- value = (value == null) ? "" : value.trim();
+ value = (value == null) ? "" : value.trim(); //$NON-NLS-1$
if(value.equals(context.getRuntimeName())) return;
context.setRuntimeName(value);
initTargetServerValue();
MutableMultipleChoiceFieldEditor ed =
(MutableMultipleChoiceFieldEditor)support.getFieldEditorByName(ATTR_TARGET_SERVER);
- ed.propertyChange(new PropertyChangeEvent(this, IPropertyEditor.LIST_CONTENT,
"old", "new"));
+ ed.propertyChange(new PropertyChangeEvent(this, IPropertyEditor.LIST_CONTENT,
"old", "new")); //$NON-NLS-1$ //$NON-NLS-2$
}
class ServerInputChangeListener implements java.beans.PropertyChangeListener {
@@ -338,7 +339,7 @@
}
public int execute() {
- Shell shell = (Shell)p.get("shell");
+ Shell shell = (Shell)p.get("shell"); //$NON-NLS-1$
IServer server = newServer(shell);
if(server == null) return -1;
@@ -348,10 +349,10 @@
ed1.setNewValue(server.getRuntime().getName());
}
- p.setProperty("value", server.getName());
+ p.setProperty("value", server.getName()); //$NON-NLS-1$
initTargetServerValue();
MutableMultipleChoiceFieldEditor ed =
(MutableMultipleChoiceFieldEditor)support.getFieldEditorByName(ATTR_TARGET_SERVER);
- ed.propertyChange(new PropertyChangeEvent(this, IPropertyEditor.LIST_CONTENT,
"old", "new"));
+ ed.propertyChange(new PropertyChangeEvent(this, IPropertyEditor.LIST_CONTENT,
"old", "new")); //$NON-NLS-1$ //$NON-NLS-2$
return 0;
}
@@ -378,12 +379,12 @@
}
public int execute() {
- Shell shell = (Shell)p.get("shell");
+ Shell shell = (Shell)p.get("shell"); //$NON-NLS-1$
IRuntime runtime = newRuntime(shell);
if(runtime == null) return -1;
- p.setProperty("value", runtime.getName());
+ p.setProperty("value", runtime.getName()); //$NON-NLS-1$
initRuntimeValue();
- context.setRuntimeName(""); //prepare for change
+ context.setRuntimeName(""); //prepare for change //$NON-NLS-1$
return 0;
}
@@ -391,7 +392,7 @@
private IRuntime newRuntime(Shell shell) {
WizardFragment fragment = null;
- String title = "New Server Runtime"; //
ServerUIPlugin.getResource2("wizNewRuntimeWizardTitle");
+ String title = Messages.AppRegisterComponent_NewServerRuntime; //
ServerUIPlugin.getResource2("wizNewRuntimeWizardTitle");
fragment = new WizardFragment() {
protected void createChildFragments(List list) {
list.add(new NewRuntimeWizardFragment());
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterWizard.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterWizard.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/AppRegisterWizard.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -78,7 +78,7 @@
}
private void register(IProgressMonitor monitor) throws Exception {
- if(monitor != null) monitor.beginTask("", 100);
+ if(monitor != null) monitor.beginTask("", 100); //$NON-NLS-1$
if(monitor != null) monitor.worked(5);
IServer[] servers = registry.getTargetServers();
@@ -100,12 +100,12 @@
RegistrationHelper.register(p, servers[i]);
if(monitor != null) monitor.worked(step);
}
- object.getModel().changeObjectAttribute(object, "application name",
registry.getApplicationName());
+ object.getModel().changeObjectAttribute(object, "application name",
registry.getApplicationName()); //$NON-NLS-1$
if(monitor != null) monitor.worked(20);
}
public String getWebRootLocation() {
- XModelObject fs = object.getModel().getByPath("FileSystems/WEB-ROOT");
+ XModelObject fs = object.getModel().getByPath("FileSystems/WEB-ROOT");
//$NON-NLS-1$
///if(fs == null) fs = getRootFileSystemForModule(model, "");
if(!(fs instanceof FileSystemImpl)) return null;
return ((FileSystemImpl)fs).getAbsoluteLocation();
@@ -114,16 +114,16 @@
public void setObject(Object object) {
p = (Properties)object;
registry = new RegisterServerContext(RegisterServerContext.PROJECT_MODE_EXISTING);
- this.object = (XModelObject)p.get("object");
+ this.object = (XModelObject)p.get("object"); //$NON-NLS-1$
registry.setProjectHandle(EclipseResourceUtil.getProject(this.object));
registry.init();
- registry.setNatureIndex(p.getProperty("natureIndex"));
- XModelObject web = this.object.getModel().getByPath("Web");
- String servletVersion = web == null ? null : web.getAttributeValue("servlet
version");
+ registry.setNatureIndex(p.getProperty("natureIndex")); //$NON-NLS-1$
+ XModelObject web = this.object.getModel().getByPath("Web"); //$NON-NLS-1$
+ String servletVersion = web == null ? null : web.getAttributeValue("servlet
version"); //$NON-NLS-1$
registry.setServletVersion(servletVersion);
- registry.setApplicationName(this.object.getAttributeValue("application
name"));
+ registry.setApplicationName(this.object.getAttributeValue("application
name")); //$NON-NLS-1$
page = new AppRegisterWizardPage(registry);
- String n = p.getProperty("natureIndex");
+ String n = p.getProperty("natureIndex"); //$NON-NLS-1$
if(n == null) n = "project"; else n += " Project";
page.setTitle(WizardKeys.toDisplayName(n));
addPage(page);
@@ -133,7 +133,7 @@
Shell shell =
ModelUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell();
WizardDialog dialog = new WizardDialog(shell, this);
dialog.create();
- dialog.getShell().setText("" + p.getProperty("title"));
+ dialog.getShell().setText("" + p.getProperty("title"));
//$NON-NLS-1$ //$NON-NLS-2$
dialog.setTitleImage(ModelUIImages.getImageDescriptor(ModelUIImages.WIZARD_DEFAULT).createImage(null));
return dialog.open();
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/NewProjectRegisterPage.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/NewProjectRegisterPage.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/appregister/NewProjectRegisterPage.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -25,6 +25,7 @@
import org.jboss.tools.common.meta.action.impl.XEntityDataImpl;
import org.jboss.tools.common.model.options.Preference;
import org.jboss.tools.jst.web.project.helpers.NewWebProjectContext;
+import org.jboss.tools.jst.web.ui.Messages;
public class NewProjectRegisterPage extends WizardPage {
private NewWebProjectContext context;
@@ -34,7 +35,7 @@
Preference servletPreference;
public NewProjectRegisterPage(NewWebProjectContext context, Preference
servletPreference) {
- super("Register");
+ super(Messages.NewProjectRegisterPage_Register);
this.context = context;
this.servletPreference = servletPreference;
initServletSupport();
@@ -64,8 +65,8 @@
String defaultServletVersion = servletPreference.getValue();
XEntityData entityData = XEntityDataImpl.create(
- new String[][]{{"WebPrjCreateStepDirs", ""},
{"servletVersion", ""}});
- entityData.setValue("servletVersion", defaultServletVersion);
+ new String[][]{{"WebPrjCreateStepDirs", ""},
{"servletVersion", ""}}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
//$NON-NLS-4$
+ entityData.setValue("servletVersion", defaultServletVersion); //$NON-NLS-1$
context.setServletVersion(defaultServletVersion);
support = new XAttributeSupport(ModelUtilities.getPreferenceModel().getRoot(),
entityData);
support.setLayout(getLayoutForSupport());
@@ -105,12 +106,12 @@
}
public void loadServletVersion() {
- String currentServletVersion =
support.getPropertyEditorAdapterByName("servletVersion").getStringValue(true);
+ String currentServletVersion =
support.getPropertyEditorAdapterByName("servletVersion").getStringValue(true);
//$NON-NLS-1$
String vs = context.getServletVersion();
if(vs != null && vs.length() > 0 &&
!vs.equals(currentServletVersion)) {
context.setServletVersion(vs);
- support.getPropertyEditorAdapterByName("servletVersion").setValue(vs);
+ support.getPropertyEditorAdapterByName("servletVersion").setValue(vs);
//$NON-NLS-1$
}
if(context != null && context.getProjectTemplate() != null) {
@@ -119,7 +120,7 @@
int i = context.compareServletVersions(prefServletVersion, currentServletVersion);
if(i > 0) {
context.setServletVersion(prefServletVersion);
- support.getPropertyEditorAdapterByName("servletVersion").setValue(prefServletVersion);
+ support.getPropertyEditorAdapterByName("servletVersion").setValue(prefServletVersion);
//$NON-NLS-1$
}
}
}
@@ -153,14 +154,14 @@
}
private void initListeners() {
- support.getPropertyEditorAdapterByName("servletVersion").addValueChangeListener(new
InputChangeListener());
+ support.getPropertyEditorAdapterByName("servletVersion").addValueChangeListener(new
InputChangeListener()); //$NON-NLS-1$
appRegister.addPropertyChangeListener(new InputChangeListener());
}
class InputChangeListener implements java.beans.PropertyChangeListener {
public void propertyChange(java.beans.PropertyChangeEvent evt) {
if(lock) return;
- context.setServletVersion(support.getPropertyEditorAdapterByName("servletVersion").getStringValue(true));
+ context.setServletVersion(support.getPropertyEditorAdapterByName("servletVersion").getStringValue(true));
//$NON-NLS-1$
setPageComplete(validatePage());
}
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewCSSFileWizard.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewCSSFileWizard.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewCSSFileWizard.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -20,7 +20,7 @@
class NewCSSFileContext extends NewFileContextEx {
protected String getActionPath() {
- return "CreateActions.CreateFiles.Web.CreateFileCSS";
+ return "CreateActions.CreateFiles.Web.CreateFileCSS"; //$NON-NLS-1$
}
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewJSFileWizard.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewJSFileWizard.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewJSFileWizard.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -20,7 +20,7 @@
class NewJSFileContext extends NewFileContextEx {
protected String getActionPath() {
- return "CreateActions.CreateFiles.Web.CreateFileJS";
+ return "CreateActions.CreateFiles.Web.CreateFileJS"; //$NON-NLS-1$
}
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewTLD20FileWizard.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewTLD20FileWizard.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewTLD20FileWizard.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -21,7 +21,7 @@
}
protected String getActionPath() {
- return "CreateActions.CreateFiles.Web.CreateFileTLD20";
+ return "CreateActions.CreateFiles.Web.CreateFileTLD20"; //$NON-NLS-1$
}
class NewWebFileContext extends NewFileContextEx {
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewTLD21FileWizard.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewTLD21FileWizard.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewTLD21FileWizard.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -13,7 +13,7 @@
public class NewTLD21FileWizard extends NewTLD20FileWizard {
protected String getActionPath() {
- return "CreateActions.CreateFiles.Web.CreateFileTLD21";
+ return "CreateActions.CreateFiles.Web.CreateFileTLD21"; //$NON-NLS-1$
}
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewTLDFileWizard.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewTLDFileWizard.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewTLDFileWizard.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -22,7 +22,7 @@
class NewWebFileContext extends NewFileContextEx {
protected String getActionPath() {
- return "CreateActions.CreateFiles.Web.CreateFileTLD";
+ return "CreateActions.CreateFiles.Web.CreateFileTLD"; //$NON-NLS-1$
}
protected SpecialWizardSupport createSupport() {
return new CreateTLDFileSupport();
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewWebFileWizard.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewWebFileWizard.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/newfile/NewWebFileWizard.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -20,7 +20,7 @@
class NewWebFileContext extends NewFileContextEx {
protected String getActionPath() {
- return "CreateActions.CreateFiles.Web.CreateWebApp";
+ return "CreateActions.CreateFiles.Web.CreateWebApp"; //$NON-NLS-1$
}
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/palette/ImportTLDPage.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/palette/ImportTLDPage.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/palette/ImportTLDPage.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -34,8 +34,8 @@
public void setSupport(SpecialWizardSupport support, int i) {
super.setSupport(support, i);
importSupport = (ImportTLDToPaletteSupport)support;
- parentGroupComponent.setItems((String[])support.getProperties().get("groups"));
- parentGroupComponent.setInitialItem(support.getProperties().getProperty("parent
group"));
+ parentGroupComponent.setItems((String[])support.getProperties().get("groups"));
//$NON-NLS-1$
+ parentGroupComponent.setInitialItem(support.getProperties().getProperty("parent
group")); //$NON-NLS-1$
}
public Control createControl(Composite parent) {
@@ -75,12 +75,12 @@
attributes.store();
parentGroupComponent.store(support.getProperties());
validate();
- if(event != null && event.getSource() ==
attributes.getPropertyEditorAdapterByName("tld")) {
+ if(event != null && event.getSource() ==
attributes.getPropertyEditorAdapterByName("tld")) { //$NON-NLS-1$
// String path = (String)event.getNewValue();
- boolean locked =
((DefaultValueAdapter)attributes.getPropertyEditorAdapterByName("tld")).isStoreLocked();
+ boolean locked =
((DefaultValueAdapter)attributes.getPropertyEditorAdapterByName("tld")).isStoreLocked();
//$NON-NLS-1$
if(!locked) {
importSupport.onPathModified();
- String[] as = {"name", URIConstants.DEFAULT_PREFIX,
URIConstants.LIBRARY_URI};
+ String[] as = {"name", URIConstants.DEFAULT_PREFIX,
URIConstants.LIBRARY_URI}; //$NON-NLS-1$
for (int i = 0; i < as.length; i++)
attributes.getPropertyEditorAdapterByName(as[i]).setValue(support.getAttributeValue(0,
as[i]));
validate();
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplateNameView.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplateNameView.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplateNameView.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -31,8 +31,8 @@
}
private void syncNameAndProject(PropertyChangeEvent arg0) {
- IModelPropertyEditorAdapter n =
attributes.getPropertyEditorAdapterByName("name");
- IModelPropertyEditorAdapter p =
attributes.getPropertyEditorAdapterByName("project");
+ IModelPropertyEditorAdapter n =
attributes.getPropertyEditorAdapterByName("name"); //$NON-NLS-1$
+ IModelPropertyEditorAdapter p =
attributes.getPropertyEditorAdapterByName("project"); //$NON-NLS-1$
if(n == null || p == null) return;
if(arg0.getSource() == p) {
if(nameEqualsProjectName) n.setValue(p.getStringValue(true));
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplatePropertiesView.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplatePropertiesView.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplatePropertiesView.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -20,7 +20,7 @@
PropertiesEditor propertiesEditor = new PropertiesEditor();
public Control createControl(Composite parent) {
- XModelObject properties =
(XModelObject)support.getProperties().get("properties");
+ XModelObject properties =
(XModelObject)support.getProperties().get("properties"); //$NON-NLS-1$
propertiesEditor.setObject(properties);
return propertiesEditor.createControl(parent);
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplateResourcesView.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplateResourcesView.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplateResourcesView.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -30,7 +30,7 @@
AddProjectTemplateResourcesStep step;
public Control createControl(Composite parent) {
- step =
(AddProjectTemplateResourcesStep)support.getProperties().get("ResourcesStep");
+ step =
(AddProjectTemplateResourcesStep)support.getProperties().get("ResourcesStep");
//$NON-NLS-1$
Composite composite = new Composite(parent, SWT.NONE);
composite.setLayout(new GridLayout());
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplateVelocityView.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplateVelocityView.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/AddProjectTemplateVelocityView.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -25,7 +25,7 @@
public class AddProjectTemplateVelocityView extends SpecialWizardStep {
public Control createControl(Composite parent) {
- IModelPropertyEditorAdapter adapter =
attributes.getPropertyEditorAdapterByName("velocity templates");
+ IModelPropertyEditorAdapter adapter =
attributes.getPropertyEditorAdapterByName("velocity templates"); //$NON-NLS-1$
if(adapter instanceof StructuredListAdapter) {
StructuredListAdapter s = (StructuredListAdapter)adapter;
NewResourceProvider provider = new NewResourceProvider();
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/CustomCheckboxTreeAndListGroup.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/CustomCheckboxTreeAndListGroup.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/CustomCheckboxTreeAndListGroup.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -45,7 +45,7 @@
public CheckboxTreeViewer getTreeViewer() {
CheckboxTreeViewer viewer = null;
try {
- Field f = cls.getDeclaredField("treeViewer");
+ Field f = cls.getDeclaredField("treeViewer"); //$NON-NLS-1$
f.setAccessible(true);
viewer = (CheckboxTreeViewer)f.get(this);
} catch (SecurityException e) {
@@ -72,7 +72,7 @@
private void setCurrentTreeSelection(Object element) {
Field f;
try {
- f = cls.getDeclaredField("currentTreeSelection");
+ f = cls.getDeclaredField("currentTreeSelection"); //$NON-NLS-1$
f.setAccessible(true);
f.set(this, element);
} catch (SecurityException e) {
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/EditProjectTemplateView.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/EditProjectTemplateView.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/EditProjectTemplateView.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -41,7 +41,7 @@
Control control;
public Control createControl(Composite parent) {
- projectTemplate =
(ProjectTemplate)support.getProperties().get("projectTemplate");
+ projectTemplate =
(ProjectTemplate)support.getProperties().get("projectTemplate"); //$NON-NLS-1$
templateName.init(new NameChangeListener(), projectTemplate,
support.getEntityData()[id]);
templatePreprocessing.setProjectTemplate(projectTemplate);
templateProperties.setObject(projectTemplate.getProperties());
@@ -106,7 +106,7 @@
this.listener = listener;
projectTemplate = t;
this.data = data;
- data.setValue("name", t.getName());
+ data.setValue("name", t.getName()); //$NON-NLS-1$
}
public Control createControl(Composite parent) {
@@ -119,7 +119,7 @@
public void commit() {
support.store();
- projectTemplate.setName(data.getValue("name"));
+ projectTemplate.setName(data.getValue("name")); //$NON-NLS-1$
}
}
@@ -199,7 +199,7 @@
void addSelected(Set set, File f, File root) {
String n = f.getAbsolutePath().replace('\\', '/');
- String r = root.getAbsolutePath().replace('\\', '/') + "/";
+ String r = root.getAbsolutePath().replace('\\', '/') + "/";
//$NON-NLS-1$
if(n.startsWith(r)) {
n = n.substring(r.length());
set.add(n);
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizardPage.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizardPage.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizardPage.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -95,7 +95,7 @@
webXmlLocationAdapter.setValue("" + context.getInitialLocation());
//$NON-NLS-1$
} else {
linkAdapter =
support.getPropertyEditorAdapterByName(ImportWebDirProjectContext.ATTR_LINK);
- linkAdapter.setValue("true");
+ linkAdapter.setValue("true"); //$NON-NLS-1$
}
}
@@ -179,7 +179,7 @@
if(linkAdapter != null) {
support.getFieldEditorByName(ImportWebDirProjectContext.ATTR_LINK).setEnabled(mayNeedLink(),
(Composite)getControl());
if(!mayNeedLink() && linkAdapter != null) {
- linkAdapter.setValue("false");
+ linkAdapter.setValue("false"); //$NON-NLS-1$
}
}
}
@@ -195,7 +195,7 @@
support.getFieldEditorByName(ImportWebDirProjectContext.ATTR_LINK).setEnabled(mayNeedLink(),
(Composite)getControl());
}
if(!mayNeedLink() && linkAdapter != null) {
- linkAdapter.setValue("false");
+ linkAdapter.setValue("false"); //$NON-NLS-1$
}
}
}
@@ -204,7 +204,7 @@
new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
String v = linkAdapter.getStringValue(false);
- context.setLinkingToProjectOutsideWorkspace(!"false".equals(v) &&
mayNeedLink());
+ context.setLinkingToProjectOutsideWorkspace(!"false".equals(v) &&
mayNeedLink()); //$NON-NLS-1$
}
}
);
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebWarWizard.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebWarWizard.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebWarWizard.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -49,9 +49,9 @@
protected void installMainPage() {
mainPage = new ImportWebWarWizardPage(context);
- String mainPageTitle = WizardKeys.getString("" + getClass().getName() +
".mainPageTitle");
+ String mainPageTitle = WizardKeys.getString("" + getClass().getName() +
".mainPageTitle"); //$NON-NLS-1$ //$NON-NLS-2$
mainPage.setTitle(mainPageTitle);
- String mainPageDescr = WizardKeys.getString("" +
ImportWebWarWizard.class.getName() + ".mainPagePrompt");
+ String mainPageDescr = WizardKeys.getString("" +
ImportWebWarWizard.class.getName() + ".mainPagePrompt"); //$NON-NLS-1$
//$NON-NLS-2$
mainPage.setDescription(mainPageDescr);
addPage(mainPage);
}
@@ -65,9 +65,9 @@
boolean result = true;
mainPage.commit();
- context.setServletVersion("2.4");
+ context.setServletVersion("2.4"); //$NON-NLS-1$
if(!context.isServletVersionConsistentToWebXML()) {
- context.setServletVersion("2.3");
+ context.setServletVersion("2.3"); //$NON-NLS-1$
}
IRunnableWithProgress op = new
WorkspaceModifyDelegatingOperation(createOperation());
@@ -90,7 +90,7 @@
}
protected String getFinalPerspective() {
- return "org.jboss.tools.jst.web.ui.WebDevelopmentPerspective";
+ return "org.jboss.tools.jst.web.ui.WebDevelopmentPerspective"; //$NON-NLS-1$
}
private class ConfigurationElementInternal implements IConfigurationElement {
@@ -98,35 +98,35 @@
return null;
}
public String getAttribute(String name) {
- return "finalPerspective".equals(name) ? getFinalPerspective() : null;
+ return "finalPerspective".equals(name) ? getFinalPerspective() : null;
//$NON-NLS-1$
}
public Object createExecutableExtension(String propertyName) throws CoreException {
- throw new UnsupportedOperationException("Not implemented.");
+ throw new UnsupportedOperationException("Not implemented."); //$NON-NLS-1$
}
public String getAttributeAsIs(String name) {
- throw new UnsupportedOperationException("Not implemented.");
+ throw new UnsupportedOperationException("Not implemented."); //$NON-NLS-1$
}
public String[] getAttributeNames() {
- throw new UnsupportedOperationException("Not implemented.");
+ throw new UnsupportedOperationException("Not implemented."); //$NON-NLS-1$
}
public IConfigurationElement[] getChildren() {
- throw new UnsupportedOperationException("Not implemented.");
+ throw new UnsupportedOperationException("Not implemented."); //$NON-NLS-1$
}
public IConfigurationElement[] getChildren(String name) {
- throw new UnsupportedOperationException("Not implemented.");
+ throw new UnsupportedOperationException("Not implemented."); //$NON-NLS-1$
}
public IExtension getDeclaringExtension() {
- throw new UnsupportedOperationException("Not implemented.");
+ throw new UnsupportedOperationException("Not implemented."); //$NON-NLS-1$
}
public String getName() {
- throw new UnsupportedOperationException("Not implemented.");
+ throw new UnsupportedOperationException("Not implemented."); //$NON-NLS-1$
}
public String getValue() {
- throw new UnsupportedOperationException("Not implemented.");
+ throw new UnsupportedOperationException("Not implemented."); //$NON-NLS-1$
}
public String getValueAsIs() {
- throw new UnsupportedOperationException("Not implemented.");
+ throw new UnsupportedOperationException("Not implemented."); //$NON-NLS-1$
}
public Class loadExtensionClass(String propertyName) throws CoreException {
return null;
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebWarWizardPage.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebWarWizardPage.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebWarWizardPage.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -43,14 +43,14 @@
Path defaultPath = (Path)ModelUIPlugin.getWorkspace().getRoot().getLocation();
public ImportWebWarWizardPage(ImportWebWarContext context) {
- super("Wizard Page");
+ super("Wizard Page"); //$NON-NLS-1$
this.context = context;
XEntityData entityData = XEntityDataImpl.create(new String[][] {
- {"WebPrjAdoptWarStep0", ""},
- {"*.war location", "yes"},
- {"name", "yes"},
- {"use default path", "no"},
- {"location", "yes"},
+ {"WebPrjAdoptWarStep0", ""}, //$NON-NLS-1$ //$NON-NLS-2$
+ {"*.war location", "yes"}, //$NON-NLS-1$ //$NON-NLS-2$
+ {"name", "yes"}, //$NON-NLS-1$ //$NON-NLS-2$
+ {"use default path", "no"}, //$NON-NLS-1$ //$NON-NLS-2$
+ {"location", "yes"}, //$NON-NLS-1$ //$NON-NLS-2$
// WTP allows only classic structure
// {"import type", "no"}
});
@@ -60,10 +60,10 @@
}
support = new XAttributeSupport(ModelUtilities.getPreferenceModel().getRoot(),
entityData);
support.setLayout(getLayoutForSupport());
- warLocationAdapter = support.getPropertyEditorAdapterByName("*.war
location");
- nameLocationAdapter = support.getPropertyEditorAdapterByName("name");
- useDefaultPathAdapter = support.getPropertyEditorAdapterByName("use default
path");
- projectLocationAdapter = support.getPropertyEditorAdapterByName("location");
+ warLocationAdapter = support.getPropertyEditorAdapterByName("*.war
location"); //$NON-NLS-1$
+ nameLocationAdapter = support.getPropertyEditorAdapterByName("name");
//$NON-NLS-1$
+ useDefaultPathAdapter = support.getPropertyEditorAdapterByName("use default
path"); //$NON-NLS-1$
+ projectLocationAdapter = support.getPropertyEditorAdapterByName("location");
//$NON-NLS-1$
appRegister.setContext(context.getRegisterServerContext());
appRegister.setEnabling(false);
appRegister.init();
@@ -96,7 +96,7 @@
Control control = support.createControl(c);
supportControl = (Composite)control;
control.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- projectLocationEditor =
(IPropertyEditor)support.getPropertyEditorByName("location");
+ projectLocationEditor =
(IPropertyEditor)support.getPropertyEditorByName("location"); //$NON-NLS-1$
updateLocationEditor();
initListeners();
createRegisterControl(c);
@@ -107,7 +107,7 @@
}
private boolean isDefaultPath() {
- return "true".equals(useDefaultPathAdapter.getStringValue(true));
+ return "true".equals(useDefaultPathAdapter.getStringValue(true));
//$NON-NLS-1$
}
private void updateLocationEditor() {
@@ -158,7 +158,7 @@
if(p == null) {
return defaultPath.toOSString();
} else {
- return defaultPath.toOSString() + "/" + p.getName();
+ return defaultPath.toOSString() + "/" + p.getName(); //$NON-NLS-1$
}
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizard.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizard.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizard.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -31,7 +31,7 @@
import org.jboss.tools.jst.web.ui.operation.WebNatureOperation;
public abstract class NewWebProjectWizard extends Wizard implements INewWizard,
IExecutableExtension {
- private static final String CANNOT_CREATE_LOCATION =
"NewStrutsProjectWizard.CannotCreateLocation";
+ private static final String CANNOT_CREATE_LOCATION =
"NewStrutsProjectWizard.CannotCreateLocation"; //$NON-NLS-1$
protected IWorkbench workbench;
protected IStructuredSelection selection;
@@ -71,14 +71,14 @@
}
} catch (InvocationTargetException e) {
WebUiPlugin.getPluginLog().logError(e);
- String message = WizardKeys.getString(CANNOT_CREATE_LOCATION +
".ErrorMessage") + ": " + context.getLocationPath();
- Status status = new Status(IStatus.ERROR, "org.jboss.tools.jst.web.ui", 0,
message, e);
+ String message = WizardKeys.getString(CANNOT_CREATE_LOCATION +
".ErrorMessage") + ": " + context.getLocationPath(); //$NON-NLS-1$
//$NON-NLS-2$
+ Status status = new Status(IStatus.ERROR, "org.jboss.tools.jst.web.ui", 0,
message, e); //$NON-NLS-1$
ProblemReportingHelper.reportProblem(status);
result = false;
} catch (InterruptedException e) {
WebUiPlugin.getPluginLog().logError(e);
- String message =
WizardKeys.getString(CANNOT_CREATE_LOCATION+".ErrorMessage")+":
"+context.getLocationPath();
- Status status = new Status(IStatus.ERROR, "org.jboss.tools.jst.web.ui", 0,
message, e);
+ String message =
WizardKeys.getString(CANNOT_CREATE_LOCATION+".ErrorMessage")+":
"+context.getLocationPath(); //$NON-NLS-1$ //$NON-NLS-2$
+ Status status = new Status(IStatus.ERROR, "org.jboss.tools.jst.web.ui", 0,
message, e); //$NON-NLS-1$
ProblemReportingHelper.reportProblem(status);
result = false;
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizardPage.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizardPage.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizardPage.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -89,27 +89,27 @@
nameEditor = new StringEditor(settings);
nameAdapter = new NameAdapter();
nameEditor.setInput(nameAdapter);
- nameEditor.setLabelText(getString(getKey() +
"_"+NewWebProjectContext.ATTR_NAME)+"*");
+ nameEditor.setLabelText(getString(getKey() +
"_"+NewWebProjectContext.ATTR_NAME)+"*"); //$NON-NLS-1$ //$NON-NLS-2$
locationEditor = new DirectoryChoicerEditor(settings);
locationAdapter = new LocationAdapter();
locationEditor.setInput(locationAdapter);
- locationEditor.setLabelText(getString(getKey() +
"_"+NewWebProjectContext.ATTR_LOCATION)+"*");
+ locationEditor.setLabelText(getString(getKey() +
"_"+NewWebProjectContext.ATTR_LOCATION)+"*"); //$NON-NLS-1$
//$NON-NLS-2$
useDefaultPathEditor = new CheckBoxEditor(settings);
useDefaultPathAdapter = new UseDefaultPathAdapter();
useDefaultPathEditor.setInput(useDefaultPathAdapter);
- useDefaultPathEditor.setLabelText(getString(getKey() +
"_"+NewWebProjectContext.ATTR_USE_DEFAULT_LOCATION)+"*");
+ useDefaultPathEditor.setLabelText(getString(getKey() +
"_"+NewWebProjectContext.ATTR_USE_DEFAULT_LOCATION)+"*");
//$NON-NLS-1$ //$NON-NLS-2$
versionEditor = new DropDownEditor(settings);
versionAdapter = new StrutsVersionAdapter();
versionEditor.setInput(versionAdapter);
- versionEditor.setLabelText(getString(getKey() +
"_"+NewWebProjectContext.ATTR_VERSION)+"*");
+ versionEditor.setLabelText(getString(getKey() +
"_"+NewWebProjectContext.ATTR_VERSION)+"*"); //$NON-NLS-1$
//$NON-NLS-2$
templateEditor = new DropDownEditor(settings);
templateAdapter = new TemplateAdapter();
templateEditor.setInput(templateAdapter);
- templateEditor.setLabelText(getString(getKey() +
"_"+NewWebProjectContext.ATTR_TEMPLATE)+"*");
+ templateEditor.setLabelText(getString(getKey() +
"_"+NewWebProjectContext.ATTR_TEMPLATE)+"*"); //$NON-NLS-1$
//$NON-NLS-2$
defaultPath = ModelUIPlugin.getWorkspace().getRoot().getLocation();
@@ -117,7 +117,7 @@
}
protected String getKey() {
- return "newStrutsProjectPage1";
+ return "newStrutsProjectPage1"; //$NON-NLS-1$
}
Composite composite = null;
@@ -138,7 +138,7 @@
composite.setLayout(layout);
introduction = new Label(composite, SWT.NO_FOCUS);
- String text = "" + WizardKeys.getString(getKey() +
"_introduction");
+ String text = "" + WizardKeys.getString(getKey() +
"_introduction"); //$NON-NLS-1$ //$NON-NLS-2$
text = insertBreaks(introduction, text, 380);
introduction.setText(text);
gd = new GridData(GridData.FILL_HORIZONTAL);
@@ -172,8 +172,8 @@
this.setControl(composite);
///Preference.USE_DEFAULT_PROJECT_ROOT.getValue()
// init default values
- nameAdapter.setValue("");
- useDefaultPathAdapter.setValue((getProjectRootOption() != null) ? "false" :
"true");
+ nameAdapter.setValue(""); //$NON-NLS-1$
+ useDefaultPathAdapter.setValue((getProjectRootOption() != null) ? "false" :
"true"); //$NON-NLS-1$ //$NON-NLS-2$
// locationAdapter.setValue(defaultPath.toOSString());
if (getProjectRootOption() == null)
locationAdapter.setValue(defaultPath.toOSString());
@@ -234,9 +234,9 @@
return false;
}
- if ("".equals(projectName)) {
+ if ("".equals(projectName)) { //$NON-NLS-1$
setErrorMessage(null);
- setMessage(getString(getKey() + "_specifyProjectName"));
+ setMessage(getString(getKey() + "_specifyProjectName")); //$NON-NLS-1$
return false;
}
@@ -247,19 +247,19 @@
}
String projectLocation = getProjectLocation();
- if ("".equals(projectLocation)) {
+ if ("".equals(projectLocation)) { //$NON-NLS-1$
setErrorMessage(null);
- setMessage(getString(getKey() + "_specifyLocation"));
+ setMessage(getString(getKey() + "_specifyLocation")); //$NON-NLS-1$
return false;
}
if (!(new Path(projectLocation)).isAbsolute()) {
- setErrorMessage(getString(getKey() + "_locationError"));
+ setErrorMessage(getString(getKey() + "_locationError")); //$NON-NLS-1$
return false;
}
if (getProjectHandle().exists() || projectExistsIgnoreCase()) {
- setErrorMessage(getString(getKey() + "_projectExistsMessage"));
+ setErrorMessage(getString(getKey() + "_projectExistsMessage"));
//$NON-NLS-1$
return false;
}
@@ -269,7 +269,7 @@
return false;
}
- if ("".equals(getStringValue(versionAdapter))) {
+ if ("".equals(getStringValue(versionAdapter))) { //$NON-NLS-1$
setErrorMessage(versionsError);
return false;
}
@@ -303,10 +303,10 @@
}
private IProject overlaps(String projectLocation) {
- projectLocation = projectLocation.replace('\\','/').toLowerCase() +
"/";
+ projectLocation = projectLocation.replace('\\','/').toLowerCase() +
"/"; //$NON-NLS-1$
IProject[] ps = ModelPlugin.getWorkspace().getRoot().getProjects();
for (int i = 0; i < ps.length; i++) {
- String location =
ps[i].getLocation().toString().replace('\\','/').toLowerCase() +
"/";
+ String location =
ps[i].getLocation().toString().replace('\\','/').toLowerCase() +
"/"; //$NON-NLS-1$
if(location.startsWith(projectLocation)) return ps[i];
if(projectLocation.startsWith(location)) return ps[i];
}
@@ -322,7 +322,7 @@
}
class LocalValueProvider implements IValueProvider, IValueChangeListener, IAdaptable {
- protected Object value = "";
+ protected Object value = ""; //$NON-NLS-1$
protected PropertyChangeSupport pcs = new PropertyChangeSupport(this);
// listeners
@@ -343,7 +343,7 @@
public String getStringValue(boolean returnNullAsEmptyString) {
Object o = getValue();
- return (o != null) ? o.toString() : (returnNullAsEmptyString) ? "" : null;
+ return (o != null) ? o.toString() : (returnNullAsEmptyString) ? "" : null;
//$NON-NLS-1$
}
public void setValue(Object value) {
@@ -365,7 +365,7 @@
if (adapter == IValueChangeListener.class) {
return this;
}
- Assert.isTrue(true, "LocalValueProvider instance itself cannot provide adapter
for "+adapter.getName());
+ Assert.isTrue(true, "LocalValueProvider instance itself cannot provide adapter
for "+adapter.getName()); //$NON-NLS-1$
return null;
}
}
@@ -373,8 +373,8 @@
class NameAdapter extends LocalValueProvider {
public void setValue(Object value) {
super.setValue(value);
- if ("true".equals("" + useDefaultPathAdapter.getValue())) {
- String name = (value == null) ? "" : value.toString().trim();
+ if ("true".equals("" + useDefaultPathAdapter.getValue())) {
//$NON-NLS-1$ //$NON-NLS-2$
+ String name = (value == null) ? "" : value.toString().trim();
//$NON-NLS-1$
locationAdapter.setValue(defaultPath.append(name).toOSString());
}
setPageComplete(validatePage());
@@ -392,9 +392,9 @@
public void setValue(Object value) {
super.setValue(value);
if (getControl()!=null) {
- locationEditor.getFieldEditor(null).setEnabled("false".equals(""
+ getValue()),(Composite)getControl());
+ locationEditor.getFieldEditor(null).setEnabled("false".equals(""
+ getValue()),(Composite)getControl()); //$NON-NLS-1$ //$NON-NLS-2$
String name = nameEditor.getValue().toString();
- if(name == null) name = ""; else name = name.trim();
+ if(name == null) name = ""; else name = name.trim(); //$NON-NLS-1$
locationAdapter.setValue(defaultPath.append(name).toOSString());
}
setPageComplete(validatePage());
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckClass.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckClass.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckClass.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -36,12 +36,12 @@
if(type != null) {
String mustImpl = null;
try { mustImpl = checkImplements(object, type); } catch (Exception e) {
- LogHelper.logError("org.jboss.tools.jst.web.verification", e);
+ LogHelper.logError("org.jboss.tools.jst.web.verification", e);
//$NON-NLS-1$
}
if(mustImpl != null) return fireImplements(object, attr, attr, value, mustImpl);
String mustExtend = null;
try { mustExtend = checkExtends(object, type); } catch (Exception e) {
- LogHelper.logError("org.jboss.tools.jst.web.verification", e);
+ LogHelper.logError("org.jboss.tools.jst.web.verification", e);
//$NON-NLS-1$
}
if(mustExtend != null) return fireExtends(object, attr, attr, value, mustExtend);
return null;
@@ -54,8 +54,8 @@
}
private String checkImplements(VObject object, IType type) throws Exception {
- if("java.lang.Class".equals(type.getFullyQualifiedName())) return null;
- String impl = rule.getProperty("implements");
+ if("java.lang.Class".equals(type.getFullyQualifiedName())) return null;
//$NON-NLS-1$
+ String impl = rule.getProperty("implements"); //$NON-NLS-1$
if(impl == null || impl.length() == 0) return null;
String[] is = type.getSuperInterfaceNames();
for (int i = 0; i < is.length; i++) {
@@ -64,9 +64,9 @@
}
if(type.isInterface()) return impl;
String f = type.getSuperclassName();
- if(f == null || f.length() == 0 || "java.lang.Object".equals(f)) return
impl;
+ if(f == null || f.length() == 0 || "java.lang.Object".equals(f)) return impl;
//$NON-NLS-1$
f = EclipseJavaUtil.resolveType(type, f);
- if(f == null || f.length() == 0 || "java.lang.Object".equals(f)) return
impl;
+ if(f == null || f.length() == 0 || "java.lang.Object".equals(f)) return impl;
//$NON-NLS-1$
type = object.getModel().getValidType(f);
if(type == null) return impl;
return checkImplements(object, type);
@@ -74,14 +74,14 @@
private String checkExtends(VObject object, IType type) throws Exception {
if(type.isInterface()) return null;
- if("java.lang.Class".equals(type.getFullyQualifiedName())) return null;
- String ext = rule.getProperty("extends");
+ if("java.lang.Class".equals(type.getFullyQualifiedName())) return null;
//$NON-NLS-1$
+ String ext = rule.getProperty("extends"); //$NON-NLS-1$
if(ext == null || ext.length() == 0) return null;
String f = type.getSuperclassName();
- if(f == null || f.length() == 0 || "java.lang.Object".equals(f)) return ext;
+ if(f == null || f.length() == 0 || "java.lang.Object".equals(f)) return ext;
//$NON-NLS-1$
if(f.equals(ext)) return null;
f = EclipseJavaUtil.resolveType(type, f);
- if(f == null || f.length() == 0 || "java.lang.Object".equals(f)) return ext;
+ if(f == null || f.length() == 0 || "java.lang.Object".equals(f)) return ext;
//$NON-NLS-1$
if(f.equals(ext)) return null;
type = object.getModel().getValidType(f);
if(type == null) return ext;
@@ -89,21 +89,21 @@
}
protected String getAttribute() {
- return rule.getProperty("attribute");
+ return rule.getProperty("attribute"); //$NON-NLS-1$
}
private boolean allowsPrimitive() {
- return "true".equals(rule.getProperty("allow-primitive"));
+ return "true".equals(rule.getProperty("allow-primitive"));
//$NON-NLS-1$ //$NON-NLS-2$
}
private boolean isPrimitive(String value) {
- return
".int.boolean.char.byte.double.float.long.short.".indexOf("." + value
+ ".") >= 0;
+ return
".int.boolean.char.byte.double.float.long.short.".indexOf("." + value
+ ".") >= 0; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
private boolean isJavaLang(String value) {
if(value.indexOf('.') < 0) {
- return
".String.Integer.Boolean.Character.Byte.Double.Float.Long.Short.".indexOf("."
+ value + ".") >= 0;
- } else if(value.startsWith("java.lang.")) {
+ return
".String.Integer.Boolean.Character.Byte.Double.Float.Long.Short.".indexOf("."
+ value + ".") >= 0; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ } else if(value.startsWith("java.lang.")) { //$NON-NLS-1$
return isJavaLang(value.substring(10));
} else {
return false;
@@ -118,18 +118,18 @@
protected VResult[] fireImplements(VObject object, String id, String attr, String value,
String interfaceName) {
Object[] os = new Object[] {attr, value, interfaceName};
- VResult result = rule.getResultFactory().getResult(id + ".implements",
object, attr, object, attr, os);
+ VResult result = rule.getResultFactory().getResult(id + ".implements",
object, attr, object, attr, os); //$NON-NLS-1$
return new VResult[] {result};
}
protected VResult[] fireExtends(VObject object, String id, String attr, String value,
String superName) {
Object[] os = new Object[] {attr, value, superName};
- VResult result = rule.getResultFactory().getResult(id + ".extends", object,
attr, object, attr, os);
+ VResult result = rule.getResultFactory().getResult(id + ".extends", object,
attr, object, attr, os); //$NON-NLS-1$
return new VResult[] {result};
}
protected VResult[] fireInvalid(VObject object, String id, String attr, String value) {
Object[] os = new Object[] {attr, value};
- VResult result = rule.getResultFactory().getResult(id + ".valid", object,
attr, object, attr, os);
+ VResult result = rule.getResultFactory().getResult(id + ".valid", object,
attr, object, attr, os); //$NON-NLS-1$
return new VResult[] {result};
}
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckFilterMappingName.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckFilterMappingName.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckFilterMappingName.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -16,15 +16,15 @@
import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
public class CheckFilterMappingName extends WebDefaultCheck {
- static String ATTR = "filter-name";
+ static String ATTR = "filter-name"; //$NON-NLS-1$
public VResult[] check(VObject object) {
XModelObject o = ((VObjectImpl)object).getModelObject();
String servletName = o.getAttributeValue(ATTR);
if(servletName == null) return null;
if(servletName.length() == 0) {
- return fire(object, "filter-mapping.empty", ATTR, null);
+ return fire(object, "filter-mapping.empty", ATTR, null); //$NON-NLS-1$
} else if(findFilter(o, servletName) == null) {
- return fire(object, "filter-mapping", ATTR, servletName);
+ return fire(object, "filter-mapping", ATTR, servletName); //$NON-NLS-1$
}
return null;
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckResource.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckResource.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckResource.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -29,7 +29,7 @@
String attribute = getAttribute();
String value = (String)object.getAttribute(attribute);
XModel model = getXModel(object);
- XModelObject webRoot = model == null ? null :
model.getByPath("FileSystems/WEB-ROOT");
+ XModelObject webRoot = model == null ? null :
model.getByPath("FileSystems/WEB-ROOT"); //$NON-NLS-1$
if(webRoot == null) return null;
List list = WebPromptingProvider.getInstance().getList(model,
IWebPromptingProvider.JSF_CONVERT_URL_TO_PATH, value, null);
@@ -38,35 +38,35 @@
}
if(value == null || value.trim().length() == 0) {
- if("true".equals(rule.getProperty("acceptEmpty"))) return null;
- return fire(object, attribute + ".empty", attribute, null);
+ if("true".equals(rule.getProperty("acceptEmpty"))) return null;
//$NON-NLS-1$ //$NON-NLS-2$
+ return fire(object, attribute + ".empty", attribute, null); //$NON-NLS-1$
}
- String value1 = !value.startsWith("/") ? "/" + value : value;
+ String value1 = !value.startsWith("/") ? "/" + value : value;
//$NON-NLS-1$ //$NON-NLS-2$
XModelObject tld = XModelImpl.getByRelativePath(model, value1);
if(tld == null) {
- return fire(object, attribute + ".exists", attribute, value);
+ return fire(object, attribute + ".exists", attribute, value); //$NON-NLS-1$
}
- String value2 = value.startsWith("/") ? value.substring(1) : value;
+ String value2 = value.startsWith("/") ? value.substring(1) : value;
//$NON-NLS-1$
XModelObject tld2 = webRoot.getChildByPath(value2);
if(tld2 == null) {
- return fire(object, attribute + ".exists", attribute, value);
+ return fire(object, attribute + ".exists", attribute, value); //$NON-NLS-1$
}
if(!checkExtensions(value)) {
- return fire(object, attribute + ".extension", attribute, value);
+ return fire(object, attribute + ".extension", attribute, value);
//$NON-NLS-1$
}
return null;
}
protected String getAttribute() {
- return rule.getProperty("attribute");
+ return rule.getProperty("attribute"); //$NON-NLS-1$
}
boolean checkExtensions(String value) {
value = value.toLowerCase();
- String extensions = rule.getProperty("extensions");
+ String extensions = rule.getProperty("extensions"); //$NON-NLS-1$
if(extensions == null || extensions.trim().length() == 0) return true;
- StringTokenizer st = new StringTokenizer(extensions, " ");
+ StringTokenizer st = new StringTokenizer(extensions, " "); //$NON-NLS-1$
while(st.hasMoreTokens()) {
String ext = st.nextToken();
if(value.endsWith(ext)) return true;
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckRoleReferenceName.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckRoleReferenceName.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckRoleReferenceName.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -16,25 +16,25 @@
import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
public class CheckRoleReferenceName extends WebDefaultCheck {
- static String ATTR = "role-name";
+ static String ATTR = "role-name"; //$NON-NLS-1$
public VResult[] check(VObject object) {
XModelObject o = ((VObjectImpl)object).getModelObject();
- String attr = rule.getProperty("attribute");
+ String attr = rule.getProperty("attribute"); //$NON-NLS-1$
if(attr == null || attr.length() == 0) attr = ATTR;
String roleName = o.getAttributeValue(attr);
if(roleName == null) return null;
if(roleName.length() == 0) {
- return fire(object, "role.empty", attr, null);
+ return fire(object, "role.empty", attr, null); //$NON-NLS-1$
} else if(!isRoleNameOk(o, roleName)) {
- return fire(object, "role", attr, roleName);
+ return fire(object, "role", attr, roleName); //$NON-NLS-1$
}
return null;
}
boolean isRoleNameOk(XModelObject mapping, String roleName) {
- if(roleName.equalsIgnoreCase("NONE")) return true;
- if("*".equals(roleName)) return true;
+ if(roleName.equalsIgnoreCase("NONE")) return true; //$NON-NLS-1$
+ if("*".equals(roleName)) return true; //$NON-NLS-1$
if(findRole(mapping, roleName) != null) return true;
return false;
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckServletMappingName.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckServletMappingName.java 2009-07-10
07:06:52 UTC (rev 16524)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.verification/src/org/jboss/tools/jst/web/verification/vrules/CheckServletMappingName.java 2009-07-10
07:56:03 UTC (rev 16525)
@@ -16,16 +16,16 @@
import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
public class CheckServletMappingName extends WebDefaultCheck {
- static String ATTR = "servlet-name";
+ static String ATTR = "servlet-name"; //$NON-NLS-1$
public VResult[] check(VObject object) {
XModelObject o = ((VObjectImpl)object).getModelObject();
String servletName = o.getAttributeValue(ATTR);
if(servletName == null) return null;
if(servletName.length() == 0) {
- if("true".equals(rule.getProperty("acceptEmpty"))) return null;
- return fire(object, "servlet-mapping.empty", ATTR, null);
+ if("true".equals(rule.getProperty("acceptEmpty"))) return null;
//$NON-NLS-1$ //$NON-NLS-2$
+ return fire(object, "servlet-mapping.empty", ATTR, null); //$NON-NLS-1$
} else if(findServlet(o, servletName) == null) {
- return fire(object, "servlet-mapping", ATTR, servletName);
+ return fire(object, "servlet-mapping", ATTR, servletName); //$NON-NLS-1$
}
return null;
}