org.eclipse.mylar.internal.tasks.ui.editors
Class TaskPlanningEditor

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.ui.part.WorkbenchPart
          extended by org.eclipse.ui.part.EditorPart
              extended by org.eclipse.ui.forms.editor.FormPage
                  extended by org.eclipse.mylar.internal.tasks.ui.editors.TaskFormPage
                      extended by org.eclipse.mylar.internal.tasks.ui.editors.TaskPlanningEditor
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.forms.editor.IFormPage, org.eclipse.ui.IEditorPart, org.eclipse.ui.ISaveablePart, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.part.IWorkbenchPartOrientation

public class TaskPlanningEditor
extends TaskFormPage

Author:
Mik Kersten, Ken Sueda (initial prototype), Rob Elves

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.mylar.internal.tasks.ui.editors.TaskFormPage
TaskFormPage.AnnotationConfiguration, TaskFormPage.AnnotationHover, TaskFormPage.AnnotationMarkerAccess, TaskFormPage.ErrorAnnotation, TaskFormPage.SharedTextColors
 
Field Summary
protected static java.lang.String CONTEXT_MENU_ID
           
private  DatePicker datePicker
           
private static java.lang.String DESCRIPTION_ESTIMATED
           
private  org.eclipse.swt.widgets.Composite editorComposite
           
private  org.eclipse.swt.widgets.Text endDate
           
private  org.eclipse.swt.widgets.Spinner estimated
           
private  org.eclipse.ui.forms.widgets.ScrolledForm form
           
private  org.eclipse.swt.widgets.Button getDescButton
           
private  org.eclipse.swt.widgets.Text issueReportURL
           
static java.lang.String LABEL_COMPLETE
           
static java.lang.String LABEL_INCOMPLETE
           
private static java.lang.String LABEL_NOTES
           
private static java.lang.String LABEL_OVERVIEW
           
private static java.lang.String LABEL_PLAN
           
private static java.lang.String LABEL_SCHEDULE
           
private static java.lang.String NO_TIME_ELAPSED
           
private  org.eclipse.jface.text.TextViewer noteEditor
           
private  MylarTaskEditor parentEditor
           
private  org.eclipse.swt.widgets.Text pathText
           
static java.lang.String PLANNING_EDITOR_ID
           
private  org.eclipse.swt.widgets.Combo priorityCombo
           
private  org.eclipse.swt.widgets.Button removeReminder
           
private  org.eclipse.swt.widgets.Combo statusCombo
           
private  org.eclipse.swt.widgets.Text summary
           
private  ITask task
           
private  ITaskListChangeListener TASK_LIST_LISTENER
           
private  org.eclipse.ui.forms.widgets.FormToolkit toolkit
           
 
Fields inherited from class org.eclipse.mylar.internal.tasks.ui.editors.TaskFormPage
actionContributor, isDirty, textViewers
 
Fields inherited from interface org.eclipse.ui.IEditorPart
PROP_DIRTY, PROP_INPUT
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Constructor Summary
TaskPlanningEditor(org.eclipse.ui.forms.editor.FormEditor editor)
           
 
Method Summary
protected  void createFormContent(org.eclipse.ui.forms.IManagedForm managedForm)
           
private  void createNotesSection(org.eclipse.swt.widgets.Composite parent)
           
private  void createPlanningSection(org.eclipse.swt.widgets.Composite parent)
           
(package private)  void createResourcesSection(org.eclipse.swt.widgets.Composite parent)
           
private  void createSummarySection(org.eclipse.swt.widgets.Composite parent)
           
 void dispose()
           
 void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
           
 void doSaveAs()
           
 org.eclipse.swt.widgets.Control getControl()
           
 java.lang.String getDescription()
          for testing
 java.lang.String getFormTitle()
          for testing
private  java.lang.String getTaskDateString(ITask task)
           
 boolean isDirty()
           
 boolean isSaveAsAllowed()
           
protected  void retrieveTaskDescription(java.lang.String url)
          Attempts to set the task pageTitle to the title from the specified url
protected  void setButtonStatus()
          Sets the Get Description button enabled or not depending on whether there is a URL specified
 void setDescription(java.lang.String desc)
          for testing - should cause dirty state
 void setFocus()
           
 void setNotes(java.lang.String notes)
          for testing - should cause dirty state
 void setParentEditor(MylarTaskEditor parentEditor)
           
 java.lang.String toString()
           
 void updateTaskData(ITask updateTask)
          public for testing
 
Methods inherited from class org.eclipse.mylar.internal.tasks.ui.editors.TaskFormPage
addTextEditor, addTextViewer, canDoAction, canPerformDirectly, doAction, getFocusControl, markDirty
 
Methods inherited from class org.eclipse.ui.forms.editor.FormPage
canLeaveThePage, createPartControl, getEditor, getId, getIndex, getManagedForm, getPartControl, getTitleImage, init, initialize, isActive, isEditor, selectReveal, setActive, setIndex
 
Methods inherited from class org.eclipse.ui.part.EditorPart
checkSite, getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setInput, setInputWithNotify, setPartName
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPropertyListener, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getSite, getTitle, removePropertyListener, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
 
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.ui.IEditorPart
getEditorInput, getEditorSite
 
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, getSite, getTitle, getTitleToolTip, removePropertyListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.ui.ISaveablePart
isSaveOnCloseNeeded
 

Field Detail

PLANNING_EDITOR_ID

public static final java.lang.String PLANNING_EDITOR_ID
See Also:
Constant Field Values

LABEL_SCHEDULE

private static final java.lang.String LABEL_SCHEDULE
See Also:
Constant Field Values

DESCRIPTION_ESTIMATED

private static final java.lang.String DESCRIPTION_ESTIMATED

LABEL_INCOMPLETE

public static final java.lang.String LABEL_INCOMPLETE
See Also:
Constant Field Values

LABEL_COMPLETE

public static final java.lang.String LABEL_COMPLETE
See Also:
Constant Field Values

LABEL_PLAN

private static final java.lang.String LABEL_PLAN
See Also:
Constant Field Values

NO_TIME_ELAPSED

private static final java.lang.String NO_TIME_ELAPSED
See Also:
Constant Field Values

LABEL_OVERVIEW

private static final java.lang.String LABEL_OVERVIEW
See Also:
Constant Field Values

LABEL_NOTES

private static final java.lang.String LABEL_NOTES
See Also:
Constant Field Values

datePicker

private DatePicker datePicker

task

private ITask task

editorComposite

private org.eclipse.swt.widgets.Composite editorComposite

CONTEXT_MENU_ID

protected static final java.lang.String CONTEXT_MENU_ID
See Also:
Constant Field Values

removeReminder

private org.eclipse.swt.widgets.Button removeReminder

pathText

private org.eclipse.swt.widgets.Text pathText

endDate

private org.eclipse.swt.widgets.Text endDate

form

private org.eclipse.ui.forms.widgets.ScrolledForm form

summary

private org.eclipse.swt.widgets.Text summary

issueReportURL

private org.eclipse.swt.widgets.Text issueReportURL

priorityCombo

private org.eclipse.swt.widgets.Combo priorityCombo

statusCombo

private org.eclipse.swt.widgets.Combo statusCombo

noteEditor

private org.eclipse.jface.text.TextViewer noteEditor

estimated

private org.eclipse.swt.widgets.Spinner estimated

getDescButton

private org.eclipse.swt.widgets.Button getDescButton

parentEditor

private MylarTaskEditor parentEditor

TASK_LIST_LISTENER

private ITaskListChangeListener TASK_LIST_LISTENER

toolkit

private org.eclipse.ui.forms.widgets.FormToolkit toolkit
Constructor Detail

TaskPlanningEditor

public TaskPlanningEditor(org.eclipse.ui.forms.editor.FormEditor editor)
Method Detail

updateTaskData

public void updateTaskData(ITask updateTask)
public for testing


doSave

public void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
Specified by:
doSave in interface org.eclipse.ui.ISaveablePart
Overrides:
doSave in class org.eclipse.ui.forms.editor.FormPage

doSaveAs

public void doSaveAs()
Specified by:
doSaveAs in interface org.eclipse.ui.ISaveablePart
Overrides:
doSaveAs in class org.eclipse.ui.forms.editor.FormPage

isDirty

public boolean isDirty()
Specified by:
isDirty in interface org.eclipse.ui.ISaveablePart
Overrides:
isDirty in class TaskFormPage

isSaveAsAllowed

public boolean isSaveAsAllowed()
Specified by:
isSaveAsAllowed in interface org.eclipse.ui.ISaveablePart
Overrides:
isSaveAsAllowed in class org.eclipse.ui.forms.editor.FormPage

createFormContent

protected void createFormContent(org.eclipse.ui.forms.IManagedForm managedForm)
Overrides:
createFormContent in class org.eclipse.ui.forms.editor.FormPage

setFocus

public void setFocus()
Specified by:
setFocus in interface org.eclipse.ui.IWorkbenchPart
Overrides:
setFocus in class org.eclipse.ui.forms.editor.FormPage

getControl

public org.eclipse.swt.widgets.Control getControl()

createSummarySection

private void createSummarySection(org.eclipse.swt.widgets.Composite parent)

retrieveTaskDescription

protected void retrieveTaskDescription(java.lang.String url)
Attempts to set the task pageTitle to the title from the specified url


setButtonStatus

protected void setButtonStatus()
Sets the Get Description button enabled or not depending on whether there is a URL specified


createPlanningSection

private void createPlanningSection(org.eclipse.swt.widgets.Composite parent)

createNotesSection

private void createNotesSection(org.eclipse.swt.widgets.Composite parent)

getTaskDateString

private java.lang.String getTaskDateString(ITask task)

createResourcesSection

void createResourcesSection(org.eclipse.swt.widgets.Composite parent)

setParentEditor

public void setParentEditor(MylarTaskEditor parentEditor)

dispose

public void dispose()
Specified by:
dispose in interface org.eclipse.ui.IWorkbenchPart
Overrides:
dispose in class org.eclipse.ui.forms.editor.FormPage

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setNotes

public void setNotes(java.lang.String notes)
for testing - should cause dirty state


setDescription

public void setDescription(java.lang.String desc)
for testing - should cause dirty state


getDescription

public java.lang.String getDescription()
for testing


getFormTitle

public java.lang.String getFormTitle()
for testing