public abstract class AbstractToDoItem extends ChangeEventSource implements Copyable, ToDoItem
AbstractToDoItem represents a task the user wants to track. ToDoItems can be
private to a user or they can be shared among users. In order to share to do items,
the user needs to put a to do tag into the source code, for example, TODO might
be used to indicate a to do item.To do items can also be associated with a file by adding a ToDoItem to a source file through the editor's line gutter context menu. These to do items will not be shared among users.
Finally, the user can create to do items that have no association with a file by creating new ToDoItems in the ToDoWindow. These to do items are not shared.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ITEM_ATTRIBUTES |
static java.lang.String |
ITEM_COLUMN |
static java.lang.String |
ITEM_DATE |
static java.lang.String |
ITEM_DONE |
static java.lang.String |
ITEM_LINE |
static java.lang.String |
ITEM_PRIORITYID |
static java.lang.String |
ITEM_TEXT |
static java.lang.String |
ITEM_URL |
static java.lang.String |
ITEM_USERDATA |
_hash| Constructor and Description |
|---|
AbstractToDoItem()
Constructor
|
AbstractToDoItem(java.lang.String text,
int priorityId,
int line,
int column,
java.net.URL url,
boolean done,
java.util.Date date) |
| Modifier and Type | Method and Description |
|---|---|
HashStructure |
asHash() |
boolean |
canGoTo()
Called to determine if the to do item allows goTo navigation.
|
abstract void |
dispose()
Called when the to do item is being deleted.
|
boolean |
equals(java.lang.Object object)
Equals support.
|
Attributes |
getAttributes()
Provides an attribute set
|
java.util.Iterator<Element> |
getChildren()
Provides an iterator over the children, always returns null
|
int |
getColumn()
Gets the column this to do item is associated with in a code editor
|
java.lang.Object |
getData()
Provides the
ToDoItem that is being wrapped |
java.util.Date |
getDate()
Gets the
Date associated with the to do item |
javax.swing.Icon |
getIcon()
Returns an icon to represent the to do item
|
int |
getLine()
Gets the line this to do item is associated with in a code editor
|
java.lang.String |
getLongLabel()
Returns a long label
|
int |
getPriorityId()
Gets the unique id associated with the priority
|
java.lang.String |
getShortLabel()
Returns a short label
|
java.lang.String |
getText()
Gets the descriptive text of the to do item
|
java.lang.String |
getTooltip()
Returns a text string that can be used for a tooltip, typically
in a file overview margin.
|
java.lang.String |
getToolTipText()
Returns a tooltip
|
java.net.URL |
getURL()
Gets the
URL this to do item is associated with |
java.lang.Object |
getUserData()
Gets the user-specified data object
|
abstract void |
goTo()
Called when a to do item is double-clicked on in the To Do Log page
If the item is linked to a url and line, this should navigate to the
editor and position the cursor on that line.
|
boolean |
isDone()
Gets whether the to do item has been marked as complete or not
|
boolean |
isEditable()
Determines whether the to do item can be edited.
|
boolean |
mayHaveChildren()
Whether or not the item can have children.
|
void |
setColumn(int column)
Sets the column this to do item is associated with in a code editor
|
void |
setDate(java.util.Date date)
Sets the
Date associated with the to do item |
void |
setDone(boolean done)
Sets whether the to do item is completed or not
|
void |
setLine(int line)
Sets the line this to do item is associated with in a code editor
|
void |
setPriorityId(int priorityId)
Sets the unique id associated with the priority
|
void |
setText(java.lang.String text)
Sets the descriptive text of the to do item
|
void |
setURL(java.net.URL url)
Sets the
URL this to do item is associated with |
void |
setUserData(java.lang.Object userData)
Sets the user-specified data object
|
boolean |
shouldPersist()
By default the expectation is that the
ToDoItem should
be persisted in the IDE's data file. |
abstract void |
stateChanged()
Called when the state of the ToDoItem has changed
|
java.lang.String |
toString()
Returns the Short Label displayed to a user.
|
addChangeListener, copyTo, fireChangeEvent, fireChangeEvent, removeChangeListener, setUseObjectEqualsaddStructureChangeListener, containsKey, copyToImpl, equalsImpl, findOrCreate, forcedCopyTo, getHashStructure, removeStructureChangeListener, useObjectEqualsclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAttributedLabelpublic static final java.lang.String ITEM_TEXT
public static final java.lang.String ITEM_PRIORITYID
public static final java.lang.String ITEM_LINE
public static final java.lang.String ITEM_COLUMN
public static final java.lang.String ITEM_URL
public static final java.lang.String ITEM_DONE
public static final java.lang.String ITEM_DATE
public static final java.lang.String ITEM_USERDATA
public static final java.lang.String ITEM_ATTRIBUTES
public AbstractToDoItem()
public AbstractToDoItem(java.lang.String text,
int priorityId,
int line,
int column,
java.net.URL url,
boolean done,
java.util.Date date)
public HashStructure asHash()
public java.lang.String getText()
public void setText(java.lang.String text)
public java.lang.String getTooltip()
public int getPriorityId()
getPriorityId in interface ToDoItempublic void setPriorityId(int priorityId)
setPriorityId in interface ToDoItempriorityId - unique id associated with the prioritypublic int getLine()
getLine in interface LocatableItempublic void setLine(int line)
setLine in interface LocatableItemline - the line to associate this to do item withpublic int getColumn()
getColumn in interface LocatableItempublic void setColumn(int column)
column - the column to associate this to do item withpublic java.net.URL getURL()
URL this to do item is associated withpublic void setURL(java.net.URL url)
URL this to do item is associated withpublic boolean isDone()
public void setDone(boolean done)
public java.util.Date getDate()
Date associated with the to do itempublic void setDate(java.util.Date date)
Date associated with the to do itempublic java.lang.Object getUserData()
ToDoItemgetUserData in interface ToDoItempublic void setUserData(java.lang.Object userData)
ToDoItemsetUserData in interface ToDoItempublic boolean isEditable()
isEditable in interface ToDoItempublic boolean shouldPersist()
ToDoItem should
be persisted in the IDE's data file.shouldPersist in interface ToDoItempublic java.lang.String toString()
DisplayabletoString method in java.lang.Object.
Implementors of the Displayable interface should
override this as appropriate. The default implementation is
the same as getShortLabel
toString in interface DisplayabletoString in class java.lang.ObjectObject.toString(),
Displayable.getShortLabel()public boolean equals(java.lang.Object object)
HashStructureAdapterHashStructureAdapter._hash, this base equals implementation should be
sufficient and not need to be overridden.equals in class HashStructureAdapterpublic boolean canGoTo()
public abstract void goTo()
public abstract void dispose()
ToDoItempublic abstract void stateChanged()
ToDoItemstateChanged in interface ToDoItempublic boolean mayHaveChildren()
mayHaveChildren in interface Elementpublic java.util.Iterator<Element> getChildren()
getChildren in interface Elementpublic Attributes getAttributes()
getAttributes in interface Elementpublic java.lang.Object getData()
ToDoItem that is being wrappedpublic java.lang.String getShortLabel()
getShortLabel in interface DisplayableToDoItempublic java.lang.String getLongLabel()
getLongLabel in interface DisplayableToDoItempublic javax.swing.Icon getIcon()
getIcon in interface Displayablepublic java.lang.String getToolTipText()
getToolTipText in interface DisplayableToDoItem