[jboss-svn-commits] JBL Code SVN: r22244 - in labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools: META-INF and 10 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Fri Aug 29 14:10:35 EDT 2008
Author: john.graham at jboss.org
Date: 2008-08-29 14:10:34 -0400 (Fri, 29 Aug 2008)
New Revision: 22244
Added:
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/Messages.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/messages.properties
Modified:
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/META-INF/MANIFEST.MF
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/about.html
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/plugin.xml
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/Activator.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/GuvnorDecorator.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/GuvnorLocationManager.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/actions/CommitAction.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/actions/CompareVersionAction.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/actions/DeleteAction.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/perspectives/GuvnorRepExplorerPerspective.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/preferences/GuvnorPreferencePage.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/preferences/IGuvnorPreferenceConstants.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/properties/GuvnorWorkspaceFilePage.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/properties/RepositoryElementPropsDialog.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/AuthenticationPromptDialog.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/GuvnorMetadataUtils.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/PlatformUtils.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/StringInput.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/StringStorage.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/VersionChooserDialog.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/webdav/ResourceProperties.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/webdav/StreamProcessingUtils.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/webdav/WebDavAuthenticator.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/webdav/WebDavClient.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/webdav/WebDavException.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/webdav/WebDavSessionAuthenticator.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/IGuvnorConstants.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/RepositoryContentProvider.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/RepositoryLabelProvider.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/RepositoryView.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/ResourceHistoryView.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/model/ResourceHistoryEntry.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/model/TreeObject.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/model/TreeParent.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/model/TreePropertyProvider.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/AddResourceWizard.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/CheckoutWizard.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/GuvWizardModel.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/GuvnorMainConfigPage.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/NewRepLocationWizard.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/SelectGuvnorFolderPage.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/SelectGuvnorRepPage.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/SelectGuvnorResourcesPage.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/SelectLocalTargetPage.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/SelectResourceVersionPage.java
labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/WizardUtils.java
Log:
Externalize strings, minor code clean up
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/META-INF/MANIFEST.MF
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/META-INF/MANIFEST.MF 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/META-INF/MANIFEST.MF 2008-08-29 18:10:34 UTC (rev 22244)
@@ -23,3 +23,4 @@
org.guvnor.tools.views,
org.guvnor.tools.views.model,
org.guvnor.tools.wizards
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/about.html
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/about.html 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/about.html 2008-08-29 18:10:34 UTC (rev 22244)
@@ -8,7 +8,7 @@
<body lang="EN-US">
<h2>About This Content</h2>
-<p>June 15, 2008</p>
+<p>August 29, 2008</p>
<h3>License</h3>
<p>JBoss, a Division of Red Hat makes available all content in this plug-in ("Content"). Unless otherwise
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/plugin.xml
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/plugin.xml 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/plugin.xml 2008-08-29 18:10:34 UTC (rev 22244)
@@ -55,7 +55,7 @@
</extension>
<extension point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension targetID="org.eclipse.ui.resourcePerspective">
- <view id="org.guvnor.tools.views.RepositoriesView"
+ <view id="org.guvnor.tools.views.RepositoryView"
ratio="0.5"
relationship="right"
relative="org.eclipse.ui.views.TaskList"/>
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/Activator.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/Activator.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/Activator.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -21,7 +21,7 @@
public class Activator extends AbstractUIPlugin {
// The plug-in ID
- public static final String PLUGIN_ID = "org.drools.guvnor";
+ public static final String PLUGIN_ID = "org.drools.guvnor"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
@@ -83,10 +83,10 @@
public void run() {
switch (severity) {
case IStatus.ERROR:
- MessageDialog.openError(display.getActiveShell(), "Error", msg);
+ MessageDialog.openError(display.getActiveShell(), Messages.getString("error"), msg); //$NON-NLS-1$
break;
case IStatus.WARNING:
- MessageDialog.openWarning(display.getActiveShell(), "Warning", msg);
+ MessageDialog.openWarning(display.getActiveShell(), Messages.getString("warning"), msg); //$NON-NLS-1$
break;
}
}
@@ -152,11 +152,11 @@
private static ImageDescriptor GUVLOCADD_IMG;
private static ImageDescriptor GUVREPWIZBAN_IMG;
- public static final String IMG_GUVCONTROLLED = "guvnor_controlled.gif";
- public static final String IMG_GUVLOCADD = "guvnor_rep_add.gif";
- public static final String IMG_GUVREPWIZBAN = "guvnor_rep_wizban.gif";
+ public static final String IMG_GUVCONTROLLED = "guvnor_controlled.gif"; //$NON-NLS-1$
+ public static final String IMG_GUVLOCADD = "guvnor_rep_add.gif"; //$NON-NLS-1$
+ public static final String IMG_GUVREPWIZBAN = "guvnor_rep_wizban.gif"; //$NON-NLS-1$
public boolean useDebugHttpClient() {
- return Boolean.parseBoolean(Platform.getDebugOption("org.guvnor.tools/debugHttpClient"));
+ return Boolean.parseBoolean(Platform.getDebugOption("org.guvnor.tools/debugHttpClient")); //$NON-NLS-1$
}
}
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/GuvnorDecorator.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/GuvnorDecorator.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/GuvnorDecorator.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -17,7 +17,7 @@
*/
public class GuvnorDecorator implements ILightweightLabelDecorator {
- public static final String DECORATOR_ID = "org.guvnor.tools.decorator";
+ public static final String DECORATOR_ID = "org.guvnor.tools.decorator"; //$NON-NLS-1$
private boolean isGuvnorResource(Object element) {
if (element instanceof IResource) {
@@ -54,14 +54,14 @@
boolean showRevision = GuvnorPreferencePage.shouldShowRevision();
boolean showDateTime = GuvnorPreferencePage.shouldShowTimeDateStamp();
if (showRevision || showDateTime) {
- decoration.addSuffix(" ");
+ decoration.addSuffix(" "); //$NON-NLS-1$
}
if (showRevision) {
decoration.addSuffix(props.getRevision());
}
if (showDateTime) {
if (showRevision) {
- decoration.addSuffix(", " + props.getVersion());
+ decoration.addSuffix(", " + props.getVersion()); //$NON-NLS-1$
} else {
decoration.addSuffix(props.getVersion());
}
@@ -73,7 +73,7 @@
throws CoreException {
if (!GuvnorMetadataUtils.isGuvnorResourceCurrent(resource)
&& GuvnorPreferencePage.shouldShowChangeIndicator()) {
- decoration.addSuffix(" >");
+ decoration.addSuffix(" >"); //$NON-NLS-1$
}
}
@@ -83,7 +83,7 @@
decorateResource((IResource)element, decoration);
} else {
Activator.getDefault().writeLog(IStatus.ERROR,
- "Called to decorate unknown: " + element.getClass().toString(), new Exception());
+ "Called to decorate unknown: " + element.getClass().toString(), new Exception()); //$NON-NLS-1$
}
}
}
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/GuvnorLocationManager.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/GuvnorLocationManager.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/GuvnorLocationManager.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -15,7 +15,7 @@
public class GuvnorLocationManager {
- private static final String REP_CACHE_NAME = ".replist";
+ private static final String REP_CACHE_NAME = ".replist"; //$NON-NLS-1$
private ArrayList<GuvnorRepository> repList = new ArrayList<GuvnorRepository>();
@@ -36,7 +36,7 @@
public void addRepository(GuvnorRepository rep) throws Exception {
if (findRepository(rep.getLocation()) != null) {
- throw new Exception("Duplicate repository: " + rep.getLocation());
+ throw new Exception("Duplicate repository: " + rep.getLocation()); //$NON-NLS-1$
}
repList.add(rep);
notifyListeners(IRepositorySetListener.REP_ADDED);
@@ -59,7 +59,7 @@
return false;
}
res = repList.remove(theRep);
- Platform.flushAuthorizationInfo(new URL(rep), "", "basic");
+ Platform.flushAuthorizationInfo(new URL(rep), "", "basic"); //$NON-NLS-1$ //$NON-NLS-2$
Activator.getLocationManager().removeRepository(theRep.getLocation());
notifyListeners(IRepositorySetListener.REP_ADDED);
commit();
@@ -94,7 +94,6 @@
fos.close();
}
- @SuppressWarnings("unchecked")
private void load() throws Exception {
repList.clear();
File repFile = Activator.getDefault().getStateLocation().
Added: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/Messages.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/Messages.java (rev 0)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/Messages.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -0,0 +1,22 @@
+package org.guvnor.tools;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+ private static final String BUNDLE_NAME = "org.guvnor.tools.messages"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+ .getBundle(BUNDLE_NAME);
+
+ private Messages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
Property changes on: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/Messages.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/actions/CommitAction.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/actions/CommitAction.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/actions/CommitAction.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -13,6 +13,7 @@
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.webdav.IResponse;
import org.guvnor.tools.Activator;
+import org.guvnor.tools.Messages;
import org.guvnor.tools.utils.ActionUtils;
import org.guvnor.tools.utils.GuvnorMetadataProps;
import org.guvnor.tools.utils.GuvnorMetadataUtils;
@@ -80,18 +81,18 @@
}
}
if (remoteProps == null) {
- throw new Exception("Could not retrieve server version of " + props.getFullpath());
+ throw new Exception("Could not retrieve server version of " + props.getFullpath()); //$NON-NLS-1$
}
// Check to make sure that the version in the repository is the same as the base
// version for the local copy
boolean proceed = true;
if (!props.getRevision().equals(remoteProps.getRevision())) {
- String msg = "The Guvnor revision for " + selectedFile.getName() + " is " +
- remoteProps.getRevision() + ", but the local copy is based on revision " +
+ String msg = Messages.getString("overwrite.confirmation.prefix") + selectedFile.getName() + Messages.getString("overwrite.confirmation.infix") + //$NON-NLS-1$ //$NON-NLS-2$
+ remoteProps.getRevision() + Messages.getString("overwrite.confirmation.suffix") + //$NON-NLS-1$
props.getRevision() +
- ".\r\nOverwrite Guvnor repository revision with current local file contents?";
+ Messages.getString("overwrite.confirmation.question"); //$NON-NLS-1$
proceed = MessageDialog.openQuestion(targetPart.getSite().getShell(),
- "Revision Conflict", msg);
+ Messages.getString("overwrite.confirmation.caption"), msg); //$NON-NLS-1$
}
if (proceed) {
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/actions/CompareVersionAction.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/actions/CompareVersionAction.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/actions/CompareVersionAction.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -86,9 +86,9 @@
String rightContents = StreamProcessingUtils.getStreamContents(response.getInputStream());
//Assuming UTF-8 for Guvnor resources...
GuvnorResourceEdition right =
- new GuvnorResourceEdition(selectedFile.getName() + ", " + revision.getRevision(),
+ new GuvnorResourceEdition(selectedFile.getName() + ", " + revision.getRevision(), //$NON-NLS-1$
ITypedElement.TEXT_TYPE,
- rightContents, "UTF-8");
+ rightContents, "UTF-8"); //$NON-NLS-1$
CompareUI.openCompareEditorOnPage(new GuvnorCompareEditorInput(left, right), page);
} catch (Exception e) {
Activator.getDefault().displayError(IStatus.ERROR, e.getMessage(), e);
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/actions/DeleteAction.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/actions/DeleteAction.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/actions/DeleteAction.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -13,6 +13,7 @@
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.webdav.IResponse;
import org.guvnor.tools.Activator;
+import org.guvnor.tools.Messages;
import org.guvnor.tools.utils.ActionUtils;
import org.guvnor.tools.utils.GuvnorMetadataProps;
import org.guvnor.tools.utils.GuvnorMetadataUtils;
@@ -52,13 +53,13 @@
}
String msg = null;
if (selectedItems.size() == 1) {
- msg = "Delete " +
- ((IFile)selectedItems.getFirstElement()).getName() + " in Guvnor?";
+ msg = Messages.getString("delete.singlefile.confirmation.prefix") + //$NON-NLS-1$
+ ((IFile)selectedItems.getFirstElement()).getName() + Messages.getString("delete.singlefile.confirmation.suffix"); //$NON-NLS-1$
} else {
- msg = "Delete these " + selectedItems.size() + " resources in Guvnor?";
+ msg = Messages.getString("delete.multifile.confirmation.prefix") + selectedItems.size() + Messages.getString("delete.multifile.confirmation.suffix"); //$NON-NLS-1$ //$NON-NLS-2$
}
if (!MessageDialog.openConfirm(targetPart.getSite().getShell(),
- "Confirm Delete", msg)) {
+ Messages.getString("delete.confirmation.dialog.caption"), msg)) { //$NON-NLS-1$
return;
}
for (Iterator it = selectedItems.iterator(); it.hasNext();) {
Added: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/messages.properties
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/messages.properties (rev 0)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/messages.properties 2008-08-29 18:10:34 UTC (rev 22244)
@@ -0,0 +1,111 @@
+10=show_revision
+11=show_datetime
+9=show_change_indicator
+action.add.rep=Add
+action.add.rep.desc=Add a Guvnor respository location
+action.delete.rep=Delete
+action.delete.rep.desc=Delete Guvnor repository location
+action.open=Open (read-only)
+action.open.desc=Opens a read-only editor with the version contents
+action.refresh.rep=Refresh
+action.refresh.rep.desc=Refreshes the current node and its children
+alreadfy.exists=\ already exists
+already.exists=\ already exists in folder
+bottom.left=Bottom left
+bottom.right=Bottom right
+copy.of=CopyOf
+delete.confirmation.dialog.caption=Confirm Delete
+delete.multifile.confirmation.prefix=Delete these
+delete.multifile.confirmation.suffix=\ resources in Guvnor?
+delete.singlefile.confirmation.prefix=Delete
+delete.singlefile.confirmation.suffix=\ in Guvnor?
+error=Error
+guvnor.repository.element=Guvnor Repository Element
+guvnor.resource.properties=Properties for element:
+history.author=Author
+history.comment=Comment
+history.date=Date
+history.rep.label=Repository:
+history.resource.label=Resource:
+history.revision=Revision
+login.dialog.caption=Guvnor Repository Log in
+login.dialog.desc=Authentication required for repository:
+login.failure.dialog.caption=Guvnor Repository Log in
+login.failure.dialog.message=Authentication failure
+mainconfig.guvnor.loc=Location:
+mainconfig.password=Password:
+mainconfig.port=Port:
+mainconfig.rep=Repository:
+mainconfig.save.password=Save user name and password
+mainconfig.save.password.warning=NOTE: Saved passwords are stored on your computer in a file that is difficult, but not impossible, for an intruder to read.
+mainconfig.user.name=User Name:
+name.conflict=Name Conflict
+name.conflict.request=Enter a new name for
+new.guvnor.loc=New Guvnor location
+new.guvnor.loc.desc=Create a new Guvnor repository connection
+new.guvnor.rep=New Guvnor repository location
+new.guvnor.rep.desc=Creates a connection to a Guvnor repository
+new.guvnor.rep.loc=New Guvnor repository location
+new.guvnor.rep.loc.desc=Creates a connection to a Guvnor repository
+no.overlay=<None>
+not.guvnor.associated=(Not associated with Guvnor)
+overwrite.confirmation.caption=Revision Conflict
+overwrite.confirmation.infix=\ is
+overwrite.confirmation.prefix=The Guvnor revision for
+overwrite.confirmation.question=.\r\nOverwrite Guvnor repository revision with current local file contents?
+overwrite.confirmation.suffix=, but the local copy is based on revision
+password=Password:
+password=Password:
+password.warning=NOTE: Saved passwords are stored on your computer in a file that is difficult, but not impossible, for an intruder to read.
+pending=Pending...
+pending=Pending...
+prepage.decoration.location=Icon decoration location:
+prepage.decoration.text=Text
+prepage.file.decoration=File Decoration
+prepage.guvnor.url.template=Guvnor URL template:
+prepage.include.change.indicator=Include change indication (>)
+prepage.include.date.time.stamp=Include date/time stamp
+prepage.include.revision=Include revision
+prepage.repository.connections=Repository Connections
+prepage.save.passwords=Save passwords in platform key-ring
+prop.created=Created
+prop.dir.value=directory
+prop.file.value=file
+prop.lastmod=Last Modified
+prop.location=Location
+prop.name=Name
+prop.rep.value=repository
+prop.revision=Revision
+prop.type=Type
+properties.basic=Basic
+properties.security=Security
+remove.rep.dialog.caption=Remove repository location
+remove.rep.dialog.msg=Confirm removing
+repository.label=Repository:
+repository.path=Path:
+repository.resource.revision=Revision:
+repository.resource.version=Version:
+save.password=Save user name and password
+select.folder=Select folder
+select.folder=Select folder:
+select.folder.desc=Select the target folder in the Guvnor repository
+select.guvnor.rep=Select Guvnor repository location
+select.guvnor.rep.desc=Select an existing Guvnor repository location or create a new one
+select.guvnor.rep.location=Select Guvnor repository location
+select.guvnor.rep.location.desc=Select an existing Guvnor repository location or create a new one
+select.location=Select location:
+select.rep.guvnor.loc=Create a new Guvnor repository location
+select.rep.guvnor.loc.desc=Use an existing Guvnor repository location
+select.resources=Select resources
+select.resources=Select resources:
+select.resources.desc=Select resources to copy from the Guvnor repository
+select.target.loc=Select copy location
+select.target.loc.desc=Select the destination location
+select.version=Select version:
+top.left=Top left
+top.right=Top right
+user.name=User Name:
+user.name=User Name:
+version.dialog.caption=Resource Versions
+version.dialog.message=Choose a version for
+warning=Warning
Property changes on: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/messages.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/perspectives/GuvnorRepExplorerPerspective.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/perspectives/GuvnorRepExplorerPerspective.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/perspectives/GuvnorRepExplorerPerspective.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -13,14 +13,14 @@
public void createInitialLayout(IPageLayout layout) {
String editorArea = layout.getEditorArea();
IFolderLayout top =
- layout.createFolder("top", IPageLayout.LEFT, 0.30f, editorArea);
+ layout.createFolder("top", IPageLayout.LEFT, 0.30f, editorArea); //$NON-NLS-1$
top.addView(IGuvnorConstants.REPVIEW_ID);
IFolderLayout botLeft =
- layout.createFolder("botleft", IPageLayout.BOTTOM, 0.70f, "top");
+ layout.createFolder("botleft", IPageLayout.BOTTOM, 0.70f, "top"); //$NON-NLS-1$ //$NON-NLS-2$
botLeft.addView(IPageLayout.ID_PROP_SHEET);
layout.addView(IGuvnorConstants.RESHISTORYVIEW_ID, IPageLayout.BOTTOM, 0.70f, editorArea);
IFolderLayout right =
- layout.createFolder("right", IPageLayout.RIGHT, 0.70f, editorArea);
+ layout.createFolder("right", IPageLayout.RIGHT, 0.70f, editorArea); //$NON-NLS-1$
right.addView(IPageLayout.ID_RES_NAV);
layout.setEditorAreaVisible(true);
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/preferences/GuvnorPreferencePage.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/preferences/GuvnorPreferencePage.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/preferences/GuvnorPreferencePage.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -16,6 +16,7 @@
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.guvnor.tools.Activator;
+import org.guvnor.tools.Messages;
import org.guvnor.tools.utils.PlatformUtils;
/**
@@ -52,16 +53,16 @@
GridLayout layout = new GridLayout();
layout.numColumns = 1;
group.setLayout(layout);
- group.setText("Repository Connections");
+ group.setText(Messages.getString("prepage.repository.connections")); //$NON-NLS-1$
Composite doubleLine = PlatformUtils.createComposite(group, 2);
- new Label(doubleLine, SWT.NONE).setText("Guvnor URL template: ");
+ new Label(doubleLine, SWT.NONE).setText(Messages.getString("prepage.guvnor.url.template")); //$NON-NLS-1$
guvnorURLTemplate = new Text(doubleLine, SWT.BORDER);
guvnorURLTemplate.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
guvnorURLTemplate.setText(getGuvnorTemplatePref());
savePassword = new Button(group, SWT.CHECK);
- savePassword.setText("Save passwords in platform key-ring");
+ savePassword.setText(Messages.getString("prepage.save.passwords")); //$NON-NLS-1$
savePassword.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
savePassword.setSelection(true);
@@ -71,10 +72,10 @@
layout = new GridLayout();
layout.numColumns = 1;
group.setLayout(layout);
- group.setText("File Decoration");
+ group.setText(Messages.getString("prepage.file.decoration")); //$NON-NLS-1$
doubleLine = PlatformUtils.createComposite(group, 2);
- new Label(doubleLine, SWT.NONE).setText("Icon decoration location: ");
+ new Label(doubleLine, SWT.NONE).setText(Messages.getString("prepage.decoration.location")); //$NON-NLS-1$
decorationIconLoc = new Combo(doubleLine, SWT.BORDER | SWT.DROP_DOWN);
String[] locs = IGuvnorPreferenceConstants.OVERLAY_LOCATIONS;
for (int i = 0; i < locs.length; i++) {
@@ -88,20 +89,20 @@
layout = new GridLayout();
layout.numColumns = 1;
textDec.setLayout(layout);
- textDec.setText("Text");
+ textDec.setText(Messages.getString("prepage.decoration.text")); //$NON-NLS-1$
incChangeIndicator = new Button(textDec, SWT.CHECK);
- incChangeIndicator.setText("Include change indication (>)");
+ incChangeIndicator.setText(Messages.getString("prepage.include.change.indicator")); //$NON-NLS-1$
incChangeIndicator.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
incChangeIndicator.setSelection(shouldShowChangeIndicator());
incRevision = new Button(textDec, SWT.CHECK);
- incRevision.setText("Include revision");
+ incRevision.setText(Messages.getString("prepage.include.revision")); //$NON-NLS-1$
incRevision.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
incRevision.setSelection(shouldShowRevision());
incDateStamp = new Button(textDec, SWT.CHECK);
- incDateStamp.setText("Include date/time stamp");
+ incDateStamp.setText(Messages.getString("prepage.include.date.time.stamp")); //$NON-NLS-1$
incDateStamp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
incDateStamp.setSelection(shouldShowTimeDateStamp());
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/preferences/IGuvnorPreferenceConstants.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/preferences/IGuvnorPreferenceConstants.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/preferences/IGuvnorPreferenceConstants.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -1,4 +1,7 @@
package org.guvnor.tools.preferences;
+
+import org.guvnor.tools.Messages;
+
/**
* Constants for Guvnor tools preference names and values.
* @author jgraham
@@ -6,21 +9,21 @@
public interface IGuvnorPreferenceConstants {
// Value is a string, specified in GUVNOR_LOC_TEMPLATE_DEFAULT
- public String GUVNOR_LOC_TEMPLATE_PREF = "guvnor_loc_template";
+ public String GUVNOR_LOC_TEMPLATE_PREF = "guvnor_loc_template"; //$NON-NLS-1$
- public String GUVNOR_LOC_TEMPLATE_DEFAULT = "http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/webdav";
+ public String GUVNOR_LOC_TEMPLATE_DEFAULT = "http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/webdav"; //$NON-NLS-1$
- public String SAVE_PASSWORDS_PREF = "save_passwords";
+ public String SAVE_PASSWORDS_PREF = "save_passwords"; //$NON-NLS-1$
// Value it an integer, specified in OVERLAY_LOCATIONS
- public String OVERLAY_LOCATION_PREF = "overlay_location";
+ public String OVERLAY_LOCATION_PREF = "overlay_location"; //$NON-NLS-1$
// Text for the corresponding IDecoration overlay locations, 0 -> 3. 4 is for "don't display"
- public String[] OVERLAY_LOCATIONS = { "Top left",
- "Top right",
- "Bottom left",
- "Bottom right",
- "<None>" };
+ public String[] OVERLAY_LOCATIONS = { Messages.getString("top.left"), //$NON-NLS-1$
+ Messages.getString("top.right"), //$NON-NLS-1$
+ Messages.getString("bottom.left"), //$NON-NLS-1$
+ Messages.getString("bottom.right"), //$NON-NLS-1$
+ Messages.getString("no.overlay") }; //$NON-NLS-1$
public int NO_OVERLAY = 4;
@@ -28,11 +31,11 @@
public int OVERLAY_LOCATION_DEFAULT = 1;
// Value is a boolean, true by default
- public String SHOW_CHANGE_INDICATOR_PREF = "show_change_indicator";
+ public String SHOW_CHANGE_INDICATOR_PREF = Messages.getString("9"); //$NON-NLS-1$
// Value is a boolean, true by default
- public String SHOW_REVISION_PREF = "show_revision";
+ public String SHOW_REVISION_PREF = Messages.getString("10"); //$NON-NLS-1$
// Value is a boolean, true by default
- public String SHOW_DATETIME_PREF = "show_datetime";
+ public String SHOW_DATETIME_PREF = Messages.getString("11"); //$NON-NLS-1$
}
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/properties/GuvnorWorkspaceFilePage.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/properties/GuvnorWorkspaceFilePage.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/properties/GuvnorWorkspaceFilePage.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -9,6 +9,7 @@
import org.eclipse.ui.IWorkbenchPropertyPage;
import org.eclipse.ui.dialogs.PropertyPage;
import org.guvnor.tools.Activator;
+import org.guvnor.tools.Messages;
import org.guvnor.tools.utils.GuvnorMetadataProps;
import org.guvnor.tools.utils.GuvnorMetadataUtils;
import org.guvnor.tools.utils.PlatformUtils;
@@ -47,28 +48,28 @@
private void addGuvnorProperties(Composite composite, GuvnorMetadataProps props) {
- new Label(composite, SWT.NONE).setText("Repository:");
+ new Label(composite, SWT.NONE).setText(Messages.getString("repository.label")); //$NON-NLS-1$
Label l = new Label(composite, SWT.NONE);
- String val = props.getRepository() != null?props.getRepository():"";
+ String val = props.getRepository() != null?props.getRepository():""; //$NON-NLS-1$
l.setText(val);
- new Label(composite, SWT.NONE).setText("Path:");
+ new Label(composite, SWT.NONE).setText(Messages.getString("repository.path")); //$NON-NLS-1$
l = new Label(composite, SWT.NONE);
- String fullpath = props.getFullpath() != null?props.getFullpath().substring(val.length()):"";
+ String fullpath = props.getFullpath() != null?props.getFullpath().substring(val.length()):""; //$NON-NLS-1$
l.setText(fullpath);
- new Label(composite, SWT.NONE).setText("Version:");
+ new Label(composite, SWT.NONE).setText(Messages.getString("repository.resource.version")); //$NON-NLS-1$
l = new Label(composite, SWT.NONE);
- val = props.getVersion() != null?props.getVersion():"";
+ val = props.getVersion() != null?props.getVersion():""; //$NON-NLS-1$
l.setText(val);
- new Label(composite, SWT.NONE).setText("Revision:");
+ new Label(composite, SWT.NONE).setText(Messages.getString("repository.resource.revision")); //$NON-NLS-1$
l = new Label(composite, SWT.NONE);
- val = props.getVersion() != null?props.getRevision():"";
+ val = props.getVersion() != null?props.getRevision():""; //$NON-NLS-1$
l.setText(val);
}
private void indicateNotGuvnorAssociated(Composite composite) {
- new Label(composite, SWT.NONE).setText("(Not associated with Guvnor)");
+ new Label(composite, SWT.NONE).setText(Messages.getString("not.guvnor.associated")); //$NON-NLS-1$
}
}
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/properties/RepositoryElementPropsDialog.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/properties/RepositoryElementPropsDialog.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/properties/RepositoryElementPropsDialog.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -21,6 +21,7 @@
import org.eclipse.ui.views.properties.IPropertySource;
import org.eclipse.ui.views.properties.TextPropertyDescriptor;
import org.guvnor.tools.Activator;
+import org.guvnor.tools.Messages;
import org.guvnor.tools.utils.PlatformUtils;
import org.guvnor.tools.views.model.TreeObject;
/**
@@ -44,20 +45,20 @@
@Override
protected Control createDialogArea(Composite parent) {
- super.setTitle("Guvnor Repository Element");
- super.setMessage("Properties for element: " + node.getName());
+ super.setTitle(Messages.getString("guvnor.repository.element")); //$NON-NLS-1$
+ super.setMessage(Messages.getString("guvnor.resource.properties") + node.getName()); //$NON-NLS-1$
super.setTitleImage(Activator.getImageDescriptor(Activator.IMG_GUVREPWIZBAN).createImage());
TabFolder folder = new TabFolder(parent, SWT.TOP);
folder.setLayoutData(new GridData(GridData.FILL_BOTH));
TabItem tab = new TabItem(folder, SWT.NONE);
- tab.setText("Basic");
+ tab.setText(Messages.getString("properties.basic")); //$NON-NLS-1$
Composite composite = PlatformUtils.createComposite(folder, 2);
tab.setControl(composite);
addElementProperties(composite);
tab = new TabItem(folder, SWT.NONE);
- tab.setText("Security");
+ tab.setText(Messages.getString("properties.security")); //$NON-NLS-1$
composite = PlatformUtils.createComposite(folder, 2);
tab.setControl(composite);
addSecurityProperties(composite);
@@ -74,21 +75,21 @@
for (int i = 0; i < desc.length; i++) {
if (desc[i] instanceof TextPropertyDescriptor) {
TextPropertyDescriptor oneDesc = (TextPropertyDescriptor)desc[i];
- new Label(composite, SWT.NONE).setText(oneDesc.getDisplayName() + ":");
+ new Label(composite, SWT.NONE).setText(oneDesc.getDisplayName() + ":"); //$NON-NLS-1$
String val = ps.getPropertyValue(oneDesc.getId()) != null?
- (String)ps.getPropertyValue(oneDesc.getId()):"";
+ (String)ps.getPropertyValue(oneDesc.getId()):""; //$NON-NLS-1$
new Label(composite, SWT.NONE).setText(val);
}
}
}
private void addSecurityProperties(Composite composite) {
- new Label(composite, SWT.NONE).setText("User Name: ");
+ new Label(composite, SWT.NONE).setText(Messages.getString("user.name")); //$NON-NLS-1$
unField = new Text(composite, SWT.SINGLE | SWT.BORDER);
unField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
unField.setEditable(false);
- new Label(composite, SWT.NONE).setText("Password: ");
+ new Label(composite, SWT.NONE).setText(Messages.getString("password")); //$NON-NLS-1$
pwField = new Text(composite, SWT.SINGLE | SWT.BORDER | SWT.PASSWORD);
pwField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
pwField.setEditable(false);
@@ -99,15 +100,15 @@
private void populateSecuritySettings() {
try {
Map info = Platform.getAuthorizationInfo(
- new URL(node.getGuvnorRepository().getLocation()), "", "basic");
+ new URL(node.getGuvnorRepository().getLocation()), "", "basic"); //$NON-NLS-1$ //$NON-NLS-2$
if (info == null) {
return;
}
- String un = (String)info.get("username");
+ String un = (String)info.get("username"); //$NON-NLS-1$
if (un != null) {
unField.setText(un);
}
- String pw = (String)info.get("password");
+ String pw = (String)info.get("password"); //$NON-NLS-1$
if (pw != null) {
pwField.setText(pw);
}
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/AuthenticationPromptDialog.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/AuthenticationPromptDialog.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/AuthenticationPromptDialog.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -15,6 +15,7 @@
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.guvnor.tools.Activator;
+import org.guvnor.tools.Messages;
import org.guvnor.tools.preferences.GuvnorPreferencePage;
/**
@@ -48,12 +49,12 @@
@Override
protected Control createDialogArea(Composite parent) {
- super.setTitle("Guvnor Repository Log in");
- super.setMessage("Authentication required for repository: " + serverName);
+ super.setTitle(Messages.getString("login.dialog.caption")); //$NON-NLS-1$
+ super.setMessage(Messages.getString("login.dialog.desc") + serverName); //$NON-NLS-1$
super.setTitleImage(Activator.getImageDescriptor(Activator.IMG_GUVREPWIZBAN).createImage());
Composite composite = PlatformUtils.createComposite(parent, 2);
- new Label(composite, SWT.NONE).setText("User Name: ");
+ new Label(composite, SWT.NONE).setText(Messages.getString("user.name")); //$NON-NLS-1$
unField = new Text(composite, SWT.SINGLE | SWT.BORDER);
unField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
unField.addModifyListener(new ModifyListener() {
@@ -62,7 +63,7 @@
}
});
- new Label(composite, SWT.NONE).setText("Password: ");
+ new Label(composite, SWT.NONE).setText(Messages.getString("password")); //$NON-NLS-1$
pwField = new Text(composite, SWT.SINGLE | SWT.BORDER | SWT.PASSWORD);
pwField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
pwField.addModifyListener(new ModifyListener() {
@@ -90,11 +91,11 @@
saveInfo = shouldSavePasswords;
cbSavePassword.setSelection(shouldSavePasswords);
- new Label(pwgroup, SWT.NONE).setText("Save user name and password");
+ new Label(pwgroup, SWT.NONE).setText(Messages.getString("save.password")); //$NON-NLS-1$
new Label(composite, SWT.NONE).setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
warningLabel = new Label(composite, SWT.WRAP);
- warningLabel.setText("NOTE: Saved passwords are stored on your computer in a file that is difficult, but not impossible, for an intruder to read.");
+ warningLabel.setText(Messages.getString("password.warning")); //$NON-NLS-1$
warningLabel.setEnabled(shouldSavePasswords);
return super.createDialogArea(parent);
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/GuvnorMetadataUtils.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/GuvnorMetadataUtils.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/GuvnorMetadataUtils.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -33,7 +33,7 @@
public static IFile findGuvnorMetadata(IResource resource) {
IFile res = null;
IPath dir = resource.getFullPath().removeLastSegments(1);
- IPath mdpath = dir.append(".guvnorinfo").append("." + resource.getName());
+ IPath mdpath = dir.append(".guvnorinfo").append("." + resource.getName()); //$NON-NLS-1$ //$NON-NLS-2$
IResource mdResource = resource.getWorkspace().getRoot().findMember(mdpath);
if (mdResource != null
&& mdResource.exists()
@@ -51,7 +51,7 @@
public static IFile findGuvnorMetadata(IPath resource) {
IFile res = null;
IPath dir = resource.removeLastSegments(1);
- IPath mdpath = dir.append(".guvnorinfo").append("." + resource.lastSegment());
+ IPath mdpath = dir.append(".guvnorinfo").append("." + resource.lastSegment()); //$NON-NLS-1$ //$NON-NLS-2$
IResource mdResource = Activator.getDefault().getWorkspace().
getRoot().findMember(mdpath);
if (mdResource != null
@@ -69,11 +69,11 @@
public static GuvnorMetadataProps loadGuvnorMetadata(IFile mdFile) throws Exception {
Properties props = new Properties();
props.load(mdFile.getContents());
- return new GuvnorMetadataProps(props.getProperty("filename"),
- props.getProperty("repository"),
- props.getProperty("fullpath"),
- props.getProperty("lastmodified"),
- props.getProperty("revision"));
+ return new GuvnorMetadataProps(props.getProperty("filename"), //$NON-NLS-1$
+ props.getProperty("repository"), //$NON-NLS-1$
+ props.getProperty("fullpath"), //$NON-NLS-1$
+ props.getProperty("lastmodified"), //$NON-NLS-1$
+ props.getProperty("revision")); //$NON-NLS-1$
}
public static GuvnorMetadataProps getGuvnorMetadata(IResource resource) throws Exception {
@@ -88,11 +88,11 @@
GuvnorMetadataProps mdProps) throws Exception {
FileOutputStream fos = new FileOutputStream(mdFile);
Properties props = new Properties();
- props.put("repository", mdProps.getRepository());
- props.put("fullpath", mdProps.getFullpath());
- props.put("filename", mdProps.getFilename());
- props.put("lastmodified", mdProps.getVersion());
- props.put("revision", mdProps.getRevision());
+ props.put("repository", mdProps.getRepository()); //$NON-NLS-1$
+ props.put("fullpath", mdProps.getFullpath()); //$NON-NLS-1$
+ props.put("filename", mdProps.getFilename()); //$NON-NLS-1$
+ props.put("lastmodified", mdProps.getVersion()); //$NON-NLS-1$
+ props.put("revision", mdProps.getRevision()); //$NON-NLS-1$
props.store(fos, null);
fos.flush();
fos.close();
@@ -102,12 +102,12 @@
GuvnorMetadataProps mdProps) throws Exception {
IWorkspaceRoot root = Activator.getDefault().getWorkspace().getRoot();
IFolder mdFolder = root.getFolder(
- controlledFile.removeLastSegments(1).append(".guvnorinfo"));
+ controlledFile.removeLastSegments(1).append(".guvnorinfo")); //$NON-NLS-1$
if (!mdFolder.exists()) {
mdFolder.create(true, true, null);
}
IFile mdFile = root.getFile(
- mdFolder.getFullPath().append("." + controlledFile.lastSegment()));
+ mdFolder.getFullPath().append("." + controlledFile.lastSegment())); //$NON-NLS-1$
Properties props = new Properties();
if (!mdFile.exists()) {
mdFile.create(new ByteArrayInputStream(new byte[] {}), true, null);
@@ -115,19 +115,19 @@
props.load(mdFile.getContents());
}
if (mdProps.getRepository() != null) {
- props.put("repository", mdProps.getRepository());
+ props.put("repository", mdProps.getRepository()); //$NON-NLS-1$
}
if (mdProps.getFullpath() != null) {
- props.put("fullpath", mdProps.getFullpath());
+ props.put("fullpath", mdProps.getFullpath()); //$NON-NLS-1$
}
if (mdProps.getFilename() != null) {
- props.put("filename", mdProps.getFilename());
+ props.put("filename", mdProps.getFilename()); //$NON-NLS-1$
}
if (mdProps.getVersion() != null) {
- props.put("lastmodified", mdProps.getVersion());
+ props.put("lastmodified", mdProps.getVersion()); //$NON-NLS-1$
}
if (mdProps.getRevision() != null) {
- props.put("revision", mdProps.getRevision());
+ props.put("revision", mdProps.getRevision()); //$NON-NLS-1$
}
OutputStream os = new FileOutputStream(
new File(mdFile.getLocation().toOSString()));
@@ -138,17 +138,17 @@
}
public static IPath createGuvnorMetadataLocation(String rootPath) throws Exception {
- IPath path = new Path(rootPath + File.separator + ".guvnorinfo");
+ IPath path = new Path(rootPath + File.separator + ".guvnorinfo"); //$NON-NLS-1$
if (!path.toFile().exists()) {
if (!path.toFile().mkdir()) {
- throw new Exception("Could not create directory " + path.toOSString());
+ throw new Exception("Could not create directory " + path.toOSString()); //$NON-NLS-1$
}
}
return path;
}
public static File getGuvnorMetadataFile(String path, String fname) {
- return new File(path + File.separator + "." + fname);
+ return new File(path + File.separator + "." + fname); //$NON-NLS-1$
}
public static IFile getGuvnorControlledResource(IResource resource) throws Exception {
@@ -156,10 +156,10 @@
if (resource instanceof IFile) {
Properties props = new Properties();
props.load(((IFile)resource).getContents());
- if (props.getProperty("filename") != null) {
+ if (props.getProperty("filename") != null) { //$NON-NLS-1$
res = (IFile)Activator.getDefault().getWorkspace().
getRoot().findMember(resource.getFullPath().
- removeLastSegments(2).append(props.getProperty("filename")));
+ removeLastSegments(2).append(props.getProperty("filename"))); //$NON-NLS-1$
}
}
return res;
@@ -167,31 +167,31 @@
public static boolean isGuvnorMetadata(IResource resource) {
return resource.getFullPath().removeLastSegments(1).
- toOSString().endsWith(".guvnorinfo");
+ toOSString().endsWith(".guvnorinfo"); //$NON-NLS-1$
}
public static void markCurrentGuvnorResource(IResource resource) throws CoreException {
- resource.setPersistentProperty(generateQualifiedName("version"), "current");
+ resource.setPersistentProperty(generateQualifiedName("version"), "current"); //$NON-NLS-1$ //$NON-NLS-2$
}
public static void markExpiredGuvnorResource(IResource resource) throws CoreException {
- resource.setPersistentProperty(generateQualifiedName("version"), "expired");
+ resource.setPersistentProperty(generateQualifiedName("version"), "expired"); //$NON-NLS-1$ //$NON-NLS-2$
}
public static String getGuvnorResourceProperty(IResource resource) throws CoreException {
- return resource.getPersistentProperty(generateQualifiedName("version"));
+ return resource.getPersistentProperty(generateQualifiedName("version")); //$NON-NLS-1$
}
public static boolean isGuvnorResourceCurrent(IResource resource) throws CoreException {
- String ver = resource.getPersistentProperty(generateQualifiedName("version"));
+ String ver = resource.getPersistentProperty(generateQualifiedName("version")); //$NON-NLS-1$
if (ver == null) {
return false;
}
- return ver.equals("current");
+ return ver.equals("current"); //$NON-NLS-1$
}
private static QualifiedName generateQualifiedName(String attr) {
- return new QualifiedName("org.guvnor.tools", attr);
+ return new QualifiedName("org.guvnor.tools", attr); //$NON-NLS-1$
}
public static ResourceHistoryEntry[] parseHistoryProperties(Properties entryProps) {
@@ -200,7 +200,7 @@
for (int i = 0; i < entryProps.size(); i++) {
String oneRevision = (String)en.nextElement();
String val = entryProps.getProperty(oneRevision);
- StringTokenizer tokens = new StringTokenizer(val, ",");
+ StringTokenizer tokens = new StringTokenizer(val, ","); //$NON-NLS-1$
String verDate = null;
String author = null;
String comment = null;
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/PlatformUtils.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/PlatformUtils.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/PlatformUtils.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -26,6 +26,7 @@
import org.eclipse.ui.PlatformUI;
import org.guvnor.tools.Activator;
import org.guvnor.tools.GuvnorDecorator;
+import org.guvnor.tools.Messages;
import org.guvnor.tools.utils.webdav.IWebDavClient;
import org.guvnor.tools.utils.webdav.WebDavClientFactory;
import org.guvnor.tools.utils.webdav.WebDavServerCache;
@@ -134,7 +135,7 @@
getEditorRegistry().getDefaultEditor(name);
// If there is no editor associated with the given file name, we'll just
// use the eclipse text editor as a default
- String editorId = desc != null?desc.getId():"org.eclipse.ui.DefaultTextEditor";
+ String editorId = desc != null?desc.getId():"org.eclipse.ui.DefaultTextEditor"; //$NON-NLS-1$
try {
if (page != null) {
page.openEditor(input, editorId);
@@ -160,22 +161,22 @@
TableColumn column = new TableColumn(table, SWT.LEFT, 0);
column.setResizable(true);
- column.setText("Revision");
+ column.setText(Messages.getString("history.revision")); //$NON-NLS-1$
column.setWidth(100);
column = new TableColumn(table, SWT.LEFT, 1);
column.setResizable(true);
- column.setText("Date");
+ column.setText(Messages.getString("history.date")); //$NON-NLS-1$
column.setWidth(175);
column = new TableColumn(table, SWT.LEFT, 2);
column.setResizable(true);
- column.setText("Author");
+ column.setText(Messages.getString("history.author")); //$NON-NLS-1$
column.setWidth(200);
column = new TableColumn(table, SWT.CENTER, 3);
column.setResizable(true);
- column.setText("Comment");
+ column.setText(Messages.getString("history.comment")); //$NON-NLS-1$
column.setWidth(350);
return table;
@@ -185,10 +186,10 @@
AuthPromptResults res = promptForAuthentication(server);
if (res != null) {
if (res.wasSaved()) {
- Platform.addAuthorizationInfo(new URL(server), "", "basic", res.getAuthInfo());
+ Platform.addAuthorizationInfo(new URL(server), "", "basic", res.getAuthInfo()); //$NON-NLS-1$ //$NON-NLS-2$
} else {
WebDavSessionAuthenticator authen = new WebDavSessionAuthenticator();
- authen.addAuthenticationInfo(new URL(server), "", "basic", res.getAuthInfo());
+ authen.addAuthenticationInfo(new URL(server), "", "basic", res.getAuthInfo()); //$NON-NLS-1$ //$NON-NLS-2$
client.setSessionAuthenticator(authen);
}
return true;
@@ -200,8 +201,8 @@
public void updateAuthentication(String server, String username,
String password, boolean saveInfo) throws Exception {
Map<String, String> info = new HashMap<String, String>();
- info.put("username", username);
- info.put("password", password);
+ info.put("username", username); //$NON-NLS-1$
+ info.put("password", password); //$NON-NLS-1$
URL serverUrl = new URL(server);
IWebDavClient client = WebDavServerCache.getWebDavClient(server);
if (client == null) {
@@ -209,11 +210,11 @@
WebDavServerCache.cacheWebDavClient(server, client);
}
if (saveInfo) {
- Platform.flushAuthorizationInfo(serverUrl, "", "basic");
- Platform.addAuthorizationInfo(serverUrl, "", "basic", info);
+ Platform.flushAuthorizationInfo(serverUrl, "", "basic"); //$NON-NLS-1$ //$NON-NLS-2$
+ Platform.addAuthorizationInfo(serverUrl, "", "basic", info); //$NON-NLS-1$ //$NON-NLS-2$
} else {
WebDavSessionAuthenticator authen = new WebDavSessionAuthenticator();
- authen.addAuthenticationInfo(new URL(server), "", "basic", info);
+ authen.addAuthenticationInfo(new URL(server), "", "basic", info); //$NON-NLS-1$ //$NON-NLS-2$
client.setSessionAuthenticator(authen);
}
}
@@ -227,8 +228,8 @@
public void run() {
Display display = Display.getCurrent();
Shell shell = display.getActiveShell();
- MessageDialog.openError(shell, "Guvnor Repository Log in",
- "Authentication failure");
+ MessageDialog.openError(shell, Messages.getString("login.failure.dialog.caption"), //$NON-NLS-1$
+ Messages.getString("login.failure.dialog.message")); //$NON-NLS-1$
}
});
}
@@ -267,8 +268,8 @@
AuthenticationPromptDialog diag = new AuthenticationPromptDialog(shell, server);
if (diag.open() == Dialog.OK) {
Map<String, String> info = new HashMap<String, String>();
- info.put("username", diag.getUserName());
- info.put("password", diag.getPassword());
+ info.put("username", diag.getUserName()); //$NON-NLS-1$
+ info.put("password", diag.getPassword()); //$NON-NLS-1$
res = new AuthPromptResults(info, diag.saveAuthenInfo());
}
}
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/StringInput.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/StringInput.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/StringInput.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -34,6 +34,6 @@
}
public String getToolTipText() {
- return "String-based file: " + storage.getName();
+ return "String-based file: " + storage.getName(); //$NON-NLS-1$
}
}
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/StringStorage.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/StringStorage.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/StringStorage.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -26,7 +26,7 @@
}
public String getName() {
- return name + " (Read only)";
+ return name + " (Read only)"; //$NON-NLS-1$
}
public boolean isReadOnly() {
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/VersionChooserDialog.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/VersionChooserDialog.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/VersionChooserDialog.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -12,6 +12,7 @@
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.guvnor.tools.Activator;
+import org.guvnor.tools.Messages;
import org.guvnor.tools.views.ResourceHistoryContentProvider;
import org.guvnor.tools.views.ResourceHistoryLabelProvider;
import org.guvnor.tools.views.model.ResourceHistoryEntry;
@@ -37,8 +38,8 @@
@Override
protected Control createDialogArea(Composite parent) {
- super.setTitle("Resource Versions");
- super.setMessage("Choose a version for " + fileName);
+ super.setTitle(Messages.getString("version.dialog.caption")); //$NON-NLS-1$
+ super.setMessage(Messages.getString("version.dialog.message") + fileName); //$NON-NLS-1$
super.setTitleImage(Activator.getImageDescriptor(Activator.IMG_GUVREPWIZBAN).createImage());
viewer = new TableViewer(PlatformUtils.createResourceHistoryTable(parent));
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/webdav/ResourceProperties.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/webdav/ResourceProperties.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/webdav/ResourceProperties.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -20,19 +20,19 @@
this.isDirectory = isDirectory;
}
public String getCreationDate() {
- return creationDate != null?creationDate:"";
+ return creationDate != null?creationDate:""; //$NON-NLS-1$
}
public void setCreationDate(String creationDate) {
this.creationDate = creationDate;
}
public String getLastModifiedDate() {
- return lastModifiedDate != null?lastModifiedDate:"";
+ return lastModifiedDate != null?lastModifiedDate:""; //$NON-NLS-1$
}
public void setLastModifiedDate(String lastModifiedDate) {
this.lastModifiedDate = lastModifiedDate;
}
public String getRevision() {
- return revision != null?revision:"";
+ return revision != null?revision:""; //$NON-NLS-1$
}
public void setRevision(String revision) {
this.revision = revision;
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/webdav/StreamProcessingUtils.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/webdav/StreamProcessingUtils.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/webdav/StreamProcessingUtils.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -23,7 +23,7 @@
return sb.toString();
}
- private static String DAV_NS = "DAV:";
+ private static String DAV_NS = "DAV:"; //$NON-NLS-1$
public static Map<String, ResourceProperties> parseListing(String base, InputStream is) throws Exception {
Map<String, ResourceProperties> res = new HashMap<String, ResourceProperties>();
@@ -31,30 +31,30 @@
factory.setNamespaceAware(true);
DocumentBuilder parser = factory.newDocumentBuilder();
Document doc = parser.parse(is);
- NodeList nl = doc.getElementsByTagNameNS(DAV_NS, "response");
+ NodeList nl = doc.getElementsByTagNameNS(DAV_NS, "response"); //$NON-NLS-1$
for (int i = 0; i < nl.getLength(); i++) {
Element oneElem = (Element)nl.item(i);
- NodeList resName = oneElem.getElementsByTagNameNS(DAV_NS, "href");
+ NodeList resName = oneElem.getElementsByTagNameNS(DAV_NS, "href"); //$NON-NLS-1$
assert(resName.getLength() == 1);
String bareName = extractOverlap(base, resName.item(0).getTextContent());
if (bareName.trim().length() > 0) {
ResourceProperties props = new ResourceProperties();
- NodeList propList = oneElem.getElementsByTagNameNS(DAV_NS, "resourcetype");
+ NodeList propList = oneElem.getElementsByTagNameNS(DAV_NS, "resourcetype"); //$NON-NLS-1$
assert(propList.getLength() == 1);
- NodeList resTypeList = ((Element)propList.item(0)).getElementsByTagNameNS(DAV_NS, "collection");
+ NodeList resTypeList = ((Element)propList.item(0)).getElementsByTagNameNS(DAV_NS, "collection"); //$NON-NLS-1$
assert(resTypeList.getLength() < 2);
if (resTypeList.getLength() == 1) {
props.setDirectory(true);
}
- propList = oneElem.getElementsByTagNameNS(DAV_NS, "creationdate");
+ propList = oneElem.getElementsByTagNameNS(DAV_NS, "creationdate"); //$NON-NLS-1$
if (propList.getLength() > 0) {
props.setCreationDate(propList.item(0).getTextContent());
}
- propList = oneElem.getElementsByTagNameNS(DAV_NS, "getlastmodified");
+ propList = oneElem.getElementsByTagNameNS(DAV_NS, "getlastmodified"); //$NON-NLS-1$
if (propList.getLength() > 0) {
props.setLastModifiedDate(propList.item(0).getTextContent());
}
- String normBase = base.trim().endsWith("/")?base.trim():base.trim() + "/";
+ String normBase = base.trim().endsWith("/")?base.trim():base.trim() + "/"; //$NON-NLS-1$ //$NON-NLS-2$
props.setBase(normBase);
res.put(bareName, props);
}
@@ -79,9 +79,9 @@
// that means the entire extension string matched in
// base, so remove the entire extension contents
if (!done) {
- res = "";
+ res = ""; //$NON-NLS-1$
}
- if (res.startsWith("/") && res.length() > 1) {
+ if (res.startsWith("/") && res.length() > 1) { //$NON-NLS-1$
res = res.substring(1);
}
//System.out.println("Returning " + res + " from " + base + ", " + extension);
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/webdav/WebDavAuthenticator.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/webdav/WebDavAuthenticator.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/webdav/WebDavAuthenticator.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -13,7 +13,6 @@
public WebDavAuthenticator() {
}
- @SuppressWarnings("unchecked")
public WebDavAuthenticator(URL serverUrl) {
this();
repLocation = serverUrl;
@@ -36,13 +35,13 @@
public Map getAuthenticationInfo(URL serverUrl,
String realm,
String scheme) {
- return Platform.getAuthorizationInfo(repLocation, "", scheme);
+ return Platform.getAuthorizationInfo(repLocation, "", scheme); //$NON-NLS-1$
}
public String getProtectionSpace(URL resourceUrl) {
// We don't have the notion of "realm," but the client
// requires a non-null return value.
- return "";
+ return ""; //$NON-NLS-1$
}
@SuppressWarnings("unchecked")
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/webdav/WebDavClient.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/webdav/WebDavClient.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/webdav/WebDavClient.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -72,7 +72,7 @@
public IContext createContext() {
IContext context = WebDAVFactory.contextFactory.newContext();
// Need to make sure the USER-AGENT header is present for Guvnor
- context.put("USER-AGENT", "guvnor");
+ context.put("USER-AGENT", "guvnor"); //$NON-NLS-1$ //$NON-NLS-2$
return context;
}
@@ -84,7 +84,7 @@
IResponse response = null;
try {
IContext context = createContext();
- context.put("Depth", "1");
+ context.put("Depth", "1"); //$NON-NLS-1$ //$NON-NLS-2$
ILocator locator = WebDAVFactory.locatorFactory.newLocator(path);
response = client.propfind(locator, context, null);
if (response.getStatusCode() != IResponse.SC_MULTI_STATUS) {
@@ -116,7 +116,7 @@
String val = guvProps.getProperty(oneKey);
if (val != null) {
ResourceProperties resProps = props.get(oneKey);
- StringTokenizer tokens = new StringTokenizer(val, ",");
+ StringTokenizer tokens = new StringTokenizer(val, ","); //$NON-NLS-1$
String dateStamp = tokens.nextToken();
String revision = tokens.nextToken();
resProps.setLastModifiedDate(dateStamp);
@@ -138,7 +138,7 @@
IResponse response = null;
try {
IContext context = createContext();
- context.put("Depth", "1");
+ context.put("Depth", "1"); //$NON-NLS-1$ //$NON-NLS-2$
ILocator locator = WebDAVFactory.locatorFactory.newLocator(resource);
response = client.propfind(locator, context, null);
if (response.getStatusCode() != IResponse.SC_MULTI_STATUS
@@ -146,9 +146,9 @@
throw new WebDavException(response);
}
Map<String, ResourceProperties> props =
- StreamProcessingUtils.parseListing("", response.getInputStream());
+ StreamProcessingUtils.parseListing("", response.getInputStream()); //$NON-NLS-1$
if (props.keySet().size() != 1) {
- throw new Exception(props.keySet().size() + " entries found for " + resource);
+ throw new Exception(props.keySet().size() + " entries found for " + resource); //$NON-NLS-1$
}
String fullpath = props.keySet().iterator().next();
ResourceProperties res = props.get(fullpath);
@@ -183,13 +183,13 @@
guvProps.load(response.getInputStream());
String val = guvProps.getProperty(filename);
if (val != null) {
- StringTokenizer tokens = new StringTokenizer(val, ",");
+ StringTokenizer tokens = new StringTokenizer(val, ","); //$NON-NLS-1$
String dateStamp = tokens.nextToken();
String revision = tokens.nextToken();
props.setLastModifiedDate(dateStamp);
props.setRevision(revision);
} else {
- Exception nfe = new Exception("Failed to get Guvnor properties for " + filename);
+ Exception nfe = new Exception("Failed to get Guvnor properties for " + filename); //$NON-NLS-1$
Activator.getDefault().writeLog(IStatus.WARNING, nfe.getMessage(), nfe);
}
} finally {
@@ -220,7 +220,7 @@
* @see org.guvnor.tools.utils.webdav.IWebDavClient#getResourceVersionContents(java.lang.String, java.lang.String)
*/
public String getResourceVersionContents(String resource, String version) throws Exception {
- String apiVer = changeToAPICall(resource) + "?version=" + version;
+ String apiVer = changeToAPICall(resource) + "?version=" + version; //$NON-NLS-1$
return getResourceContents(apiVer);
}
@@ -242,7 +242,7 @@
* @see org.guvnor.tools.utils.webdav.IWebDavClient#getResourceVersionInputStream(java.lang.String, java.lang.String)
*/
public IResponse getResourceVersionInputStream(String resource, String version) throws Exception {
- String apiVer = changeToAPICall(resource) + "?version=" + version;
+ String apiVer = changeToAPICall(resource) + "?version=" + version; //$NON-NLS-1$
return getResourceInputStream(apiVer);
}
@@ -315,7 +315,7 @@
* @see org.guvnor.tools.utils.webdav.IWebDavClient#getResourceVersions(java.lang.String)
*/
public IResponse getResourceVersions(String resource) throws Exception {
- String apiVer = changeToAPICall(resource) + "?version=all";
+ String apiVer = changeToAPICall(resource) + "?version=all"; //$NON-NLS-1$
return getResourceInputStream(apiVer);
}
@@ -343,6 +343,6 @@
* Converts the WedDav resource path to a Guvnor "API path."
*/
private String changeToAPICall(String path) {
- return path.replaceFirst("/webdav/", "/api/");
+ return path.replaceFirst("/webdav/", "/api/"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
\ No newline at end of file
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/webdav/WebDavException.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/webdav/WebDavException.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/webdav/WebDavException.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -9,8 +9,8 @@
private int errCode;
public WebDavException(IResponse response) {
- super("WebDav error: " + response.getStatusMessage() +
- " (" + response.getStatusCode() + ")");
+ super("WebDav error: " + response.getStatusMessage() + //$NON-NLS-1$
+ " (" + response.getStatusCode() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
this.errCode = response.getStatusCode();
}
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/webdav/WebDavSessionAuthenticator.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/webdav/WebDavSessionAuthenticator.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/utils/webdav/WebDavSessionAuthenticator.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -65,7 +65,7 @@
public String getProtectionSpace(URL resourceUrl) {
// We don't have the notion of "realm," but the client
// requires a non-null return value.
- return "";
+ return ""; //$NON-NLS-1$
}
@SuppressWarnings("unchecked")
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/IGuvnorConstants.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/IGuvnorConstants.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/IGuvnorConstants.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -1,6 +1,6 @@
package org.guvnor.tools.views;
public interface IGuvnorConstants {
- public final static String REPVIEW_ID = "org.guvnor.tools.views.RepositoryView";
- public static final String RESHISTORYVIEW_ID = "org.guvnor.tools.views.ResourceHistoryView";
+ public final static String REPVIEW_ID = "org.guvnor.tools.views.RepositoryView"; //$NON-NLS-1$
+ public static final String RESHISTORYVIEW_ID = "org.guvnor.tools.views.ResourceHistoryView"; //$NON-NLS-1$
}
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/RepositoryContentProvider.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/RepositoryContentProvider.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/RepositoryContentProvider.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -88,7 +88,7 @@
private void initialize() {
boolean shouldAdd = true;
- invisibleRoot = new TreeParent("", TreeObject.Type.NONE);
+ invisibleRoot = new TreeParent("", TreeObject.Type.NONE); //$NON-NLS-1$
List<GuvnorRepository> reps = Activator.getLocationManager().getRepositories();
for (int i = 0; i < reps.size(); i++) {
if (repUrl != null) {
@@ -105,7 +105,7 @@
TreeObject.Type.REPOSITORY);
p.setGuvnorRepository(reps.get(i));
ResourceProperties props = new ResourceProperties();
- props.setBase("");
+ props.setBase(""); //$NON-NLS-1$
p.setResourceProps(props);
invisibleRoot.addChild(p);
}
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/RepositoryLabelProvider.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/RepositoryLabelProvider.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/RepositoryLabelProvider.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -6,6 +6,7 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.progress.PendingUpdateAdapter;
import org.guvnor.tools.Activator;
+import org.guvnor.tools.Messages;
import org.guvnor.tools.views.model.TreeParent;
import org.guvnor.tools.views.model.TreeObject.Type;
@@ -18,7 +19,7 @@
public String getText(Object obj) {
if (obj instanceof PendingUpdateAdapter) {
- return "Pending...";
+ return Messages.getString("pending"); //$NON-NLS-1$
} else {
return obj.toString();
}
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/RepositoryView.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/RepositoryView.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/RepositoryView.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -41,6 +41,7 @@
import org.eclipse.ui.part.ViewPart;
import org.guvnor.tools.Activator;
import org.guvnor.tools.GuvnorRepository;
+import org.guvnor.tools.Messages;
import org.guvnor.tools.GuvnorLocationManager.IRepositorySetListener;
import org.guvnor.tools.utils.GuvnorMetadataProps;
import org.guvnor.tools.utils.GuvnorMetadataUtils;
@@ -152,7 +153,7 @@
IPath path = new Path(Activator.getDefault().getStateLocation().toOSString() +
File.separator + new UID().toString());
if (!path.toFile().mkdir()) {
- throw new Exception("Could not create directory " + path.toOSString());
+ throw new Exception("Could not create directory " + path.toOSString()); //$NON-NLS-1$
}
path.toFile().deleteOnExit();
File transfer = new File(path + File.separator + node.getName());
@@ -192,7 +193,7 @@
}
private void hookContextMenu() {
- MenuManager menuMgr = new MenuManager("#PopupMenu");
+ MenuManager menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager manager) {
@@ -243,15 +244,15 @@
if (obj instanceof TreeParent) {
GuvnorRepository rep = ((TreeParent)obj).getGuvnorRepository();
if (MessageDialog.openConfirm(RepositoryView.this.getSite().getShell(),
- "Remove repository location", "Confirm removing " +
+ Messages.getString("remove.rep.dialog.caption"), Messages.getString("remove.rep.dialog.msg") + //$NON-NLS-1$ //$NON-NLS-2$
rep.getLocation())) {
Activator.getLocationManager().removeRepository(rep.getLocation());
}
}
}
};
- deleteRepositoryLocAction.setText("Delete");
- deleteRepositoryLocAction.setToolTipText("Delete Guvnor repository location");
+ deleteRepositoryLocAction.setText(Messages.getString("action.delete.rep")); //$NON-NLS-1$
+ deleteRepositoryLocAction.setToolTipText(Messages.getString("action.delete.rep.desc")); //$NON-NLS-1$
deleteRepositoryLocAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().
getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
@@ -265,8 +266,8 @@
dialog.open();
}
};
- addRepositoryLocAction.setText("Add");
- addRepositoryLocAction.setToolTipText("Add a Guvnor respository location");
+ addRepositoryLocAction.setText(Messages.getString("action.add.rep")); //$NON-NLS-1$
+ addRepositoryLocAction.setToolTipText(Messages.getString("action.add.rep.desc")); //$NON-NLS-1$
addRepositoryLocAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().
getImageDescriptor(ISharedImages.IMG_TOOL_NEW_WIZARD));
@@ -291,8 +292,8 @@
}
}
};
- refreshAction.setText("Refresh");
- refreshAction.setToolTipText("Refreshes the current node and its children");
+ refreshAction.setText(Messages.getString("action.refresh.rep")); //$NON-NLS-1$
+ refreshAction.setToolTipText(Messages.getString("action.refresh.rep.desc")); //$NON-NLS-1$
refreshAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().
getImageDescriptor(ISharedImages.IMG_TOOL_REDO));
}
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/ResourceHistoryView.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/ResourceHistoryView.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/ResourceHistoryView.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -28,6 +28,7 @@
import org.eclipse.ui.part.ViewPart;
import org.eclipse.webdav.IResponse;
import org.guvnor.tools.Activator;
+import org.guvnor.tools.Messages;
import org.guvnor.tools.utils.GuvnorMetadataUtils;
import org.guvnor.tools.utils.PlatformUtils;
import org.guvnor.tools.utils.webdav.IWebDavClient;
@@ -77,11 +78,11 @@
Composite composite = PlatformUtils.createComposite(parent, 1);
repositoryLabel = new Label(composite, SWT.NONE);
- repositoryLabel.setText("Repository: ");
+ repositoryLabel.setText(Messages.getString("history.rep.label")); //$NON-NLS-1$
repositoryLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
resourceLabel = new Label(composite, SWT.NONE);
- resourceLabel.setText("Resource: ");
+ resourceLabel.setText(Messages.getString("history.resource.label")); //$NON-NLS-1$
resourceLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
viewer = new TableViewer(PlatformUtils.createResourceHistoryTable(composite));
@@ -98,7 +99,7 @@
}
private void hookContextMenu() {
- MenuManager menuMgr = new MenuManager("#PopupMenu");
+ MenuManager menuMgr = new MenuManager("#PopupMenu"); //$NON-NLS-1$
menuMgr.setRemoveAllWhenShown(true);
menuMgr.addMenuListener(new IMenuListener() {
public void menuAboutToShow(IMenuManager manager) {
@@ -131,8 +132,8 @@
showResourceVersionContents();
}
};
- showVersionAction.setText("Open (read-only)");
- showVersionAction.setToolTipText("Opens a read-only editor with the version contents");
+ showVersionAction.setText(Messages.getString("action.open")); //$NON-NLS-1$
+ showVersionAction.setToolTipText(Messages.getString("action.open.desc")); //$NON-NLS-1$
showVersionAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().
getImageDescriptor(ISharedImages.IMG_OBJ_FILE));
}
@@ -166,14 +167,14 @@
}
if (contents != null) {
String editorTitle = null;
- int pos = fullPath.lastIndexOf("/");
+ int pos = fullPath.lastIndexOf("/"); //$NON-NLS-1$
if (pos != -1
&& pos + 1 < fullPath.length()) {
editorTitle = fullPath.substring(pos + 1);
} else {
editorTitle = fullPath;
}
- PlatformUtils.openEditor(contents, editorTitle + ", " + theEntry.getRevision());
+ PlatformUtils.openEditor(contents, editorTitle + ", " + theEntry.getRevision()); //$NON-NLS-1$
}
} catch (Exception e) {
Activator.getDefault().displayError(IStatus.ERROR, e.getMessage(), e);
@@ -189,9 +190,9 @@
}
public void setEntries(String repository, String fullPath, Properties entryProps) {
- repositoryLabel.setText("Repository: " + repository);
+ repositoryLabel.setText(Messages.getString("history.rep.label") + repository); //$NON-NLS-1$
repositoryLabel.setToolTipText(repository);
- resourceLabel.setText("Resource: " + fullPath.substring(repository.length()));
+ resourceLabel.setText(Messages.getString("history.resource.label") + fullPath.substring(repository.length())); //$NON-NLS-1$
resourceLabel.setToolTipText(fullPath);
ResourceHistoryEntry[] entries = GuvnorMetadataUtils.parseHistoryProperties(entryProps);
viewer.setContentProvider(new ResourceHistoryContentProvider(entries));
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/model/ResourceHistoryEntry.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/model/ResourceHistoryEntry.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/model/ResourceHistoryEntry.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -20,15 +20,15 @@
}
public String getRevision() {
- return revision != null?revision:"";
+ return revision != null?revision:""; //$NON-NLS-1$
}
public String getDate() {
- return date != null?date:"";
+ return date != null?date:""; //$NON-NLS-1$
}
public String getAuthor() {
- return author != null?author:"";
+ return author != null?author:""; //$NON-NLS-1$
}
public String getComment() {
- return comment != null?comment:"";
+ return comment != null?comment:""; //$NON-NLS-1$
}
}
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/model/TreeObject.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/model/TreeObject.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/model/TreeObject.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -69,10 +69,10 @@
}
public String getFullPath() {
if (props.getBase().trim().length() > 0) {
- if (props.getBase().endsWith("/")) {
+ if (props.getBase().endsWith("/")) { //$NON-NLS-1$
return props.getBase() + getName();
} else {
- return props.getBase() + "/" + getName();
+ return props.getBase() + "/" + getName(); //$NON-NLS-1$
}
} else {
return getName();
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/model/TreeParent.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/model/TreeParent.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/model/TreeParent.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -14,6 +14,7 @@
import org.eclipse.webdav.IResponse;
import org.guvnor.tools.Activator;
import org.guvnor.tools.GuvnorRepository;
+import org.guvnor.tools.Messages;
import org.guvnor.tools.utils.PlatformUtils;
import org.guvnor.tools.utils.webdav.IWebDavClient;
import org.guvnor.tools.utils.webdav.ResourceProperties;
@@ -57,13 +58,13 @@
TreeParent node = (TreeParent)object;
if (node.getNodeType() == Type.NONE) {
List<GuvnorRepository> reps = Activator.getLocationManager().getRepositories();
- monitor.beginTask("Pending...", reps.size());
+ monitor.beginTask(Messages.getString("pending"), reps.size()); //$NON-NLS-1$
for (int i = 0; i < reps.size(); i++) {
TreeParent p = new TreeParent(reps.get(i).getLocation(), Type.REPOSITORY);
p.setParent(node);
p.setGuvnorRepository(reps.get(i));
ResourceProperties props = new ResourceProperties();
- props.setBase("");
+ props.setBase(""); //$NON-NLS-1$
p.setResourceProps(props);
collector.add(p, monitor);
monitor.worked(1);
@@ -85,7 +86,7 @@
public void listDirectory(TreeParent node,
IElementCollector collector,
IProgressMonitor monitor) {
- monitor.beginTask("Pending...", 1);
+ monitor.beginTask(Messages.getString("pending"), 1); //$NON-NLS-1$
monitor.worked(1);
GuvnorRepository rep = node.getGuvnorRepository();
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/model/TreePropertyProvider.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/model/TreePropertyProvider.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/model/TreePropertyProvider.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -3,6 +3,7 @@
import org.eclipse.ui.views.properties.IPropertyDescriptor;
import org.eclipse.ui.views.properties.IPropertySource;
import org.eclipse.ui.views.properties.TextPropertyDescriptor;
+import org.guvnor.tools.Messages;
public class TreePropertyProvider implements IPropertySource {
@@ -18,43 +19,43 @@
public IPropertyDescriptor[] getPropertyDescriptors() {
return new IPropertyDescriptor[] {
- new TextPropertyDescriptor("name", "Name"),
- new TextPropertyDescriptor("location", "Location"),
- new TextPropertyDescriptor("type", "Type"),
- new TextPropertyDescriptor("creationdate", "Created"),
- new TextPropertyDescriptor("lastmodified", "Last Modified"),
- new TextPropertyDescriptor("revision", "Revision")
+ new TextPropertyDescriptor("name", Messages.getString("prop.name")), //$NON-NLS-1$ //$NON-NLS-2$
+ new TextPropertyDescriptor("location", Messages.getString("prop.location")), //$NON-NLS-1$ //$NON-NLS-2$
+ new TextPropertyDescriptor("type", Messages.getString("prop.type")), //$NON-NLS-1$ //$NON-NLS-2$
+ new TextPropertyDescriptor("creationdate", Messages.getString("prop.created")), //$NON-NLS-1$ //$NON-NLS-2$
+ new TextPropertyDescriptor("lastmodified", Messages.getString("prop.lastmod")), //$NON-NLS-1$ //$NON-NLS-2$
+ new TextPropertyDescriptor("revision", Messages.getString("prop.revision")) //$NON-NLS-1$ //$NON-NLS-2$
};
}
public Object getPropertyValue(Object id) {
- if (id.equals("name")) {
+ if (id.equals("name")) { //$NON-NLS-1$
return node.getName();
}
- if (id.equals("location")) {
+ if (id.equals("location")) { //$NON-NLS-1$
return node.getFullPath().substring(node.getGuvnorRepository().getLocation().length());
}
- if (id.equals("type")) {
+ if (id.equals("type")) { //$NON-NLS-1$
if (node.getNodeType() == TreeObject.Type.REPOSITORY) {
- return "repository";
+ return Messages.getString("prop.rep.value"); //$NON-NLS-1$
}
if (node.getNodeType() == TreeObject.Type.PACKAGE) {
- return "directory";
+ return Messages.getString("prop.dir.value"); //$NON-NLS-1$
}
if (node.getNodeType() == TreeObject.Type.RESOURCE) {
- return "file";
+ return Messages.getString("prop.file.value"); //$NON-NLS-1$
}
}
- if (id.equals("creationdate")) {
+ if (id.equals("creationdate")) { //$NON-NLS-1$
return node.getResourceProps().getCreationDate();
}
- if (id.equals("lastmodified")) {
+ if (id.equals("lastmodified")) { //$NON-NLS-1$
return node.getResourceProps().getLastModifiedDate();
}
- if (id.equals("revision")) {
+ if (id.equals("revision")) { //$NON-NLS-1$
return node.getResourceProps().getRevision();
}
- return "";
+ return ""; //$NON-NLS-1$
}
public boolean isPropertySet(Object id) {
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/AddResourceWizard.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/AddResourceWizard.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/AddResourceWizard.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -13,6 +13,7 @@
import org.eclipse.ui.IWorkbench;
import org.eclipse.webdav.IResponse;
import org.guvnor.tools.Activator;
+import org.guvnor.tools.Messages;
import org.guvnor.tools.utils.GuvnorMetadataProps;
import org.guvnor.tools.utils.GuvnorMetadataUtils;
import org.guvnor.tools.utils.PlatformUtils;
@@ -46,19 +47,19 @@
@Override
public void addPages() {
- selectRepPage = new SelectGuvnorRepPage("select_rep_page", "Select Guvnor repository location",
+ selectRepPage = new SelectGuvnorRepPage("select_rep_page", Messages.getString("select.guvnor.rep.location"), //$NON-NLS-1$ //$NON-NLS-2$
Activator.getImageDescriptor(Activator.IMG_GUVREPWIZBAN));
- selectRepPage.setDescription("Select an existing Guvnor repository location or create a new one");
+ selectRepPage.setDescription(Messages.getString("select.guvnor.rep.location.desc")); //$NON-NLS-1$
super.addPage(selectRepPage);
- mainConfigPage = new GuvnorMainConfigPage("config_page", "New Guvnor repository location",
+ mainConfigPage = new GuvnorMainConfigPage("config_page", Messages.getString("new.guvnor.rep.loc"), //$NON-NLS-1$ //$NON-NLS-2$
Activator.getImageDescriptor(Activator.IMG_GUVREPWIZBAN));
- mainConfigPage.setDescription("Creates a connection to a Guvnor repository");
+ mainConfigPage.setDescription(Messages.getString("new.guvnor.rep.loc.desc")); //$NON-NLS-1$
super.addPage(mainConfigPage);
- selectFolderPage = new SelectGuvnorFolderPage("select_folder_page", "Select folder",
+ selectFolderPage = new SelectGuvnorFolderPage("select_folder_page", Messages.getString("select.folder"), //$NON-NLS-1$ //$NON-NLS-2$
Activator.getImageDescriptor(Activator.IMG_GUVREPWIZBAN));
- selectFolderPage.setDescription("Select the target folder in the Guvnor repository");
+ selectFolderPage.setDescription(Messages.getString("select.folder.desc")); //$NON-NLS-1$
super.addPage(selectFolderPage);
super.addPages();
@@ -66,14 +67,14 @@
@Override
public IWizardPage getNextPage(IWizardPage page) {
- if (page.getName().equals("select_rep_page")) {
+ if (page.getName().equals("select_rep_page")) { //$NON-NLS-1$
if (model.shouldCreateNewRep()) {
return mainConfigPage;
} else {
return selectFolderPage;
}
}
- if (page.getName().equals("config_page")) {
+ if (page.getName().equals("config_page")) { //$NON-NLS-1$
return selectFolderPage;
}
return null;
@@ -81,7 +82,7 @@
private void setDuplicateFileError(IFile selectedFile) {
selectFolderPage.setErrorMessage(selectedFile.getName() +
- " already exists in folder " +
+ Messages.getString("already.exists") + //$NON-NLS-1$
model.getTargetLocation());
model.setTargetLocation(null);
super.getContainer().updateButtons();
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/CheckoutWizard.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/CheckoutWizard.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/CheckoutWizard.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -15,6 +15,7 @@
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
import org.guvnor.tools.Activator;
+import org.guvnor.tools.Messages;
import org.guvnor.tools.utils.GuvnorMetadataProps;
import org.guvnor.tools.utils.GuvnorMetadataUtils;
import org.guvnor.tools.utils.webdav.IWebDavClient;
@@ -45,24 +46,24 @@
@Override
public void addPages() {
- selectRepPage = new SelectGuvnorRepPage("select_rep_page", "Select Guvnor repository location",
+ selectRepPage = new SelectGuvnorRepPage("select_rep_page", Messages.getString("select.guvnor.rep"), //$NON-NLS-1$ //$NON-NLS-2$
Activator.getImageDescriptor(Activator.IMG_GUVREPWIZBAN));
- selectRepPage.setDescription("Select an existing Guvnor repository location or create a new one");
+ selectRepPage.setDescription(Messages.getString("select.guvnor.rep.desc")); //$NON-NLS-1$
super.addPage(selectRepPage);
- mainConfigPage = new GuvnorMainConfigPage("config_page", "New Guvnor repository location",
+ mainConfigPage = new GuvnorMainConfigPage("config_page", Messages.getString("new.guvnor.rep"), //$NON-NLS-1$ //$NON-NLS-2$
Activator.getImageDescriptor(Activator.IMG_GUVREPWIZBAN));
- mainConfigPage.setDescription("Creates a connection to a Guvnor repository");
+ mainConfigPage.setDescription(Messages.getString("new.guvnor.rep.desc")); //$NON-NLS-1$
super.addPage(mainConfigPage);
- selectResPage = new SelectGuvnorResourcesPage("select_res_page", "Select resources",
+ selectResPage = new SelectGuvnorResourcesPage("select_res_page", Messages.getString("select.resources"), //$NON-NLS-1$ //$NON-NLS-2$
Activator.getImageDescriptor(Activator.IMG_GUVREPWIZBAN));
- selectResPage.setDescription("Select resources to copy from the Guvnor repository");
+ selectResPage.setDescription(Messages.getString("select.resources.desc")); //$NON-NLS-1$
super.addPage(selectResPage);
- selectLocalTargetPage = new SelectLocalTargetPage("local_target_page", "Select copy location",
+ selectLocalTargetPage = new SelectLocalTargetPage("local_target_page", Messages.getString("select.target.loc"), //$NON-NLS-1$ //$NON-NLS-2$
Activator.getImageDescriptor(Activator.IMG_GUVREPWIZBAN));
- selectLocalTargetPage.setDescription("Select the destination location");
+ selectLocalTargetPage.setDescription(Messages.getString("select.target.loc.desc")); //$NON-NLS-1$
super.addPage(selectLocalTargetPage);
// selectVerPage = new SelectResourceVersionPage("select_version_page", "Select resource versions",
@@ -75,17 +76,17 @@
@Override
public IWizardPage getNextPage(IWizardPage page) {
- if (page.getName().equals("select_rep_page")) {
+ if (page.getName().equals("select_rep_page")) { //$NON-NLS-1$
if (model.shouldCreateNewRep()) {
return mainConfigPage;
} else {
return selectResPage;
}
}
- if (page.getName().equals("config_page")) {
+ if (page.getName().equals("config_page")) { //$NON-NLS-1$
return selectResPage;
}
- if (page.getName().equals("select_res_page")) {
+ if (page.getName().equals("select_res_page")) { //$NON-NLS-1$
return selectLocalTargetPage;
}
return null;
@@ -103,7 +104,7 @@
// Get the metadata properties
ResourceProperties resprops = webdav.queryProperties(oneResource);
if (resprops == null) {
- throw new Exception("Null resource properties for " + oneResource);
+ throw new Exception("Null resource properties for " + oneResource); //$NON-NLS-1$
}
String contents = webdav.getResourceContents(oneResource);
IPath targetLocation = new Path(model.getTargetLocation());
@@ -142,9 +143,9 @@
final IWorkspaceRoot root = Activator.getDefault().getWorkspace().getRoot();
final IPath basePath = conflictingFile.getFullPath().removeLastSegments(1);
InputDialog dialog = new InputDialog(super.getShell(),
- "Name Conflict",
- "Enter a new name for " + conflictingFile.getName(),
- "CopyOf" + conflictingFile.getName(),
+ Messages.getString("name.conflict"), //$NON-NLS-1$
+ Messages.getString("name.conflict.request") + conflictingFile.getName(), //$NON-NLS-1$
+ Messages.getString("copy.of") + conflictingFile.getName(), //$NON-NLS-1$
new IInputValidator() {
public String isValid(String newText) {
IFile temp = root.getFile(basePath.append(newText));
@@ -152,7 +153,7 @@
|| !temp.exists()) {
return null;
} else {
- return newText + " already exists";
+ return newText + Messages.getString("alreadfy.exists"); //$NON-NLS-1$
}
}
});
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/GuvWizardModel.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/GuvWizardModel.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/GuvWizardModel.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -21,13 +21,13 @@
this.repLocation = repLocation;
}
public String getUsername() {
- return username != null?username:"";
+ return username != null?username:""; //$NON-NLS-1$
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
- return password != null?password:"";
+ return password != null?password:""; //$NON-NLS-1$
}
public void setPassword(String password) {
this.password = password;
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/GuvnorMainConfigPage.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/GuvnorMainConfigPage.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/GuvnorMainConfigPage.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -24,6 +24,7 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.guvnor.tools.Activator;
+import org.guvnor.tools.Messages;
import org.guvnor.tools.preferences.GuvnorPreferencePage;
import org.guvnor.tools.utils.PlatformUtils;
@@ -51,7 +52,7 @@
public void createControl(Composite parent) {
Composite composite = PlatformUtils.createComposite(parent, 2);
- new Label(composite, SWT.NONE).setText("Location: ");
+ new Label(composite, SWT.NONE).setText(Messages.getString("mainconfig.guvnor.loc")); //$NON-NLS-1$
serverField = new Text(composite, SWT.SINGLE | SWT.BORDER);
serverField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
serverField.addModifyListener(new ModifyListener() {
@@ -63,7 +64,7 @@
serverField.setFocus();
- new Label(composite, SWT.NONE).setText("Port: ");
+ new Label(composite, SWT.NONE).setText(Messages.getString("mainconfig.port")); //$NON-NLS-1$
portField = new Text(composite, SWT.SINGLE | SWT.BORDER);
portField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
portField.addModifyListener(new ModifyListener() {
@@ -72,7 +73,7 @@
}
});
- new Label(composite, SWT.NONE).setText("Repository: ");
+ new Label(composite, SWT.NONE).setText(Messages.getString("mainconfig.rep")); //$NON-NLS-1$
replocField = new Text(composite, SWT.SINGLE | SWT.BORDER);
replocField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
replocField.addModifyListener(new ModifyListener() {
@@ -81,7 +82,7 @@
}
});
- new Label(composite, SWT.NONE).setText("User Name: ");
+ new Label(composite, SWT.NONE).setText(Messages.getString("mainconfig.user.name")); //$NON-NLS-1$
unField = new Text(composite, SWT.SINGLE | SWT.BORDER);
unField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
unField.addModifyListener(new ModifyListener() {
@@ -90,7 +91,7 @@
}
});
- new Label(composite, SWT.NONE).setText("Password: ");
+ new Label(composite, SWT.NONE).setText(Messages.getString("mainconfig.password")); //$NON-NLS-1$
pwField = new Text(composite, SWT.SINGLE | SWT.BORDER | SWT.PASSWORD);
pwField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
pwField.addModifyListener(new ModifyListener() {
@@ -120,10 +121,10 @@
saveAuthInfo = shouldSavePasswords;
cbSavePassword.setSelection(shouldSavePasswords);
- new Label(pwgroup, SWT.NONE).setText("Save user name and password");
+ new Label(pwgroup, SWT.NONE).setText(Messages.getString("mainconfig.save.password")); //$NON-NLS-1$
new Label(composite, SWT.NONE).setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
warningLabel = new Label(composite, SWT.WRAP);
- warningLabel.setText("NOTE: Saved passwords are stored on your computer in a file that is difficult, but not impossible, for an intruder to read.");
+ warningLabel.setText(Messages.getString("mainconfig.save.password.warning")); //$NON-NLS-1$
warningLabel.setEnabled(shouldSavePasswords);
super.setControl(composite);
@@ -218,19 +219,19 @@
// Try to construct a valid URL from the text boxes
String repPath = null;
if (replocField.getText().trim().length() > 0) {
- if (replocField.getText().startsWith("/")) {
+ if (replocField.getText().startsWith("/")) { //$NON-NLS-1$
repPath = replocField.getText();
} else {
- repPath = "/" + replocField.getText();
+ repPath = "/" + replocField.getText(); //$NON-NLS-1$
}
} else {
- repPath = "";
+ repPath = ""; //$NON-NLS-1$
}
if (portField.getText().trim().length() > 0) {
int port = Integer.parseInt(portField.getText());
- res = new URL("http", serverField.getText(), port, repPath);
+ res = new URL("http", serverField.getText(), port, repPath); //$NON-NLS-1$
} else {
- res = new URL("http", serverField.getText(), repPath);
+ res = new URL("http", serverField.getText(), repPath); //$NON-NLS-1$
}
return res;
}
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/NewRepLocationWizard.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/NewRepLocationWizard.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/NewRepLocationWizard.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -6,6 +6,7 @@
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
import org.guvnor.tools.Activator;
+import org.guvnor.tools.Messages;
public class NewRepLocationWizard extends Wizard implements INewWizard, IGuvnorWizard {
@@ -19,9 +20,9 @@
@Override
public void addPages() {
- mainPage = new GuvnorMainConfigPage("config_page", "New Guvnor location",
+ mainPage = new GuvnorMainConfigPage("config_page", Messages.getString("new.guvnor.loc"), //$NON-NLS-1$ //$NON-NLS-2$
Activator.getImageDescriptor(Activator.IMG_GUVLOCADD));
- mainPage.setDescription("Create a new Guvnor repository connection");
+ mainPage.setDescription(Messages.getString("new.guvnor.loc.desc")); //$NON-NLS-1$
super.addPage(mainPage);
super.addPages();
}
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/SelectGuvnorFolderPage.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/SelectGuvnorFolderPage.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/SelectGuvnorFolderPage.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -15,6 +15,7 @@
import org.eclipse.swt.widgets.Label;
import org.guvnor.tools.Activator;
import org.guvnor.tools.GuvnorRepository;
+import org.guvnor.tools.Messages;
import org.guvnor.tools.utils.PlatformUtils;
import org.guvnor.tools.views.RepositoryContentProvider;
import org.guvnor.tools.views.RepositoryLabelProvider;
@@ -36,7 +37,7 @@
public void createControl(Composite parent) {
Composite composite = PlatformUtils.createComposite(parent, 1);
- new Label(composite, SWT.NONE).setText("Select folder:");
+ new Label(composite, SWT.NONE).setText(Messages.getString("select.folder")); //$NON-NLS-1$
viewer = new TreeViewer(composite, SWT.BORDER | SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL);
viewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
@@ -52,7 +53,7 @@
// The snapshots directory in Guvnor is read-only for Eclipse tools
if (element instanceof TreeObject) {
TreeObject o = (TreeObject)element;
- return o.getFullPath().indexOf("/snapshots/") == -1;
+ return o.getFullPath().indexOf("/snapshots/") == -1; //$NON-NLS-1$
} else {
return true;
}
@@ -115,7 +116,6 @@
super.setVisible(visible);
}
- @SuppressWarnings("unchecked")
private void updateModel() {
if (super.getErrorMessage() != null) {
super.setErrorMessage(null);
@@ -127,7 +127,7 @@
if (node.getNodeType() == TreeObject.Type.PACKAGE
|| node.getNodeType() == TreeObject.Type.REPOSITORY) {
viewer.expandToLevel(node, 1);
- String base = node.getFullPath().endsWith("/")?node.getFullPath():node.getFullPath() + "/";
+ String base = node.getFullPath().endsWith("/")?node.getFullPath():node.getFullPath() + "/"; //$NON-NLS-1$ //$NON-NLS-2$
model.setTargetLocation(base);
super.getWizard().getContainer().updateButtons();
} else {
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/SelectGuvnorRepPage.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/SelectGuvnorRepPage.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/SelectGuvnorRepPage.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -11,6 +11,7 @@
import org.eclipse.swt.widgets.List;
import org.guvnor.tools.Activator;
import org.guvnor.tools.GuvnorRepository;
+import org.guvnor.tools.Messages;
import org.guvnor.tools.utils.PlatformUtils;
public class SelectGuvnorRepPage extends WizardPage {
@@ -30,7 +31,7 @@
public void createControl(Composite parent) {
Composite composite = PlatformUtils.createComposite(parent, 1);
createRep = new Button(composite, SWT.RADIO);
- createRep.setText("Create a new Guvnor repository location");
+ createRep.setText(Messages.getString("select.rep.guvnor.loc")); //$NON-NLS-1$
createRep.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
createRep.setSelection(false);
createRep.addSelectionListener(new SelectionListener() {
@@ -43,7 +44,7 @@
});
existingRep = new Button(composite, SWT.RADIO);
- existingRep.setText("Use an existing Guvnor repository location");
+ existingRep.setText(Messages.getString("select.rep.guvnor.loc.desc")); //$NON-NLS-1$
existingRep.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
existingRep.setSelection(true);
existingRep.addSelectionListener(new SelectionListener() {
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/SelectGuvnorResourcesPage.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/SelectGuvnorResourcesPage.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/SelectGuvnorResourcesPage.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -16,6 +16,7 @@
import org.eclipse.swt.widgets.Label;
import org.guvnor.tools.Activator;
import org.guvnor.tools.GuvnorRepository;
+import org.guvnor.tools.Messages;
import org.guvnor.tools.utils.PlatformUtils;
import org.guvnor.tools.views.RepositoryContentProvider;
import org.guvnor.tools.views.RepositoryLabelProvider;
@@ -36,7 +37,7 @@
public void createControl(Composite parent) {
Composite composite = PlatformUtils.createComposite(parent, 1);
- new Label(composite, SWT.NONE).setText("Select resources:");
+ new Label(composite, SWT.NONE).setText(Messages.getString("select.resources")); //$NON-NLS-1$
viewer = new TreeViewer(composite, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
viewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/SelectLocalTargetPage.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/SelectLocalTargetPage.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/SelectLocalTargetPage.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -16,6 +16,7 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.model.WorkbenchContentProvider;
import org.eclipse.ui.model.WorkbenchLabelProvider;
+import org.guvnor.tools.Messages;
import org.guvnor.tools.utils.PlatformUtils;
public class SelectLocalTargetPage extends WizardPage {
@@ -32,7 +33,7 @@
public void createControl(Composite parent) {
Composite composite = PlatformUtils.createComposite(parent, 1);
- new Label(composite, SWT.NONE).setText("Select location:");
+ new Label(composite, SWT.NONE).setText(Messages.getString("select.location")); //$NON-NLS-1$
viewer = new TreeViewer(composite, SWT.BORDER | SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL);
viewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/SelectResourceVersionPage.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/SelectResourceVersionPage.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/SelectResourceVersionPage.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -7,6 +7,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.List;
+import org.guvnor.tools.Messages;
import org.guvnor.tools.utils.PlatformUtils;
public class SelectResourceVersionPage extends WizardPage {
@@ -23,7 +24,7 @@
public void createControl(Composite parent) {
Composite composite = PlatformUtils.createComposite(parent, 1);
- new Label(composite, SWT.NONE).setText("Select version:");
+ new Label(composite, SWT.NONE).setText(Messages.getString("select.version")); //$NON-NLS-1$
versions = new List(composite, SWT.BORDER | SWT.MULTI);
versions.setLayoutData(new GridData(GridData.FILL_BOTH));
@@ -33,10 +34,10 @@
}
private void populateVersions() {
- versions.add("v20080424");
- versions.add("v20080516");
- versions.add("v20080522");
- versions.add("v20080705");
+ versions.add("v20080424"); //$NON-NLS-1$
+ versions.add("v20080516"); //$NON-NLS-1$
+ versions.add("v20080522"); //$NON-NLS-1$
+ versions.add("v20080705"); //$NON-NLS-1$
versions.setSelection(0);
}
}
Modified: labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/WizardUtils.java
===================================================================
--- labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/WizardUtils.java 2008-08-29 18:09:50 UTC (rev 22243)
+++ labs/jbossrules/trunk/drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/wizards/WizardUtils.java 2008-08-29 18:10:34 UTC (rev 22244)
@@ -17,15 +17,15 @@
Activator.getLocationManager().addRepository(new GuvnorRepository(model.getRepLocation()));
URL serverUrl = new URL(model.getRepLocation());
Map<String, String> info = new HashMap<String, String>();
- info.put("username", model.getUsername());
- info.put("password", model.getPassword());
+ info.put("username", model.getUsername()); //$NON-NLS-1$
+ info.put("password", model.getPassword()); //$NON-NLS-1$
if (model.shouldSaveAuthInfo()) {
- Platform.addAuthorizationInfo(serverUrl, "", "basic", info);
+ Platform.addAuthorizationInfo(serverUrl, "", "basic", info); //$NON-NLS-1$ //$NON-NLS-2$
} else {
IWebDavClient client = WebDavClientFactory.createClient(serverUrl);
WebDavServerCache.cacheWebDavClient(serverUrl.toString(), client);
WebDavSessionAuthenticator authen = new WebDavSessionAuthenticator();
- authen.addAuthenticationInfo(serverUrl, "", "basic", info);
+ authen.addAuthenticationInfo(serverUrl, "", "basic", info); //$NON-NLS-1$ //$NON-NLS-2$
client.setSessionAuthenticator(authen);
}
}
More information about the jboss-svn-commits
mailing list