Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 214212 Details for
Bug 342200
move summary section into the common header of the task editor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
prototype
clipboard.txt (text/plain), 7.09 KB, created by
Robert Elves
on 2012-04-18 19:33:05 EDT
(
hide
)
Description:
prototype
Filename:
MIME Type:
Creator:
Robert Elves
Created:
2012-04-18 19:33:05 EDT
Size:
7.09 KB
patch
obsolete
>diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorSummaryPart.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorSummaryPart.java >index 710e12f..9977ed3 100644 >--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorSummaryPart.java >+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorSummaryPart.java >@@ -15,6 +15,7 @@ > import org.eclipse.jface.layout.GridDataFactory; > import org.eclipse.jface.layout.GridLayoutFactory; > import org.eclipse.mylyn.commons.ui.CommonImages; >+import org.eclipse.mylyn.commons.ui.compatibility.CommonThemes; > import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal; > import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel; > import org.eclipse.mylyn.tasks.core.ITaskMapping; >@@ -24,11 +25,13 @@ > import org.eclipse.swt.SWT; > import org.eclipse.swt.events.FocusAdapter; > import org.eclipse.swt.events.FocusEvent; >+import org.eclipse.swt.graphics.Color; > import org.eclipse.swt.graphics.Image; > import org.eclipse.swt.layout.GridLayout; > import org.eclipse.swt.widgets.Composite; > import org.eclipse.swt.widgets.Control; > import org.eclipse.swt.widgets.Label; >+import org.eclipse.ui.PlatformUI; > import org.eclipse.ui.forms.widgets.FormToolkit; > > /** >@@ -68,6 +71,7 @@ > > if (showLabel && !isPriority) { > editor.createLabelControl(composite, toolkit); >+ editor.getLabelControl().setBackground(null); > GridDataFactory.defaultsFor(editor.getLabelControl()) > .indent(indent, 0) > .applyTo(editor.getLabelControl()); >@@ -93,6 +97,13 @@ > } > > editor.createControl(composite, toolkit); >+ editor.getControl().setBackground(null); >+ Color color = PlatformUI.getWorkbench() >+ .getThemeManager() >+ .getCurrentTheme() >+ .getColorRegistry() >+ .get(CommonThemes.COLOR_COMPLETED); >+ editor.getControl().setForeground(color); > getTaskEditorPage().getAttributeEditorToolkit().adapt(editor); > } > } >@@ -170,6 +181,7 @@ > TaskAttribute priorityAttribute = getTaskData().getRoot().getMappedAttribute(TaskAttribute.PRIORITY); > final Control priorityEditor = addAttributeWithIcon(composite, toolkit, priorityAttribute, false); > if (priorityEditor != null) { >+ priorityEditor.setBackground(null); > GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.CENTER).span(1, 2).applyTo(priorityEditor); > // forward focus to the summary editor > priorityEditor.addFocusListener(new FocusAdapter() { >@@ -220,7 +232,9 @@ > layout.marginHeight = 0; > layout.marginWidth = 0; > headerComposite.setLayout(layout); >- GridDataFactory.fillDefaults().grab(true, false).applyTo(headerComposite); >+ headerComposite.setBackground(null); >+ headerComposite.setBackgroundMode(SWT.INHERIT_FORCE); >+ GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.TOP).grab(true, false).applyTo(headerComposite); > > // ITaskMapping mapping = getTaskEditorPage().getConnector().getTaskMapping(getTaskData()); > // if (mapping != null) { >diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java >index daf2998..e9c8879 100644 >--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java >+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java >@@ -35,6 +35,7 @@ > import org.eclipse.jface.action.Separator; > import org.eclipse.jface.action.ToolBarManager; > import org.eclipse.jface.dialogs.IMessageProvider; >+import org.eclipse.jface.layout.GridDataFactory; > import org.eclipse.jface.resource.CompositeImageDescriptor; > import org.eclipse.jface.resource.ImageDescriptor; > import org.eclipse.jface.resource.JFaceResources; >@@ -63,6 +64,7 @@ > import org.eclipse.mylyn.internal.tasks.ui.editors.EditorUtil; > import org.eclipse.mylyn.internal.tasks.ui.editors.Messages; > import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorActionContributor; >+import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorSummaryPart; > import org.eclipse.mylyn.internal.tasks.ui.util.TaskDragSourceListener; > import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal; > import org.eclipse.mylyn.tasks.core.ITask; >@@ -86,6 +88,7 @@ > import org.eclipse.swt.graphics.Image; > import org.eclipse.swt.graphics.Point; > import org.eclipse.swt.graphics.Rectangle; >+import org.eclipse.swt.layout.GridLayout; > import org.eclipse.swt.layout.RowLayout; > import org.eclipse.swt.widgets.Composite; > import org.eclipse.swt.widgets.Control; >@@ -186,6 +189,8 @@ > > OpenWithBrowserAction openWithBrowserAction; > >+ private Composite headingClientComposite; >+ > private static boolean toolBarFailureLogged; > > public TaskEditor() { >@@ -207,7 +212,20 @@ > // create left tool bar that replaces form heading label > try { > FormHeading heading = (FormHeading) getHeaderForm().getForm().getForm().getHead(); >+ headingClientComposite = new Composite(heading, SWT.NONE); >+ //headingClientComposite.setBackground(new org.eclipse.swt.graphics.Color(Display.getCurrent(), 23, 44, 32)); >+ GridLayout headingLayout = new GridLayout(); >+ headingLayout.verticalSpacing = 0; >+ headingLayout.horizontalSpacing = 0; >+ headingLayout.marginBottom = 0; >+ headingLayout.marginTop = 0; >+ headingLayout.marginLeft = 0; >+ headingLayout.marginRight = 0; >+ headingClientComposite.setBackgroundMode(SWT.INHERIT_DEFAULT); > >+ headingClientComposite.setLayout(headingLayout); >+ GridDataFactory.fillDefaults().grab(true, false).applyTo(headingClientComposite); >+ heading.setHeadClient(headingClientComposite); > Field field = FormHeading.class.getDeclaredField("titleRegion"); //$NON-NLS-1$ > field.setAccessible(true); > >@@ -236,7 +254,7 @@ > > //titleLabel = new Label(titleRegion, SWT.NONE); > // need a viewer for copy support >- TextViewer titleViewer = new TextViewer(titleRegion, SWT.READ_ONLY); >+ TextViewer titleViewer = new TextViewer(titleRegion, SWT.NONE); > // Eclipse 3.3 needs a document, otherwise an NPE is thrown > titleViewer.setDocument(new Document()); > >@@ -416,6 +434,18 @@ > if (page instanceof ISelectionProvider) { > ((ISelectionProvider) page).addSelectionChangedListener(getActionBarContributor()); > } >+ if (page instanceof AbstractTaskEditorPage) { >+ // Pull out summary section into the common header >+ AbstractTaskEditorPart editorPart = ((AbstractTaskEditorPage) page).getPart(AbstractTaskEditorPage.ID_PART_SUMMARY); >+ if (editorPart instanceof TaskEditorSummaryPart) { >+ ((TaskEditorSummaryPart) editorPart).createControl(headingClientComposite, getToolkit()); >+ GridDataFactory.fillDefaults() >+ .align(SWT.FILL, SWT.TOP) >+ .grab(true, false) >+ .applyTo(editorPart.getControl()); >+ editorPart.getControl().setBackground(null); >+ } >+ } > } catch (Exception e) { > StatusHandler.log(new Status(IStatus.ERROR, TasksUiPlugin.ID_PLUGIN, > "Could not create editor via factory: " + factory, e)); //$NON-NLS-1$
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 342200
:
214211
| 214212 |
214213
|
232475