Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2001-11-01 10:54:19 -0500
committerDani Megert2001-11-01 10:54:19 -0500
commit788d23a63a86266559d64ffad30d327c1d78ca39 (patch)
tree28e57f711d97ce8457a7797b299f4cfd13e0b3a5
parent3672de0b6469b3bffa3fa9603aa904549a0b43fd (diff)
downloadeclipse.platform.text-788d23a63a86266559d64ffad30d327c1d78ca39.tar.gz
eclipse.platform.text-788d23a63a86266559d64ffad30d327c1d78ca39.tar.xz
eclipse.platform.text-788d23a63a86266559d64ffad30d327c1d78ca39.zip
Error messages and NLSv0_207
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSet.java23
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetDialog.java96
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetMessages.java59
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetMessages.properties24
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetReader.java61
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetSelectionDialog.java10
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetWriter.java4
7 files changed, 220 insertions, 57 deletions
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSet.java b/org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSet.java
index 9827bf90b..682a635df 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSet.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSet.java
@@ -25,7 +25,6 @@ import org.xml.sax.SAXException;
import org.eclipse.search.ui.IWorkingSet;
import org.eclipse.search.ui.SearchUI;
-import org.eclipse.search.internal.ui.SearchMessages;
import org.eclipse.search.internal.ui.SearchPlugin;
import org.eclipse.search.internal.ui.util.ExceptionHandler;
@@ -54,7 +53,7 @@ public class WorkingSet implements IWorkingSet {
Set fElements; // of IResources
WorkingSet(String name, Object[] elements) {
- Assert.isNotNull(name, "name must not be null");
+ Assert.isNotNull(name, "name must not be null"); //$NON-NLS-1$
fName= name;
setResources(elements, true);
}
@@ -64,11 +63,11 @@ public class WorkingSet implements IWorkingSet {
}
private void setResources(Object[] elements, boolean internal) {
- Assert.isNotNull(elements, "IPath array must not be null");
+ Assert.isNotNull(elements, "IPath array must not be null"); //$NON-NLS-1$
fElements= new HashSet(elements.length);
for (int i= 0; i < elements.length; i++) {
Assert.isTrue(elements[i] instanceof IResource);
- Assert.isTrue(!fElements.contains(elements[i]), "elements must only contain each element once");
+ Assert.isTrue(!fElements.contains(elements[i]), "elements must only contain each element once"); //$NON-NLS-1$
fElements.add(elements[i]);
}
if (!internal)
@@ -83,7 +82,7 @@ public class WorkingSet implements IWorkingSet {
}
void setName(String name) {
- Assert.isNotNull(name, "name must not be null");
+ Assert.isNotNull(name, "name must not be null"); //$NON-NLS-1$
fName= name;
saveWorkingSets();
}
@@ -158,12 +157,12 @@ public class WorkingSet implements IWorkingSet {
* The working set must not exist yet.
*/
static void add(IWorkingSet workingSet) {
- Assert.isTrue(!fgWorkingSets.contains(workingSet), "working set already registered");
+ Assert.isTrue(!fgWorkingSets.contains(workingSet), "working set already registered"); //$NON-NLS-1$
fgWorkingSets.add(workingSet);
saveWorkingSets();
}
- // Persistency
+ //--- Persistency -----------------------------------------------
private static void restore() {
WorkingSetReader reader= null;
@@ -175,10 +174,10 @@ public class WorkingSet implements IWorkingSet {
reader= new WorkingSetReader(new BufferedInputStream(new FileInputStream(file)));
workingSets= reader.readXML();
} catch (IOException ex) {
- String message= SearchMessages.getFormattedString("WorkingSet.error.readingFile", ex.getMessage()); //$NON-NLS-1$
+ String message= WorkingSetMessages.getFormattedString("WorkingSet.error.readingFile", ex.getMessage()); //$NON-NLS-1$
ExceptionHandler.log(ex, message);
} catch (SAXException ex) {
- String message= SearchMessages.getFormattedString("WorkingSet.error.badXmlFormat", ex.getMessage()); //$NON-NLS-1$
+ String message= WorkingSetMessages.getFormattedString("WorkingSet.error.badXmlFormat", ex.getMessage()); //$NON-NLS-1$
ExceptionHandler.log(ex, message);
} finally {
try {
@@ -186,7 +185,7 @@ public class WorkingSet implements IWorkingSet {
reader.close();
}
catch (IOException ex) {
- String message= SearchMessages.getFormattedString("WorkingSet.error.close", ex.getMessage()); //$NON-NLS-1$
+ String message= WorkingSetMessages.getFormattedString("WorkingSet.error.close", ex.getMessage()); //$NON-NLS-1$
ExceptionHandler.log(ex, message);
}
}
@@ -202,14 +201,14 @@ public class WorkingSet implements IWorkingSet {
writer= new WorkingSetWriter(new BufferedOutputStream(new FileOutputStream(file)));
writer.writeXML(SearchUI.getWorkingSets());
} catch (IOException ex) {
- String message= SearchMessages.getFormattedString("WorkingSet.error.readingFile", ex.getMessage()); //$NON-NLS-1$
+ String message= WorkingSetMessages.getFormattedString("WorkingSet.error.readingFile", ex.getMessage()); //$NON-NLS-1$
ExceptionHandler.log(ex, message);
} finally {
if (writer != null)
try {
writer.close();
} catch (IOException ex) {
- String message= SearchMessages.getFormattedString("WorkingSet.error.readingFile", ex.getMessage()); //$NON-NLS-1$
+ String message= WorkingSetMessages.getFormattedString("WorkingSet.error.readingFile", ex.getMessage()); //$NON-NLS-1$
ExceptionHandler.log(ex, message);
}
}
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetDialog.java b/org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetDialog.java
index 48067876c..005f114d8 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetDialog.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetDialog.java
@@ -9,17 +9,24 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.dialogs.IInputValidator;
import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.jface.util.Assert;
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
import org.eclipse.jface.viewers.CheckboxTreeViewer;
+import org.eclipse.jface.viewers.ICheckStateListener;
import org.eclipse.ui.model.WorkbenchContentProvider;
import org.eclipse.ui.model.WorkbenchLabelProvider;
import org.eclipse.search.ui.IWorkingSet;
import org.eclipse.search.internal.ui.SearchPlugin;
+import org.eclipse.search.internal.ui.util.ExceptionHandler;
class WorkingSetDialog extends InputDialog {
@@ -29,33 +36,33 @@ class WorkingSetDialog extends InputDialog {
String fInitalName;
public WorkingSetNameInputValidator(String initialName) {
- Assert.isNotNull(initialName, "initial name must not be null");
+ Assert.isNotNull(initialName, "initial name must not be null"); //$NON-NLS-1$
fInitalName= initialName;
}
public String isValid(String newText) {
- if (newText == null ||newText.equals(""))
- return "The name must not be empty.";
+ if (newText == null ||newText.equals("")) //$NON-NLS-1$
+ return WorkingSetMessages.getString("WorkingSetDialog.warning.nameMustNotBeEmpty"); //$NON-NLS-1$
IWorkingSet[] workingSets= WorkingSet.getWorkingSets();
if (newText.equals(fInitalName))
return null;
for (int i= 0; i < workingSets.length; i++) {
if (newText.equals(workingSets[i].getName()))
- return "A workspace with that name already exists.";
+ return WorkingSetMessages.getString("WorkingSetDialog.warning.workspaceExists"); //$NON-NLS-1$
}
return null;
}
}
// Widgets constants
- private final static int SIZING_SELECTION_WIDGET_WIDTH= 300;
- private final static int SIZING_SELECTION_WIDGET_HEIGHT= 300;
+ private final static int SIZING_SELECTION_WIDGET_WIDTH= 100;
+ private final static int SIZING_SELECTION_WIDGET_HEIGHT= 200;
private IWorkingSet fWorkingSet;
private CheckboxTreeViewer fTree;
WorkingSetDialog(Shell parentShell) {
- this(parentShell, "");
+ this(parentShell, ""); //$NON-NLS-1$
}
WorkingSetDialog(Shell parentShell, IWorkingSet workingSet) {
@@ -64,7 +71,7 @@ class WorkingSetDialog extends InputDialog {
}
private WorkingSetDialog(Shell parentShell, String initialSelection) {
- super(parentShell, "Working Set", "Define the working set name:", initialSelection, new WorkingSetNameInputValidator(initialSelection));
+ super(parentShell, WorkingSetMessages.getString("WorkingSetDialog.title"), WorkingSetMessages.getString("WorkingSetDialog.message"), initialSelection, new WorkingSetNameInputValidator(initialSelection)); //$NON-NLS-2$ //$NON-NLS-1$
}
/*
@@ -82,6 +89,13 @@ class WorkingSetDialog extends InputDialog {
GridData gd= new GridData(GridData.FILL_BOTH | GridData.GRAB_VERTICAL);
gd.heightHint= SIZING_SELECTION_WIDGET_HEIGHT;
fTree.getControl().setLayoutData(gd);
+
+// fTree.addCheckStateListener(new ICheckStateListener() {
+// public void checkStateChanged(CheckStateChangedEvent event) {
+// handleCheckStateChange(event);
+// }
+// });
+
if (fWorkingSet != null)
fTree.setCheckedElements(fWorkingSet.getResources());
@@ -108,4 +122,70 @@ class WorkingSetDialog extends InputDialog {
IWorkingSet getWorkingSet() {
return fWorkingSet;
}
+
+ //--- Checked state handling --------------------------
+
+ void handleCheckStateChange(CheckStateChangedEvent event) {
+ boolean state= event.getChecked();
+ IResource resource= (IResource)event.getElement();
+ fTree.setGrayed(resource, false);
+ if (resource instanceof IContainer)
+ setSubtreeChecked((IContainer)resource, state);
+ updateParentState(resource, state);
+ }
+
+ private void setSubtreeChecked(IContainer container, boolean state) {
+ IResource[] members= null;
+ try {
+ members= container.members();
+ } catch (CoreException ex) {
+ ExceptionHandler.handle(ex, getShell(), "Error", "Error during update of checked state");
+ }
+ for (int i= members.length - 1; i >= 0; i--) {
+ IResource element= members[i];
+ fTree.setChecked(element, state);
+ fTree.setGrayed(element, false);
+ if (element instanceof IContainer)
+ setSubtreeChecked((IContainer)element, state);
+ }
+ }
+
+ private void updateParentState(IResource child, boolean baseChildState) {
+
+ if (child == null || child.getParent() == null)
+ return;
+
+ IContainer parent= child.getParent();
+ boolean allSameState= true;
+ IResource[] members= null;
+ try {
+ members= parent.members();
+ } catch (CoreException ex) {
+ ExceptionHandler.handle(ex, getShell(), "Error", "Error during update of checked state");
+ }
+ for (int i= members.length -1; i >= 0; i--) {
+ if (fTree.getChecked(members[i]) != baseChildState) {
+ allSameState= false;
+ break;
+ }
+ }
+
+ fTree.setGrayed(parent, !allSameState);
+ fTree.setChecked(parent, !allSameState || baseChildState);
+
+ updateParentState(parent, baseChildState);
+ }
+
+ private void initializeCheckedState() {
+ if (fWorkingSet == null)
+ return;
+
+ IResource[] resources= fWorkingSet.getResources();
+ fTree.setCheckedElements(resources);
+ for (int i= 0; i < resources.length; i++) {
+ if (resources[i] instanceof IContainer)
+ setSubtreeChecked((IContainer)resources[i], true);
+ updateParentState(resources[i], true);
+ }
+ }
}
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetMessages.java b/org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetMessages.java
new file mode 100644
index 000000000..0afda2e0b
--- /dev/null
+++ b/org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetMessages.java
@@ -0,0 +1,59 @@
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+package org.eclipse.search.internal.workingsets;
+
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class WorkingSetMessages {
+
+ private static final String RESOURCE_BUNDLE= WorkingSetMessages.class.getName();
+
+ private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
+
+ private WorkingSetMessages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return fgResourceBundle.getString(key);
+ } catch (MissingResourceException e) {
+ return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * Gets a string from the resource bundle and formats it with the argument
+ *
+ * @param key the string used to get the bundle value, must not be null
+ */
+ public static String getFormattedString(String key, Object arg) {
+ String format= null;
+ try {
+ format= fgResourceBundle.getString(key);
+ } catch (MissingResourceException e) {
+ return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
+ }
+ if (arg == null)
+ arg= ""; //$NON-NLS-1$
+ return MessageFormat.format(format, new Object[] { arg });
+ }
+
+ /**
+ * Gets a string from the resource bundle and formats it with the argument
+ *
+ * @param key the string used to get the bundle value, must not be null
+ */
+ public static String getFormattedString(String key, Object[] args) {
+ String format= null;
+ try {
+ format= fgResourceBundle.getString(key);
+ } catch (MissingResourceException e) {
+ return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
+ }
+ return MessageFormat.format(format, args);
+ }
+}
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetMessages.properties b/org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetMessages.properties
new file mode 100644
index 000000000..245b1f712
--- /dev/null
+++ b/org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetMessages.properties
@@ -0,0 +1,24 @@
+#########################################
+# (c) Copyright IBM Corp. 2000, 2001.
+# All Rights Reserved.
+#########################################
+
+WorkingSet.error.readingFile= Error reading: {0}
+WorkingSet.error.badXmlFormat= Bad XML format: {0}
+WorkingSet.error.close= Unable to close the XML file: {0}
+
+WorkingSetReader.error.badFormat= Bad format
+WorkingSetReader.warnings= JAR Package Reader Warnings
+WorkingSetReader.error.tagNameNotFound= Bad format: Tag \'name\' not found
+WorkingSetReader.error.tagPathNotFound= Bad format: Tag \'path\' not found
+
+WorkingSetWriter.error.couldNotGetXmlBuilder = Could not get XML builder
+
+WorkingSetDialog.message=Define the working set name:
+WorkingSetDialog.title=Working Set
+WorkingSetDialog.warning.nameMustNotBeEmpty=The name must not be empty.
+WorkingSetDialog.warning.workspaceExists=A workspace with that name already exists.
+
+WorkingSetSelectionDialogdetailsButton.label=Details...
+WorkingSetSelectionDialognewButton.label=New...
+WorkingSetSelectionDialogremoveButton.label=Remove
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetReader.java b/org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetReader.java
index f390d4fd3..278ac747d 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetReader.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetReader.java
@@ -34,7 +34,6 @@ import org.xml.sax.SAXException;
import org.eclipse.search.ui.IWorkingSet;
import org.eclipse.search.ui.SearchUI;
-import org.eclipse.search.internal.ui.SearchMessages;
import org.eclipse.search.internal.ui.SearchPlugin;
/**
@@ -53,7 +52,7 @@ public class WorkingSetReader extends Object {
public WorkingSetReader(InputStream inputStream) {
Assert.isNotNull(inputStream);
fInputStream= new BufferedInputStream(inputStream);
- fWarnings= new MultiStatus(SearchUI.PLUGIN_ID, 0, SearchMessages.getString("WorkingSetReader.warnings"), null); //$NON-NLS-1$
+ fWarnings= new MultiStatus(SearchUI.PLUGIN_ID, 0, WorkingSetMessages.getString("WorkingSetReader.warnings"), null); //$NON-NLS-1$
}
/**
@@ -86,7 +85,7 @@ public class WorkingSetReader extends Object {
}
Element xml= parser.parse(new InputSource(fInputStream)).getDocumentElement();
if (!xml.getNodeName().equals(WorkingSet.TAG_WORKINGSETS))
- throw new IOException(SearchMessages.getString("WorkingSetReader.error.badFormat")); //$NON-NLS-1$
+ throw new IOException(WorkingSetMessages.getString("WorkingSetReader.error.badFormat")); //$NON-NLS-1$
NodeList topLevelElements= xml.getChildNodes();
Set workingSets= new HashSet(5);
@@ -97,35 +96,39 @@ public class WorkingSetReader extends Object {
Element element= (Element)node;
String workingSetName= element.getAttribute(WorkingSet.TAG_NAME);
Set resources= new HashSet(5);
- if (element.getNodeName().equals(WorkingSet.TAG_WORKINGSET)) {
- NodeList workingSetNode= element.getChildNodes();
- for (int j= 0; j < workingSetNode.getLength(); j++) {
- Node wsNodeNode= workingSetNode.item(j);
- if (wsNodeNode.getNodeType() != Node.ELEMENT_NODE)
- continue;
- Element wsNodeElement= (Element)wsNodeNode;
- if (wsNodeElement.getNodeName().equals(WorkingSet.TAG_CONTENTS)) {
- NodeList contents= wsNodeElement.getChildNodes();
- for (int k= 0; k < contents.getLength(); k++) {
- Node selectedNode= contents.item(k);
- if (selectedNode.getNodeType() != Node.ELEMENT_NODE)
- continue;
- Element selectedElement= (Element)selectedNode;
- if (selectedElement.getNodeName().equals(WorkingSet.TAG_FILE))
- addFile(resources, selectedElement);
- else if (selectedElement.getNodeName().equals(WorkingSet.TAG_FOLDER))
- addFolder(resources ,selectedElement);
- else if (selectedElement.getNodeName().equals(WorkingSet.TAG_PROJECT))
- addProject(resources ,selectedElement);
- }
- }
- }
- }
+ if (element.getNodeName().equals(WorkingSet.TAG_WORKINGSET))
+ readWorkingSetTag(resources, element.getChildNodes());
workingSets.add(new WorkingSet(workingSetName, resources.toArray()));
}
return (IWorkingSet[]) workingSets.toArray(new IWorkingSet[workingSets.size()]);
}
+ private void readWorkingSetTag(Set resources, NodeList nodes) throws IOException {
+ for (int j= 0; j < nodes.getLength(); j++) {
+ Node node= nodes.item(j);
+ if (node.getNodeType() != Node.ELEMENT_NODE)
+ continue;
+ Element element= (Element)node;
+ if (element.getNodeName().equals(WorkingSet.TAG_CONTENTS))
+ readContentsTag(resources, element.getChildNodes());
+ }
+ }
+
+ private void readContentsTag(Set resources, NodeList contents) throws IOException {
+ for (int k= 0; k < contents.getLength(); k++) {
+ Node node= contents.item(k);
+ if (node.getNodeType() != Node.ELEMENT_NODE)
+ continue;
+ Element element= (Element)node;
+ if (element.getNodeName().equals(WorkingSet.TAG_FILE))
+ addFile(resources, element);
+ else if (element.getNodeName().equals(WorkingSet.TAG_FOLDER))
+ addFolder(resources ,element);
+ else if (element.getNodeName().equals(WorkingSet.TAG_PROJECT))
+ addProject(resources ,element);
+ }
+ }
+
private void addFile(Set selectedElements, Element element) throws IOException {
IPath path= getPath(element);
if (path != null) {
@@ -147,7 +150,7 @@ public class WorkingSetReader extends Object {
private void addProject(Set selectedElements, Element element) throws IOException {
String name= element.getAttribute(WorkingSet.TAG_NAME); //$NON-NLS-1$
if (name.equals("")) //$NON-NLS-1$
- throw new IOException(SearchMessages.getString("WorkingSetReader.error.tagNameNotFound")); //$NON-NLS-1$
+ throw new IOException(WorkingSetMessages.getString("WorkingSetReader.error.tagNameNotFound")); //$NON-NLS-1$
IProject project= SearchPlugin.getWorkspace().getRoot().getProject(name);
if (project != null)
selectedElements.add(project);
@@ -156,7 +159,7 @@ public class WorkingSetReader extends Object {
private IPath getPath(Element element) throws IOException {
String pathString= element.getAttribute(WorkingSet.TAG_PATH);
if (pathString.equals("")) //$NON-NLS-1$
- throw new IOException(SearchMessages.getString("WorkingSetReader.error.tagPathNotFound")); //$NON-NLS-1$
+ throw new IOException(WorkingSetMessages.getString("WorkingSetReader.error.tagPathNotFound")); //$NON-NLS-1$
return new Path(element.getAttribute(WorkingSet.TAG_PATH));
}
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetSelectionDialog.java b/org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetSelectionDialog.java
index 22cdef00f..eb8aec364 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetSelectionDialog.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetSelectionDialog.java
@@ -63,8 +63,8 @@ public class WorkingSetSelectionDialog extends SelectionDialog {
}
// sizing constants
- private final static int SIZING_SELECTION_WIDGET_HEIGHT= 250;
- private final static int SIZING_SELECTION_WIDGET_WIDTH= 300;
+ private final static int SIZING_SELECTION_WIDGET_HEIGHT= 200;
+ private final static int SIZING_SELECTION_WIDGET_WIDTH= 50;
// Providers for populating this dialog
private ILabelProvider fLabelProvider;
@@ -109,7 +109,7 @@ public class WorkingSetSelectionDialog extends SelectionDialog {
composite.setData(data);
int id= IDialogConstants.CLIENT_ID + 1;
- fNewButton= createButton(buttonComposite, id++, "New...", false);
+ fNewButton= createButton(buttonComposite, id++, WorkingSetMessages.getString("WorkingSetSelectionDialognewButton.label"), false); //$NON-NLS-1$
fNewButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
WorkingSetDialog dlg= new WorkingSetDialog(getShell());
@@ -121,7 +121,7 @@ public class WorkingSetSelectionDialog extends SelectionDialog {
}
});
- fDetailsButton= createButton(buttonComposite, id++, "Details...", false);
+ fDetailsButton= createButton(buttonComposite, id++, WorkingSetMessages.getString("WorkingSetSelectionDialogdetailsButton.label"), false); //$NON-NLS-1$
fDetailsButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
WorkingSetDialog dlg= new WorkingSetDialog(getShell(), getWorkingSet());
@@ -130,7 +130,7 @@ public class WorkingSetSelectionDialog extends SelectionDialog {
}
});
- fRemoveButton= createButton(buttonComposite, id++, "Remove", false);
+ fRemoveButton= createButton(buttonComposite, id++, WorkingSetMessages.getString("WorkingSetSelectionDialogremoveButton.label"), false); //$NON-NLS-1$
fRemoveButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
removeSelectedWorkingSets();
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetWriter.java b/org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetWriter.java
index 82572e8a1..b7fe2ae11 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetWriter.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/workingsets/WorkingSetWriter.java
@@ -23,8 +23,6 @@ import org.w3c.dom.Element;
import org.eclipse.search.ui.IWorkingSet;
-import org.eclipse.search.internal.ui.SearchMessages;
-
import org.apache.xml.serialize.Method;
import org.apache.xml.serialize.OutputFormat;
import org.apache.xml.serialize.Serializer;
@@ -66,7 +64,7 @@ public class WorkingSetWriter extends Object {
try {
docBuilder= factory.newDocumentBuilder();
} catch (ParserConfigurationException ex) {
- throw new IOException(SearchMessages.getString("WorkingSetWriter.error.couldNotGetXmlBuilder")); //$NON-NLS-1$
+ throw new IOException(WorkingSetMessages.getString("WorkingSetWriter.error.couldNotGetXmlBuilder")); //$NON-NLS-1$
}
Document document= docBuilder.newDocument();

Back to the top