|
Re: What is a content type?? [message #326511 is a reply to message #326506] |
Fri, 21 March 2008 08:31 |
|
This is a multi-part message in MIME format.
--------------060803060206060108070800
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Julien,
Content-types are a way for Eclipse to define what a given file contains
: build.properties defines which files must be built along with your
plug-in, *.xml may contain models ...
I don't really know if the Eclipse wiki contains some information about
content-type, but http://www.developer.com/java/data/article.php/3648736
may help even if it mainly describes how to define a new content-type.
Cheers,
Laurent
julien a
|
|
|
Re: What is a content type?? [message #326538 is a reply to message #326506] |
Sun, 23 March 2008 15:52 |
Alex Le Messages: 649 Registered: July 2009 |
Senior Member |
|
|
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 09:00 |
|
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.03899 seconds