Posts

Showing posts with the label document

Eclipse PDE: Everything about Editor Part 2

Document Partition In this series of “ Eclipse PDE: Everything about Editor ”, this post explains how to configure your document to represent different partition. Document partitions helps to manipulate different part of document in different way. For example there is not need to showing content assist in single line comment or multi line comment. Here I am explaining defining partition for single and multi line comments 1. Define a custom partition scanner Eclipse framework provides Rule based partition scanner, which allows us to define single or multi line rule for partitioning document content. We need to define Custome partition scanner extending org.eclipse.jface.text.rules.RuleBasedPartitionScanner . Override the constructor and define rules for partition . Below code snippets defines rule for single and multi line comments public class MyPartitionScanner extends RuleBasedPartitionScanner { //Define COnstants for supported partition types public static ...

Eclipse PDE: Everything about Editor

Image
Editors are the most important part of eclipse IDE framework. Editor are the primary framework to create and modify resource like files. Every eclipse plug-in or eclipse based products needs to provide custom editor for editing proprietary resources. I am tried to put important parts of Eclipse Editor Framework in this pos. This is the first post from the series "Everything About Editor" Everything about Editor Document Partition Syntax Highlighting Auto-Edit Strategy Code Completion using Content Assist Eclipse divides the concept of a text editor into two parts: the document and the viewer. While the document holds the actual content of the editor, the viewer is responsible for handling the content display. This nice Model-View-Controller (MVC)-style separation allows you to separate code that manipulates the content of the editor from the part that manipulates its display. The Document represents the "model" part of the text editor framework. It c...