實作Python DLTK需要以下class與檔案:
1. Project nature
定義 content type
定義 nature
並加入以下class XML資訊:
ScriptNature :
2.
ExamplePythonNature extends ScriptNature
Describer:
3.
ExamplePythonContentDescriber extends ScriptContentDescriber
DLTK Language Toolkit:
4.
ExamplePythonLanguageToolkit extends AbstractLanguageToolkit
DLTK UI-Language Toolkit:
5.
ExamplePythonUILanguageToolkit extends AbstractDLTKUILanguageToolkit
Structure Parser:
6.
ExamplePythonSourceElementParser extends AbstractSourceElementParser
Interpreter:
7.
ExamplePythonInstallType extends AbstractInterpreterInstallType
8. ExamplePythonInstall extends AbstractInterpreterInstall
9.
ExamplePythonInterpreterPreferencePage extends ScriptInterpreterPreferencePage
Interpreter Preference (optional):
10.
ExamplePythonInterpreterPreferencePage extends ScriptInterpreterPreferencePage
11.
ExamplePythonInterpretersBlock extends InterpretersBlock
11.
ExampleAddPythonInterpreterDialog extends AddScriptInterpreterDialog
12.
ExamplePythonInterpreterLibraryBlock extends AbstractInterpreterLibraryBlock
Editor:
13.
ExamplePythonEditor extends ScriptEditor
Syntax highlighting:
14. create
interface:
IExamplePythonPartitions
Editor Source configuration:
15.
ExamplePythonTextTools extends ScriptTextTools (For creating SourceViewerConfiguration)
16.
ExamplePythonSourceViewerConfiguration extends ScriptSourceViewerConfiguration
17.
ExamplePythonContentAssistPreference extends ContentAssistPreference
Eclipse platform UI:
18. ExmplePythonUI extends AbstractUIPlugin (To hold the text tools)
Partitioning (used for highlighting) 特定 Scanner <-> Partition:
(如: code partition (for source code), commentary partition (for source code comments), string partition)
19.
ExamplePythonPartitionScanner extends RuleBasedPartitionScanner
20: create
interface: IPartitionTokenScanner from: ExamplePythonTextTools.getPartitionScanner()
Color constants:
21: create
interface:
IExamplePythonColorConstants
22.
ExamplePythonUIPreferenceInitializer extends AbstractPreferenceInitializer
Keyword highlighting:
23.
ExamplePythonCodeScanner extends AbstractScriptScanner (關鍵字)
Search:
24.
ExamplePythonSearchPage extends ScriptSearchPage
25.
ExamplePythonSearchFactory extends AbstractSearchFactory
26.
ExamplePythonMatchLocationParser extends MatchLocatorParser
Open type:
27.
ExamplePythonOpenTypeAction extends OpenTypeAction
Open declaration:
28.
ExamplePythonSelectionEngine implements ISelectionEngine
Simple documentation provider for comments:
29.
ExamplePythonCommentDocumentationProvider implements IScriptDocumentationProvider
Code assistance:
30.
ExamplePythonCompletionEngine implements ICompletionEngine
Completion:
31.
ExamplePythonCompletionProposalComputer extends ScriptCompletionProposalComputer
32.
ExamplePythonCompletionProposalCollector extends ScriptCompletionProposalCollector
33.
ExamplePythonCompletionProposal extends ScriptCompletionProposal
34.
ExamplePythonCompletionProcessor extends ScriptCompletionProcessor
Code templates
35.
ExamplePythonUniversalTemplateContextType extends ScriptTemplateContextType
36.
ExamplePythonTemplateContext extends ScriptTemplateContext
37.
ExamplePythonTemplateCompletionProcessor extends ScriptTemplateCompletionProcessor
38.
ExamplePythonTemplateAccess extends ScriptTemplateAccess
39.
ExamplePythonCodeTemplatesPreferencePage extends ScriptTemplatePreferencePage
40.
ExamplePythonUILanguageToolkit2 extends ExamplePythonUILanguageToolkit (AbstractDLTKUILanguageToolkit)
41.
ExampleSimplePythonSourceViewerConfiguration extends ExamplePythonSourceViewerConfiguration (SourceViewerConfiguration)