|
|
Re: What is a content type?? [message #326538 is a reply to message #326506] |
Sun, 23 March 2008 11:52   |
Eclipse User |
|
|
|
julien wrote:
> hi all?
>
> I have lot of difficul to understand what is a content type?
>
> http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse. jdt.doc.isv/reference/api/org/eclipse/jdt/ui/text/JavaSource ViewerConfiguration.html
>
>
> the sourceviewer use it but what is it? when use it that? it s may be
> cause my english is not good but if someone can me explain that simply
> (or show me a site), it's will be cool.
>
> thanks
>
> a++
In the text editing world of Eclipse, there are content types
(synonymously as partitions) and then there are partitionings.
A content type or a partition is basically a special region in the text
that an editor deals with. For example the comment text in C/C++ or
Java is a content type, thus having different coloring, usually light
green. By defining a content type (special regions of text), you can do
special things for each of the content type. Another example, content
assist is activated when the content type is not comments in the code.
With content types (or partition types, if you will) can you working
each region of the text accordingly, formatting, coloring, text
hovering, etc.
Partitioning is basically a collection of content types. An editor's
model, the IDocument, is associated to a partitioning. Usually, the
partitioning id is basically the IDocument.DEFAULT_PARTITIONING that is
used to reference the set of partitions or content types that you
registered in the source viewer. You can define your partitioning, thus
providing a specific partition scanner, etc.
See AbstractedDocument class and read about the text framework. That
should clear up some questions.
|
|
|
|
Re: What is a content type?? [message #326602 is a reply to message #326558] |
Wed, 26 March 2008 05:00  |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------020005010808070505090005
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Daniel,
Sorry, didn't know there was two things going by nearly the same name (bow).
Laurent Goubet
Obeo
Daniel Megert a
|
|
|
Powered by
FUDForum. Page generated in 0.03512 seconds