Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "DLTK Adding Todo Task Tag Support"
(New page: == Summary == This mini tutorial outlines the steps required to add todo task tag support to your plugin. == Prerequisites == This tutorial assumes the following have been implemented: ...) |
(→Summary) |
||
Line 1: | Line 1: | ||
== Summary == | == Summary == | ||
+ | |||
+ | WORK IN PROGRESS!!!! | ||
This mini tutorial outlines the steps required to add todo task tag support to your plugin. | This mini tutorial outlines the steps required to add todo task tag support to your plugin. |
Revision as of 13:33, 25 September 2008
Summary
WORK IN PROGRESS!!!!
This mini tutorial outlines the steps required to add todo task tag support to your plugin.
Prerequisites
This tutorial assumes the following have been implemented:
- document partitioning
- syntax highlighting
Steps
- If you have not done so already, set up a preference initializer for your core plugin.
- Once complete, initialize your plugin store's default values with a call to: TodoTaskPreferences.initializeDefaultValues(store);
- Add org.eclipse.dltk.validators.core as a dependency for your core plugin.
- Create an implementation of org.eclipse.dltk.validators.core.AbstractTodoParserBuildParticipantType and add the extension definition, ie:
<extension point="org.eclipse.dltk.validators.core.validator"> <validatorType class="org.eclipse.dltk.internal.javascript.parser.JavaScriptTodoParserType" id="org.eclipse.dltk.javascript.todo" nature="org.eclipse.dltk.javascript.core.nature"> </validatorType> </extension>
- replace the comment scanner in your org.eclipse.dltk.ui.text.ScriptSourceViewerConfiguration implementation with a org.eclipse.dltk.ui.text.ScriptCommentScanner, ie:
fCommentScanner = new ScriptCommentScanner(getColorManager(), fPreferenceStore, JavascriptColorConstants.JS_SINGLE_LINE_COMMENT, JavascriptColorConstants.JS_TODO_TAG, new TodoTaskPreferences( JavaScriptPlugin.getDefault().getPluginPreferences()));
- add ui preference constants and their initialization values, ie:
public final static String COMMENT_TASK_TAGS = JavascriptColorConstants.JS_TODO_TAG; public final static String COMMENT_TASK_TAGS_BOLD = COMMENT_TASK_TAGS + EDITOR_BOLD_SUFFIX; PreferenceConverter.setDefault(store, COMMENT_TASK_TAGS, new RGB(127, 159, 191)); store.setDefault(COMMENT_TASK_TAGS_BOLD, true);