|
Lines 35-40
Link Here
|
| 35 |
import org.eclipse.jface.action.Separator; |
35 |
import org.eclipse.jface.action.Separator; |
| 36 |
import org.eclipse.jface.action.ToolBarManager; |
36 |
import org.eclipse.jface.action.ToolBarManager; |
| 37 |
import org.eclipse.jface.dialogs.IMessageProvider; |
37 |
import org.eclipse.jface.dialogs.IMessageProvider; |
|
|
38 |
import org.eclipse.jface.layout.GridDataFactory; |
| 38 |
import org.eclipse.jface.resource.CompositeImageDescriptor; |
39 |
import org.eclipse.jface.resource.CompositeImageDescriptor; |
| 39 |
import org.eclipse.jface.resource.ImageDescriptor; |
40 |
import org.eclipse.jface.resource.ImageDescriptor; |
| 40 |
import org.eclipse.jface.resource.JFaceResources; |
41 |
import org.eclipse.jface.resource.JFaceResources; |
|
Lines 63-68
Link Here
|
| 63 |
import org.eclipse.mylyn.internal.tasks.ui.editors.EditorUtil; |
64 |
import org.eclipse.mylyn.internal.tasks.ui.editors.EditorUtil; |
| 64 |
import org.eclipse.mylyn.internal.tasks.ui.editors.Messages; |
65 |
import org.eclipse.mylyn.internal.tasks.ui.editors.Messages; |
| 65 |
import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorActionContributor; |
66 |
import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorActionContributor; |
|
|
67 |
import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorSummaryPart; |
| 66 |
import org.eclipse.mylyn.internal.tasks.ui.util.TaskDragSourceListener; |
68 |
import org.eclipse.mylyn.internal.tasks.ui.util.TaskDragSourceListener; |
| 67 |
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal; |
69 |
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal; |
| 68 |
import org.eclipse.mylyn.tasks.core.ITask; |
70 |
import org.eclipse.mylyn.tasks.core.ITask; |
|
Lines 86-91
Link Here
|
| 86 |
import org.eclipse.swt.graphics.Image; |
88 |
import org.eclipse.swt.graphics.Image; |
| 87 |
import org.eclipse.swt.graphics.Point; |
89 |
import org.eclipse.swt.graphics.Point; |
| 88 |
import org.eclipse.swt.graphics.Rectangle; |
90 |
import org.eclipse.swt.graphics.Rectangle; |
|
|
91 |
import org.eclipse.swt.layout.GridLayout; |
| 89 |
import org.eclipse.swt.layout.RowLayout; |
92 |
import org.eclipse.swt.layout.RowLayout; |
| 90 |
import org.eclipse.swt.widgets.Composite; |
93 |
import org.eclipse.swt.widgets.Composite; |
| 91 |
import org.eclipse.swt.widgets.Control; |
94 |
import org.eclipse.swt.widgets.Control; |
|
Lines 186-191
Link Here
|
| 186 |
|
189 |
|
| 187 |
OpenWithBrowserAction openWithBrowserAction; |
190 |
OpenWithBrowserAction openWithBrowserAction; |
| 188 |
|
191 |
|
|
|
192 |
private Composite headingClientComposite; |
| 193 |
|
| 189 |
private static boolean toolBarFailureLogged; |
194 |
private static boolean toolBarFailureLogged; |
| 190 |
|
195 |
|
| 191 |
public TaskEditor() { |
196 |
public TaskEditor() { |
|
Lines 207-213
Link Here
|
| 207 |
// create left tool bar that replaces form heading label |
212 |
// create left tool bar that replaces form heading label |
| 208 |
try { |
213 |
try { |
| 209 |
FormHeading heading = (FormHeading) getHeaderForm().getForm().getForm().getHead(); |
214 |
FormHeading heading = (FormHeading) getHeaderForm().getForm().getForm().getHead(); |
|
|
215 |
headingClientComposite = new Composite(heading, SWT.NONE); |
| 216 |
//headingClientComposite.setBackground(new org.eclipse.swt.graphics.Color(Display.getCurrent(), 23, 44, 32)); |
| 217 |
GridLayout headingLayout = new GridLayout(); |
| 218 |
headingLayout.verticalSpacing = 0; |
| 219 |
headingLayout.horizontalSpacing = 0; |
| 220 |
headingLayout.marginBottom = 0; |
| 221 |
headingLayout.marginTop = 0; |
| 222 |
headingLayout.marginLeft = 0; |
| 223 |
headingLayout.marginRight = 0; |
| 224 |
headingClientComposite.setBackgroundMode(SWT.INHERIT_DEFAULT); |
| 210 |
|
225 |
|
|
|
226 |
headingClientComposite.setLayout(headingLayout); |
| 227 |
GridDataFactory.fillDefaults().grab(true, false).applyTo(headingClientComposite); |
| 228 |
heading.setHeadClient(headingClientComposite); |
| 211 |
Field field = FormHeading.class.getDeclaredField("titleRegion"); //$NON-NLS-1$ |
229 |
Field field = FormHeading.class.getDeclaredField("titleRegion"); //$NON-NLS-1$ |
| 212 |
field.setAccessible(true); |
230 |
field.setAccessible(true); |
| 213 |
|
231 |
|
|
Lines 236-242
Link Here
|
| 236 |
|
254 |
|
| 237 |
//titleLabel = new Label(titleRegion, SWT.NONE); |
255 |
//titleLabel = new Label(titleRegion, SWT.NONE); |
| 238 |
// need a viewer for copy support |
256 |
// need a viewer for copy support |
| 239 |
TextViewer titleViewer = new TextViewer(titleRegion, SWT.READ_ONLY); |
257 |
TextViewer titleViewer = new TextViewer(titleRegion, SWT.NONE); |
| 240 |
// Eclipse 3.3 needs a document, otherwise an NPE is thrown |
258 |
// Eclipse 3.3 needs a document, otherwise an NPE is thrown |
| 241 |
titleViewer.setDocument(new Document()); |
259 |
titleViewer.setDocument(new Document()); |
| 242 |
|
260 |
|
|
Lines 416-421
Link Here
|
| 416 |
if (page instanceof ISelectionProvider) { |
434 |
if (page instanceof ISelectionProvider) { |
| 417 |
((ISelectionProvider) page).addSelectionChangedListener(getActionBarContributor()); |
435 |
((ISelectionProvider) page).addSelectionChangedListener(getActionBarContributor()); |
| 418 |
} |
436 |
} |
|
|
437 |
if (page instanceof AbstractTaskEditorPage) { |
| 438 |
// Pull out summary section into the common header |
| 439 |
AbstractTaskEditorPart editorPart = ((AbstractTaskEditorPage) page).getPart(AbstractTaskEditorPage.ID_PART_SUMMARY); |
| 440 |
if (editorPart instanceof TaskEditorSummaryPart) { |
| 441 |
((TaskEditorSummaryPart) editorPart).createControl(headingClientComposite, getToolkit()); |
| 442 |
GridDataFactory.fillDefaults() |
| 443 |
.align(SWT.FILL, SWT.TOP) |
| 444 |
.grab(true, false) |
| 445 |
.applyTo(editorPart.getControl()); |
| 446 |
editorPart.getControl().setBackground(null); |
| 447 |
} |
| 448 |
} |
| 419 |
} catch (Exception e) { |
449 |
} catch (Exception e) { |
| 420 |
StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, |
450 |
StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, |
| 421 |
"Could not create editor via factory: " + factory, e)); //$NON-NLS-1$ |
451 |
"Could not create editor via factory: " + factory, e)); //$NON-NLS-1$ |