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

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.AbstractRepositoryTaskEditor
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
Direct Known Subclasses:
AbstractNewRepositoryTaskEditor

public abstract class AbstractRepositoryTaskEditor
extends TaskFormPage

Author:
Mik Kersten, Rob Elves, Jeff Pound (Attachment work), Steffen Pingel

Nested Class Summary
private  class AbstractRepositoryTaskEditor.AttachmentLabelProvider
           
private static class AbstractRepositoryTaskEditor.AttachmentTableLabelProvider
           
protected  class AbstractRepositoryTaskEditor.ComboSelectionListener
           
protected  class AbstractRepositoryTaskEditor.DescriptionListener
          A listener for selection of the description field.
 class AbstractRepositoryTaskEditor.GenericListener
          A generic listener for selection of unimportant items.
protected  class AbstractRepositoryTaskEditor.NewCommentListener
          A listener for selection of the textbox where a new comment is entered in.
private  class AbstractRepositoryTaskEditor.RadioButtonListener
          Class to handle the selection change of the radio buttons.
protected  class AbstractRepositoryTaskEditor.SummaryListener
          A listener to check if the summary field was modified.
 
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  org.eclipse.swt.custom.StyledText addCommentsTextBox
           
protected  org.eclipse.swt.widgets.Button addSelfToCCCheck
           
protected  org.eclipse.swt.widgets.Button attachContextButton
           
private static java.lang.String ATTACHMENT_DEFAULT_NAME
           
protected  java.lang.String[] attachmentsColumns
           
protected  int[] attachmentsColumnWidths
           
protected  org.eclipse.swt.widgets.Table attachmentsTable
           
private  org.eclipse.jface.viewers.TableViewer attachmentsTableViewer
           
protected  org.eclipse.jface.viewers.TableViewer attachmentTableViewer
           
protected  org.eclipse.swt.custom.CCombo attributeCombo
           
private  java.util.List<IRepositoryTaskAttributeListener> attributesListeners
           
private  org.eclipse.swt.graphics.Color backgroundIncoming
           
protected  org.eclipse.swt.widgets.List ccList
           
protected  org.eclipse.swt.widgets.Text ccText
           
protected  java.util.HashMap<org.eclipse.swt.custom.CCombo,RepositoryTaskAttribute> comboListenerMap
           
private  org.eclipse.ui.forms.widgets.Section commentsSection
           
protected  java.util.List<org.eclipse.swt.custom.StyledText> commentStyleText
           
protected static java.lang.String CONTEXT_MENU_ID
           
private static java.lang.String CTYPE_HTML
           
private static java.lang.String CTYPE_OCTET_STREAM
           
private static java.lang.String CTYPE_TEXT
           
private static java.lang.String CTYPE_ZIP
           
protected  org.eclipse.swt.custom.StyledText currentSelectedText
           
protected  org.eclipse.ui.actions.RetargetAction cutAction
           
static int DESCRIPTION_HEIGHT
           
static int DESCRIPTION_WIDTH
           
protected  org.eclipse.jface.text.TextViewer descriptionTextViewer
           
protected  org.eclipse.swt.widgets.Display display
           
protected  org.eclipse.swt.widgets.Composite editorComposite
           
protected  AbstractTaskEditorInput editorInput
           
protected  boolean expandedStateAttributes
           
private  org.eclipse.ui.forms.widgets.ScrolledForm form
           
protected  java.lang.String HEADER
          Style option for function newLayout.
private static java.lang.String HEADER_DATE_FORMAT
           
static org.eclipse.swt.graphics.Font HEADER_FONT
           
protected  int HORZ_INDENT
           
protected  boolean htmlComments
           
static java.lang.String HYPERLINK_TYPE_JAVA
           
static java.lang.String HYPERLINK_TYPE_TASK
           
private  boolean isDisposed
           
private static java.lang.String LABEL_BROWSER
           
private static java.lang.String LABEL_BUTTON_SUBMIT
           
private static java.lang.String LABEL_DEFAULT_EDITOR
           
protected static java.lang.String LABEL_SECTION_ACTIONS
           
private static java.lang.String LABEL_SECTION_ATTACHMENTS
           
private static java.lang.String LABEL_SECTION_ATTRIBUTES
           
protected static java.lang.String LABEL_SECTION_COMMENTS
           
protected static java.lang.String LABEL_SECTION_DESCRIPTION
           
protected static java.lang.String LABEL_SECTION_NEW_COMMENT
           
private static java.lang.String LABEL_TEXT_EDITOR
           
private  IRepositoryTaskSelection lastSelected
           
protected  org.eclipse.jface.text.TextViewer newCommentTextViewer
           
private  RepositoryTaskOutlinePage outlinePage
           
private  MylarTaskEditor parentEditor
           
protected  org.eclipse.ui.actions.RetargetAction pasteAction
           
protected  java.lang.String PROPERTY
          Style option for function newLayout.
protected  org.eclipse.swt.widgets.Control[] radioOptions
           
protected  org.eclipse.swt.widgets.Button[] radios
           
private static java.lang.String REASSIGN_BUG_TO
           
protected  TaskRepository repository
           
protected  int scrollHorzPageIncrement
           
protected  int scrollIncrement
           
protected  int scrollVertPageIncrement
           
private static java.lang.String SECTION_TITLE_PEOPLE
           
protected  java.util.List<org.eclipse.jface.viewers.ISelectionChangedListener> selectionChangedListeners
           
protected  org.eclipse.ui.ISelectionListener selectionListener
          Focuses on form widgets when an item in the outline is selected.
protected  org.eclipse.jface.viewers.ISelectionProvider selectionProvider
           
protected  org.eclipse.swt.widgets.Button submitButton
           
protected  org.eclipse.swt.widgets.Text summaryText
           
protected  RepositoryTaskOutlineNode taskOutlineModel
           
static org.eclipse.swt.graphics.Font TEXT_FONT
           
protected  java.util.HashMap<java.lang.Object,org.eclipse.swt.custom.StyledText> textHash
          List of the StyledText's so that we can get the previous and the next
protected  int textsindex
          Index into the styled texts
static org.eclipse.swt.graphics.Font TITLE_FONT
           
private  org.eclipse.ui.forms.widgets.FormToolkit toolkit
           
protected  java.lang.String VALUE
          Style option for function newLayout.
static int WRAP_LENGTH
           
 
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
AbstractRepositoryTaskEditor(org.eclipse.ui.forms.editor.FormEditor editor)
          Creates a new AbstractRepositoryTaskEditor.
AbstractRepositoryTaskEditor(org.eclipse.ui.forms.editor.FormEditor editor, boolean htmlComments)
           
 
Method Summary
protected  void addActionButtons(org.eclipse.swt.widgets.Composite buttonComposite)
          Adds buttons to this composite.
protected  void addAttachContextButton(org.eclipse.swt.widgets.Composite buttonComposite, ITask task)
           
 void addAttributeListener(IRepositoryTaskAttributeListener listener)
           
protected  void addCCList(org.eclipse.swt.widgets.Composite attributesComposite)
           
protected  void addRadioButtons(org.eclipse.swt.widgets.Composite buttonComposite)
           
protected  void addSelfToCC(org.eclipse.swt.widgets.Composite composite)
          Creates a check box for adding the repository user to the cc list.
protected  void addSummaryText(org.eclipse.swt.widgets.Composite attributesComposite)
          Adds a text field to display and edit the bug's summary.
static java.lang.String checkText(java.lang.String text)
          Make sure that a String that is null is changed to a null string
 void close()
           
protected  void createActionsLayout(org.eclipse.swt.widgets.Composite composite)
          Creates the button layout.
protected  void createAttachmentLayout(org.eclipse.swt.widgets.Composite composite)
           
protected  org.eclipse.swt.widgets.Composite createAttributeLayout(org.eclipse.swt.widgets.Composite composite)
          Creates the attribute layout, which contains most of the basic attributes of the bug (some of which are editable).
protected  void createCommentLayout(org.eclipse.swt.widgets.Composite composite)
           
protected  void createCustomAttributeLayout(org.eclipse.swt.widgets.Composite composite)
           
protected  void createDescriptionLayout(org.eclipse.swt.widgets.Composite composite)
           
protected  void createFormContent(org.eclipse.ui.forms.IManagedForm managedForm)
           
protected  void createNewCommentLayout(org.eclipse.swt.widgets.Composite composite)
           
protected  void createPeopleLayout(org.eclipse.swt.widgets.Composite composite)
           
protected  void createReportHeaderLayout(org.eclipse.swt.widgets.Composite composite)
           
protected  org.eclipse.ui.forms.widgets.Section createSection(org.eclipse.swt.widgets.Composite composite, java.lang.String title)
           
protected  org.eclipse.swt.widgets.Text createTextField(org.eclipse.swt.widgets.Composite composite, RepositoryTaskAttribute attribute, int style)
          Utility method to create text field sets backgournd to TaskListColorsAndFonts.COLOR_ATTRIBUTE_CHANGED if attribute has changed.
 void dispose()
           
 void doSave(org.eclipse.core.runtime.IProgressMonitor monitor)
           
 void doSaveAs()
           
protected  void fireSelectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
          Fires a SelectionChangedEvent to all listeners registered under selectionChangedListeners.
private  void focusOn(org.eclipse.swt.widgets.Control selectionComposite, boolean highlight)
          Scroll to a specified piece of text
 java.lang.Object getAdapter(java.lang.Class adapter)
           
 java.lang.Object getAdapterDelgate(java.lang.Class<?> adapter)
           
 boolean getAttachContext()
           
 org.eclipse.swt.widgets.Control getControl()
           
 org.eclipse.swt.widgets.Composite getEditorComposite()
           
 java.lang.String getNewCommentText()
           
protected  IOfflineTaskHandler getOfflineTaskHandler()
           
 RepositoryTaskOutlinePage getOutline()
           
 RepositoryTaskOutlineNode getOutlineModel()
           
protected  RepositoryTaskData getRepositoryTaskData()
           
 RepositoryTaskOutlineNode getTaskOutlineModel()
           
protected  java.lang.String getTitleString()
           
 void handleSummaryEvent()
          Check if the summary field was modified, and update it if necessary.
protected  boolean hasAttributeChanges()
           
protected  boolean hasChanged(RepositoryTaskAttribute newAttribute)
           
 void init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput input)
           
 boolean isDisposed()
           
 boolean isSaveAsAllowed()
           
private  void registerDropListener(org.eclipse.swt.widgets.Control control)
           
 void removeAttributeListener(IRepositoryTaskAttributeListener listener)
           
 void revealAllComments()
           
 void saveBug()
          If there is no locally saved copy of the current bug, then it saved offline.
 void select(int commentNumber)
          Selects the given object in the editor.
 void select(java.lang.Object o, boolean highlight)
          Selects the given object in the editor.
 void selectDescription()
           
 void selectNewComment()
           
 void setAttachContext(boolean attachContext)
           
 void setDescriptionText(java.lang.String text)
           
 void setFocus()
           
protected  void setGeneralTitleText()
          This refreshes the text in the title label of the info area (it contains elements which can change).
 void setParentEditor(MylarTaskEditor parentEditor)
           
 void setSummaryText(java.lang.String text)
           
 void setTaskOutlineModel(RepositoryTaskOutlineNode taskOutlineModel)
           
protected abstract  void submitToRepository()
           
protected  void updateEditor()
          Refreshes any text labels in the editor that contain information that might change.
protected  void updateEditorTitle()
          Updates the title of the editor to reflect dirty status.
protected  void updateTask()
           
protected abstract  void validateInput()
           
 
Methods inherited from class org.eclipse.mylar.internal.tasks.ui.editors.TaskFormPage
addTextEditor, addTextViewer, canDoAction, canPerformDirectly, doAction, getFocusControl, isDirty, markDirty
 
Methods inherited from class org.eclipse.ui.forms.editor.FormPage
canLeaveThePage, createPartControl, getEditor, getId, getIndex, getManagedForm, getPartControl, getTitleImage, 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, 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, toString, 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.ui.ISaveablePart
isSaveOnCloseNeeded
 

Field Detail

HEADER_DATE_FORMAT

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

ATTACHMENT_DEFAULT_NAME

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

CTYPE_ZIP

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

CTYPE_OCTET_STREAM

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

CTYPE_TEXT

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

CTYPE_HTML

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

LABEL_BROWSER

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

LABEL_DEFAULT_EDITOR

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

LABEL_TEXT_EDITOR

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

CONTEXT_MENU_ID

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

HYPERLINK_TYPE_TASK

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

HYPERLINK_TYPE_JAVA

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

LABEL_BUTTON_SUBMIT

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

LABEL_SECTION_ACTIONS

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

LABEL_SECTION_ATTRIBUTES

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

LABEL_SECTION_ATTACHMENTS

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

LABEL_SECTION_DESCRIPTION

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

LABEL_SECTION_COMMENTS

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

LABEL_SECTION_NEW_COMMENT

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

SECTION_TITLE_PEOPLE

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

toolkit

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

form

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

repository

protected TaskRepository repository

WRAP_LENGTH

public static final int WRAP_LENGTH
See Also:
Constant Field Values

display

protected org.eclipse.swt.widgets.Display display

htmlComments

protected boolean htmlComments

TITLE_FONT

public static final org.eclipse.swt.graphics.Font TITLE_FONT

TEXT_FONT

public static final org.eclipse.swt.graphics.Font TEXT_FONT

HEADER_FONT

public static final org.eclipse.swt.graphics.Font HEADER_FONT

DESCRIPTION_WIDTH

public static final int DESCRIPTION_WIDTH
See Also:
Constant Field Values

DESCRIPTION_HEIGHT

public static final int DESCRIPTION_HEIGHT
See Also:
Constant Field Values

REASSIGN_BUG_TO

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

editorInput

protected AbstractTaskEditorInput editorInput

parentEditor

private MylarTaskEditor parentEditor

taskOutlineModel

protected RepositoryTaskOutlineNode taskOutlineModel

expandedStateAttributes

protected boolean expandedStateAttributes

VALUE

protected final java.lang.String VALUE
Style option for function newLayout. This will create a plain-styled, selectable text label.

See Also:
Constant Field Values

HEADER

protected final java.lang.String HEADER
Style option for function newLayout. This will create a bolded, selectable header. It will also have an arrow image before the text (simply for decoration).

See Also:
Constant Field Values

PROPERTY

protected final java.lang.String PROPERTY
Style option for function newLayout. This will create a bolded, unselectable label.

See Also:
Constant Field Values

HORZ_INDENT

protected final int HORZ_INDENT
See Also:
Constant Field Values

attributeCombo

protected org.eclipse.swt.custom.CCombo attributeCombo

addSelfToCCCheck

protected org.eclipse.swt.widgets.Button addSelfToCCCheck

summaryText

protected org.eclipse.swt.widgets.Text summaryText

submitButton

protected org.eclipse.swt.widgets.Button submitButton

attachmentsTable

protected org.eclipse.swt.widgets.Table attachmentsTable

attachmentTableViewer

protected org.eclipse.jface.viewers.TableViewer attachmentTableViewer

attachmentsColumns

protected java.lang.String[] attachmentsColumns

attachmentsColumnWidths

protected int[] attachmentsColumnWidths

scrollIncrement

protected int scrollIncrement

scrollVertPageIncrement

protected int scrollVertPageIncrement

scrollHorzPageIncrement

protected int scrollHorzPageIncrement

currentSelectedText

protected org.eclipse.swt.custom.StyledText currentSelectedText

cutAction

protected org.eclipse.ui.actions.RetargetAction cutAction

pasteAction

protected org.eclipse.ui.actions.RetargetAction pasteAction

editorComposite

protected org.eclipse.swt.widgets.Composite editorComposite

newCommentTextViewer

protected org.eclipse.jface.text.TextViewer newCommentTextViewer

ccList

protected org.eclipse.swt.widgets.List ccList

ccText

protected org.eclipse.swt.widgets.Text ccText

attachmentsTableViewer

private org.eclipse.jface.viewers.TableViewer attachmentsTableViewer

commentsSection

private org.eclipse.ui.forms.widgets.Section commentsSection

attributesListeners

private java.util.List<IRepositoryTaskAttributeListener> attributesListeners

selectionProvider

protected final org.eclipse.jface.viewers.ISelectionProvider selectionProvider

selectionChangedListeners

protected java.util.List<org.eclipse.jface.viewers.ISelectionChangedListener> selectionChangedListeners

comboListenerMap

protected java.util.HashMap<org.eclipse.swt.custom.CCombo,RepositoryTaskAttribute> comboListenerMap

lastSelected

private IRepositoryTaskSelection lastSelected

selectionListener

protected final org.eclipse.ui.ISelectionListener selectionListener
Focuses on form widgets when an item in the outline is selected.


backgroundIncoming

private org.eclipse.swt.graphics.Color backgroundIncoming

textHash

protected java.util.HashMap<java.lang.Object,org.eclipse.swt.custom.StyledText> textHash
List of the StyledText's so that we can get the previous and the next


commentStyleText

protected java.util.List<org.eclipse.swt.custom.StyledText> commentStyleText

textsindex

protected int textsindex
Index into the styled texts


addCommentsTextBox

protected org.eclipse.swt.custom.StyledText addCommentsTextBox

descriptionTextViewer

protected org.eclipse.jface.text.TextViewer descriptionTextViewer

outlinePage

private RepositoryTaskOutlinePage outlinePage

isDisposed

private boolean isDisposed

radios

protected org.eclipse.swt.widgets.Button[] radios

radioOptions

protected org.eclipse.swt.widgets.Control[] radioOptions

attachContextButton

protected org.eclipse.swt.widgets.Button attachContextButton
Constructor Detail

AbstractRepositoryTaskEditor

public AbstractRepositoryTaskEditor(org.eclipse.ui.forms.editor.FormEditor editor)
Creates a new AbstractRepositoryTaskEditor. Sets up the default fonts and cut/copy/paste actions.


AbstractRepositoryTaskEditor

public AbstractRepositoryTaskEditor(org.eclipse.ui.forms.editor.FormEditor editor,
                                    boolean htmlComments)
Method Detail

getRepositoryTaskData

protected RepositoryTaskData getRepositoryTaskData()

updateTask

protected void updateTask()

validateInput

protected abstract void validateInput()

getTitleString

protected java.lang.String getTitleString()

submitToRepository

protected abstract void submitToRepository()

init

public void init(org.eclipse.ui.IEditorSite site,
                 org.eclipse.ui.IEditorInput input)
Specified by:
init in interface org.eclipse.ui.IEditorPart
Overrides:
init in class org.eclipse.ui.forms.editor.FormPage

getNewCommentText

public java.lang.String getNewCommentText()

createFormContent

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

createReportHeaderLayout

protected void createReportHeaderLayout(org.eclipse.swt.widgets.Composite composite)

createTextField

protected org.eclipse.swt.widgets.Text createTextField(org.eclipse.swt.widgets.Composite composite,
                                                       RepositoryTaskAttribute attribute,
                                                       int style)
Utility method to create text field sets backgournd to TaskListColorsAndFonts.COLOR_ATTRIBUTE_CHANGED if attribute has changed.

Parameters:
composite -
attribute -
style -

createAttributeLayout

protected org.eclipse.swt.widgets.Composite createAttributeLayout(org.eclipse.swt.widgets.Composite composite)
Creates the attribute layout, which contains most of the basic attributes of the bug (some of which are editable).


addSummaryText

protected void addSummaryText(org.eclipse.swt.widgets.Composite attributesComposite)
Adds a text field to display and edit the bug's summary.

Parameters:
attributesComposite - The composite to add the text field to.

createAttachmentLayout

protected void createAttachmentLayout(org.eclipse.swt.widgets.Composite composite)

getOfflineTaskHandler

protected IOfflineTaskHandler getOfflineTaskHandler()

registerDropListener

private void registerDropListener(org.eclipse.swt.widgets.Control control)

createDescriptionLayout

protected void createDescriptionLayout(org.eclipse.swt.widgets.Composite composite)

createCustomAttributeLayout

protected void createCustomAttributeLayout(org.eclipse.swt.widgets.Composite composite)

createPeopleLayout

protected void createPeopleLayout(org.eclipse.swt.widgets.Composite composite)

addCCList

protected void addCCList(org.eclipse.swt.widgets.Composite attributesComposite)

createCommentLayout

protected void createCommentLayout(org.eclipse.swt.widgets.Composite composite)

createNewCommentLayout

protected void createNewCommentLayout(org.eclipse.swt.widgets.Composite composite)

createActionsLayout

protected void createActionsLayout(org.eclipse.swt.widgets.Composite composite)
Creates the button layout. This displays options and buttons at the bottom of the editor to allow actions to be performed on the bug.


createSection

protected org.eclipse.ui.forms.widgets.Section createSection(org.eclipse.swt.widgets.Composite composite,
                                                             java.lang.String title)

addActionButtons

protected void addActionButtons(org.eclipse.swt.widgets.Composite buttonComposite)
Adds buttons to this composite. Subclasses can override this method to provide different/additional buttons.

Parameters:
buttonComposite - Composite to add the buttons to.

checkText

public static java.lang.String checkText(java.lang.String text)
Make sure that a String that is null is changed to a null string

Parameters:
text - The text to check if it is null or not
Returns:
If the text is null, then return the null string (""). Otherwise, return the text.

setGeneralTitleText

protected void setGeneralTitleText()
This refreshes the text in the title label of the info area (it contains elements which can change).


saveBug

public void saveBug()
If there is no locally saved copy of the current bug, then it saved offline. Otherwise, any changes are updated in the file.


updateEditor

protected void updateEditor()
Refreshes any text labels in the editor that contain information that might change.


setFocus

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

updateEditorTitle

protected void updateEditorTitle()
Updates the title of the editor to reflect dirty status. If the bug report has been modified but not saved, then an indicator will appear in the title.


isSaveAsAllowed

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

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

getEditorComposite

public org.eclipse.swt.widgets.Composite getEditorComposite()
Returns:
The composite for the whole editor.

dispose

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

fireSelectionChanged

protected void fireSelectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent event)
Fires a SelectionChangedEvent to all listeners registered under selectionChangedListeners.

Parameters:
event - The selection event.

handleSummaryEvent

public void handleSummaryEvent()
Check if the summary field was modified, and update it if necessary.


select

public void select(int commentNumber)
Selects the given object in the editor.

Parameters:
commentNumber - The comment number to be selected

revealAllComments

public void revealAllComments()

select

public void select(java.lang.Object o,
                   boolean highlight)
Selects the given object in the editor.

Parameters:
o - The object to be selected.
highlight - Whether or not the object should be highlighted.

selectNewComment

public void selectNewComment()

selectDescription

public void selectDescription()

focusOn

private void focusOn(org.eclipse.swt.widgets.Control selectionComposite,
                     boolean highlight)
Scroll to a specified piece of text

Parameters:
selectionComposite - The StyledText to scroll to

getAdapter

public java.lang.Object getAdapter(java.lang.Class adapter)
Specified by:
getAdapter in interface org.eclipse.core.runtime.IAdaptable
Overrides:
getAdapter in class org.eclipse.ui.part.WorkbenchPart

getAdapterDelgate

public java.lang.Object getAdapterDelgate(java.lang.Class<?> adapter)

getOutlineModel

public RepositoryTaskOutlineNode getOutlineModel()

getOutline

public RepositoryTaskOutlinePage getOutline()

isDisposed

public boolean isDisposed()

close

public void close()

addAttributeListener

public void addAttributeListener(IRepositoryTaskAttributeListener listener)

removeAttributeListener

public void removeAttributeListener(IRepositoryTaskAttributeListener listener)

setParentEditor

public void setParentEditor(MylarTaskEditor parentEditor)

getTaskOutlineModel

public RepositoryTaskOutlineNode getTaskOutlineModel()

setTaskOutlineModel

public void setTaskOutlineModel(RepositoryTaskOutlineNode taskOutlineModel)

getControl

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

setSummaryText

public void setSummaryText(java.lang.String text)

setDescriptionText

public void setDescriptionText(java.lang.String text)

addRadioButtons

protected void addRadioButtons(org.eclipse.swt.widgets.Composite buttonComposite)

hasAttributeChanges

protected boolean hasAttributeChanges()

hasChanged

protected boolean hasChanged(RepositoryTaskAttribute newAttribute)

addAttachContextButton

protected void addAttachContextButton(org.eclipse.swt.widgets.Composite buttonComposite,
                                      ITask task)

addSelfToCC

protected void addSelfToCC(org.eclipse.swt.widgets.Composite composite)
Creates a check box for adding the repository user to the cc list. Does nothing if the repository does not have a valid username, the repository user is the assignee, reporter or already on the the cc list.


getAttachContext

public boolean getAttachContext()

setAttachContext

public void setAttachContext(boolean attachContext)