public interface IContentTypeManager extends IContentTypeMatcher
This interface is not intended to be implemented by clients.
IContentTypeMatcher,
Platform.getContentTypeManager()| Modifier and Type | Interface and Description |
|---|---|
static class |
IContentTypeManager.ContentTypeChangeEvent
An event object which describes the details of a change to a
content type.
|
static interface |
IContentTypeManager.IContentTypeChangeListener
A listener to be used to receive content type change events.
|
static interface |
IContentTypeManager.ISelectionPolicy
A policy for refining the set of content types that
should be accepted during content type matching operations.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
CT_TEXT
Content type identifier constant for platform's primary
text-based content type:
org.eclipse.core.runtime.text. |
| Modifier and Type | Method and Description |
|---|---|
void |
addContentTypeChangeListener(IContentTypeManager.IContentTypeChangeListener listener)
Register the given listener for notification of content type changes.
|
IContentType[] |
getAllContentTypes()
Returns all content types known by the platform.
|
IContentType |
getContentType(String contentTypeIdentifier)
Returns the content type with the given identifier, or
null
if no such content type is known by the platform. |
IContentTypeMatcher |
getMatcher(IContentTypeManager.ISelectionPolicy customPolicy,
IScopeContext context)
Returns a newly created content type matcher using the given content type selection policy
and preference scope.
|
void |
removeContentTypeChangeListener(IContentTypeManager.IContentTypeChangeListener listener)
De-register the given listener from receiving notification of content type changes.
|
findContentTypeFor, findContentTypeFor, findContentTypesFor, findContentTypesFor, getDescriptionFor, getDescriptionForstatic final String CT_TEXT
org.eclipse.core.runtime.text.
All text-based content types ought to be sub types of the content type identified by this string. This provides a simple way for detecting whether a content type is text-based:
IContentType text = Platform.getContentTypeManager().getContentType(IContentTypeManager.CT_TEXT); IContentType someType = ...; boolean isTextBased = someType.isKindOf(text);
void addContentTypeChangeListener(IContentTypeManager.IContentTypeChangeListener listener)
null.listener - the content type change listener to registerremoveContentTypeChangeListener(IContentTypeManager.IContentTypeChangeListener),
IContentTypeManager.IContentTypeChangeListenerIContentType[] getAllContentTypes()
Returns an empty array if there are no content types available.
IContentType getContentType(String contentTypeIdentifier)
null
if no such content type is known by the platform.contentTypeIdentifier - the identifier for the content typenullIContentTypeMatcher getMatcher(IContentTypeManager.ISelectionPolicy customPolicy, IScopeContext context)
null, the default scope
is used.customPolicy - a selection policycontext - a user preference context to be used by the matcher, or nullvoid removeContentTypeChangeListener(IContentTypeManager.IContentTypeChangeListener listener)
null.listener - the content type change listener to removeaddContentTypeChangeListener(IContentTypeManager.IContentTypeChangeListener),
IContentTypeManager.IContentTypeChangeListenerGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.