org.eclipse.cdt.core
Class CCorePlugin

java.lang.Object
  extended by org.eclipse.core.runtime.Plugin
      extended by org.eclipse.cdt.core.CCorePlugin
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public class CCorePlugin
extends org.eclipse.core.runtime.Plugin


Field Summary
static java.lang.String BINARY_PARSER_SIMPLE_ID
           
static java.lang.String BINARY_PARSER_UNIQ_ID
           
static java.lang.String BUILD_SCANNER_INFO_SIMPLE_ID
           
static java.lang.String BUILD_SCANNER_INFO_UNIQ_ID
           
static java.lang.String BUILDER_MODEL_ID
           
static int CDT_PROJECT_NATURE_ID_MISMATCH
           
 CDTLogWriter cdtLog
           
static java.lang.String CONTENT_TYPE_ASMSOURCE
          IContentType id for ASM Unit
static java.lang.String CONTENT_TYPE_BINARYFILE
          IContentType id for Binary Files
static java.lang.String CONTENT_TYPE_CHEADER
          IContentType id for C Header Unit
static java.lang.String CONTENT_TYPE_CSOURCE
          IContentType id for C Source Unit
static java.lang.String CONTENT_TYPE_CXXHEADER
          IContentType id for C++ Header Unit
static java.lang.String CONTENT_TYPE_CXXSOURCE
          IContentType id for C++ Source Unit
static java.lang.String CORE_ENCODING
          Possible configurable option ID.
static java.lang.String DEFAULT_BINARY_PARSER_SIMPLE_ID
           
static java.lang.String DEFAULT_BINARY_PARSER_UNIQ_ID
           
static java.lang.String DEFAULT_INDEXER
           
static java.lang.String DEFAULT_PATHENTRY_STORE_ID
           
static java.lang.String DEFAULT_PROVIDER_ID
           
static java.lang.String DO_NOT_INSERT
          Possible configurable option value.
static java.lang.String ERROR_PARSER_SIMPLE_ID
           
static java.lang.String ERROR_PARSER_UNIQ_ID
           
static java.lang.String FORMATTER_EXTPOINT_ID
          Name of the extension point for contributing a source code formatter
static java.lang.String INDEX_SIMPLE_ID
           
static java.lang.String INDEX_UNIQ_ID
           
static java.lang.String INDEXER_SIMPLE_ID
           
static java.lang.String INDEXER_UNIQ_ID
           
static java.lang.String INSERT
          Possible configurable option value.
static java.lang.String PLUGIN_ID
           
static java.lang.String PREF_BINARY_PARSER
           
static java.lang.String PREF_INDEXER
           
static java.lang.String PREF_USE_STRUCTURAL_PARSE_MODE
           
static java.lang.String SPACE
          Possible configurable option value.
static int STATUS_CDTPROJECT_EXISTS
           
static int STATUS_CDTPROJECT_MISMATCH
           
static java.lang.String TAB
          Possible configurable option value.
 
Fields inherited from class org.eclipse.core.runtime.Plugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
 
Constructor Summary
CCorePlugin()
           
 
Method Summary
 void configurePluginDebugOptions()
          Configure the plugin with respect to option settings defined in ".options" file
 void convertProjectFromCtoCC(org.eclipse.core.resources.IProject projectHandle, org.eclipse.core.runtime.IProgressMonitor monitor)
          Method convertProjectFromCtoCC converts a C Project to a C++ Project The newProject MUST, not be null, already have a C Nature && must NOT already have a C++ Nature
 void convertProjectToC(org.eclipse.core.resources.IProject projectHandle, org.eclipse.core.runtime.IProgressMonitor monitor, java.lang.String projectID)
          Method to convert a project to a C nature All checks should have been done externally (as in the Conversion Wizards).
 void convertProjectToCC(org.eclipse.core.resources.IProject projectHandle, org.eclipse.core.runtime.IProgressMonitor monitor, java.lang.String projectID)
          Method to convert a project to a C++ nature
 void convertProjectToNewC(org.eclipse.core.resources.IProject projectHandle, java.lang.String bsId, org.eclipse.core.runtime.IProgressMonitor monitor)
           
 void convertProjectToNewCC(org.eclipse.core.resources.IProject projectHandle, java.lang.String bsId, org.eclipse.core.runtime.IProgressMonitor monitor)
           
 org.eclipse.core.resources.IProject createCDTProject(org.eclipse.core.resources.IProjectDescription description, org.eclipse.core.resources.IProject projectHandle, org.eclipse.core.runtime.IProgressMonitor monitor)
           
 org.eclipse.core.resources.IProject createCDTProject(org.eclipse.core.resources.IProjectDescription description, org.eclipse.core.resources.IProject projectHandle, java.lang.String bsId, org.eclipse.core.runtime.IProgressMonitor monitor)
           
 org.eclipse.core.resources.IProject createCProject(org.eclipse.core.resources.IProjectDescription description, org.eclipse.core.resources.IProject projectHandle, org.eclipse.core.runtime.IProgressMonitor monitor, java.lang.String projectID)
          Creates a C project resource given the project handle and description.
 org.eclipse.cdt.core.settings.model.ICProjectDescription createProjectDescription(org.eclipse.core.resources.IProject project, boolean loadIfExists)
          this method is a full equivalent to #createProjectDescription(IProject, boolean, false)
 org.eclipse.cdt.core.settings.model.ICProjectDescription createProjectDescription(org.eclipse.core.resources.IProject project, boolean loadIfExists, boolean creating)
          the method creates and returns a writable project description
static org.eclipse.core.runtime.IStatus createStatus(java.lang.String msg)
           
static org.eclipse.core.runtime.IStatus createStatus(java.lang.String msg, java.lang.Throwable e)
           
 java.lang.String[] getAllErrorParsersIDs()
          Array of error parsers ids.
 IBinaryParser[] getBinaryParser(org.eclipse.core.resources.IProject project)
          Deprecated. - use getBinaryParserExtensions(IProject project)
 ICExtensionReference[] getBinaryParserExtensions(org.eclipse.core.resources.IProject project)
           
 IEnvironmentVariableManager getBuildEnvironmentManager()
           
 ICDescriptorManager getCDescriptorManager()
           
 ICdtVariableManager getCdtVariableManager()
           
 IConsole getConsole()
           
 IConsole getConsole(java.lang.String id)
           
static org.eclipse.core.runtime.content.IContentType getContentType(org.eclipse.core.resources.IProject project, java.lang.String filename)
          Returns the content type for a filename.
static org.eclipse.core.runtime.content.IContentType getContentType(java.lang.String filename)
          Helper function, returning the content type for a filename Same as: getContentType(null, filename)
 org.eclipse.cdt.core.model.CoreModel getCoreModel()
           
 ICDescriptor getCProjectDescription(org.eclipse.core.resources.IProject project)
          Deprecated. use getCProjetDescription(IProject project, boolean create)
 ICDescriptor getCProjectDescription(org.eclipse.core.resources.IProject project, boolean create)
          Get the ICDescriptor for the given project, if create is true then a descriptor will be created if one does not exist.
static CCorePlugin getDefault()
           
 IBinaryParser getDefaultBinaryParser()
           
static java.util.HashMap getDefaultOptions()
          TODO: Add all options here Returns a table of all known configurable options with their default values.
 CDOM getDOM()
           
 IErrorParser[] getErrorParser(java.lang.String id)
           
static java.lang.String getFormattedString(java.lang.String key, java.lang.String arg)
           
static java.lang.String getFormattedString(java.lang.String key, java.lang.String[] args)
           
static org.eclipse.cdt.core.index.IIndexManager getIndexManager()
           
static java.lang.String getOption(java.lang.String optionName)
          Helper method for returning one option value only.
static java.util.HashMap getOptions()
          Returns the table of the current options.
 IPathEntryVariableManager getPathEntryVariableManager()
           
static org.eclipse.cdt.core.dom.IPDOMManager getPDOMManager()
          Deprecated. use getIndexManager().
static IPositionTrackerManager getPositionTrackerManager()
           
 org.eclipse.cdt.core.settings.model.ICConfigurationDescription getPreferenceConfiguration(java.lang.String buildSystemId)
           
 org.eclipse.cdt.core.settings.model.ICConfigurationDescription getPreferenceConfiguration(java.lang.String buildSystemId, boolean write)
           
 IProcessList getProcessList()
          Get the IProcessList contributed interface for the platform.
 org.eclipse.cdt.core.settings.model.ICProjectDescription getProjectDescription(org.eclipse.core.resources.IProject project)
          returns the project description associated with this project or null if the project does not contain the CDT data associated with it.
 org.eclipse.cdt.core.settings.model.ICProjectDescription getProjectDescription(org.eclipse.core.resources.IProject project, boolean write)
          returns the project description associated with this project or null if the project does not contain the CDT data associated with it.
 org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager getProjectDescriptionManager()
           
static java.util.ResourceBundle getResourceBundle()
           
static java.lang.String getResourceString(java.lang.String key)
           
 IScannerInfoProvider getScannerInfoProvider(org.eclipse.core.resources.IProject project)
           
static org.eclipse.cdt.core.model.IWorkingCopy[] getSharedWorkingCopies(org.eclipse.cdt.internal.core.model.IBufferFactory factory)
          Answers the shared working copies currently registered for this buffer factory.
static org.eclipse.core.resources.IWorkspace getWorkspace()
           
 boolean isNewStyleProject(org.eclipse.cdt.core.settings.model.ICProjectDescription des)
          aswers whether the given project is a new-style project, i.e.
 boolean isNewStyleProject(org.eclipse.core.resources.IProject project)
          aswers whether the given project is a new-style project, i.e.
static void log(org.eclipse.core.runtime.IStatus status)
           
static void log(java.lang.String e)
           
static void log(java.lang.Throwable e)
           
 void mapCProjectOwner(org.eclipse.core.resources.IProject project, java.lang.String id, boolean override)
           
static void setOptions(java.util.HashMap newOptions)
          Sets the current table of options.
 void setPreferenceConfiguration(java.lang.String buildSystemId, org.eclipse.cdt.core.settings.model.ICConfigurationDescription des)
           
 void setProjectDescription(org.eclipse.core.resources.IProject project, org.eclipse.cdt.core.settings.model.ICProjectDescription des)
          this method is called to save/apply the project description the method should be called to apply changes made to the project description returned by the getProjectDescription(IProject, boolean) or createProjectDescription(IProject, boolean)
 void setProjectDescription(org.eclipse.core.resources.IProject project, org.eclipse.cdt.core.settings.model.ICProjectDescription des, boolean force, org.eclipse.core.runtime.IProgressMonitor monitor)
           
 void setStructuralParseMode(boolean useNewParser)
           
static void setUseProjectSpecificContentTypes(org.eclipse.core.resources.IProject project, boolean val)
          Enables or disables the project specific content types.
 void start(org.osgi.framework.BundleContext context)
           
 void stop(org.osgi.framework.BundleContext context)
           
 void updateProjectDescriptions(org.eclipse.core.resources.IProject[] projects, org.eclipse.core.runtime.IProgressMonitor monitor)
          forces the cached data of the specified projects to be re-calculated.
static boolean usesProjectSpecificContentTypes(org.eclipse.core.resources.IProject project)
          Tests whether the given project uses its project specific content types.
 boolean useStructuralParseMode()
           
 
Methods inherited from class org.eclipse.core.runtime.Plugin
find, find, getBundle, getDescriptor, getLog, getPluginPreferences, getStateLocation, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, shutdown, startup, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STATUS_CDTPROJECT_EXISTS

public static final int STATUS_CDTPROJECT_EXISTS
See Also:
Constant Field Values

STATUS_CDTPROJECT_MISMATCH

public static final int STATUS_CDTPROJECT_MISMATCH
See Also:
Constant Field Values

CDT_PROJECT_NATURE_ID_MISMATCH

public static final int CDT_PROJECT_NATURE_ID_MISMATCH
See Also:
Constant Field Values

PLUGIN_ID

public static final java.lang.String PLUGIN_ID
See Also:
Constant Field Values

BUILDER_MODEL_ID

public static final java.lang.String BUILDER_MODEL_ID
See Also:
Constant Field Values

BINARY_PARSER_SIMPLE_ID

public static final java.lang.String BINARY_PARSER_SIMPLE_ID
See Also:
Constant Field Values

BINARY_PARSER_UNIQ_ID

public static final java.lang.String BINARY_PARSER_UNIQ_ID
See Also:
Constant Field Values

PREF_BINARY_PARSER

public static final java.lang.String PREF_BINARY_PARSER
See Also:
Constant Field Values

DEFAULT_BINARY_PARSER_SIMPLE_ID

public static final java.lang.String DEFAULT_BINARY_PARSER_SIMPLE_ID
See Also:
Constant Field Values

DEFAULT_BINARY_PARSER_UNIQ_ID

public static final java.lang.String DEFAULT_BINARY_PARSER_UNIQ_ID
See Also:
Constant Field Values

PREF_USE_STRUCTURAL_PARSE_MODE

public static final java.lang.String PREF_USE_STRUCTURAL_PARSE_MODE
See Also:
Constant Field Values

INDEX_SIMPLE_ID

public static final java.lang.String INDEX_SIMPLE_ID
See Also:
Constant Field Values

INDEX_UNIQ_ID

public static final java.lang.String INDEX_UNIQ_ID
See Also:
Constant Field Values

INDEXER_SIMPLE_ID

public static final java.lang.String INDEXER_SIMPLE_ID
See Also:
Constant Field Values

INDEXER_UNIQ_ID

public static final java.lang.String INDEXER_UNIQ_ID
See Also:
Constant Field Values

PREF_INDEXER

public static final java.lang.String PREF_INDEXER
See Also:
Constant Field Values

DEFAULT_INDEXER

public static final java.lang.String DEFAULT_INDEXER
See Also:
Constant Field Values

ERROR_PARSER_SIMPLE_ID

public static final java.lang.String ERROR_PARSER_SIMPLE_ID
See Also:
Constant Field Values

ERROR_PARSER_UNIQ_ID

public static final java.lang.String ERROR_PARSER_UNIQ_ID
See Also:
Constant Field Values

DEFAULT_PATHENTRY_STORE_ID

public static final java.lang.String DEFAULT_PATHENTRY_STORE_ID
See Also:
Constant Field Values

BUILD_SCANNER_INFO_SIMPLE_ID

public static final java.lang.String BUILD_SCANNER_INFO_SIMPLE_ID
See Also:
Constant Field Values

BUILD_SCANNER_INFO_UNIQ_ID

public static final java.lang.String BUILD_SCANNER_INFO_UNIQ_ID
See Also:
Constant Field Values

DEFAULT_PROVIDER_ID

public static final java.lang.String DEFAULT_PROVIDER_ID
See Also:
Constant Field Values

FORMATTER_EXTPOINT_ID

public static final java.lang.String FORMATTER_EXTPOINT_ID
Name of the extension point for contributing a source code formatter

See Also:
Constant Field Values

CORE_ENCODING

public static final java.lang.String CORE_ENCODING
Possible configurable option ID.

See Also:
getDefaultOptions(), Constant Field Values

CONTENT_TYPE_CSOURCE

public static final java.lang.String CONTENT_TYPE_CSOURCE
IContentType id for C Source Unit

See Also:
Constant Field Values

CONTENT_TYPE_CHEADER

public static final java.lang.String CONTENT_TYPE_CHEADER
IContentType id for C Header Unit

See Also:
Constant Field Values

CONTENT_TYPE_CXXSOURCE

public static final java.lang.String CONTENT_TYPE_CXXSOURCE
IContentType id for C++ Source Unit

See Also:
Constant Field Values

CONTENT_TYPE_CXXHEADER

public static final java.lang.String CONTENT_TYPE_CXXHEADER
IContentType id for C++ Header Unit

See Also:
Constant Field Values

CONTENT_TYPE_ASMSOURCE

public static final java.lang.String CONTENT_TYPE_ASMSOURCE
IContentType id for ASM Unit

See Also:
Constant Field Values

CONTENT_TYPE_BINARYFILE

public static final java.lang.String CONTENT_TYPE_BINARYFILE
IContentType id for Binary Files

See Also:
Constant Field Values

INSERT

public static final java.lang.String INSERT
Possible configurable option value.

See Also:
getDefaultOptions(), Constant Field Values

DO_NOT_INSERT

public static final java.lang.String DO_NOT_INSERT
Possible configurable option value.

See Also:
getDefaultOptions(), Constant Field Values

TAB

public static final java.lang.String TAB
Possible configurable option value.

See Also:
getDefaultOptions(), Constant Field Values

SPACE

public static final java.lang.String SPACE
Possible configurable option value.

See Also:
getDefaultOptions(), Constant Field Values

cdtLog

public CDTLogWriter cdtLog
Constructor Detail

CCorePlugin

public CCorePlugin()
Method Detail

getSharedWorkingCopies

public static org.eclipse.cdt.core.model.IWorkingCopy[] getSharedWorkingCopies(org.eclipse.cdt.internal.core.model.IBufferFactory factory)
Answers the shared working copies currently registered for this buffer factory. Working copies can be shared by several clients using the same buffer factory,see IWorkingCopy.getSharedWorkingCopy.

Parameters:
factory - the given buffer factory
Returns:
the list of shared working copies for a given buffer factory
See Also:
IWorkingCopy

getResourceString

public static java.lang.String getResourceString(java.lang.String key)

getWorkspace

public static org.eclipse.core.resources.IWorkspace getWorkspace()

getFormattedString

public static java.lang.String getFormattedString(java.lang.String key,
                                                  java.lang.String arg)

getFormattedString

public static java.lang.String getFormattedString(java.lang.String key,
                                                  java.lang.String[] args)

getResourceBundle

public static java.util.ResourceBundle getResourceBundle()

getPositionTrackerManager

public static IPositionTrackerManager getPositionTrackerManager()

getDefault

public static CCorePlugin getDefault()

log

public static void log(java.lang.String e)

log

public static void log(java.lang.Throwable e)

createStatus

public static org.eclipse.core.runtime.IStatus createStatus(java.lang.String msg)

createStatus

public static org.eclipse.core.runtime.IStatus createStatus(java.lang.String msg,
                                                            java.lang.Throwable e)

log

public static void log(org.eclipse.core.runtime.IStatus status)

stop

public void stop(org.osgi.framework.BundleContext context)
          throws java.lang.Exception
Specified by:
stop in interface org.osgi.framework.BundleActivator
Overrides:
stop in class org.eclipse.core.runtime.Plugin
Throws:
java.lang.Exception
See Also:
Plugin.shutdown()

start

public void start(org.osgi.framework.BundleContext context)
           throws java.lang.Exception
Specified by:
start in interface org.osgi.framework.BundleActivator
Overrides:
start in class org.eclipse.core.runtime.Plugin
Throws:
java.lang.Exception
See Also:
Plugin.startup()

getDefaultOptions

public static java.util.HashMap getDefaultOptions()
TODO: Add all options here Returns a table of all known configurable options with their default values. These options allow to configure the behavior of the underlying components. The client may safely use the result as a template that they can modify and then pass to setOptions. Helper constants have been defined on CCorePlugin for each of the option ID and their possible constant values. Note: more options might be added in further releases.
 RECOGNIZED OPTIONS:
 
 CORE / Specify Default Source Encoding Format
    Get the encoding format for translated sources. This setting is read-only, it is equivalent
    to 'ResourcesPlugin.getEncoding()'.
     - option id:         "org.eclipse.cdt.core.encoding"
     - possible values:   { any of the supported encoding names}.
     - default:           
 

Returns:
a mutable map containing the default settings of all known options (key type: String; value type: String)
See Also:
setOptions(java.util.HashMap)

getOption

public static java.lang.String getOption(java.lang.String optionName)
Helper method for returning one option value only. Equivalent to (String)CCorePlugin.getOptions().get(optionName) Note that it may answer null if this option does not exist.

For a complete description of the configurable options, see getDefaultOptions.

Parameters:
optionName - the name of an option
Returns:
the String value of a given option
See Also:
getDefaultOptions()

getOptions

public static java.util.HashMap getOptions()
Returns the table of the current options. Initially, all options have their default values, and this method returns a table that includes all known options.

For a complete description of the configurable options, see getDefaultOptions.

Returns:
table of current settings of all options (key type: String; value type: String)
See Also:
getDefaultOptions()

setOptions

public static void setOptions(java.util.HashMap newOptions)
Sets the current table of options. All and only the options explicitly included in the given table are remembered; all previous option settings are forgotten, including ones not explicitly mentioned.

For a complete description of the configurable options, see getDefaultOptions.

Parameters:
newOptions - the new options (key type: String; value type: String), or null to reset all options to their default values
See Also:
getDefaultOptions()

getConsole

public IConsole getConsole(java.lang.String id)

getConsole

public IConsole getConsole()

getBinaryParserExtensions

public ICExtensionReference[] getBinaryParserExtensions(org.eclipse.core.resources.IProject project)
                                                 throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

getBinaryParser

public IBinaryParser[] getBinaryParser(org.eclipse.core.resources.IProject project)
                                throws org.eclipse.core.runtime.CoreException
Deprecated. - use getBinaryParserExtensions(IProject project)

Parameters:
project -
Returns:
Throws:
org.eclipse.core.runtime.CoreException

getDefaultBinaryParser

public IBinaryParser getDefaultBinaryParser()
                                     throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

getCoreModel

public org.eclipse.cdt.core.model.CoreModel getCoreModel()

getPDOMManager

public static org.eclipse.cdt.core.dom.IPDOMManager getPDOMManager()
Deprecated. use getIndexManager().


getIndexManager

public static org.eclipse.cdt.core.index.IIndexManager getIndexManager()

getPathEntryVariableManager

public IPathEntryVariableManager getPathEntryVariableManager()

getCProjectDescription

public ICDescriptor getCProjectDescription(org.eclipse.core.resources.IProject project)
                                    throws org.eclipse.core.runtime.CoreException
Deprecated. use getCProjetDescription(IProject project, boolean create)

Parameters:
project -
Returns:
Throws:
org.eclipse.core.runtime.CoreException

getCProjectDescription

public ICDescriptor getCProjectDescription(org.eclipse.core.resources.IProject project,
                                           boolean create)
                                    throws org.eclipse.core.runtime.CoreException
Get the ICDescriptor for the given project, if create is true then a descriptor will be created if one does not exist.

Parameters:
project -
create -
Returns:
ICDescriptor or null if create is false and no .cdtproject file exists on disk.
Throws:
org.eclipse.core.runtime.CoreException

mapCProjectOwner

public void mapCProjectOwner(org.eclipse.core.resources.IProject project,
                             java.lang.String id,
                             boolean override)
                      throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

getCDescriptorManager

public ICDescriptorManager getCDescriptorManager()

createCProject

public org.eclipse.core.resources.IProject createCProject(org.eclipse.core.resources.IProjectDescription description,
                                                          org.eclipse.core.resources.IProject projectHandle,
                                                          org.eclipse.core.runtime.IProgressMonitor monitor,
                                                          java.lang.String projectID)
                                                   throws org.eclipse.core.runtime.CoreException,
                                                          org.eclipse.core.runtime.OperationCanceledException
Creates a C project resource given the project handle and description.

Parameters:
description - the project description to create a project resource for
projectHandle - the project handle to create a project resource for
monitor - the progress monitor to show visual progress with
projectID - required for mapping the project to an owner
Throws:
org.eclipse.core.runtime.CoreException - if the operation fails
org.eclipse.core.runtime.OperationCanceledException - if the operation is canceled

createCDTProject

public org.eclipse.core.resources.IProject createCDTProject(org.eclipse.core.resources.IProjectDescription description,
                                                            org.eclipse.core.resources.IProject projectHandle,
                                                            org.eclipse.core.runtime.IProgressMonitor monitor)
                                                     throws org.eclipse.core.runtime.CoreException,
                                                            org.eclipse.core.runtime.OperationCanceledException
Throws:
org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.OperationCanceledException

createCDTProject

public org.eclipse.core.resources.IProject createCDTProject(org.eclipse.core.resources.IProjectDescription description,
                                                            org.eclipse.core.resources.IProject projectHandle,
                                                            java.lang.String bsId,
                                                            org.eclipse.core.runtime.IProgressMonitor monitor)
                                                     throws org.eclipse.core.runtime.CoreException,
                                                            org.eclipse.core.runtime.OperationCanceledException
Throws:
org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.OperationCanceledException

convertProjectFromCtoCC

public void convertProjectFromCtoCC(org.eclipse.core.resources.IProject projectHandle,
                                    org.eclipse.core.runtime.IProgressMonitor monitor)
                             throws org.eclipse.core.runtime.CoreException
Method convertProjectFromCtoCC converts a C Project to a C++ Project The newProject MUST, not be null, already have a C Nature && must NOT already have a C++ Nature

Parameters:
projectHandle -
monitor -
Throws:
org.eclipse.core.runtime.CoreException

convertProjectToC

public void convertProjectToC(org.eclipse.core.resources.IProject projectHandle,
                              org.eclipse.core.runtime.IProgressMonitor monitor,
                              java.lang.String projectID)
                       throws org.eclipse.core.runtime.CoreException
Method to convert a project to a C nature All checks should have been done externally (as in the Conversion Wizards). This method blindly does the conversion.

Parameters:
project -
String - targetNature
monitor -
projectID -
Throws:
org.eclipse.core.runtime.CoreException

convertProjectToNewC

public void convertProjectToNewC(org.eclipse.core.resources.IProject projectHandle,
                                 java.lang.String bsId,
                                 org.eclipse.core.runtime.IProgressMonitor monitor)
                          throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

convertProjectToCC

public void convertProjectToCC(org.eclipse.core.resources.IProject projectHandle,
                               org.eclipse.core.runtime.IProgressMonitor monitor,
                               java.lang.String projectID)
                        throws org.eclipse.core.runtime.CoreException
Method to convert a project to a C++ nature

Parameters:
project -
String - targetNature
monitor -
projectID -
Throws:
org.eclipse.core.runtime.CoreException

convertProjectToNewCC

public void convertProjectToNewCC(org.eclipse.core.resources.IProject projectHandle,
                                  java.lang.String bsId,
                                  org.eclipse.core.runtime.IProgressMonitor monitor)
                           throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

getProcessList

public IProcessList getProcessList()
                            throws org.eclipse.core.runtime.CoreException
Get the IProcessList contributed interface for the platform.

Returns:
IProcessList
Throws:
org.eclipse.core.runtime.CoreException

getAllErrorParsersIDs

public java.lang.String[] getAllErrorParsersIDs()
Array of error parsers ids.

Returns:

getErrorParser

public IErrorParser[] getErrorParser(java.lang.String id)

getScannerInfoProvider

public IScannerInfoProvider getScannerInfoProvider(org.eclipse.core.resources.IProject project)

getContentType

public static org.eclipse.core.runtime.content.IContentType getContentType(java.lang.String filename)
Helper function, returning the content type for a filename Same as:
        getContentType(null, filename)
 

Parameters:
filename -
Returns:
the content type found, or null

getContentType

public static org.eclipse.core.runtime.content.IContentType getContentType(org.eclipse.core.resources.IProject project,
                                                                           java.lang.String filename)
Returns the content type for a filename. The method respects project specific content type definitions. The lookup prefers case- sensitive matches over the others.

Parameters:
project - a project with possible project specific settings. Can be null
filename - a filename to compute the content type for
Returns:
the content type found or null

usesProjectSpecificContentTypes

public static boolean usesProjectSpecificContentTypes(org.eclipse.core.resources.IProject project)
Tests whether the given project uses its project specific content types.


setUseProjectSpecificContentTypes

public static void setUseProjectSpecificContentTypes(org.eclipse.core.resources.IProject project,
                                                     boolean val)
Enables or disables the project specific content types.


configurePluginDebugOptions

public void configurePluginDebugOptions()
Configure the plugin with respect to option settings defined in ".options" file


setStructuralParseMode

public void setStructuralParseMode(boolean useNewParser)

useStructuralParseMode

public boolean useStructuralParseMode()

getDOM

public CDOM getDOM()

getCdtVariableManager

public ICdtVariableManager getCdtVariableManager()

getBuildEnvironmentManager

public IEnvironmentVariableManager getBuildEnvironmentManager()

getPreferenceConfiguration

public org.eclipse.cdt.core.settings.model.ICConfigurationDescription getPreferenceConfiguration(java.lang.String buildSystemId)
                                                                                          throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

getPreferenceConfiguration

public org.eclipse.cdt.core.settings.model.ICConfigurationDescription getPreferenceConfiguration(java.lang.String buildSystemId,
                                                                                                 boolean write)
                                                                                          throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

setPreferenceConfiguration

public void setPreferenceConfiguration(java.lang.String buildSystemId,
                                       org.eclipse.cdt.core.settings.model.ICConfigurationDescription des)
                                throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

createProjectDescription

public org.eclipse.cdt.core.settings.model.ICProjectDescription createProjectDescription(org.eclipse.core.resources.IProject project,
                                                                                         boolean loadIfExists)
                                                                                  throws org.eclipse.core.runtime.CoreException
this method is a full equivalent to #createProjectDescription(IProject, boolean, false)

Throws:
org.eclipse.core.runtime.CoreException
See Also:
createProjectDescription(IProject, boolean, boolean)

createProjectDescription

public org.eclipse.cdt.core.settings.model.ICProjectDescription createProjectDescription(org.eclipse.core.resources.IProject project,
                                                                                         boolean loadIfExists,
                                                                                         boolean creating)
                                                                                  throws org.eclipse.core.runtime.CoreException
the method creates and returns a writable project description

Parameters:
project - project for which the project description is requested
loadIfExists - if true the method first tries to load and return the project description from the settings file (.cproject) if false, the stored settings are ignored and the new (empty) project description is created
creating - if true the created project description will be contain the true "isCdtProjectCreating" state. NOTE: in case the project already contains the project description AND its "isCdtProjectCreating" is false the resulting description will be created with the false "isCdtProjectCreating" state NOTE: changes made to the returned project description will not be applied until the setProjectDescription(IProject, ICProjectDescription) is called
Returns:
ICProjectDescription
Throws:
org.eclipse.core.runtime.CoreException

getProjectDescription

public org.eclipse.cdt.core.settings.model.ICProjectDescription getProjectDescription(org.eclipse.core.resources.IProject project)
returns the project description associated with this project or null if the project does not contain the CDT data associated with it. this is a convenience method fully equivalent to getProjectDescription(project, true) see getProjectDescription(IProject, boolean) for more detail

Parameters:
project -
Returns:
a writable copy of the ICProjectDescription or null if the project does not contain the CDT data associated with it. Note: changes to the project description will not be reflected/used by the core until the setProjectDescription(IProject, ICProjectDescription) is called
See Also:
getProjectDescription(IProject, boolean)

setProjectDescription

public void setProjectDescription(org.eclipse.core.resources.IProject project,
                                  org.eclipse.cdt.core.settings.model.ICProjectDescription des)
                           throws org.eclipse.core.runtime.CoreException
this method is called to save/apply the project description the method should be called to apply changes made to the project description returned by the getProjectDescription(IProject, boolean) or createProjectDescription(IProject, boolean)

Parameters:
project -
des -
Throws:
org.eclipse.core.runtime.CoreException
See Also:
#getProjectDescription(IProject, boolean)}, createProjectDescription(IProject, boolean)

setProjectDescription

public void setProjectDescription(org.eclipse.core.resources.IProject project,
                                  org.eclipse.cdt.core.settings.model.ICProjectDescription des,
                                  boolean force,
                                  org.eclipse.core.runtime.IProgressMonitor monitor)
                           throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

getProjectDescription

public org.eclipse.cdt.core.settings.model.ICProjectDescription getProjectDescription(org.eclipse.core.resources.IProject project,
                                                                                      boolean write)
returns the project description associated with this project or null if the project does not contain the CDT data associated with it.

Parameters:
project - project for which the description is requested
write - if true, the writable description copy is returned. If false the cached read-only description is returned. CDT core maintains the cached project description settings. If only read access is needed to description, then the read-only project description should be obtained. This description always operates with cached data and thus it is better to use it for performance reasons All set* calls to the read-only description result in the WriteAccessException When the writable description is requested, the description copy is created. Changes to this description will not be reflected/used by the core and Build System untill the setProjectDescription(IProject, ICProjectDescription) is called Each getProjectDescription(project, true) returns a new copy of the project description The writable description uses the cached data untill the first set call after that the description communicates directly to the Build System i.e. the implementer of the org.eclipse.cdt.core.CConfigurationDataProvider extension This ensures the Core<->Build System settings integrity
Returns:
ICProjectDescription or null if the project does not contain the CDT data associated with it.

updateProjectDescriptions

public void updateProjectDescriptions(org.eclipse.core.resources.IProject[] projects,
                                      org.eclipse.core.runtime.IProgressMonitor monitor)
                               throws org.eclipse.core.runtime.CoreException
forces the cached data of the specified projects to be re-calculated. if the projects argument is null al projects within the workspace are updated

Parameters:
projects -
monitor -
Throws:
org.eclipse.core.runtime.CoreException

isNewStyleProject

public boolean isNewStyleProject(org.eclipse.core.resources.IProject project)
aswers whether the given project is a new-style project, i.e. CConfigurationDataProvider-driven

Parameters:
project -
Returns:

isNewStyleProject

public boolean isNewStyleProject(org.eclipse.cdt.core.settings.model.ICProjectDescription des)
aswers whether the given project is a new-style project, i.e. CConfigurationDataProvider-driven

Parameters:
des -
Returns:

getProjectDescriptionManager

public org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager getProjectDescriptionManager()