public class CCorePlugin
extends org.eclipse.core.runtime.Plugin
Modifier and Type | Field and Description |
---|---|
static String |
BINARY_PARSER_SIMPLE_ID |
static String |
BINARY_PARSER_UNIQ_ID |
static String |
BUILD_SCANNER_INFO_SIMPLE_ID |
static String |
BUILD_SCANNER_INFO_UNIQ_ID |
static String |
BUILDER_MODEL_ID |
static int |
CDT_PROJECT_NATURE_ID_MISMATCH |
org.eclipse.cdt.internal.core.CDTLogWriter |
cdtLog |
static String |
COMMAND_LAUNCHER_FACTORY_SIMPLE_ID
Name of the extension point for contributing a Command Launcher factory
|
static String |
COMMAND_LAUNCHER_FACTORY_UNIQ_ID
Full unique name of the extension point for contributing a Command Launcher
factory
|
static String |
CONTENT_TYPE_ASMSOURCE
IContentType id for ASM Unit
|
static String |
CONTENT_TYPE_BINARYFILE
IContentType id for Binary Files
|
static String |
CONTENT_TYPE_CHEADER
IContentType id for C Header Unit
|
static String |
CONTENT_TYPE_CSOURCE
IContentType id for C Source Unit
|
static String |
CONTENT_TYPE_CXXHEADER
IContentType id for C++ Header Unit
|
static String |
CONTENT_TYPE_CXXSOURCE
IContentType id for C++ Source Unit
|
static String |
CORE_ENCODING
Possible configurable option ID.
|
static String |
DEFAULT_BINARY_PARSER_SIMPLE_ID |
static String |
DEFAULT_BINARY_PARSER_UNIQ_ID |
static String |
DEFAULT_INDEXER |
static String |
DEFAULT_PATHENTRY_STORE_ID |
static String |
DEFAULT_PROVIDER_ID |
static String |
DO_NOT_INSERT
Possible configurable option value.
|
static String |
ERROR_PARSER_SIMPLE_ID
Name of the extension point for contributing an error parser
|
static String |
ERROR_PARSER_UNIQ_ID
Full unique name of the extension point for contributing an error parser
|
static String |
FORMATTER_EXTPOINT_ID
Name of the extension point for contributing a source code formatter
|
static String |
INDEX_SIMPLE_ID |
static String |
INDEX_UNIQ_ID |
static String |
INDEXER_SIMPLE_ID |
static String |
INDEXER_UNIQ_ID |
static String |
INSERT
Possible configurable option value.
|
static String |
PLUGIN_ID |
static String |
PREF_BINARY_PARSER |
static String |
PREF_INDEXER |
static String |
PREF_USE_STRUCTURAL_PARSE_MODE |
static String |
SPACE
Possible configurable option value.
|
static int |
STATUS_BUILD_CONFIG_NOT_VALID
Toolchain not found when inflating a build configuration.
|
static int |
STATUS_CDTPROJECT_EXISTS |
static int |
STATUS_CDTPROJECT_MISMATCH |
static int |
STATUS_PDOM_TOO_LARGE
Status code for core exception that is thrown if a pdom grew larger than
the supported limit.
|
static String |
TAB
Possible configurable option value.
|
Constructor and Description |
---|
CCorePlugin() |
Modifier and Type | Method and Description |
---|---|
void |
configurePluginDebugOptions()
Configure the plug-in 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,
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,
String projectID)
Method to convert a project to a C++ nature
|
void |
convertProjectToNewC(org.eclipse.core.resources.IProject projectHandle,
String bsId,
org.eclipse.core.runtime.IProgressMonitor monitor) |
void |
convertProjectToNewCC(org.eclipse.core.resources.IProject projectHandle,
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,
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,
String projectID)
Creates a C project resource given the project handle and description.
|
ICProjectDescription |
createProjectDescription(org.eclipse.core.resources.IProject project,
boolean loadIfExists)
Equivalent to
createProjectDescription(IProject, boolean, false) . |
ICProjectDescription |
createProjectDescription(org.eclipse.core.resources.IProject project,
boolean loadIfExists,
boolean creating)
Creates and returns a writable project description.
|
static org.eclipse.core.runtime.IStatus |
createStatus(String msg) |
static org.eclipse.core.runtime.IStatus |
createStatus(String msg,
Throwable e) |
String[] |
getAllErrorParsersIDs()
Deprecated.
since CDT 6.1. Use
ErrorParserManager.getErrorParserAvailableIds() instead |
IBinaryParser[] |
getBinaryParser(org.eclipse.core.resources.IProject project)
Deprecated.
- use getBinaryParserExtensions(IProject project)
|
IBinaryParser |
getBinaryParser(String id)
Returns the binary parser with the given id.
|
ICExtensionReference[] |
getBinaryParserExtensions(org.eclipse.core.resources.IProject project)
Deprecated.
Use
getDefaultBinaryParserExtensions(IProject)
instead. |
IConsole |
getBuildConsole(String contextId,
String name,
URL iconUrl)
Create CDT console adapter for build console.
|
IEnvironmentVariableManager |
getBuildEnvironmentManager() |
ICDescriptorManager |
getCDescriptorManager()
Deprecated.
Settings should be set per ICConfigurationDescription rather
than global to the project. Please use
getProjectDescription(IProject, boolean) to fetch
the ICProjectDescription for the project. And use
ICProjectDescription.getConfigurations() to get an
array of ICConfigurationDescriptions, which have similar API
to ICDescriptor, allowing you to store settings and configure
extensions at the Configuration level rather than at the
project level. |
static org.osgi.framework.Version |
getCDTFeatureVersion()
Return the version of the CDT feature in this Eclipse installation, if any.
|
ICdtVariableManager |
getCdtVariableManager() |
IConsole |
getConsole()
Create CDT console adapter connected to the default build console.
|
IConsole |
getConsole(String id)
Create CDT console adapter.
|
IConsole |
getConsole(String extConsoleId,
String contextId,
String name,
URL iconUrl)
Create CDT console adapter for build console defined as an extension.
|
static org.eclipse.core.runtime.content.IContentType |
getContentType(org.eclipse.core.resources.IProject project,
String filename)
Returns the content type for a filename.
|
static org.eclipse.core.runtime.content.IContentType |
getContentType(String filename)
Helper function, returning the content type for a filename Same as:
|
CoreModel |
getCoreModel() |
ICDescriptor |
getCProjectDescription(org.eclipse.core.resources.IProject project)
Deprecated.
use
getProjectDescription(IProject, boolean) instead |
ICDescriptor |
getCProjectDescription(org.eclipse.core.resources.IProject project,
boolean create)
Deprecated.
|
static CCorePlugin |
getDefault() |
IBinaryParser |
getDefaultBinaryParser() |
ICConfigExtensionReference[] |
getDefaultBinaryParserExtensions(org.eclipse.core.resources.IProject project)
Returns the binary parser extensions for the default settings
configuration.
|
static HashMap<String,String> |
getDefaultOptions()
TODO: Add all options here Returns a table of all known configurable
options with their default values.
|
CDOM |
getDOM()
Deprecated.
use
ITranslationUnit or ILanguage to
construct ASTs, instead. |
IErrorParser[] |
getErrorParser(String id)
Deprecated.
since CDT 6.1. Use
ErrorParserManager.getErrorParserCopy(String) instead |
static String |
getFormattedString(String key,
String arg) |
static String |
getFormattedString(String key,
String[] args) |
static IIndexManager |
getIndexManager() |
static String |
getOption(String optionName)
Helper method for returning one option value only.
|
static HashMap<String,String> |
getOptions()
Returns the table of the current options.
|
IPathEntryVariableManager |
getPathEntryVariableManager() |
static IPDOMManager |
getPDOMManager()
Deprecated.
use getIndexManager().
|
static IPositionTrackerManager |
getPositionTrackerManager() |
ICConfigurationDescription |
getPreferenceConfiguration(String buildSystemId) |
ICConfigurationDescription |
getPreferenceConfiguration(String buildSystemId,
boolean write) |
IProcessList |
getProcessList()
Get the IProcessList contributed interface for the platform.
|
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.
|
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.
|
ICProjectDescriptionManager |
getProjectDescriptionManager() |
static ResourceBundle |
getResourceBundle() |
static String |
getResourceString(String key) |
IScannerInfoProvider |
getScannerInfoProvider(org.eclipse.core.resources.IProject project) |
static <T> T |
getService(Class<T> service)
Return the given OSGi service.
|
static IWorkingCopy[] |
getSharedWorkingCopies()
Returns the shared working copies currently registered for the default
buffer factory.
|
static ITagService |
getTagService() |
static IUserVarSupplier |
getUserVarSupplier() |
static org.eclipse.core.resources.IWorkspace |
getWorkspace() |
boolean |
isNewStyleProject(ICProjectDescription des)
Answers whether the given project is a new-style project, i.e.
|
boolean |
isNewStyleProject(org.eclipse.core.resources.IProject project)
Answers whether the given project is a new-style project, i.e.
|
static void |
log(int severity,
String msg)
Prints a message in the log
|
static void |
log(org.eclipse.core.runtime.IStatus status) |
static void |
log(String e) |
static void |
log(String message,
Throwable e) |
static void |
log(Throwable e) |
static void |
logStackTrace(int severity,
String msg)
Prints a message in the log accompanied by stack trace
|
void |
mapCProjectOwner(org.eclipse.core.resources.IProject project,
String id,
boolean override) |
void |
resetCachedScannerInfoProvider(org.eclipse.core.resources.IProject project)
Clears cached scanner info provider for the given project so that the
next call to
getScannerInfoProvider(IProject) would return an up
to date scanner info provider. |
static void |
setOptions(HashMap<String,String> newOptions)
Sets the current table of options.
|
void |
setPreferenceConfiguration(String buildSystemId,
ICConfigurationDescription des) |
void |
setProjectDescription(org.eclipse.core.resources.IProject project,
ICProjectDescription des)
Called to save/apply the project description.
|
void |
setProjectDescription(org.eclipse.core.resources.IProject project,
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.
|
static boolean |
showSourceRootsAtTopOfProject()
Returns the preference controlling whether source roots are shown at the
top of projects or embedded within the resource tree of projects when
they are not top level folders.
|
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() |
find, find, getBundle, getLog, getPluginPreferences, getStateLocation, initializeDefaultPluginPreferences, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, shutdown, startup, toString
public static final int STATUS_CDTPROJECT_EXISTS
public static final int STATUS_CDTPROJECT_MISMATCH
public static final int CDT_PROJECT_NATURE_ID_MISMATCH
public static final int STATUS_PDOM_TOO_LARGE
public static final int STATUS_BUILD_CONFIG_NOT_VALID
public static final String PLUGIN_ID
public static final String BUILDER_MODEL_ID
public static final String BINARY_PARSER_SIMPLE_ID
public static final String BINARY_PARSER_UNIQ_ID
public static final String PREF_BINARY_PARSER
public static final String DEFAULT_BINARY_PARSER_SIMPLE_ID
public static final String DEFAULT_BINARY_PARSER_UNIQ_ID
public static final String PREF_USE_STRUCTURAL_PARSE_MODE
public static final String INDEX_SIMPLE_ID
public static final String INDEX_UNIQ_ID
public static final String INDEXER_SIMPLE_ID
public static final String INDEXER_UNIQ_ID
public static final String PREF_INDEXER
public static final String DEFAULT_INDEXER
public static final String ERROR_PARSER_SIMPLE_ID
public static final String ERROR_PARSER_UNIQ_ID
public static final String COMMAND_LAUNCHER_FACTORY_SIMPLE_ID
public static final String COMMAND_LAUNCHER_FACTORY_UNIQ_ID
public static final String DEFAULT_PATHENTRY_STORE_ID
public static final String BUILD_SCANNER_INFO_SIMPLE_ID
public static final String BUILD_SCANNER_INFO_UNIQ_ID
public static final String DEFAULT_PROVIDER_ID
public static final String FORMATTER_EXTPOINT_ID
public static final String CORE_ENCODING
getDefaultOptions()
,
Constant Field Valuespublic static final String CONTENT_TYPE_CSOURCE
public static final String CONTENT_TYPE_CHEADER
public static final String CONTENT_TYPE_CXXSOURCE
public static final String CONTENT_TYPE_CXXHEADER
public static final String CONTENT_TYPE_ASMSOURCE
public static final String CONTENT_TYPE_BINARYFILE
public static final String INSERT
getDefaultOptions()
,
Constant Field Valuespublic static final String DO_NOT_INSERT
getDefaultOptions()
,
Constant Field Valuespublic static final String TAB
getDefaultOptions()
,
Constant Field Valuespublic static final String SPACE
getDefaultOptions()
,
Constant Field Valuespublic org.eclipse.cdt.internal.core.CDTLogWriter cdtLog
public CCorePlugin()
public static IWorkingCopy[] getSharedWorkingCopies()
public static org.eclipse.core.resources.IWorkspace getWorkspace()
public static ResourceBundle getResourceBundle()
public static IPositionTrackerManager getPositionTrackerManager()
public static CCorePlugin getDefault()
public void stop(org.osgi.framework.BundleContext context) throws Exception
stop
in interface org.osgi.framework.BundleActivator
stop
in class org.eclipse.core.runtime.Plugin
Exception
Plugin.shutdown()
public void start(org.osgi.framework.BundleContext context) throws Exception
start
in interface org.osgi.framework.BundleActivator
start
in class org.eclipse.core.runtime.Plugin
Exception
Plugin.startup()
public static HashMap<String,String> getDefaultOptions()
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:
String
; value type:
String
)setOptions(java.util.HashMap<java.lang.String, java.lang.String>)
public static String getOption(String optionName)
(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
.
optionName
- the name of an optiongetDefaultOptions()
public static HashMap<String,String> getOptions()
For a complete description of the configurable options, see
getDefaultOptions
.
String
; value type: String
)getDefaultOptions()
public static void setOptions(HashMap<String,String> newOptions)
For a complete description of the configurable options, see
getDefaultOptions
.
newOptions
- the new options (key type: String
; value type:
String
), or null
to reset all
options to their default valuesgetDefaultOptions()
public IConsole getConsole(String extConsoleId, String contextId, String name, URL iconUrl)
org.eclipse.cdt.core.CBuildConsole
extension point. If the
console class is instance of ICConsole
it is initialized with
context id, name and icon to be shown in the list of consoles in the
Console view.extConsoleId
- - console id defined in the extension point.contextId
- - context menu id in the Console view. A caller needs to
define a distinct one for own use.name
- - name of console to appear in the list of consoles in context
menu in the Console view.iconUrl
- - a URL
of the icon for the context menu of the
Console view. The url is expected to point to an image in
eclipse OSGi bundle. Here is an example how to retrieve URL:
URL iconUrl = CUIPlugin.getDefault().getBundle().getEntry("icons/obj16/flask.png");
public IConsole getConsole(String id)
id
- - id of the console specified in extension point to
instantiate console adapter.public IConsole getBuildConsole(String contextId, String name, URL iconUrl)
org.eclipse.cdt.internal.ui.buildconsole.CBuildConsole
is created
and initialized with the parameters.contextId
- - context menu id in the Console view. A caller needs to
define a distinct one for own use.name
- - name of console to appear in the list of consoles in context
menu in the Console view.iconUrl
- - a URL
of the icon for the context menu of the
Console view. The url is expected to point to an image in
eclipse OSGi bundle. Here is an example how to retrieve URL:
URL iconUrl = CUIPlugin.getDefault().getBundle().getResource("icons/obj16/flask.png");
iconUrl
can be null, in that case the default
image is used. See
org.eclipse.cdt.internal.ui.buildconsole.BuildConsole(IBuildConsoleManager, String, String, URL)
public IConsole getConsole()
@Deprecated public ICExtensionReference[] getBinaryParserExtensions(org.eclipse.core.resources.IProject project) throws org.eclipse.core.runtime.CoreException
getDefaultBinaryParserExtensions(IProject)
instead.org.eclipse.core.runtime.CoreException
public ICConfigExtensionReference[] getDefaultBinaryParserExtensions(org.eclipse.core.resources.IProject project) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
@Deprecated public IBinaryParser[] getBinaryParser(org.eclipse.core.resources.IProject project) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public IBinaryParser getDefaultBinaryParser() throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public IBinaryParser getBinaryParser(String id) throws org.eclipse.core.runtime.CoreException
id
- id of binary parserorg.eclipse.core.runtime.CoreException
public CoreModel getCoreModel()
public static IIndexManager getIndexManager()
public static ITagService getTagService()
public IPathEntryVariableManager getPathEntryVariableManager()
@Deprecated public ICDescriptor getCProjectDescription(org.eclipse.core.resources.IProject project) throws org.eclipse.core.runtime.CoreException
getProjectDescription(IProject, boolean)
insteadorg.eclipse.core.runtime.CoreException
@Deprecated public ICDescriptor getCProjectDescription(org.eclipse.core.resources.IProject project, boolean create) throws org.eclipse.core.runtime.CoreException
getProjectDescription(IProject, boolean)
to fetch the
ICProjectDescription for the project. And use
ICProjectDescription.getConfigurations()
to get an array of
ICConfigurationDescriptions, which have similar API to ICDescriptor,
allowing you to store settings and configure extensions at the
Configuration level rather than at the project level.project
- create
- org.eclipse.core.runtime.CoreException
public void mapCProjectOwner(org.eclipse.core.resources.IProject project, String id, boolean override) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
@Deprecated public ICDescriptorManager getCDescriptorManager()
getProjectDescription(IProject, boolean)
to fetch
the ICProjectDescription for the project. And use
ICProjectDescription.getConfigurations()
to get an
array of ICConfigurationDescriptions, which have similar API
to ICDescriptor, allowing you to store settings and configure
extensions at the Configuration level rather than at the
project level.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, String projectID) throws org.eclipse.core.runtime.CoreException, org.eclipse.core.runtime.OperationCanceledException
description
- the project description to create a project resource forprojectHandle
- the project handle to create a project resource formonitor
- the progress monitor to show visual progress withprojectID
- required for mapping the project to an ownerorg.eclipse.core.runtime.CoreException
- if the operation failsorg.eclipse.core.runtime.OperationCanceledException
- if the operation is canceledpublic 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
org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.OperationCanceledException
public org.eclipse.core.resources.IProject createCDTProject(org.eclipse.core.resources.IProjectDescription description, org.eclipse.core.resources.IProject projectHandle, String bsId, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException, org.eclipse.core.runtime.OperationCanceledException
org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.OperationCanceledException
public void convertProjectFromCtoCC(org.eclipse.core.resources.IProject projectHandle, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
projectHandle
- monitor
- org.eclipse.core.runtime.CoreException
public void convertProjectToC(org.eclipse.core.resources.IProject projectHandle, org.eclipse.core.runtime.IProgressMonitor monitor, String projectID) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public void convertProjectToNewC(org.eclipse.core.resources.IProject projectHandle, String bsId, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public void convertProjectToCC(org.eclipse.core.resources.IProject projectHandle, org.eclipse.core.runtime.IProgressMonitor monitor, String projectID) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public void convertProjectToNewCC(org.eclipse.core.resources.IProject projectHandle, String bsId, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public IProcessList getProcessList() throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
@Deprecated public String[] getAllErrorParsersIDs()
ErrorParserManager.getErrorParserAvailableIds()
instead@Deprecated public IErrorParser[] getErrorParser(String id)
ErrorParserManager.getErrorParserCopy(String)
insteadpublic IScannerInfoProvider getScannerInfoProvider(org.eclipse.core.resources.IProject project)
public void resetCachedScannerInfoProvider(org.eclipse.core.resources.IProject project)
getScannerInfoProvider(IProject)
would return an up
to date scanner info provider.public static org.eclipse.core.runtime.content.IContentType getContentType(String filename)
getContentType(null, filename)
filename
- null
public static org.eclipse.core.runtime.content.IContentType getContentType(org.eclipse.core.resources.IProject project, String filename)
project
- a project with possible project specific settings. Can be
null
filename
- a filename to compute the content type fornull
public static boolean usesProjectSpecificContentTypes(org.eclipse.core.resources.IProject project)
public static void setUseProjectSpecificContentTypes(org.eclipse.core.resources.IProject project, boolean val)
public void configurePluginDebugOptions()
public void setStructuralParseMode(boolean useNewParser)
public boolean useStructuralParseMode()
@Deprecated public CDOM getDOM()
ITranslationUnit
or ILanguage
to
construct ASTs, instead.public ICdtVariableManager getCdtVariableManager()
public IEnvironmentVariableManager getBuildEnvironmentManager()
public ICConfigurationDescription getPreferenceConfiguration(String buildSystemId) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public ICConfigurationDescription getPreferenceConfiguration(String buildSystemId, boolean write) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public void setPreferenceConfiguration(String buildSystemId, ICConfigurationDescription des) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public ICProjectDescription createProjectDescription(org.eclipse.core.resources.IProject project, boolean loadIfExists) throws org.eclipse.core.runtime.CoreException
createProjectDescription(IProject, boolean, false)
.org.eclipse.core.runtime.CoreException
createProjectDescription(IProject, boolean, boolean)
public ICProjectDescription createProjectDescription(org.eclipse.core.resources.IProject project, boolean loadIfExists, boolean creating) throws org.eclipse.core.runtime.CoreException
project
- project for which the project description is requestedloadIfExists
- 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 createdcreating
- if true the created project description will be contain the
true "isCdtProjectCreating" state. setProjectDescription(IProject, ICProjectDescription)
is called.ICProjectDescription
org.eclipse.core.runtime.CoreException
public ICProjectDescription getProjectDescription(org.eclipse.core.resources.IProject project)
getProjectDescription(IProject, boolean)
for more detail.project
- setProjectDescription(IProject, ICProjectDescription)
is
called.getProjectDescription(IProject, boolean)
public void setProjectDescription(org.eclipse.core.resources.IProject project, ICProjectDescription des) throws org.eclipse.core.runtime.CoreException
getProjectDescription(IProject, boolean)
or
createProjectDescription(IProject, boolean)
project
- des
- org.eclipse.core.runtime.CoreException
getProjectDescription(IProject, boolean)
,
createProjectDescription(IProject, boolean)
public void setProjectDescription(org.eclipse.core.resources.IProject project, ICProjectDescription des, boolean force, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public ICProjectDescription getProjectDescription(org.eclipse.core.resources.IProject project, boolean write)
project
- project for which the description is requestedwrite
- if true, the writable description copy is returned. If false
the cached read-only description is returned.
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 the Build System until 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 until 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.ICProjectDescription
or null if the project does not
contain the CDT data associated with it.public void updateProjectDescriptions(org.eclipse.core.resources.IProject[] projects, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
projects
- if null
, all projects within the workspace are
updatedmonitor
- org.eclipse.core.runtime.CoreException
public boolean isNewStyleProject(org.eclipse.core.resources.IProject project)
public boolean isNewStyleProject(ICProjectDescription des)
public ICProjectDescriptionManager getProjectDescriptionManager()
public static IUserVarSupplier getUserVarSupplier()
public static void log(String e)
public static void log(int severity, String msg)
severity
- - desired severity of the message in the log, one of
IStatus.INFO
, IStatus.WARNING
or
IStatus.ERROR
msg
- - messagepublic static void logStackTrace(int severity, String msg)
severity
- - desired severity of the message in the log, one of
IStatus.INFO
, IStatus.WARNING
or
IStatus.ERROR
msg
- - messagepublic static void log(Throwable e)
public static void log(String message, Throwable e)
public static org.eclipse.core.runtime.IStatus createStatus(String msg)
public static org.eclipse.core.runtime.IStatus createStatus(String msg, Throwable e)
public static void log(org.eclipse.core.runtime.IStatus status)
@Deprecated public static IPDOMManager getPDOMManager()
public static boolean showSourceRootsAtTopOfProject()
public static <T> T getService(Class<T> service)
service
- service classpublic static org.osgi.framework.Version getCDTFeatureVersion()
Copyright (c) IBM Corp. and others 2004, 2020. All Rights Reserved.