Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfbecker2011-03-14 19:30:52 +0000
committerfbecker2011-03-14 19:30:52 +0000
commit786a92a3ee27eb29cfbd4f8456a0299336d76358 (patch)
treed40284bedafb6f9e0a61a3ffe291c069b2bf1b57 /org.eclipse.mylyn.bugzilla.ui
parent3302e4bce898bffe8d4dd013b8f4110d5be3e12c (diff)
downloadorg.eclipse.mylyn.tasks-786a92a3ee27eb29cfbd4f8456a0299336d76358.tar.gz
org.eclipse.mylyn.tasks-786a92a3ee27eb29cfbd4f8456a0299336d76358.tar.xz
org.eclipse.mylyn.tasks-786a92a3ee27eb29cfbd4f8456a0299336d76358.zip
ASSIGNED - bug 339470: move flags to subsection
https://bugs.eclipse.org/bugs/show_bug.cgi?id=339470
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.ui')
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaFlagPart.java11
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/Messages.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/messages.properties1
3 files changed, 10 insertions, 4 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaFlagPart.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaFlagPart.java
index 0d08def20..66ce389ef 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaFlagPart.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaFlagPart.java
@@ -146,13 +146,16 @@ public class BugzillaFlagPart extends AbstractTaskEditorPart {
if (attributeSorter != null) {
Collections.sort(flagEditors, attributeSorter);
}
- if (used > 0 && unused > 0) {
+ if (used == 0 && unused == 0) {
+ infoOverlayText = Messages.BugzillaFlagPart_no_flags_defined;
+ } else if (used > 0 && unused > 0) {
infoOverlayText = NLS.bind(Messages.BugzillaFlagPart_numberof_unused_used_flags, "" + unused, "" + used); //$NON-NLS-1$ //$NON-NLS-2$
} else {
- infoOverlayText = NLS.bind("{0} {1}", used > 0 ? "" + used : "" + unused, used > 0 //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- ? used == 1 ? "used flag" : "used flags" //$NON-NLS-1$ //$NON-NLS-2$
- : unused == 1 ? "unused flag" : "unused flags"); //$NON-NLS-1$ //$NON-NLS-2$
+ infoOverlayText = NLS.bind("{0} {1}", unused > 0 ? "" + unused : "" + used, unused > 0 //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ ? unused == 1 ? Messages.BugzillaFlagPart_unused_flag : Messages.BugzillaFlagPart_unused_flags
+ : used == 1 ? Messages.BugzillaFlagPart_used_flag : Messages.BugzillaFlagPart_used_flags);
}
+
usedDetail = NLS.bind(
"{0} {1}", used == 1 ? Messages.BugzillaFlagPart_used_flag + Messages.BugzillaFlagPart_is : Messages.BugzillaFlagPart_used_flags + Messages.BugzillaFlagPart_are, usedDetail); //$NON-NLS-1$
unusedDetail = NLS.bind(
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/Messages.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/Messages.java
index db0771219..f13e6ce75 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/Messages.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/Messages.java
@@ -31,6 +31,8 @@ public class Messages extends NLS {
public static String BugzillaFlagPart_is;
+ public static String BugzillaFlagPart_no_flags_defined;
+
public static String BugzillaFlagPart_numberof_unused_used_flags;
public static String BugzillaFlagPart_unused_flag;
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/messages.properties b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/messages.properties
index cad88e573..bc68c949d 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/messages.properties
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/messages.properties
@@ -11,6 +11,7 @@
BugzillaFlagPart_are=\ are
BugzillaFlagPart_Flags_PartName=Flags
BugzillaFlagPart_is=\ is
+BugzillaFlagPart_no_flags_defined=no flags defined
BugzillaFlagPart_numberof_unused_used_flags={0} unused / {1} used flags
BugzillaFlagPart_unused_flag=unused flag
BugzillaFlagPart_unused_flags=unused flags

Back to the top