Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.core.runtime.content
Interface IContentTypeSettings

All Known Subinterfaces:
IContentType

public interface IContentTypeSettings

Gives access to the user settings for a content type.

This interface is not intended to be implemented by clients.

Since:
3.1
See Also:
IContentType, IContentType.getSettings(IScopeContext)

Field Summary
static int FILE_EXTENSION_SPEC
          File spec type constant, indicating a file extension specification.
static int FILE_NAME_SPEC
          File spec type constant, indicating a file name specification.
 
Method Summary
 void addFileSpec ( String fileSpec, int type)
          Adds a user-defined file specification to the corresponding content type.
  String getDefaultCharset ()
          Returns the default charset for the corresponding content type if it has been set, or null otherwise.
  String[] getFileSpecs (int type)
          Returns the file specifications for the corresponding content type.
  String getId ()
          Returns the corresponding content type's unique identifier.
 void removeFileSpec ( String fileSpec, int type)
          Removes a user-defined file specification from the corresponding content type.
 void setDefaultCharset ( String userCharset)
          Sets the default charset for the corresponding content type.
 

Field Detail

FILE_EXTENSION_SPEC

static final int FILE_EXTENSION_SPEC
File spec type constant, indicating a file extension specification.

See Also:
Constant Field Values

FILE_NAME_SPEC

static final int FILE_NAME_SPEC
File spec type constant, indicating a file name specification.

See Also:
Constant Field Values
Method Detail

addFileSpec

void addFileSpec(
String fileSpec,
                 int type)
                 throws 
CoreException
Adds a user-defined file specification to the corresponding content type. Has no effect if the given file specification is already defined.

Parameters:
fileSpec - the file specification
type - the type of the file specification. One of FILE_NAME_SPEC, FILE_EXTENSION_SPEC.
Throws:
IllegalArgumentException - if the type bit mask is incorrect
CoreException - if this method fails. Reasons include:
  • An error occurred persisting this setting.
See Also:
FILE_NAME_SPEC, FILE_EXTENSION_SPEC

getDefaultCharset


String getDefaultCharset()
Returns the default charset for the corresponding content type if it has been set, or null otherwise.

Returns:
the default charset, or null

getFileSpecs


String[] getFileSpecs(int type)
Returns the file specifications for the corresponding content type. The type mask is a bit-wise or of file specification type constants indicating the file specification types of interest.

Parameters:
type - a bit-wise or of file specification type constants. Valid flags are one of FILE_EXTENSION_SPEC or FILE_NAME_SPEC
Returns:
the file specification
See Also:
FILE_NAME_SPEC, FILE_EXTENSION_SPEC

getId


String getId()
Returns the corresponding content type's unique identifier. Each content type has an identifier by which they can be retrieved from the content type catalog.

Returns:
the content type unique identifier

removeFileSpec

void removeFileSpec(
String fileSpec,
                    int type)
                    throws 
CoreException
Removes a user-defined file specification from the corresponding content type. Has no effect if the given file specification was not defined by the user.

Parameters:
fileSpec - the file specification
type - the type of the file specification. One of FILE_NAME_SPEC, FILE_EXTENSION_SPEC.
Throws:
IllegalArgumentException - if the type bit mask is incorrect
CoreException - if this method fails. Reasons include:
  • An error occurred persisting this setting.
See Also:
FILE_NAME_SPEC, FILE_EXTENSION_SPEC

setDefaultCharset

void setDefaultCharset(
String userCharset)
                       throws 
CoreException
Sets the default charset for the corresponding content type. If null is provided, restores the pre-defined default charset.

Parameters:
userCharset - the new charset for the content type, or null
Throws:
CoreException - if this method fails. Reasons include:
  • An error occurred persisting this setting.

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire