NEW - bug 191522: Provide full text search functionality over task
comments
https://bugs.eclipse.org/bugs/show_bug.cgi?id=191522
externalize strings
diff --git a/org.eclipse.mylyn.tasks.index.core/META-INF/MANIFEST.MF b/org.eclipse.mylyn.tasks.index.core/META-INF/MANIFEST.MF
index ac8e804..03d6e58 100644
--- a/org.eclipse.mylyn.tasks.index.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.tasks.index.core/META-INF/MANIFEST.MF
@@ -1,9 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Tasks Index
+Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.mylyn.tasks.index.core
Bundle-Version: 3.7.0.qualifier
-Bundle-Vendor: Eclipse.org
+Bundle-Vendor: %Bundle-Vendor
Service-Component: OSGI-INF/task_list_index.xml
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.mylyn.tasks.core;bundle-version="3.7.0",
diff --git a/org.eclipse.mylyn.tasks.index.core/OSGI-INF/l10n/bundle.properties b/org.eclipse.mylyn.tasks.index.core/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 0000000..bf3affd
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.index.core/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,13 @@
+###############################################################################
+# Copyright (c) 2011 Tasktop Technologies and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Tasktop Technologies - initial API and implementation
+###############################################################################
+#Properties file for org.eclipse.mylyn.tasks.index.core
+Bundle-Vendor = Eclipse.org
+Bundle-Name = Tasks Index
\ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.index.core/build.properties b/org.eclipse.mylyn.tasks.index.core/build.properties
index a65755c..bb00ef7 100644
--- a/org.eclipse.mylyn.tasks.index.core/build.properties
+++ b/org.eclipse.mylyn.tasks.index.core/build.properties
@@ -3,3 +3,4 @@
bin.includes = META-INF/,\
.,\
OSGI-INF/
+
diff --git a/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/Messages.java b/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/Messages.java
new file mode 100644
index 0000000..c67d025
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/Messages.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.tasks.index.core;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author David Green
+ */
+class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.tasks.index.core.messages"; //$NON-NLS-1$
+
+ public static String TaskListIndex_indexerJob;
+
+ public static String TaskListIndex_task_rebuildingIndex;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/TaskListIndex.java b/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/TaskListIndex.java
index e024554..06a3730 100644
--- a/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/TaskListIndex.java
+++ b/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/TaskListIndex.java
@@ -544,7 +544,7 @@
private class MaintainIndexJob extends Job {
public MaintainIndexJob() {
- super("Task List Indexer");
+ super(Messages.TaskListIndex_indexerJob);
setUser(false);
setSystem(false); // true?
setPriority(Job.LONG);
@@ -586,7 +586,7 @@
}
}, monitor.newChild(1));
- reindexMonitor.beginTask("Rebuilding Task List Index", allTasks.size());
+ reindexMonitor.beginTask(Messages.TaskListIndex_task_rebuildingIndex, allTasks.size());
for (ITask task : allTasks) {
try {
TaskData taskData = dataManager.getTaskData(task);
diff --git a/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/messages.properties b/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/messages.properties
new file mode 100644
index 0000000..4fb01a2
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.index.core/src/org/eclipse/mylyn/internal/tasks/index/core/messages.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2011 Tasktop Technologies and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Tasktop Technologies - initial API and implementation
+###############################################################################
+TaskListIndex_indexerJob=Task List Indexer
+TaskListIndex_task_rebuildingIndex=Rebuilding Task List Index
diff --git a/org.eclipse.mylyn.tasks.index.ui/.settings/org.eclipse.pde.prefs b/org.eclipse.mylyn.tasks.index.ui/.settings/org.eclipse.pde.prefs
index e8f2d56..c56b02e 100644
--- a/org.eclipse.mylyn.tasks.index.ui/.settings/org.eclipse.pde.prefs
+++ b/org.eclipse.mylyn.tasks.index.ui/.settings/org.eclipse.pde.prefs
@@ -1,18 +1,35 @@
-#Tue Apr 15 11:07:59 PDT 2008
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=2
-compilers.p.missing-bundle-classpath-entries=1
-compilers.p.missing-packages=1
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=2
-compilers.p.unknown-attribute=0
-compilers.p.unknown-class=0
-compilers.p.unknown-element=0
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=0
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.use-project=true
-eclipse.preferences.version=1
+#Tue Oct 18 18:20:28 PDT 2011
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=2
+compilers.p.internal=2
+compilers.p.missing-bundle-classpath-entries=1
+compilers.p.missing-packages=1
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=0
+compilers.p.unknown-class=0
+compilers.p.unknown-element=0
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=0
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+compilers.use-project=true
+eclipse.preferences.version=1
diff --git a/org.eclipse.mylyn.tasks.index.ui/META-INF/MANIFEST.MF b/org.eclipse.mylyn.tasks.index.ui/META-INF/MANIFEST.MF
index 67b3004..09a73a5 100644
--- a/org.eclipse.mylyn.tasks.index.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.tasks.index.ui/META-INF/MANIFEST.MF
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Index
+Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.mylyn.tasks.index.ui;singleton:=true
Bundle-Version: 3.7.0.qualifier
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/org.eclipse.mylyn.tasks.index.ui/OSGI-INF/l10n/bundle.properties b/org.eclipse.mylyn.tasks.index.ui/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 0000000..6f3dd07
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.index.ui/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,12 @@
+###############################################################################
+# Copyright (c) 2011 Tasktop Technologies and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Tasktop Technologies - initial API and implementation
+###############################################################################
+#Properties file for org.eclipse.mylyn.tasks.index.ui
+Bundle-Name = Index
\ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.index.ui/build.properties b/org.eclipse.mylyn.tasks.index.ui/build.properties
index 6f20375..d0fe457 100644
--- a/org.eclipse.mylyn.tasks.index.ui/build.properties
+++ b/org.eclipse.mylyn.tasks.index.ui/build.properties
@@ -2,4 +2,6 @@
output.. = bin/
bin.includes = META-INF/,\
.,\
- plugin.xml
+ plugin.xml,\
+ OSGI-INF/
+
diff --git a/org.eclipse.mylyn.tasks.index.ui/src/org/eclipse/mylyn/internal/tasks/index/ui/IndexSearchHandler.java b/org.eclipse.mylyn.tasks.index.ui/src/org/eclipse/mylyn/internal/tasks/index/ui/IndexSearchHandler.java
index 7fa8583..38ea565 100644
--- a/org.eclipse.mylyn.tasks.index.ui/src/org/eclipse/mylyn/internal/tasks/index/ui/IndexSearchHandler.java
+++ b/org.eclipse.mylyn.tasks.index.ui/src/org/eclipse/mylyn/internal/tasks/index/ui/IndexSearchHandler.java
@@ -59,8 +59,8 @@
GridLayoutFactory.swtDefaults().applyTo(container);
final Button button = new Button(container, SWT.CHECK);
- button.setText("Summary only");
- button.setToolTipText("Search only the summary when checked");
+ button.setText(Messages.IndexSearchHandler_summaryOnly);
+ button.setToolTipText(Messages.IndexSearchHandler_summaryOnly_tooltip);
button.setSelection(true);
button.addSelectionListener(new SelectionAdapter() {
@@ -154,15 +154,15 @@
String description;
switch (field) {
case CONTENT:
- description = "Search for a term in the summary, description and comments";
+ description = Messages.IndexSearchHandler_hint_content;
break;
case PERSON:
- description = "Search for a user (reporter, assignee, watcher, commenter)";
+ description = Messages.IndexSearchHandler_hint_person;
break;
default:
- description = NLS.bind("Search on a term in the {0} field", field.fieldName());
+ description = NLS.bind(Messages.IndexSearchHandler_hint_generic, field.fieldName());
}
- proposals.add(new ContentProposal(field.fieldName().substring(prefix.length()) + ":",
+ proposals.add(new ContentProposal(field.fieldName().substring(prefix.length()) + ":", //$NON-NLS-1$
field.fieldName(), description));
}
}
diff --git a/org.eclipse.mylyn.tasks.index.ui/src/org/eclipse/mylyn/internal/tasks/index/ui/Messages.java b/org.eclipse.mylyn.tasks.index.ui/src/org/eclipse/mylyn/internal/tasks/index/ui/Messages.java
new file mode 100644
index 0000000..d0a7b36
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.index.ui/src/org/eclipse/mylyn/internal/tasks/index/ui/Messages.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Tasktop Technologies and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.tasks.index.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author David Green
+ */
+class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.tasks.index.ui.messages"; //$NON-NLS-1$
+
+ public static String IndexSearchHandler_hint_content;
+
+ public static String IndexSearchHandler_hint_generic;
+
+ public static String IndexSearchHandler_hint_person;
+
+ public static String IndexSearchHandler_summaryOnly;
+
+ public static String IndexSearchHandler_summaryOnly_tooltip;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/org.eclipse.mylyn.tasks.index.ui/src/org/eclipse/mylyn/internal/tasks/index/ui/messages.properties b/org.eclipse.mylyn.tasks.index.ui/src/org/eclipse/mylyn/internal/tasks/index/ui/messages.properties
new file mode 100644
index 0000000..de02770
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.index.ui/src/org/eclipse/mylyn/internal/tasks/index/ui/messages.properties
@@ -0,0 +1,15 @@
+###############################################################################
+# Copyright (c) 2011 Tasktop Technologies and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Tasktop Technologies - initial API and implementation
+###############################################################################
+IndexSearchHandler_hint_content=Search for a term in the summary, description and comments
+IndexSearchHandler_hint_generic=Search on a term in the {0} field
+IndexSearchHandler_hint_person=Search for a user (reporter, assignee, watcher, commenter)
+IndexSearchHandler_summaryOnly=Summary only
+IndexSearchHandler_summaryOnly_tooltip=Search only the summary when checked