|
Lines 20-25
Link Here
|
| 20 |
|
20 |
|
| 21 |
import org.eclipse.core.runtime.IAdaptable; |
21 |
import org.eclipse.core.runtime.IAdaptable; |
| 22 |
import org.eclipse.core.runtime.IStatus; |
22 |
import org.eclipse.core.runtime.IStatus; |
|
|
23 |
import org.eclipse.jface.layout.GridDataFactory; |
| 23 |
import org.eclipse.jface.window.ToolTip; |
24 |
import org.eclipse.jface.window.ToolTip; |
| 24 |
import org.eclipse.mylyn.commons.core.DateUtil; |
25 |
import org.eclipse.mylyn.commons.core.DateUtil; |
| 25 |
import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages; |
26 |
import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages; |
|
Lines 39-44
Link Here
|
| 39 |
import org.eclipse.mylyn.internal.tasks.ui.notifications.TaskDataDiff; |
40 |
import org.eclipse.mylyn.internal.tasks.ui.notifications.TaskDataDiff; |
| 40 |
import org.eclipse.mylyn.internal.tasks.ui.notifications.TaskListNotification; |
41 |
import org.eclipse.mylyn.internal.tasks.ui.notifications.TaskListNotification; |
| 41 |
import org.eclipse.mylyn.internal.tasks.ui.notifications.TaskListNotifier; |
42 |
import org.eclipse.mylyn.internal.tasks.ui.notifications.TaskListNotifier; |
|
|
43 |
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal; |
| 42 |
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; |
44 |
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; |
| 43 |
import org.eclipse.mylyn.tasks.core.IRepositoryElement; |
45 |
import org.eclipse.mylyn.tasks.core.IRepositoryElement; |
| 44 |
import org.eclipse.mylyn.tasks.core.IRepositoryQuery; |
46 |
import org.eclipse.mylyn.tasks.core.IRepositoryQuery; |
|
Lines 52-57
Link Here
|
| 52 |
import org.eclipse.mylyn.tasks.ui.TasksUi; |
54 |
import org.eclipse.mylyn.tasks.ui.TasksUi; |
| 53 |
import org.eclipse.mylyn.tasks.ui.TasksUiImages; |
55 |
import org.eclipse.mylyn.tasks.ui.TasksUiImages; |
| 54 |
import org.eclipse.swt.SWT; |
56 |
import org.eclipse.swt.SWT; |
|
|
57 |
import org.eclipse.swt.graphics.GC; |
| 55 |
import org.eclipse.swt.graphics.Image; |
58 |
import org.eclipse.swt.graphics.Image; |
| 56 |
import org.eclipse.swt.graphics.Point; |
59 |
import org.eclipse.swt.graphics.Point; |
| 57 |
import org.eclipse.swt.graphics.Rectangle; |
60 |
import org.eclipse.swt.graphics.Rectangle; |
|
Lines 79-84
Link Here
|
| 79 |
|
82 |
|
| 80 |
private final static int MAX_TEXT_WIDTH = 300; |
83 |
private final static int MAX_TEXT_WIDTH = 300; |
| 81 |
|
84 |
|
|
|
85 |
private final static int MAX_WIDTH = 600; |
| 86 |
|
| 82 |
private final static int X_SHIFT; |
87 |
private final static int X_SHIFT; |
| 83 |
|
88 |
|
| 84 |
static { |
89 |
static { |
|
Lines 604-614
Link Here
|
| 604 |
imageLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING)); |
609 |
imageLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING | GridData.VERTICAL_ALIGN_BEGINNING)); |
| 605 |
imageLabel.setImage(image); |
610 |
imageLabel.setImage(image); |
| 606 |
|
611 |
|
| 607 |
Label textLabel = new Label(parent, SWT.NONE); |
612 |
Label textLabel = new Label(parent, SWT.WRAP); |
| 608 |
textLabel.setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_FOREGROUND)); |
613 |
textLabel.setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_FOREGROUND)); |
| 609 |
textLabel.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND)); |
614 |
textLabel.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND)); |
| 610 |
textLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_CENTER)); |
615 |
textLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_CENTER)); |
| 611 |
textLabel.setText(removeTrailingNewline(text)); |
616 |
textLabel.setText(TasksUiInternal.escapeLabelText(removeTrailingNewline(text))); |
|
|
617 |
|
| 618 |
GC gc = new GC(textLabel); |
| 619 |
try { |
| 620 |
if (gc.textExtent(text).x > MAX_WIDTH) { |
| 621 |
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.BEGINNING).hint(MAX_WIDTH, SWT.DEFAULT).applyTo( |
| 622 |
textLabel); |
| 623 |
} |
| 624 |
} finally { |
| 625 |
gc.dispose(); |
| 626 |
} |
| 612 |
} |
627 |
} |
| 613 |
|
628 |
|
| 614 |
private static class ProgressData { |
629 |
private static class ProgressData { |