Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfbecker2010-12-10 22:30:13 +0000
committerfbecker2010-12-10 22:30:13 +0000
commit325a69f9a8f688d318dde26774990a2bd79024c6 (patch)
tree7de99dc1e1d3c5ebaacfb83ddf6b14fd710f4806 /org.eclipse.mylyn.bugzilla.ui
parente6167f6fbfdfd2424dbaed4aa473dd4545d14933 (diff)
downloadorg.eclipse.mylyn.tasks-325a69f9a8f688d318dde26774990a2bd79024c6.tar.gz
org.eclipse.mylyn.tasks-325a69f9a8f688d318dde26774990a2bd79024c6.tar.xz
org.eclipse.mylyn.tasks-325a69f9a8f688d318dde26774990a2bd79024c6.zip
ASSIGNED - bug 331626: [api] attribute editors should have a tooltip
https://bugs.eclipse.org/bugs/show_bug.cgi?id=331626
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.ui')
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaCcAttributeEditor.java1
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaVotesEditor.java7
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/FlagAttributeEditor.java8
3 files changed, 15 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaCcAttributeEditor.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaCcAttributeEditor.java
index 303cdf34a..0bc7b1b4f 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaCcAttributeEditor.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaCcAttributeEditor.java
@@ -49,6 +49,7 @@ public class BugzillaCcAttributeEditor extends AbstractAttributeEditor {
list.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
list.setFont(JFaceResources.getDefaultFont());
GridDataFactory.fillDefaults().grab(true, true).align(SWT.FILL, SWT.FILL).applyTo(list);
+ list.setToolTipText(getDescription());
TaskAttribute attrUserCC = getTaskAttribute();
if (attrUserCC != null) {
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaVotesEditor.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaVotesEditor.java
index d2ba620e2..64a0c7749 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaVotesEditor.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaVotesEditor.java
@@ -54,7 +54,12 @@ public class BugzillaVotesEditor extends AbstractAttributeEditor {
((GridData) getLabelControl().getLayoutData()).exclude = true;
showVotes = toolkit.createHyperlink(parent, getTaskAttribute().getValue(), SWT.NONE);
showVotes.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
- showVotes.setToolTipText(Messages.BugzillaVotesEditor_Show_votes);
+ String tooltip = getDescription();
+ if (tooltip != null && !tooltip.equals("")) { //$NON-NLS-1$
+ showVotes.setToolTipText(tooltip);
+ } else {
+ showVotes.setToolTipText(Messages.BugzillaVotesEditor_Show_votes);
+ }
showVotes.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/FlagAttributeEditor.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/FlagAttributeEditor.java
index c2e49f788..a65465780 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/FlagAttributeEditor.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/FlagAttributeEditor.java
@@ -88,6 +88,9 @@ public class FlagAttributeEditor extends AbstractAttributeEditor {
text.setBackground(parent.getBackground());
text.setEditable(false);
String tooltip = getTaskAttribute().getMetaData().getLabel();
+ if (tooltip == null) {
+ tooltip = getDescription();
+ }
if (tooltip != null) {
text.setToolTipText(tooltip);
}
@@ -99,12 +102,16 @@ public class FlagAttributeEditor extends AbstractAttributeEditor {
text.setText(requestee.getValue());
text.setBackground(parent.getBackground());
text.setEditable(false);
+ text.setToolTipText(requestee.getMetaData().getValue(TaskAttribute.META_DESCRIPTION));
}
} else {
combo = new CCombo(flagComposite, SWT.FLAT | SWT.READ_ONLY);
toolkit.adapt(combo, false, false);
combo.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
String tooltip = getTaskAttribute().getMetaData().getLabel();
+ if (tooltip == null) {
+ tooltip = getDescription();
+ }
if (tooltip != null) {
combo.setToolTipText(tooltip);
}
@@ -152,6 +159,7 @@ public class FlagAttributeEditor extends AbstractAttributeEditor {
requesteeText = toolkit.createText(requesteeComposite, requestee.getValue());
boolean enabled = "?".equals(getValueLabel()); //$NON-NLS-1$
requesteeText.setEnabled(enabled);
+ requesteeText.setToolTipText(requestee.getMetaData().getValue(TaskAttribute.META_DESCRIPTION));
IContentProposalProvider contentProposalProvider = new PersonProposalProvider(null,
requestee.getTaskData());
ILabelProvider labelPropsalProvider = new PersonProposalLabelProvider();

Back to the top