mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fixed API tooling errors.
This commit is contained in:
parent
2559c118ec
commit
cec50f2b6e
34 changed files with 632 additions and 516 deletions
|
@ -40,6 +40,8 @@ import org.eclipse.core.runtime.jobs.Job;
|
||||||
*
|
*
|
||||||
* Note: IErrorParser interface is used here to work around {@link ConsoleOutputSniffer} having
|
* Note: IErrorParser interface is used here to work around {@link ConsoleOutputSniffer} having
|
||||||
* no access from CDT core to build packages. TODO - elaborate?
|
* no access from CDT core to build packages. TODO - elaborate?
|
||||||
|
*
|
||||||
|
* @since 7.2
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractBuildCommandParser extends AbstractLanguageSettingsOutputScanner
|
public abstract class AbstractBuildCommandParser extends AbstractLanguageSettingsOutputScanner
|
||||||
implements ICConsoleParser, IErrorParser {
|
implements ICConsoleParser, IErrorParser {
|
||||||
|
|
|
@ -67,6 +67,9 @@ import org.eclipse.core.runtime.jobs.ISchedulingRule;
|
||||||
import org.eclipse.core.runtime.jobs.Job;
|
import org.eclipse.core.runtime.jobs.Job;
|
||||||
import org.w3c.dom.Element;
|
import org.w3c.dom.Element;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 7.2
|
||||||
|
*/
|
||||||
public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSettingsOutputScanner implements ICListenerAgent {
|
public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSettingsOutputScanner implements ICListenerAgent {
|
||||||
public static final Object JOB_FAMILY_BUILTIN_SPECS_DETECTOR = "org.eclipse.cdt.make.core.scannerconfig.AbstractBuiltinSpecsDetector";
|
public static final Object JOB_FAMILY_BUILTIN_SPECS_DETECTOR = "org.eclipse.cdt.make.core.scannerconfig.AbstractBuiltinSpecsDetector";
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,9 @@ import org.eclipse.core.runtime.content.IContentType;
|
||||||
import org.eclipse.core.runtime.content.IContentTypeManager;
|
import org.eclipse.core.runtime.content.IContentTypeManager;
|
||||||
import org.w3c.dom.Element;
|
import org.w3c.dom.Element;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 7.2
|
||||||
|
*/
|
||||||
public abstract class AbstractLanguageSettingsOutputScanner extends LanguageSettingsSerializableProvider {
|
public abstract class AbstractLanguageSettingsOutputScanner extends LanguageSettingsSerializableProvider {
|
||||||
|
|
||||||
protected static final String ATTR_EXPAND_RELATIVE_PATHS = "expand-relative-paths"; //$NON-NLS-1$
|
protected static final String ATTR_EXPAND_RELATIVE_PATHS = "expand-relative-paths"; //$NON-NLS-1$
|
||||||
|
|
|
@ -24,14 +24,14 @@ import org.eclipse.core.runtime.IPath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A tool-integrator defines default configurations as children of the project type.
|
* A tool-integrator defines default configurations as children of the project type.
|
||||||
* These provide a template for the configurations added to the user's project,
|
* These provide a template for the configurations added to the user's project,
|
||||||
* which are stored in the project's .cproject file.
|
* which are stored in the project's .cproject file.
|
||||||
* <p>
|
* <p>
|
||||||
* The configuration contains one child of type tool-chain. This describes how the
|
* The configuration contains one child of type tool-chain. This describes how the
|
||||||
* project's resources are transformed into the build artifact. The configuration can
|
* project's resources are transformed into the build artifact. The configuration can
|
||||||
* contain one or more children of type resourceConfiguration. These describe build
|
* contain one or more children of type resourceConfiguration. These describe build
|
||||||
* settings of individual resources that are different from the configuration as a whole.
|
* settings of individual resources that are different from the configuration as a whole.
|
||||||
*
|
*
|
||||||
* @since 2.1
|
* @since 2.1
|
||||||
* @noextend This class is not intended to be subclassed by clients.
|
* @noextend This class is not intended to be subclassed by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
|
@ -39,34 +39,35 @@ import org.eclipse.core.runtime.IPath;
|
||||||
public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesContainer {
|
public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesContainer {
|
||||||
public static final String ARTIFACT_NAME = "artifactName"; //$NON-NLS-1$
|
public static final String ARTIFACT_NAME = "artifactName"; //$NON-NLS-1$
|
||||||
public static final String CLEAN_COMMAND = "cleanCommand"; //$NON-NLS-1$
|
public static final String CLEAN_COMMAND = "cleanCommand"; //$NON-NLS-1$
|
||||||
public static final String PREBUILD_STEP = "prebuildStep"; //$NON-NLS-1$
|
public static final String PREBUILD_STEP = "prebuildStep"; //$NON-NLS-1$
|
||||||
public static final String POSTBUILD_STEP = "postbuildStep"; //$NON-NLS-1$
|
public static final String POSTBUILD_STEP = "postbuildStep"; //$NON-NLS-1$
|
||||||
public static final String PREANNOUNCEBUILD_STEP = "preannouncebuildStep"; //$NON-NLS-1$
|
public static final String PREANNOUNCEBUILD_STEP = "preannouncebuildStep"; //$NON-NLS-1$
|
||||||
public static final String POSTANNOUNCEBUILD_STEP = "postannouncebuildStep"; //$NON-NLS-1$
|
public static final String POSTANNOUNCEBUILD_STEP = "postannouncebuildStep"; //$NON-NLS-1$
|
||||||
// Schema element names
|
// Schema element names
|
||||||
public static final String CONFIGURATION_ELEMENT_NAME = "configuration"; //$NON-NLS-1$
|
public static final String CONFIGURATION_ELEMENT_NAME = "configuration"; //$NON-NLS-1$
|
||||||
public static final String ERROR_PARSERS = "errorParsers"; //$NON-NLS-1$
|
public static final String ERROR_PARSERS = "errorParsers"; //$NON-NLS-1$
|
||||||
|
/** @since 8.1 */
|
||||||
public static final String LANGUAGE_SETTINGS_PROVIDERS = "languageSettingsProviders";
|
public static final String LANGUAGE_SETTINGS_PROVIDERS = "languageSettingsProviders";
|
||||||
public static final String EXTENSION = "artifactExtension"; //$NON-NLS-1$
|
public static final String EXTENSION = "artifactExtension"; //$NON-NLS-1$
|
||||||
public static final String PARENT = "parent"; //$NON-NLS-1$
|
public static final String PARENT = "parent"; //$NON-NLS-1$
|
||||||
|
|
||||||
public static final String DESCRIPTION = "description"; //$NON-NLS-1$
|
public static final String DESCRIPTION = "description"; //$NON-NLS-1$
|
||||||
|
|
||||||
public static final String BUILD_PROPERTIES = "buildProperties"; //$NON-NLS-1$
|
public static final String BUILD_PROPERTIES = "buildProperties"; //$NON-NLS-1$
|
||||||
public static final String BUILD_ARTEFACT_TYPE = "buildArtefactType"; //$NON-NLS-1$
|
public static final String BUILD_ARTEFACT_TYPE = "buildArtefactType"; //$NON-NLS-1$
|
||||||
public static final String IS_SYSTEM = "isSystem"; //$NON-NLS-1$
|
public static final String IS_SYSTEM = "isSystem"; //$NON-NLS-1$
|
||||||
|
|
||||||
public static final String SOURCE_ENTRIES = "sourceEntries"; //$NON-NLS-1$
|
public static final String SOURCE_ENTRIES = "sourceEntries"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the description of the configuration.
|
* Returns the description of the configuration.
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getDescription();
|
public String getDescription();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the description of the receiver to the value specified in the argument
|
* Sets the description of the receiver to the value specified in the argument
|
||||||
*/
|
*/
|
||||||
|
@ -85,206 +86,207 @@ public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesCont
|
||||||
* @param name - The name for the new tool chain
|
* @param name - The name for the new tool chain
|
||||||
* @param isExtensionElement - set {@code true} if the toolchain being created
|
* @param isExtensionElement - set {@code true} if the toolchain being created
|
||||||
* represents extension point toolchain
|
* represents extension point toolchain
|
||||||
*
|
*
|
||||||
* @return IToolChain
|
* @return IToolChain
|
||||||
*/
|
*/
|
||||||
public IToolChain createToolChain(IToolChain superClass, String Id, String name, boolean isExtensionElement);
|
public IToolChain createToolChain(IToolChain superClass, String Id, String name, boolean isExtensionElement);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the extension that should be applied to build artifacts created by
|
* Returns the extension that should be applied to build artifacts created by
|
||||||
* this configuration.
|
* this configuration.
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getArtifactExtension();
|
public String getArtifactExtension();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the name of the final build artifact.
|
* Returns the name of the final build artifact.
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getArtifactName();
|
public String getArtifactName();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the build arguments from this configuration's builder
|
* Returns the build arguments from this configuration's builder
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getBuildArguments();
|
public String getBuildArguments();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the build command from this configuration's builder
|
* Returns the build command from this configuration's builder
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getBuildCommand();
|
public String getBuildCommand();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the prebuild step command
|
* Returns the prebuild step command
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getPrebuildStep();
|
public String getPrebuildStep();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the postbuild step command
|
* Returns the postbuild step command
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getPostbuildStep();
|
public String getPostbuildStep();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the display string associated with the prebuild step
|
* Returns the display string associated with the prebuild step
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getPreannouncebuildStep();
|
public String getPreannouncebuildStep();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the display string associated with the postbuild step
|
* Returns the display string associated with the postbuild step
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getPostannouncebuildStep();
|
public String getPostannouncebuildStep();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Answers the OS-specific command to remove files created by the build
|
* Answers the OS-specific command to remove files created by the build
|
||||||
* of this configuration.
|
* of this configuration.
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getCleanCommand();
|
public String getCleanCommand();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Answers the semicolon separated list of unique IDs of the error parsers associated
|
* Answers the semicolon separated list of unique IDs of the error parsers associated
|
||||||
* with this configuration.
|
* with this configuration.
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getErrorParserIds();
|
public String getErrorParserIds();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Answers the ordered list of unique IDs of the error parsers associated
|
* Answers the ordered list of unique IDs of the error parsers associated
|
||||||
* with this configuration.
|
* with this configuration.
|
||||||
*
|
*
|
||||||
* @return String[]
|
* @return String[]
|
||||||
*/
|
*/
|
||||||
public String[] getErrorParserList();
|
public String[] getErrorParserList();
|
||||||
|
|
||||||
|
/** @since 8.1 */
|
||||||
public String getDefaultLanguageSettingsProvidersIds();
|
public String getDefaultLanguageSettingsProvidersIds();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Projects have C or CC natures. Tools can specify a filter so they are not
|
* Projects have C or CC natures. Tools can specify a filter so they are not
|
||||||
* misapplied to a project. This method allows the caller to retrieve a list
|
* misapplied to a project. This method allows the caller to retrieve a list
|
||||||
* of tools from a project that are correct for a project's nature.
|
* of tools from a project that are correct for a project's nature.
|
||||||
*
|
*
|
||||||
* @return an array of <code>ITools</code> that have compatible filters
|
* @return an array of <code>ITools</code> that have compatible filters
|
||||||
* for this configuration.
|
* for this configuration.
|
||||||
*/
|
*/
|
||||||
ITool[] getFilteredTools();
|
ITool[] getFilteredTools();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the managed-project parent of this configuration, if this is a
|
* Returns the managed-project parent of this configuration, if this is a
|
||||||
* project configuration. Otherwise, returns <code>null</code>.
|
* project configuration. Otherwise, returns <code>null</code>.
|
||||||
*
|
*
|
||||||
* @return IManagedProject
|
* @return IManagedProject
|
||||||
*/
|
*/
|
||||||
public IManagedProject getManagedProject();
|
public IManagedProject getManagedProject();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the Eclipse project that owns the configuration.
|
* Returns the Eclipse project that owns the configuration.
|
||||||
*
|
*
|
||||||
* @return IResource
|
* @return IResource
|
||||||
*/
|
*/
|
||||||
public IResource getOwner();
|
public IResource getOwner();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the configuration that this configuration is based on.
|
* Returns the configuration that this configuration is based on.
|
||||||
*
|
*
|
||||||
* @return IConfiguration
|
* @return IConfiguration
|
||||||
*/
|
*/
|
||||||
public IConfiguration getParent();
|
public IConfiguration getParent();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the project-type parent of this configuration, if this is an
|
* Returns the project-type parent of this configuration, if this is an
|
||||||
* extension configuration. Otherwise, returns <code>null</code>.
|
* extension configuration. Otherwise, returns <code>null</code>.
|
||||||
*
|
*
|
||||||
* @return IProjectType
|
* @return IProjectType
|
||||||
*/
|
*/
|
||||||
public IProjectType getProjectType();
|
public IProjectType getProjectType();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param path - path of the resource
|
* @param path - path of the resource
|
||||||
*
|
*
|
||||||
* @return the resource configuration child of this configuration
|
* @return the resource configuration child of this configuration
|
||||||
* that is associated with the project resource, or <code>null</code> if none.
|
* that is associated with the project resource, or <code>null</code> if none.
|
||||||
*/
|
*/
|
||||||
public IResourceConfiguration getResourceConfiguration(String path);
|
public IResourceConfiguration getResourceConfiguration(String path);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the resource configuration children of this configuration.
|
* Returns the resource configuration children of this configuration.
|
||||||
*
|
*
|
||||||
* @return IResourceConfigurations[]
|
* @return IResourceConfigurations[]
|
||||||
*/
|
*/
|
||||||
public IResourceConfiguration[] getResourceConfigurations();
|
public IResourceConfiguration[] getResourceConfigurations();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the <code>ITool</code> in this configuration's tool-chain with
|
* Returns the <code>ITool</code> in this configuration's tool-chain with
|
||||||
* the same id as the argument, or <code>null</code>.
|
* the same id as the argument, or <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param id unique identifier to search for
|
* @param id unique identifier to search for
|
||||||
* @return ITool
|
* @return ITool
|
||||||
*/
|
*/
|
||||||
public ITool getTool(String id);
|
public ITool getTool(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the <code>ITool</code> in this configuration's tool-chain with
|
* Returns the <code>ITool</code> in this configuration's tool-chain with
|
||||||
* the specified ID, or the tool(s) with a superclass with this id.
|
* the specified ID, or the tool(s) with a superclass with this id.
|
||||||
*
|
*
|
||||||
* <p>If the tool-chain does not have a tool with that ID, the method
|
* <p>If the tool-chain does not have a tool with that ID, the method
|
||||||
* returns an empty array. It is the responsibility of the caller to
|
* returns an empty array. It is the responsibility of the caller to
|
||||||
* verify the return value.
|
* verify the return value.
|
||||||
*
|
*
|
||||||
* @param id unique identifier of the tool to search for
|
* @param id unique identifier of the tool to search for
|
||||||
* @return <code>ITool[]</code>
|
* @return <code>ITool[]</code>
|
||||||
* @since 3.0.2
|
* @since 3.0.2
|
||||||
*/
|
*/
|
||||||
public ITool[] getToolsBySuperClassId(String id);
|
public ITool[] getToolsBySuperClassId(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the <code>IToolChain</code> child of this configuration.
|
* Returns the <code>IToolChain</code> child of this configuration.
|
||||||
*
|
*
|
||||||
* @return IToolChain
|
* @return IToolChain
|
||||||
*/
|
*/
|
||||||
public IToolChain getToolChain();
|
public IToolChain getToolChain();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the command-line invocation command for the specified tool.
|
* Returns the command-line invocation command for the specified tool.
|
||||||
*
|
*
|
||||||
* @param tool The tool that will have its command retrieved.
|
* @param tool The tool that will have its command retrieved.
|
||||||
* @return String The command
|
* @return String The command
|
||||||
*/
|
*/
|
||||||
public String getToolCommand(ITool tool);
|
public String getToolCommand(ITool tool);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the tools that are used in this configuration's tool-chain.
|
* Returns the tools that are used in this configuration's tool-chain.
|
||||||
*
|
*
|
||||||
* @return ITool[]
|
* @return ITool[]
|
||||||
*/
|
*/
|
||||||
public ITool[] getTools();
|
public ITool[] getTools();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the tool in this configuration specified with
|
* Returns the tool in this configuration specified with
|
||||||
* the toolChain#targetTool attribute that creates the build artifact
|
* the toolChain#targetTool attribute that creates the build artifact
|
||||||
*
|
*
|
||||||
* NOTE: This method returns null in case the toolChain definition
|
* NOTE: This method returns null in case the toolChain definition
|
||||||
* does not have the targetTool attribute or if the attribute does not
|
* does not have the targetTool attribute or if the attribute does not
|
||||||
* refer to the appropriate tool.
|
* refer to the appropriate tool.
|
||||||
* For the target tool calculation the IConfiguration#calculateTargetTool()
|
* For the target tool calculation the IConfiguration#calculateTargetTool()
|
||||||
* method should be used
|
* method should be used
|
||||||
*
|
*
|
||||||
* @see IConfiguration#calculateTargetTool()
|
* @see IConfiguration#calculateTargetTool()
|
||||||
*
|
*
|
||||||
* @return ITool
|
* @return ITool
|
||||||
*/
|
*/
|
||||||
public ITool getTargetTool();
|
public ITool getTargetTool();
|
||||||
|
@ -292,42 +294,42 @@ public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesCont
|
||||||
/**
|
/**
|
||||||
* Returns <code>true</code> if this configuration has overridden the default build
|
* Returns <code>true</code> if this configuration has overridden the default build
|
||||||
* build command in this configuration, otherwise <code>false</code>.
|
* build command in this configuration, otherwise <code>false</code>.
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public boolean hasOverriddenBuildCommand();
|
public boolean hasOverriddenBuildCommand();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns <code>true</code> if the extension matches one of the special
|
* Returns <code>true</code> if the extension matches one of the special
|
||||||
* file extensions the tools for the configuration consider to be a header file.
|
* file extensions the tools for the configuration consider to be a header file.
|
||||||
*
|
*
|
||||||
* @param ext the file extension of the resource
|
* @param ext the file extension of the resource
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public boolean isHeaderFile(String ext);
|
public boolean isHeaderFile(String ext);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns <code>true</code> if this configuration has changes that need to
|
* Returns <code>true</code> if this configuration has changes that need to
|
||||||
* be saved in the project file, else <code>false</code>.
|
* be saved in the project file, else <code>false</code>.
|
||||||
* Should not be called for an extension configuration.
|
* Should not be called for an extension configuration.
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public boolean isDirty();
|
public boolean isDirty();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns <code>true</code> if this configuration was loaded from a manifest file,
|
* Returns <code>true</code> if this configuration was loaded from a manifest file,
|
||||||
* and <code>false</code> if it was loaded from a project (.cdtbuild) file.
|
* and <code>false</code> if it was loaded from a project (.cdtbuild) file.
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public boolean isExtensionElement();
|
public boolean isExtensionElement();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether this configuration has been changed and requires the
|
* Returns whether this configuration has been changed and requires the
|
||||||
* project to be rebuilt.
|
* project to be rebuilt.
|
||||||
*
|
*
|
||||||
* @return <code>true</code> if the configuration contains a change
|
* @return <code>true</code> if the configuration contains a change
|
||||||
* that needs the project to be rebuilt.
|
* that needs the project to be rebuilt.
|
||||||
* Should not be called for an extension configuration.
|
* Should not be called for an extension configuration.
|
||||||
*/
|
*/
|
||||||
|
@ -335,13 +337,13 @@ public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesCont
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Removes a resource configuration from the configuration's list.
|
* Removes a resource configuration from the configuration's list.
|
||||||
*
|
*
|
||||||
* @param resConfig - resource configuration to remove
|
* @param resConfig - resource configuration to remove
|
||||||
*/
|
*/
|
||||||
public void removeResourceConfiguration(IResourceInfo resConfig);
|
public void removeResourceConfiguration(IResourceInfo resConfig);
|
||||||
|
|
||||||
public void removeResourceInfo(IPath path);
|
public void removeResourceInfo(IPath path);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set (override) the extension that should be appended to the build artifact
|
* Set (override) the extension that should be appended to the build artifact
|
||||||
* for the receiver.
|
* for the receiver.
|
||||||
|
@ -355,7 +357,7 @@ public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesCont
|
||||||
public void setArtifactName(String name);
|
public void setArtifactName(String name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the arguments to be passed to the build utility used by the
|
* Sets the arguments to be passed to the build utility used by the
|
||||||
* receiver to produce a build goal.
|
* receiver to produce a build goal.
|
||||||
*/
|
*/
|
||||||
public void setBuildArguments(String makeArgs);
|
public void setBuildArguments(String makeArgs);
|
||||||
|
@ -366,26 +368,26 @@ public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesCont
|
||||||
public void setBuildCommand(String command);
|
public void setBuildCommand(String command);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the prebuild step for the receiver to the value in the argument.
|
* Sets the prebuild step for the receiver to the value in the argument.
|
||||||
*/
|
*/
|
||||||
public void setPrebuildStep(String step);
|
public void setPrebuildStep(String step);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the postbuild step for the receiver to the value in the argument.
|
* Sets the postbuild step for the receiver to the value in the argument.
|
||||||
*/
|
*/
|
||||||
public void setPostbuildStep(String step);
|
public void setPostbuildStep(String step);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the prebuild step display string for the receiver to the value in the argument.
|
* Sets the prebuild step display string for the receiver to the value in the argument.
|
||||||
*/
|
*/
|
||||||
public void setPreannouncebuildStep(String announceStep);
|
public void setPreannouncebuildStep(String announceStep);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the postbuild step display string for the receiver to the value in the argument.
|
* Sets the postbuild step display string for the receiver to the value in the argument.
|
||||||
*/
|
*/
|
||||||
public void setPostannouncebuildStep(String announceStep);
|
public void setPostannouncebuildStep(String announceStep);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the command used to clean the outputs of this configuration.
|
* Sets the command used to clean the outputs of this configuration.
|
||||||
* @param command - the command to clean outputs
|
* @param command - the command to clean outputs
|
||||||
*/
|
*/
|
||||||
|
@ -407,46 +409,46 @@ public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesCont
|
||||||
* Sets the name of the receiver to the value specified in the argument
|
* Sets the name of the receiver to the value specified in the argument
|
||||||
*/
|
*/
|
||||||
public void setName(String name);
|
public void setName(String name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value of a boolean option for this configuration.
|
* Sets the value of a boolean option for this configuration.
|
||||||
*
|
*
|
||||||
* @param parent The holder/parent of the option.
|
* @param parent The holder/parent of the option.
|
||||||
* @param option The option to change.
|
* @param option The option to change.
|
||||||
* @param value The value to apply to the option.
|
* @param value The value to apply to the option.
|
||||||
*
|
*
|
||||||
* @return IOption The modified option. This can be the same option or a newly created option.
|
* @return IOption The modified option. This can be the same option or a newly created option.
|
||||||
*
|
*
|
||||||
* @since 3.0 - The type of parent has changed from ITool to IHoldsOptions.
|
* @since 3.0 - The type of parent has changed from ITool to IHoldsOptions.
|
||||||
* Code assuming ITool as type, will continue to work unchanged.
|
* Code assuming ITool as type, will continue to work unchanged.
|
||||||
*/
|
*/
|
||||||
public IOption setOption(IHoldsOptions parent, IOption option, boolean value)
|
public IOption setOption(IHoldsOptions parent, IOption option, boolean value)
|
||||||
throws BuildException;
|
throws BuildException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value of a string option for this configuration.
|
* Sets the value of a string option for this configuration.
|
||||||
*
|
*
|
||||||
* @param parent The holder/parent of the option.
|
* @param parent The holder/parent of the option.
|
||||||
* @param option The option that will be effected by change.
|
* @param option The option that will be effected by change.
|
||||||
* @param value The value to apply to the option.
|
* @param value The value to apply to the option.
|
||||||
*
|
*
|
||||||
* @return IOption The modified option. This can be the same option or a newly created option.
|
* @return IOption The modified option. This can be the same option or a newly created option.
|
||||||
*
|
*
|
||||||
* @since 3.0 - The type of parent has changed from ITool to IHoldsOptions.
|
* @since 3.0 - The type of parent has changed from ITool to IHoldsOptions.
|
||||||
* Code assuming ITool as type, will continue to work unchanged.
|
* Code assuming ITool as type, will continue to work unchanged.
|
||||||
*/
|
*/
|
||||||
public IOption setOption(IHoldsOptions parent, IOption option, String value)
|
public IOption setOption(IHoldsOptions parent, IOption option, String value)
|
||||||
throws BuildException;
|
throws BuildException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value of a list option for this configuration.
|
* Sets the value of a list option for this configuration.
|
||||||
*
|
*
|
||||||
* @param parent The holder/parent of the option.
|
* @param parent The holder/parent of the option.
|
||||||
* @param option The option to change.
|
* @param option The option to change.
|
||||||
* @param value The values to apply to the option.
|
* @param value The values to apply to the option.
|
||||||
*
|
*
|
||||||
* @return IOption The modified option. This can be the same option or a newly created option.
|
* @return IOption The modified option. This can be the same option or a newly created option.
|
||||||
*
|
*
|
||||||
* @since 3.0 - The type of parent has changed from ITool to IHoldsOptions.
|
* @since 3.0 - The type of parent has changed from ITool to IHoldsOptions.
|
||||||
* Code assuming ITool as type, will continue to work unchanged.
|
* Code assuming ITool as type, will continue to work unchanged.
|
||||||
*/
|
*/
|
||||||
|
@ -455,7 +457,7 @@ public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesCont
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the rebuild state in this configuration.
|
* Sets the rebuild state in this configuration.
|
||||||
*
|
*
|
||||||
* @param rebuild <code>true</code> will force a rebuild the next time the project builds
|
* @param rebuild <code>true</code> will force a rebuild the next time the project builds
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo#setRebuildState(boolean)
|
* @see org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo#setRebuildState(boolean)
|
||||||
*/
|
*/
|
||||||
|
@ -463,93 +465,93 @@ public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesCont
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overrides the tool command for a tool defined in this configuration's tool-chain.
|
* Overrides the tool command for a tool defined in this configuration's tool-chain.
|
||||||
*
|
*
|
||||||
* @param tool The tool that will have its command modified.
|
* @param tool The tool that will have its command modified.
|
||||||
* @param command The command
|
* @param command The command
|
||||||
*/
|
*/
|
||||||
public void setToolCommand(ITool tool, String command);
|
public void setToolCommand(ITool tool, String command);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns <code>true</code> if the configuration's tool-chain is supported on the system
|
* Returns <code>true</code> if the configuration's tool-chain is supported on the system
|
||||||
* otherwise returns <code>false</code>
|
* otherwise returns <code>false</code>
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public boolean isSupported();
|
public boolean isSupported();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the implementation of the IConfigurationEnvironmentVariableSupplier provided
|
* Returns the implementation of the IConfigurationEnvironmentVariableSupplier provided
|
||||||
* by the tool-integrator or <code>null</code> if none.
|
* by the tool-integrator or <code>null</code> if none.
|
||||||
*
|
*
|
||||||
* @return IConfigurationEnvironmentVariableSupplier
|
* @return IConfigurationEnvironmentVariableSupplier
|
||||||
*/
|
*/
|
||||||
public IConfigurationEnvironmentVariableSupplier getEnvironmentVariableSupplier();
|
public IConfigurationEnvironmentVariableSupplier getEnvironmentVariableSupplier();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the tool-integrator provided implementation of the configuration build macro supplier
|
* Returns the tool-integrator provided implementation of the configuration build macro supplier
|
||||||
* or <code>null</code> if none.
|
* or <code>null</code> if none.
|
||||||
*
|
*
|
||||||
* @return IConfigurationBuildMacroSupplier
|
* @return IConfigurationBuildMacroSupplier
|
||||||
*/
|
*/
|
||||||
public IConfigurationBuildMacroSupplier getBuildMacroSupplier();
|
public IConfigurationBuildMacroSupplier getBuildMacroSupplier();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* answers true if the configuration is temporary, otherwise - false
|
* answers true if the configuration is temporary, otherwise - false
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public boolean isTemporary();
|
public boolean isTemporary();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether this configuration requires a full rebuild
|
* Returns whether this configuration requires a full rebuild
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public boolean needsFullRebuild();
|
public boolean needsFullRebuild();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculates the configuration target tool.
|
* Calculates the configuration target tool.
|
||||||
*
|
*
|
||||||
* @return ITool or null if not found
|
* @return ITool or null if not found
|
||||||
*
|
*
|
||||||
* @since 3.1
|
* @since 3.1
|
||||||
*/
|
*/
|
||||||
public ITool calculateTargetTool();
|
public ITool calculateTargetTool();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a <code>ITool</code> for the tool associated with the
|
* Returns a <code>ITool</code> for the tool associated with the
|
||||||
* output extension.
|
* output extension.
|
||||||
*
|
*
|
||||||
* @param extension the file extension of the output file
|
* @param extension the file extension of the output file
|
||||||
* @return ITool
|
* @return ITool
|
||||||
*
|
*
|
||||||
* @since 3.1
|
* @since 3.1
|
||||||
*/
|
*/
|
||||||
public ITool getToolFromOutputExtension(String extension);
|
public ITool getToolFromOutputExtension(String extension);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a <code>ITool</code> for the tool associated with the
|
* Returns a <code>ITool</code> for the tool associated with the
|
||||||
* input extension.
|
* input extension.
|
||||||
*
|
*
|
||||||
* @param sourceExtension the file extension of the input file
|
* @param sourceExtension the file extension of the input file
|
||||||
* @return ITool
|
* @return ITool
|
||||||
*
|
*
|
||||||
* @since 3.1
|
* @since 3.1
|
||||||
*/
|
*/
|
||||||
public ITool getToolFromInputExtension(String sourceExtension);
|
public ITool getToolFromInputExtension(String sourceExtension);
|
||||||
|
|
||||||
IResourceInfo getResourceInfo(IPath path, boolean exactPath);
|
IResourceInfo getResourceInfo(IPath path, boolean exactPath);
|
||||||
|
|
||||||
IResourceInfo[] getResourceInfos();
|
IResourceInfo[] getResourceInfos();
|
||||||
|
|
||||||
IResourceInfo getResourceInfoById(String id);
|
IResourceInfo getResourceInfoById(String id);
|
||||||
|
|
||||||
IFolderInfo getRootFolderInfo();
|
IFolderInfo getRootFolderInfo();
|
||||||
|
|
||||||
IFileInfo createFileInfo(IPath path);
|
IFileInfo createFileInfo(IPath path);
|
||||||
|
|
||||||
IFileInfo createFileInfo(IPath path, String id, String name);
|
IFileInfo createFileInfo(IPath path, String id, String name);
|
||||||
|
|
||||||
IFileInfo createFileInfo(IPath path, IFolderInfo base, ITool baseTool, String id, String name);
|
IFileInfo createFileInfo(IPath path, IFolderInfo base, ITool baseTool, String id, String name);
|
||||||
|
|
||||||
IFileInfo createFileInfo(IPath path, IFileInfo base, String id, String name);
|
IFileInfo createFileInfo(IPath path, IFileInfo base, String id, String name);
|
||||||
|
@ -557,49 +559,49 @@ public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesCont
|
||||||
IFolderInfo createFolderInfo(IPath path);
|
IFolderInfo createFolderInfo(IPath path);
|
||||||
|
|
||||||
IFolderInfo createFolderInfo(IPath path, String id, String name);
|
IFolderInfo createFolderInfo(IPath path, String id, String name);
|
||||||
|
|
||||||
IFolderInfo createFolderInfo(IPath path, IFolderInfo base, String id, String name);
|
IFolderInfo createFolderInfo(IPath path, IFolderInfo base, String id, String name);
|
||||||
|
|
||||||
CConfigurationData getConfigurationData();
|
CConfigurationData getConfigurationData();
|
||||||
|
|
||||||
ICSourceEntry[] getSourceEntries();
|
ICSourceEntry[] getSourceEntries();
|
||||||
|
|
||||||
void setSourceEntries(ICSourceEntry[] entries);
|
void setSourceEntries(ICSourceEntry[] entries);
|
||||||
|
|
||||||
CBuildData getBuildData();
|
CBuildData getBuildData();
|
||||||
|
|
||||||
IBuilder getBuilder();
|
IBuilder getBuilder();
|
||||||
|
|
||||||
IBuilder getEditableBuilder();
|
IBuilder getEditableBuilder();
|
||||||
|
|
||||||
String getOutputPrefix(String outputExtension);
|
String getOutputPrefix(String outputExtension);
|
||||||
|
|
||||||
boolean isSystemObject();
|
boolean isSystemObject();
|
||||||
|
|
||||||
String getOutputExtension(String resourceExtension);
|
String getOutputExtension(String resourceExtension);
|
||||||
|
|
||||||
String getOutputFlag(String outputExt);
|
String getOutputFlag(String outputExt);
|
||||||
|
|
||||||
IManagedCommandLineInfo generateToolCommandLineInfo( String sourceExtension, String[] flags,
|
IManagedCommandLineInfo generateToolCommandLineInfo( String sourceExtension, String[] flags,
|
||||||
String outputFlag, String outputPrefix, String outputName, String[] inputResources, IPath inputLocation, IPath outputLocation );
|
String outputFlag, String outputPrefix, String outputName, String[] inputResources, IPath inputLocation, IPath outputLocation );
|
||||||
|
|
||||||
String[] getUserObjects(String extension);
|
String[] getUserObjects(String extension);
|
||||||
|
|
||||||
String[] getLibs(String extension);
|
String[] getLibs(String extension);
|
||||||
|
|
||||||
boolean buildsFileType(String srcExt);
|
boolean buildsFileType(String srcExt);
|
||||||
|
|
||||||
boolean supportsBuild(boolean managed);
|
boolean supportsBuild(boolean managed);
|
||||||
|
|
||||||
boolean isManagedBuildOn();
|
boolean isManagedBuildOn();
|
||||||
|
|
||||||
void setManagedBuildOn(boolean on) throws BuildException;
|
void setManagedBuildOn(boolean on) throws BuildException;
|
||||||
|
|
||||||
boolean isBuilderCompatible(IBuilder builder);
|
boolean isBuilderCompatible(IBuilder builder);
|
||||||
|
|
||||||
void changeBuilder(IBuilder newBuilder, String id, String name);
|
void changeBuilder(IBuilder newBuilder, String id, String name);
|
||||||
|
|
||||||
IBuildPropertyValue getBuildArtefactType();
|
IBuildPropertyValue getBuildArtefactType();
|
||||||
|
|
||||||
void setBuildArtefactType(String id) throws BuildException;
|
void setBuildArtefactType(String id) throws BuildException;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,19 +16,19 @@ import org.eclipse.cdt.managedbuilder.macros.IConfigurationBuildMacroSupplier;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This interface represents a tool-integrator-defined, ordered set of tools
|
* This interface represents a tool-integrator-defined, ordered set of tools
|
||||||
* that transform the project's input into the project's outputs. A
|
* that transform the project's input into the project's outputs. A
|
||||||
* tool-chain can be defined as part of a configuration, or as an
|
* tool-chain can be defined as part of a configuration, or as an
|
||||||
* independent specification that is referenced in a separate configuration
|
* independent specification that is referenced in a separate configuration
|
||||||
* via the toolChain superclass attribute.
|
* via the toolChain superclass attribute.
|
||||||
* <p>
|
* <p>
|
||||||
* The toolChain contains one or more children of type tool. These define
|
* The toolChain contains one or more children of type tool. These define
|
||||||
* the tools used in the tool-chain. The toolChain contains one child of
|
* the tools used in the tool-chain. The toolChain contains one child of
|
||||||
* type targetPlatform. This defines the architecture/os combination where
|
* type targetPlatform. This defines the architecture/os combination where
|
||||||
* the outputs of the project can be deployed. The toolChain contains one
|
* the outputs of the project can be deployed. The toolChain contains one
|
||||||
* child of type builder. This defines the "build" or "make" utility that
|
* child of type builder. This defines the "build" or "make" utility that
|
||||||
* is used to drive the transformation of the inputs into outputs.
|
* is used to drive the transformation of the inputs into outputs.
|
||||||
*
|
*
|
||||||
* @since 2.1
|
* @since 2.1
|
||||||
* @noextend This class is not intended to be subclassed by clients.
|
* @noextend This class is not intended to be subclassed by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
|
@ -49,15 +49,16 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
||||||
public static final String IS_SYSTEM= "isSystem"; //$NON-NLS-1$
|
public static final String IS_SYSTEM= "isSystem"; //$NON-NLS-1$
|
||||||
public static final String NON_INTERNAL_BUILDER_ID = "nonInternalBuilderId"; //$NON-NLS-1$
|
public static final String NON_INTERNAL_BUILDER_ID = "nonInternalBuilderId"; //$NON-NLS-1$
|
||||||
public static final String RESOURCE_TYPE_BASED_DISCOVERY = "resourceTypeBasedDiscovery"; //$NON-NLS-1$
|
public static final String RESOURCE_TYPE_BASED_DISCOVERY = "resourceTypeBasedDiscovery"; //$NON-NLS-1$
|
||||||
|
|
||||||
// The attribute name for the scanner info collector
|
// The attribute name for the scanner info collector
|
||||||
public static final String SCANNER_CONFIG_PROFILE_ID = "scannerConfigDiscoveryProfileId"; //$NON-NLS-1$
|
public static final String SCANNER_CONFIG_PROFILE_ID = "scannerConfigDiscoveryProfileId"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
/** @since 8.1 */
|
||||||
public static final String LANGUAGE_SETTINGS_PROVIDERS = "languageSettingsProviders";
|
public static final String LANGUAGE_SETTINGS_PROVIDERS = "languageSettingsProviders";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the configuration that is the parent of this tool-chain.
|
* Returns the configuration that is the parent of this tool-chain.
|
||||||
*
|
*
|
||||||
* @return IConfiguration
|
* @return IConfiguration
|
||||||
*/
|
*/
|
||||||
public IConfiguration getParent();
|
public IConfiguration getParent();
|
||||||
|
@ -69,14 +70,14 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
||||||
* @param Id The id for the new tool chain
|
* @param Id The id for the new tool chain
|
||||||
* @param name The name for the new tool chain
|
* @param name The name for the new tool chain
|
||||||
* @param isExtensionElement Indicates whether this is an extension element or a managed project element
|
* @param isExtensionElement Indicates whether this is an extension element or a managed project element
|
||||||
*
|
*
|
||||||
* @return ITargetPlatform
|
* @return ITargetPlatform
|
||||||
*/
|
*/
|
||||||
public ITargetPlatform createTargetPlatform(ITargetPlatform superClass, String Id, String name, boolean isExtensionElement);
|
public ITargetPlatform createTargetPlatform(ITargetPlatform superClass, String Id, String name, boolean isExtensionElement);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the target-platform child of this tool-chain
|
* Returns the target-platform child of this tool-chain
|
||||||
*
|
*
|
||||||
* @return ITargetPlatform
|
* @return ITargetPlatform
|
||||||
*/
|
*/
|
||||||
public ITargetPlatform getTargetPlatform();
|
public ITargetPlatform getTargetPlatform();
|
||||||
|
@ -89,30 +90,30 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the 'versionsSupported' of this tool-chain
|
* Returns the 'versionsSupported' of this tool-chain
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public String getVersionsSupported();
|
public String getVersionsSupported();
|
||||||
/**
|
/**
|
||||||
* Returns the 'convertToId' of this tool-chain
|
* Returns the 'convertToId' of this tool-chain
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public String getConvertToId();
|
public String getConvertToId();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the 'versionsSupported' attribute of the tool-chain.
|
* Sets the 'versionsSupported' attribute of the tool-chain.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void setVersionsSupported(String versionsSupported);
|
public void setVersionsSupported(String versionsSupported);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the 'convertToId' attribute of the tool-chain.
|
* Sets the 'convertToId' attribute of the tool-chain.
|
||||||
*/
|
*/
|
||||||
public void setConvertToId(String convertToId);
|
public void setConvertToId(String convertToId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the <code>Builder</code> child of this tool-chain.
|
* Creates the <code>Builder</code> child of this tool-chain.
|
||||||
*
|
*
|
||||||
|
@ -120,7 +121,7 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
||||||
* @param Id The id for the new tool chain
|
* @param Id The id for the new tool chain
|
||||||
* @param name The name for the new tool chain
|
* @param name The name for the new tool chain
|
||||||
* @param isExtensionElement Indicates whether this is an extension element or a managed project element
|
* @param isExtensionElement Indicates whether this is an extension element or a managed project element
|
||||||
*
|
*
|
||||||
* @return IBuilder
|
* @return IBuilder
|
||||||
*/
|
*/
|
||||||
public IBuilder createBuilder(IBuilder superClass, String Id, String name, boolean isExtensionElement);
|
public IBuilder createBuilder(IBuilder superClass, String Id, String name, boolean isExtensionElement);
|
||||||
|
@ -133,7 +134,7 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the builder child of this tool-chain.
|
* Returns the builder child of this tool-chain.
|
||||||
*
|
*
|
||||||
* @return IBuilder
|
* @return IBuilder
|
||||||
*/
|
*/
|
||||||
public IBuilder getBuilder();
|
public IBuilder getBuilder();
|
||||||
|
@ -145,35 +146,35 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
||||||
* @param Id The id for the new tool chain
|
* @param Id The id for the new tool chain
|
||||||
* @param name The name for the new tool chain
|
* @param name The name for the new tool chain
|
||||||
* @param isExtensionElement Indicates whether this is an extension element or a managed project element
|
* @param isExtensionElement Indicates whether this is an extension element or a managed project element
|
||||||
*
|
*
|
||||||
* @return ITool
|
* @return ITool
|
||||||
*/
|
*/
|
||||||
public ITool createTool(ITool superClass, String Id, String name, boolean isExtensionElement);
|
public ITool createTool(ITool superClass, String Id, String name, boolean isExtensionElement);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array of tool children of this tool-chain
|
* Returns an array of tool children of this tool-chain
|
||||||
*
|
*
|
||||||
* @return ITool[]
|
* @return ITool[]
|
||||||
*/
|
*/
|
||||||
public ITool[] getTools();
|
public ITool[] getTools();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the tool in this tool-chain with the ID specified in the argument,
|
* Returns the tool in this tool-chain with the ID specified in the argument,
|
||||||
* or <code>null</code>
|
* or <code>null</code>
|
||||||
*
|
*
|
||||||
* @param id The ID of the requested tool
|
* @param id The ID of the requested tool
|
||||||
* @return ITool
|
* @return ITool
|
||||||
*/
|
*/
|
||||||
public ITool getTool(String id);
|
public ITool getTool(String id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the <code>ITool</code> in the tool-chain with the specified
|
* Returns the <code>ITool</code> in the tool-chain with the specified
|
||||||
* ID, or the tool(s) with a superclass with this id.
|
* ID, or the tool(s) with a superclass with this id.
|
||||||
*
|
*
|
||||||
* <p>If the tool-chain does not have a tool with that ID, the method
|
* <p>If the tool-chain does not have a tool with that ID, the method
|
||||||
* returns an empty array. It is the responsibility of the caller to
|
* returns an empty array. It is the responsibility of the caller to
|
||||||
* verify the return value.
|
* verify the return value.
|
||||||
*
|
*
|
||||||
* @param id unique identifier of the tool to search for
|
* @param id unique identifier of the tool to search for
|
||||||
* @return <code>ITool[]</code>
|
* @return <code>ITool[]</code>
|
||||||
* @since 3.0.2
|
* @since 3.0.2
|
||||||
|
@ -183,55 +184,55 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
||||||
/**
|
/**
|
||||||
* Returns the <code>IToolChain</code> that is the superclass of this
|
* Returns the <code>IToolChain</code> that is the superclass of this
|
||||||
* tool-chain, or <code>null</code> if the attribute was not specified.
|
* tool-chain, or <code>null</code> if the attribute was not specified.
|
||||||
*
|
*
|
||||||
* @return IToolChain
|
* @return IToolChain
|
||||||
*/
|
*/
|
||||||
public IToolChain getSuperClass();
|
public IToolChain getSuperClass();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether this element is abstract. Returns <code>false</code>
|
* Returns whether this element is abstract. Returns <code>false</code>
|
||||||
* if the attribute was not specified.
|
* if the attribute was not specified.
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public boolean isAbstract();
|
public boolean isAbstract();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the isAbstract attribute of the tool-chain.
|
* Sets the isAbstract attribute of the tool-chain.
|
||||||
*/
|
*/
|
||||||
public void setIsAbstract(boolean b);
|
public void setIsAbstract(boolean b);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a semi-colon delimited list of child Ids of the superclass'
|
* Returns a semi-colon delimited list of child Ids of the superclass'
|
||||||
* children that should not be automatically inherited by this element.
|
* children that should not be automatically inherited by this element.
|
||||||
* Returns an empty string if the attribute was not specified.
|
* Returns an empty string if the attribute was not specified.
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getUnusedChildren();
|
public String getUnusedChildren();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array of operating systems the tool-chain outputs can run on.
|
* Returns an array of operating systems the tool-chain outputs can run on.
|
||||||
*
|
*
|
||||||
* @return String[]
|
* @return String[]
|
||||||
*/
|
*/
|
||||||
public String[] getOSList();
|
public String[] getOSList();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the OS list.
|
* Sets the OS list.
|
||||||
*
|
*
|
||||||
* @param OSs The list of OS names
|
* @param OSs The list of OS names
|
||||||
*/
|
*/
|
||||||
public void setOSList(String[] OSs);
|
public void setOSList(String[] OSs);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an array of architectures the tool-chain outputs can run on.
|
* Returns an array of architectures the tool-chain outputs can run on.
|
||||||
*
|
*
|
||||||
* @return String[]
|
* @return String[]
|
||||||
*/
|
*/
|
||||||
public String[] getArchList();
|
public String[] getArchList();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the architecture list.
|
* Sets the architecture list.
|
||||||
*
|
*
|
||||||
* @param archs The list of architecture names
|
* @param archs The list of architecture names
|
||||||
*/
|
*/
|
||||||
public void setArchList(String[] archs);
|
public void setArchList(String[] archs);
|
||||||
|
@ -239,7 +240,7 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
||||||
/**
|
/**
|
||||||
* Returns the semicolon separated list of unique IDs of the error parsers associated
|
* Returns the semicolon separated list of unique IDs of the error parsers associated
|
||||||
* with the tool-chain.
|
* with the tool-chain.
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getErrorParserIds();
|
public String getErrorParserIds();
|
||||||
|
@ -251,9 +252,9 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
||||||
public String getErrorParserIds(IConfiguration config);
|
public String getErrorParserIds(IConfiguration config);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the ordered list of unique IDs of the error parsers associated with the
|
* Returns the ordered list of unique IDs of the error parsers associated with the
|
||||||
* tool-chain.
|
* tool-chain.
|
||||||
*
|
*
|
||||||
* @return String[]
|
* @return String[]
|
||||||
*/
|
*/
|
||||||
public String[] getErrorParserList();
|
public String[] getErrorParserList();
|
||||||
|
@ -267,12 +268,14 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
||||||
* Returns the default language settings providers IDs.
|
* Returns the default language settings providers IDs.
|
||||||
*
|
*
|
||||||
* @return the default language settings providers IDs separated by semicolon or {@code null} if none.
|
* @return the default language settings providers IDs separated by semicolon or {@code null} if none.
|
||||||
|
*
|
||||||
|
* @since 8.1
|
||||||
*/
|
*/
|
||||||
public String getDefaultLanguageSettingsProvidersIds();
|
public String getDefaultLanguageSettingsProvidersIds();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the scanner config discovery profile id or <code>null</code> if none.
|
* Returns the scanner config discovery profile id or <code>null</code> if none.
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getScannerConfigDiscoveryProfileId();
|
public String getScannerConfigDiscoveryProfileId();
|
||||||
|
@ -283,93 +286,93 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
||||||
public void setScannerConfigDiscoveryProfileId(String profileId);
|
public void setScannerConfigDiscoveryProfileId(String profileId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the sem-colon separated list of Tool ids containing each
|
* Returns the sem-colon separated list of Tool ids containing each
|
||||||
* tool that can create the final build artifact (the end target of
|
* tool that can create the final build artifact (the end target of
|
||||||
* the build). MBS will use the first ID in the list that matches
|
* the build). MBS will use the first ID in the list that matches
|
||||||
* a Tool in the ToolChain. One reason for specifying a list, is
|
* a Tool in the ToolChain. One reason for specifying a list, is
|
||||||
* that different versions of a tool can be selected based upon the
|
* that different versions of a tool can be selected based upon the
|
||||||
* project nature (e.g. different tool definitions for a linker for C vs. C++).
|
* project nature (e.g. different tool definitions for a linker for C vs. C++).
|
||||||
*
|
*
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
public String getTargetToolIds();
|
public String getTargetToolIds();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the sem-colon separated list of Tool ids containing each
|
* Sets the sem-colon separated list of Tool ids containing each
|
||||||
* tool that can create the final build artifact (the end target of
|
* tool that can create the final build artifact (the end target of
|
||||||
* the build).
|
* the build).
|
||||||
*/
|
*/
|
||||||
public void setTargetToolIds(String targetToolIds);
|
public void setTargetToolIds(String targetToolIds);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the list of Tool ids containing each
|
* Returns the list of Tool ids containing each
|
||||||
* tool that can create the final build artifact (the end target of
|
* tool that can create the final build artifact (the end target of
|
||||||
* the build). MBS will use the first ID in the list that matches
|
* the build). MBS will use the first ID in the list that matches
|
||||||
* a Tool in the ToolChain. One reason for specifying a list, is
|
* a Tool in the ToolChain. One reason for specifying a list, is
|
||||||
* that different versions of a tool can be selected based upon the
|
* that different versions of a tool can be selected based upon the
|
||||||
* project nature (e.g. different tool definitions for a linker for C vs. C++).
|
* project nature (e.g. different tool definitions for a linker for C vs. C++).
|
||||||
*
|
*
|
||||||
* @return String[]
|
* @return String[]
|
||||||
*/
|
*/
|
||||||
public String[] getTargetToolList();
|
public String[] getTargetToolList();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the OutputTypes in this tool-chain, besides the primary
|
* Returns the OutputTypes in this tool-chain, besides the primary
|
||||||
* output of the targetTool, that are also considered to be build
|
* output of the targetTool, that are also considered to be build
|
||||||
* artifacts.
|
* artifacts.
|
||||||
*
|
*
|
||||||
* @return IOutputType[]
|
* @return IOutputType[]
|
||||||
*/
|
*/
|
||||||
public IOutputType[] getSecondaryOutputs();
|
public IOutputType[] getSecondaryOutputs();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the semicolon separated list of OutputType identifiers in
|
* Sets the semicolon separated list of OutputType identifiers in
|
||||||
* this tool-chain, besides the primary output of the targetTool,
|
* this tool-chain, besides the primary output of the targetTool,
|
||||||
* that are also considered to be build artifacts.
|
* that are also considered to be build artifacts.
|
||||||
*/
|
*/
|
||||||
public void setSecondaryOutputs(String ids);
|
public void setSecondaryOutputs(String ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns <code>true</code> if this tool-chain has changes that need to
|
* Returns <code>true</code> if this tool-chain has changes that need to
|
||||||
* be saved in the project file, else <code>false</code>.
|
* be saved in the project file, else <code>false</code>.
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public boolean isDirty();
|
public boolean isDirty();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the element's "dirty" (have I been modified?) flag.
|
* Sets the element's "dirty" (have I been modified?) flag.
|
||||||
*/
|
*/
|
||||||
public void setDirty(boolean isDirty);
|
public void setDirty(boolean isDirty);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns <code>true</code> if this tool-chain was loaded from a manifest file,
|
* Returns <code>true</code> if this tool-chain was loaded from a manifest file,
|
||||||
* and <code>false</code> if it was loaded from a project (.cdtbuild) file.
|
* and <code>false</code> if it was loaded from a project (.cdtbuild) file.
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public boolean isExtensionElement();
|
public boolean isExtensionElement();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns <code>true</code> if the tool-chain support is installed on the system
|
* Returns <code>true</code> if the tool-chain support is installed on the system
|
||||||
* otherwise returns <code>false</code>
|
* otherwise returns <code>false</code>
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public boolean isSupported();
|
public boolean isSupported();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the tool-integrator provided implementation of the configuration environment variable supplier
|
* Returns the tool-integrator provided implementation of the configuration environment variable supplier
|
||||||
* or <code>null</code> if none.
|
* or <code>null</code> if none.
|
||||||
*
|
*
|
||||||
* @return IConfigurationEnvironmentVariableSupplier
|
* @return IConfigurationEnvironmentVariableSupplier
|
||||||
*/
|
*/
|
||||||
public IConfigurationEnvironmentVariableSupplier getEnvironmentVariableSupplier();
|
public IConfigurationEnvironmentVariableSupplier getEnvironmentVariableSupplier();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the tool-integrator provided implementation of the configuration build macro supplier
|
* Returns the tool-integrator provided implementation of the configuration build macro supplier
|
||||||
* or <code>null</code> if none.
|
* or <code>null</code> if none.
|
||||||
*
|
*
|
||||||
* @return IConfigurationBuildMacroSupplier
|
* @return IConfigurationBuildMacroSupplier
|
||||||
*/
|
*/
|
||||||
public IConfigurationBuildMacroSupplier getBuildMacroSupplier();
|
public IConfigurationBuildMacroSupplier getBuildMacroSupplier();
|
||||||
|
@ -379,16 +382,16 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
|
||||||
* or null, if no conversion is required
|
* or null, if no conversion is required
|
||||||
*/
|
*/
|
||||||
public IOptionPathConverter getOptionPathConverter() ;
|
public IOptionPathConverter getOptionPathConverter() ;
|
||||||
|
|
||||||
IFolderInfo getParentFolderInfo();
|
IFolderInfo getParentFolderInfo();
|
||||||
|
|
||||||
CTargetPlatformData getTargetPlatformData();
|
CTargetPlatformData getTargetPlatformData();
|
||||||
|
|
||||||
boolean supportsBuild(boolean managed);
|
boolean supportsBuild(boolean managed);
|
||||||
|
|
||||||
boolean isSystemObject();
|
boolean isSystemObject();
|
||||||
|
|
||||||
boolean matches(IToolChain tc);
|
boolean matches(IToolChain tc);
|
||||||
|
|
||||||
String getUniqueRealName();
|
String getUniqueRealName();
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,9 @@ import org.eclipse.cdt.managedbuilder.core.IToolChain;
|
||||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
|
import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 8.1
|
||||||
|
*/
|
||||||
public abstract class ToolchainBuiltinSpecsDetector extends AbstractBuiltinSpecsDetector {
|
public abstract class ToolchainBuiltinSpecsDetector extends AbstractBuiltinSpecsDetector {
|
||||||
private Map<String, ITool> toolMap = new HashMap<String, ITool>();
|
private Map<String, ITool> toolMap = new HashMap<String, ITool>();
|
||||||
/**
|
/**
|
||||||
|
@ -33,7 +36,7 @@ public abstract class ToolchainBuiltinSpecsDetector extends AbstractBuiltinSpecs
|
||||||
if (langTool != null) {
|
if (langTool != null) {
|
||||||
return langTool;
|
return langTool;
|
||||||
}
|
}
|
||||||
|
|
||||||
String toolchainId = getToolchainId();
|
String toolchainId = getToolchainId();
|
||||||
IToolChain toolchain = ManagedBuildManager.getExtensionToolChain(toolchainId);
|
IToolChain toolchain = ManagedBuildManager.getExtensionToolChain(toolchainId);
|
||||||
if (toolchain != null) {
|
if (toolchain != null) {
|
||||||
|
|
|
@ -94,6 +94,7 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
private static final String PROP_VAL = PROPERTY + ".debug"; //$NON-NLS-1$
|
private static final String PROP_VAL = PROPERTY + ".debug"; //$NON-NLS-1$
|
||||||
|
|
||||||
private static final String UI_USER_LANGUAGE_SETTINGS_PROVIDER = "org.eclipse.cdt.ui.user.LanguageSettingsProvider";
|
private static final String UI_USER_LANGUAGE_SETTINGS_PROVIDER = "org.eclipse.cdt.ui.user.LanguageSettingsProvider";
|
||||||
|
/** @since 8.1 */
|
||||||
public static final String MBS_LANGUAGE_SETTINGS_PROVIDER = "org.eclipse.cdt.managedbuilder.core.LanguageSettingsProvider";
|
public static final String MBS_LANGUAGE_SETTINGS_PROVIDER = "org.eclipse.cdt.managedbuilder.core.LanguageSettingsProvider";
|
||||||
private static final String LANGUAGE_SETTINGS_PROVIDER_DELIMITER = ";";
|
private static final String LANGUAGE_SETTINGS_PROVIDER_DELIMITER = ";";
|
||||||
|
|
||||||
|
@ -885,6 +886,9 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 8.1
|
||||||
|
*/
|
||||||
public static List<ILanguageSettingsProvider> getLanguageSettingsProviders(IConfiguration cfg) {
|
public static List<ILanguageSettingsProvider> getLanguageSettingsProviders(IConfiguration cfg) {
|
||||||
List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
|
List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class NewMakeProjFromExistingPage extends WizardPage {
|
||||||
IWorkspaceRoot root;
|
IWorkspaceRoot root;
|
||||||
List tcList;
|
List tcList;
|
||||||
Map<String, IToolChain> tcMap = new HashMap<String, IToolChain>();
|
Map<String, IToolChain> tcMap = new HashMap<String, IToolChain>();
|
||||||
|
|
||||||
private Button checkBoxTryNewSD;
|
private Button checkBoxTryNewSD;
|
||||||
|
|
||||||
|
|
||||||
|
@ -233,6 +233,10 @@ public class NewMakeProjFromExistingPage extends WizardPage {
|
||||||
return selection.length != 0 ? tcMap.get(selection[0]) : null;
|
return selection.length != 0 ? tcMap.get(selection[0]) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AG FIXME temporary method to be removed before CDT Juno release.
|
||||||
|
* @since 8.1
|
||||||
|
*/
|
||||||
public boolean isTryingNewSD() {
|
public boolean isTryingNewSD() {
|
||||||
return checkBoxTryNewSD.getSelection();
|
return checkBoxTryNewSD.getSelection();
|
||||||
}
|
}
|
||||||
|
|
17
core/org.eclipse.cdt.core/.settings/.api_filters
Normal file
17
core/org.eclipse.cdt.core/.settings/.api_filters
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<component id="org.eclipse.cdt.core" version="2">
|
||||||
|
<resource path="model/org/eclipse/cdt/core/settings/model/ICDescriptionDelta.java" type="org.eclipse.cdt.core.settings.model.ICDescriptionDelta">
|
||||||
|
<filter comment="Temporary filter to ignore added API restictions for interfaces that should be internal to begin with" id="403853384">
|
||||||
|
<message_arguments>
|
||||||
|
<message_argument value="org.eclipse.cdt.core.settings.model.ICDescriptionDelta"/>
|
||||||
|
</message_arguments>
|
||||||
|
</filter>
|
||||||
|
</resource>
|
||||||
|
<resource path="model/org/eclipse/cdt/core/settings/model/ICSettingEntry.java" type="org.eclipse.cdt.core.settings.model.ICSettingEntry">
|
||||||
|
<filter comment="Temporary filter to ignore added API restictions for interfaces that should be internal to begin with" id="403853384">
|
||||||
|
<message_arguments>
|
||||||
|
<message_argument value="org.eclipse.cdt.core.settings.model.ICSettingEntry"/>
|
||||||
|
</message_arguments>
|
||||||
|
</filter>
|
||||||
|
</resource>
|
||||||
|
</component>
|
|
@ -25,6 +25,8 @@ import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||||
* Implementers are to create a specific listener and register it to
|
* Implementers are to create a specific listener and register it to
|
||||||
* appropriate event manager in {@link #registerListener(ICConfigurationDescription)}
|
* appropriate event manager in {@link #registerListener(ICConfigurationDescription)}
|
||||||
* then unregister and dispose in {@link #unregisterListener()}.
|
* then unregister and dispose in {@link #unregisterListener()}.
|
||||||
|
*
|
||||||
|
* @since 5.4
|
||||||
*/
|
*/
|
||||||
public interface ICListenerAgent {
|
public interface ICListenerAgent {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -19,6 +19,8 @@ import org.eclipse.core.resources.IResource;
|
||||||
/**
|
/**
|
||||||
* This interface is to be implemented by providers which want to broadcast the changes in their setting entries
|
* This interface is to be implemented by providers which want to broadcast the changes in their setting entries
|
||||||
* with {@link ILanguageSettingsChangeEvent}.
|
* with {@link ILanguageSettingsChangeEvent}.
|
||||||
|
*
|
||||||
|
* @since 5.4
|
||||||
*/
|
*/
|
||||||
public interface ILanguageSettingsBroadcastingProvider extends ILanguageSettingsProvider {
|
public interface ILanguageSettingsBroadcastingProvider extends ILanguageSettingsProvider {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -28,6 +28,8 @@ import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
|
||||||
*
|
*
|
||||||
* @noextend This interface is not intended to be extended by clients.
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
|
*
|
||||||
|
* @since 5.4
|
||||||
*/
|
*/
|
||||||
public interface ILanguageSettingsChangeEvent {
|
public interface ILanguageSettingsChangeEvent {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,6 +17,8 @@ import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
|
||||||
*
|
*
|
||||||
* @see LanguageSettingsManager#registerLanguageSettingsChangeListener(ILanguageSettingsChangeListener)
|
* @see LanguageSettingsManager#registerLanguageSettingsChangeListener(ILanguageSettingsChangeListener)
|
||||||
* @see LanguageSettingsManager#unregisterLanguageSettingsChangeListener(ILanguageSettingsChangeListener)
|
* @see LanguageSettingsManager#unregisterLanguageSettingsChangeListener(ILanguageSettingsChangeListener)
|
||||||
|
*
|
||||||
|
* @since 5.4
|
||||||
*/
|
*/
|
||||||
public interface ILanguageSettingsChangeListener {
|
public interface ILanguageSettingsChangeListener {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -22,6 +22,8 @@ import org.eclipse.core.resources.IResource;
|
||||||
* contrary to some subclasses of {@link LanguageSettingsSerializableProvider} managing
|
* contrary to some subclasses of {@link LanguageSettingsSerializableProvider} managing
|
||||||
* their settings themselves and not providing such option to the user.
|
* their settings themselves and not providing such option to the user.
|
||||||
*
|
*
|
||||||
|
* @since 5.4
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public interface ILanguageSettingsEditableProvider extends ILanguageSettingsBroadcastingProvider, Cloneable {
|
public interface ILanguageSettingsEditableProvider extends ILanguageSettingsBroadcastingProvider, Cloneable {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -39,6 +39,8 @@ import org.eclipse.core.resources.IResource;
|
||||||
* plugins {@code AbstractBuildCommandParser} and {@code AbstractBuiltinSpecsDetector} which
|
* plugins {@code AbstractBuildCommandParser} and {@code AbstractBuiltinSpecsDetector} which
|
||||||
* serve as a base for output parsers and built-in compiler language settings detectors.
|
* serve as a base for output parsers and built-in compiler language settings detectors.
|
||||||
* See also extension point schema description LanguageSettingsProvider.exsd.
|
* See also extension point schema description LanguageSettingsProvider.exsd.
|
||||||
|
*
|
||||||
|
* @since 5.4
|
||||||
*/
|
*/
|
||||||
public interface ILanguageSettingsProvider {
|
public interface ILanguageSettingsProvider {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -18,6 +18,8 @@ import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
|
||||||
* Providers.
|
* Providers.
|
||||||
* @see ILanguageSettingsProvider
|
* @see ILanguageSettingsProvider
|
||||||
*
|
*
|
||||||
|
* @since 5.4
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public interface ILanguageSettingsProvidersKeeper {
|
public interface ILanguageSettingsProvidersKeeper {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -29,6 +29,8 @@ import org.eclipse.core.resources.IResource;
|
||||||
*
|
*
|
||||||
* This implementation supports "static" list of entries for languages specified in
|
* This implementation supports "static" list of entries for languages specified in
|
||||||
* the extension point.
|
* the extension point.
|
||||||
|
*
|
||||||
|
* @since 5.4
|
||||||
*/
|
*/
|
||||||
public class LanguageSettingsBaseProvider extends AbstractExecutableExtensionBase implements ILanguageSettingsProvider {
|
public class LanguageSettingsBaseProvider extends AbstractExecutableExtensionBase implements ILanguageSettingsProvider {
|
||||||
/** Language scope, i.e. list of languages the entries will be provided for. */
|
/** Language scope, i.e. list of languages the entries will be provided for. */
|
||||||
|
|
|
@ -16,6 +16,8 @@ package org.eclipse.cdt.core.language.settings.providers;
|
||||||
* The instances of this class can be used in plugin.xml to create a new provider
|
* The instances of this class can be used in plugin.xml to create a new provider
|
||||||
* but this class is not intended to be extended. For more details how to create a
|
* but this class is not intended to be extended. For more details how to create a
|
||||||
* language settings provider see the description of {@link ILanguageSettingsProvider}.
|
* language settings provider see the description of {@link ILanguageSettingsProvider}.
|
||||||
|
*
|
||||||
|
* @since 5.4
|
||||||
*/
|
*/
|
||||||
final public class LanguageSettingsGenericProvider extends LanguageSettingsSerializableProvider
|
final public class LanguageSettingsGenericProvider extends LanguageSettingsSerializableProvider
|
||||||
implements ILanguageSettingsEditableProvider {
|
implements ILanguageSettingsEditableProvider {
|
||||||
|
|
|
@ -34,6 +34,8 @@ import org.eclipse.core.runtime.IPath;
|
||||||
/**
|
/**
|
||||||
* A collection of utility methods to manage language settings providers.
|
* A collection of utility methods to manage language settings providers.
|
||||||
* See {@link ILanguageSettingsProvider}.
|
* See {@link ILanguageSettingsProvider}.
|
||||||
|
*
|
||||||
|
* @since 5.4
|
||||||
*/
|
*/
|
||||||
public class LanguageSettingsManager {
|
public class LanguageSettingsManager {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -38,6 +38,8 @@ import org.w3c.dom.NodeList;
|
||||||
* design. Implement {@link ILanguageSettingsEditableProvider} interface for that.
|
* design. Implement {@link ILanguageSettingsEditableProvider} interface for that.
|
||||||
* For more on the suggested way of extending this class see the description of
|
* For more on the suggested way of extending this class see the description of
|
||||||
* {@link ILanguageSettingsProvider}.
|
* {@link ILanguageSettingsProvider}.
|
||||||
|
*
|
||||||
|
* @since 5.4
|
||||||
*/
|
*/
|
||||||
public class LanguageSettingsSerializableProvider extends LanguageSettingsBaseProvider implements ILanguageSettingsBroadcastingProvider {
|
public class LanguageSettingsSerializableProvider extends LanguageSettingsBaseProvider implements ILanguageSettingsBroadcastingProvider {
|
||||||
protected static final String ATTR_ID = LanguageSettingsProvidersSerializer.ATTR_ID;
|
protected static final String ATTR_ID = LanguageSettingsProvidersSerializer.ATTR_ID;
|
||||||
|
|
|
@ -25,6 +25,8 @@ import org.eclipse.cdt.internal.core.parser.util.WeakHashSet;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The class representing the (in-memory) storage for language settings entries {@link ICLanguageSettingEntry}.
|
* The class representing the (in-memory) storage for language settings entries {@link ICLanguageSettingEntry}.
|
||||||
|
*
|
||||||
|
* @since 5.4
|
||||||
*/
|
*/
|
||||||
public class LanguageSettingsStorage implements Cloneable {
|
public class LanguageSettingsStorage implements Cloneable {
|
||||||
/** Storage to keep settings entries. */
|
/** Storage to keep settings entries. */
|
||||||
|
|
|
@ -29,6 +29,8 @@ import org.osgi.service.prefs.Preferences;
|
||||||
*
|
*
|
||||||
* @noextend This class is not intended to be subclassed by clients.
|
* @noextend This class is not intended to be subclassed by clients.
|
||||||
* @noinstantiate This class is not intended to be instantiated by clients.
|
* @noinstantiate This class is not intended to be instantiated by clients.
|
||||||
|
*
|
||||||
|
* @since 5.4
|
||||||
*/
|
*/
|
||||||
public class ScannerDiscoveryLegacySupport {
|
public class ScannerDiscoveryLegacySupport {
|
||||||
/** Name of MBS language settings provider (from org.eclipse.cdt.managedbuilder.core) */
|
/** Name of MBS language settings provider (from org.eclipse.cdt.managedbuilder.core) */
|
||||||
|
|
|
@ -36,7 +36,9 @@ public abstract class ACExclusionFilterEntry extends ACPathEntry implements ICEx
|
||||||
this.exclusionPatterns = exclusionPatterns != null ? (IPath[])exclusionPatterns.clone() : new IPath[0];
|
this.exclusionPatterns = exclusionPatterns != null ? (IPath[])exclusionPatterns.clone() : new IPath[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @since 5.3 */
|
/**
|
||||||
|
* @since 5.4
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public final boolean isFile() {
|
public final boolean isFile() {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -66,9 +66,9 @@ public abstract class ACPathEntry extends ACSettingEntry implements ICPathEntry
|
||||||
return rcs[0].getFullPath();
|
return rcs[0].getFullPath();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 5.3
|
* @since 5.4
|
||||||
*/
|
*/
|
||||||
public abstract boolean isFile();
|
public abstract boolean isFile();
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,10 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.core.settings.model;
|
package org.eclipse.cdt.core.settings.model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
|
*/
|
||||||
public interface ICDescriptionDelta {
|
public interface ICDescriptionDelta {
|
||||||
/*
|
/*
|
||||||
* delta kinds
|
* delta kinds
|
||||||
|
@ -18,8 +21,8 @@ public interface ICDescriptionDelta {
|
||||||
/**
|
/**
|
||||||
* kind specifying that the setting object returned by
|
* kind specifying that the setting object returned by
|
||||||
* the {@link #getSetting()} was removed
|
* the {@link #getSetting()} was removed
|
||||||
* the {@link #getNewSetting()} returns null
|
* the {@link #getNewSetting()} returns null
|
||||||
* the {@link #getOldSetting()} returns the same object as {@link #getSetting()}
|
* the {@link #getOldSetting()} returns the same object as {@link #getSetting()}
|
||||||
*/
|
*/
|
||||||
int REMOVED = 1;
|
int REMOVED = 1;
|
||||||
|
|
||||||
|
@ -27,28 +30,29 @@ public interface ICDescriptionDelta {
|
||||||
* kind specifying that the setting object returned by
|
* kind specifying that the setting object returned by
|
||||||
* the {@link #getSetting()} was added
|
* the {@link #getSetting()} was added
|
||||||
* the {@link #getNewSetting()} returns the same object as {@link #getSetting()}
|
* the {@link #getNewSetting()} returns the same object as {@link #getSetting()}
|
||||||
* the {@link #getOldSetting()} returns null
|
* the {@link #getOldSetting()} returns null
|
||||||
*/
|
*/
|
||||||
int ADDED = 2;
|
int ADDED = 2;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* kind specifying that the setting object was changed
|
* kind specifying that the setting object was changed
|
||||||
* the {@link #getNewSetting()} returns new object
|
* the {@link #getNewSetting()} returns new object
|
||||||
* the {@link #getOldSetting()} returns old object
|
* the {@link #getOldSetting()} returns old object
|
||||||
* the {@link #getSetting()} returns the same object as {@link #getNewSetting()}
|
* the {@link #getSetting()} returns the same object as {@link #getNewSetting()}
|
||||||
*/
|
*/
|
||||||
int CHANGED = 3;
|
int CHANGED = 3;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* delta change flags
|
* delta change flags
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int ACTIVE_CFG = 1;
|
int ACTIVE_CFG = 1;
|
||||||
int NAME = 1 << 1;
|
int NAME = 1 << 1;
|
||||||
int DESCRIPTION = 1 << 2;
|
int DESCRIPTION = 1 << 2;
|
||||||
// int PATH = 1 << 3;
|
// int PATH = 1 << 3;
|
||||||
int LANGUAGE_ID = 1 << 4;
|
int LANGUAGE_ID = 1 << 4;
|
||||||
int SOURCE_CONTENT_TYPE = 1 << 5;
|
int SOURCE_CONTENT_TYPE = 1 << 5;
|
||||||
|
/** @since 5.4 */
|
||||||
int SOURCE_EXTENSIONS = 1 << 6;
|
int SOURCE_EXTENSIONS = 1 << 6;
|
||||||
/** @deprecated Use ICDescriptionDelta.SOURCE_EXTENSIONS */
|
/** @deprecated Use ICDescriptionDelta.SOURCE_EXTENSIONS */
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
@ -69,18 +73,19 @@ public interface ICDescriptionDelta {
|
||||||
int OWNER = 1 << 20;
|
int OWNER = 1 << 20;
|
||||||
int INDEX_CFG = 1 << 21;
|
int INDEX_CFG = 1 << 21;
|
||||||
int SETTING_CFG = INDEX_CFG;
|
int SETTING_CFG = INDEX_CFG;
|
||||||
|
/** @since 5.4 */
|
||||||
int LANGUAGE_SETTINGS_PROVIDERS = 1 << 22;
|
int LANGUAGE_SETTINGS_PROVIDERS = 1 << 22;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* specifies that the project "isCdtProjectCreating" state was set to false
|
* specifies that the project "isCdtProjectCreating" state was set to false
|
||||||
* the PROJECT_CREAION_COMPLETED delta gets notified ONLY in case
|
* the PROJECT_CREAION_COMPLETED delta gets notified ONLY in case
|
||||||
* the project previously contained the project description with
|
* the project previously contained the project description with
|
||||||
* the true "isCdtProjectCreating" state
|
* the true "isCdtProjectCreating" state
|
||||||
*
|
*
|
||||||
* in case the initial project description does NOT contain the true "isCdtProjectCreating"
|
* in case the initial project description does NOT contain the true "isCdtProjectCreating"
|
||||||
* the project is considered as initialized from the very beginning
|
* the project is considered as initialized from the very beginning
|
||||||
* and the PROJECT_CREAION_COMPLETED delta is NOT notified
|
* and the PROJECT_CREAION_COMPLETED delta is NOT notified
|
||||||
*
|
*
|
||||||
* @see ICProjectDescription#isCdtProjectCreating()
|
* @see ICProjectDescription#isCdtProjectCreating()
|
||||||
* @see ICProjectDescription#setCdtProjectCreated()
|
* @see ICProjectDescription#setCdtProjectCreated()
|
||||||
* @see ICProjectDescriptionManager#createProjectDescription(org.eclipse.core.resources.IProject, boolean, boolean)
|
* @see ICProjectDescriptionManager#createProjectDescription(org.eclipse.core.resources.IProject, boolean, boolean)
|
||||||
|
@ -89,19 +94,19 @@ public interface ICDescriptionDelta {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns the kind
|
* returns the kind
|
||||||
* @see #ADDED
|
* @see #ADDED
|
||||||
* @see #REMOVED
|
* @see #REMOVED
|
||||||
* @see #CHANGED
|
* @see #CHANGED
|
||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
int getDeltaKind();
|
int getDeltaKind();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return ored delta flags
|
* @return ored delta flags
|
||||||
*/
|
*/
|
||||||
int getChangeFlags();
|
int getChangeFlags();
|
||||||
|
|
||||||
int getSettingType();
|
int getSettingType();
|
||||||
|
|
||||||
int getAddedEntriesKinds();
|
int getAddedEntriesKinds();
|
||||||
|
@ -115,8 +120,8 @@ public interface ICDescriptionDelta {
|
||||||
ICSettingObject getNewSetting();
|
ICSettingObject getNewSetting();
|
||||||
|
|
||||||
ICSettingObject getSetting();
|
ICSettingObject getSetting();
|
||||||
|
|
||||||
ICSettingObject getOldSetting();
|
ICSettingObject getOldSetting();
|
||||||
|
|
||||||
ICDescriptionDelta getParent();
|
ICDescriptionDelta getParent();
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,10 @@ package org.eclipse.cdt.core.settings.model;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.model.IIncludeEntry;
|
import org.eclipse.cdt.core.model.IIncludeEntry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
|
*/
|
||||||
public interface ICSettingEntry {
|
public interface ICSettingEntry {
|
||||||
/**
|
/**
|
||||||
* Flag {@code BUILTIN} indicates settings built in a tool (compiler) itself.
|
* Flag {@code BUILTIN} indicates settings built in a tool (compiler) itself.
|
||||||
|
@ -49,15 +53,16 @@ public interface ICSettingEntry {
|
||||||
/**
|
/**
|
||||||
* Flag {@code UNDEFINED} indicates that the entry should not be defined.
|
* Flag {@code UNDEFINED} indicates that the entry should not be defined.
|
||||||
* It's main purpose to provide the means to negate entries defined elsewhere.
|
* It's main purpose to provide the means to negate entries defined elsewhere.
|
||||||
*
|
*
|
||||||
* @since 6.0
|
* @since 5.4
|
||||||
*/
|
*/
|
||||||
int UNDEFINED = 1 << 5;
|
int UNDEFINED = 1 << 5;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag {@code FRAMEWORKS_MAC} applies for path entries. Such a path entry will be treated
|
* Flag {@code FRAMEWORKS_MAC} applies for path entries. Such a path entry will be treated
|
||||||
* in a special way to imitate resolving paths by Apple's version of gcc, see bug 69529.
|
* in a special way to imitate resolving paths by Apple's version of gcc, see bug 69529.
|
||||||
* .
|
*
|
||||||
|
* @since 5.4
|
||||||
*/
|
*/
|
||||||
int FRAMEWORKS_MAC = 1 << 6;
|
int FRAMEWORKS_MAC = 1 << 6;
|
||||||
|
|
||||||
|
|
|
@ -40,10 +40,10 @@ public class LanguageSettingEntriesSerializer {
|
||||||
public static final String ATTRIBUTE_SOURCE_ATTACHMENT_PATH = "srcPath"; //$NON-NLS-1$
|
public static final String ATTRIBUTE_SOURCE_ATTACHMENT_PATH = "srcPath"; //$NON-NLS-1$
|
||||||
public static final String ATTRIBUTE_SOURCE_ATTACHMENT_ROOT_PATH = "srcRootPath"; //$NON-NLS-1$
|
public static final String ATTRIBUTE_SOURCE_ATTACHMENT_ROOT_PATH = "srcRootPath"; //$NON-NLS-1$
|
||||||
public static final String ATTRIBUTE_SOURCE_ATTACHMENT_PREFIX_MAPPING = "srcPrefixMapping"; //$NON-NLS-1$
|
public static final String ATTRIBUTE_SOURCE_ATTACHMENT_PREFIX_MAPPING = "srcPrefixMapping"; //$NON-NLS-1$
|
||||||
|
|
||||||
// public static final String ATTRIBUTE_FULL_PATH = "fullPath"; //$NON-NLS-1$
|
// public static final String ATTRIBUTE_FULL_PATH = "fullPath"; //$NON-NLS-1$
|
||||||
// public static final String ATTRIBUTE_LOCATION = "location"; //$NON-NLS-1$
|
// public static final String ATTRIBUTE_LOCATION = "location"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
|
||||||
public static final String INCLUDE_PATH = "includePath"; //$NON-NLS-1$
|
public static final String INCLUDE_PATH = "includePath"; //$NON-NLS-1$
|
||||||
public static final String INCLUDE_FILE = "includeFile"; //$NON-NLS-1$
|
public static final String INCLUDE_FILE = "includeFile"; //$NON-NLS-1$
|
||||||
|
@ -61,7 +61,7 @@ public class LanguageSettingEntriesSerializer {
|
||||||
public static final String RESOLVED = "RESOLVED"; //$NON-NLS-1$
|
public static final String RESOLVED = "RESOLVED"; //$NON-NLS-1$
|
||||||
private static final String UNDEFINED = "UNDEFINED"; //$NON-NLS-1$
|
private static final String UNDEFINED = "UNDEFINED"; //$NON-NLS-1$
|
||||||
private static final String FRAMEWORK = "FRAMEWORK"; //$NON-NLS-1$
|
private static final String FRAMEWORK = "FRAMEWORK"; //$NON-NLS-1$
|
||||||
|
|
||||||
public static final String FLAGS_SEPARATOR = "|"; //$NON-NLS-1$
|
public static final String FLAGS_SEPARATOR = "|"; //$NON-NLS-1$
|
||||||
|
|
||||||
public static ICSettingEntry[] loadEntries(ICStorageElement el){
|
public static ICSettingEntry[] loadEntries(ICStorageElement el){
|
||||||
|
@ -86,7 +86,7 @@ public class LanguageSettingEntriesSerializer {
|
||||||
child = children[i];
|
child = children[i];
|
||||||
if(ELEMENT_ENTRY.equals(child.getName())){
|
if(ELEMENT_ENTRY.equals(child.getName())){
|
||||||
entry = loadEntry(child);
|
entry = loadEntry(child);
|
||||||
if(entry != null
|
if(entry != null
|
||||||
&& (kindFilter == 0
|
&& (kindFilter == 0
|
||||||
|| (kindFilter & entry.getKind()) != 0))
|
|| (kindFilter & entry.getKind()) != 0))
|
||||||
list.add(entry);
|
list.add(entry);
|
||||||
|
@ -99,11 +99,11 @@ public class LanguageSettingEntriesSerializer {
|
||||||
int kind = stringToKind(el.getAttribute(ATTRIBUTE_KIND));
|
int kind = stringToKind(el.getAttribute(ATTRIBUTE_KIND));
|
||||||
if(kind == 0)
|
if(kind == 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
int flags = composeFlags(el.getAttribute(ATTRIBUTE_FLAGS));
|
int flags = composeFlags(el.getAttribute(ATTRIBUTE_FLAGS));
|
||||||
String name = el.getAttribute(ATTRIBUTE_NAME);
|
String name = el.getAttribute(ATTRIBUTE_NAME);
|
||||||
|
|
||||||
|
|
||||||
switch(kind){
|
switch(kind){
|
||||||
case ICLanguageSettingEntry.INCLUDE_PATH:
|
case ICLanguageSettingEntry.INCLUDE_PATH:
|
||||||
return new CIncludePathEntry(name, flags);
|
return new CIncludePathEntry(name, flags);
|
||||||
|
@ -128,7 +128,7 @@ public class LanguageSettingEntriesSerializer {
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IPath loadPath(ICStorageElement el, String attr){
|
private static IPath loadPath(ICStorageElement el, String attr){
|
||||||
String value = el.getAttribute(attr);
|
String value = el.getAttribute(attr);
|
||||||
if(value != null)
|
if(value != null)
|
||||||
|
@ -151,18 +151,18 @@ public class LanguageSettingEntriesSerializer {
|
||||||
}
|
}
|
||||||
return paths;
|
return paths;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void storeExclusions(ICStorageElement el, IPath[] paths){
|
private static void storeExclusions(ICStorageElement el, IPath[] paths){
|
||||||
if(paths == null || paths.length == 0)
|
if(paths == null || paths.length == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
String[] strs = new String[paths.length];
|
String[] strs = new String[paths.length];
|
||||||
for(int i = 0; i < strs.length; i++){
|
for(int i = 0; i < strs.length; i++){
|
||||||
strs[i] = paths[i].toString();
|
strs[i] = paths[i].toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
String attr = CDataUtil.arrayToString(strs, FLAGS_SEPARATOR);
|
String attr = CDataUtil.arrayToString(strs, FLAGS_SEPARATOR);
|
||||||
el.setAttribute(ATTRIBUTE_EXCLUDING, attr);
|
el.setAttribute(ATTRIBUTE_EXCLUDING, attr);
|
||||||
}
|
}
|
||||||
|
@ -176,7 +176,7 @@ public class LanguageSettingEntriesSerializer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void serializeEntry(ICSettingEntry entry, ICStorageElement element){
|
public static void serializeEntry(ICSettingEntry entry, ICStorageElement element){
|
||||||
String kind = kindToString(entry.getKind());
|
String kind = kindToString(entry.getKind());
|
||||||
String flags = composeFlagsString(entry.getFlags());
|
String flags = composeFlagsString(entry.getFlags());
|
||||||
|
@ -199,7 +199,7 @@ public class LanguageSettingEntriesSerializer {
|
||||||
IPath path = libFile.getSourceAttachmentPath();
|
IPath path = libFile.getSourceAttachmentPath();
|
||||||
if(path != null)
|
if(path != null)
|
||||||
element.setAttribute(ATTRIBUTE_SOURCE_ATTACHMENT_PATH, path.toString());
|
element.setAttribute(ATTRIBUTE_SOURCE_ATTACHMENT_PATH, path.toString());
|
||||||
|
|
||||||
path = libFile.getSourceAttachmentRootPath();
|
path = libFile.getSourceAttachmentRootPath();
|
||||||
if(path != null)
|
if(path != null)
|
||||||
element.setAttribute(ATTRIBUTE_SOURCE_ATTACHMENT_ROOT_PATH, path.toString());
|
element.setAttribute(ATTRIBUTE_SOURCE_ATTACHMENT_ROOT_PATH, path.toString());
|
||||||
|
@ -209,7 +209,7 @@ public class LanguageSettingEntriesSerializer {
|
||||||
element.setAttribute(ATTRIBUTE_SOURCE_ATTACHMENT_PREFIX_MAPPING, path.toString());
|
element.setAttribute(ATTRIBUTE_SOURCE_ATTACHMENT_PREFIX_MAPPING, path.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String kindToString(int kind){
|
public static String kindToString(int kind){
|
||||||
switch(kind){
|
switch(kind){
|
||||||
case ICLanguageSettingEntry.INCLUDE_PATH:
|
case ICLanguageSettingEntry.INCLUDE_PATH:
|
||||||
|
@ -261,25 +261,25 @@ public class LanguageSettingEntriesSerializer {
|
||||||
if((flags & ICLanguageSettingEntry.READONLY) != 0){
|
if((flags & ICLanguageSettingEntry.READONLY) != 0){
|
||||||
if(buf.length() != 0)
|
if(buf.length() != 0)
|
||||||
buf.append(FLAGS_SEPARATOR);
|
buf.append(FLAGS_SEPARATOR);
|
||||||
|
|
||||||
buf.append(READONLY);
|
buf.append(READONLY);
|
||||||
}
|
}
|
||||||
if((flags & ICLanguageSettingEntry.LOCAL) != 0){
|
if((flags & ICLanguageSettingEntry.LOCAL) != 0){
|
||||||
if(buf.length() != 0)
|
if(buf.length() != 0)
|
||||||
buf.append(FLAGS_SEPARATOR);
|
buf.append(FLAGS_SEPARATOR);
|
||||||
|
|
||||||
buf.append(LOCAL);
|
buf.append(LOCAL);
|
||||||
}
|
}
|
||||||
if((flags & ICLanguageSettingEntry.VALUE_WORKSPACE_PATH) != 0){
|
if((flags & ICLanguageSettingEntry.VALUE_WORKSPACE_PATH) != 0){
|
||||||
if(buf.length() != 0)
|
if(buf.length() != 0)
|
||||||
buf.append(FLAGS_SEPARATOR);
|
buf.append(FLAGS_SEPARATOR);
|
||||||
|
|
||||||
buf.append(VALUE_WORKSPACE_PATH);
|
buf.append(VALUE_WORKSPACE_PATH);
|
||||||
}
|
}
|
||||||
if((flags & ICLanguageSettingEntry.RESOLVED) != 0){
|
if((flags & ICLanguageSettingEntry.RESOLVED) != 0){
|
||||||
if(buf.length() != 0)
|
if(buf.length() != 0)
|
||||||
buf.append(FLAGS_SEPARATOR);
|
buf.append(FLAGS_SEPARATOR);
|
||||||
|
|
||||||
buf.append(RESOLVED);
|
buf.append(RESOLVED);
|
||||||
}
|
}
|
||||||
if((flags & ICLanguageSettingEntry.UNDEFINED) != 0){
|
if((flags & ICLanguageSettingEntry.UNDEFINED) != 0){
|
||||||
|
@ -291,37 +291,40 @@ public class LanguageSettingEntriesSerializer {
|
||||||
if((flags & ICLanguageSettingEntry.FRAMEWORKS_MAC) != 0){
|
if((flags & ICLanguageSettingEntry.FRAMEWORKS_MAC) != 0){
|
||||||
if(buf.length() != 0)
|
if(buf.length() != 0)
|
||||||
buf.append(FLAGS_SEPARATOR);
|
buf.append(FLAGS_SEPARATOR);
|
||||||
|
|
||||||
buf.append(FRAMEWORK);
|
buf.append(FRAMEWORK);
|
||||||
}
|
}
|
||||||
return buf.toString();
|
return buf.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 5.4
|
||||||
|
*/
|
||||||
public static int composeFlags(String flagsString){
|
public static int composeFlags(String flagsString){
|
||||||
if(flagsString == null || flagsString.length() == 0)
|
if(flagsString == null || flagsString.length() == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
StringTokenizer tokenizer = new StringTokenizer(flagsString, FLAGS_SEPARATOR);
|
StringTokenizer tokenizer = new StringTokenizer(flagsString, FLAGS_SEPARATOR);
|
||||||
int flags = 0;
|
int flags = 0;
|
||||||
String f;
|
String f;
|
||||||
while(tokenizer.hasMoreElements()){
|
while(tokenizer.hasMoreElements()){
|
||||||
f = tokenizer.nextToken();
|
f = tokenizer.nextToken();
|
||||||
if(BUILTIN.equals(f))
|
if(BUILTIN.equals(f))
|
||||||
flags |= ICLanguageSettingEntry.BUILTIN;
|
flags |= ICLanguageSettingEntry.BUILTIN;
|
||||||
if(READONLY.equals(f))
|
if(READONLY.equals(f))
|
||||||
flags |= ICLanguageSettingEntry.READONLY;
|
flags |= ICLanguageSettingEntry.READONLY;
|
||||||
if(LOCAL.equals(f))
|
if(LOCAL.equals(f))
|
||||||
flags |= ICLanguageSettingEntry.LOCAL;
|
flags |= ICLanguageSettingEntry.LOCAL;
|
||||||
if(VALUE_WORKSPACE_PATH.equals(f))
|
if(VALUE_WORKSPACE_PATH.equals(f))
|
||||||
flags |= ICLanguageSettingEntry.VALUE_WORKSPACE_PATH;
|
flags |= ICLanguageSettingEntry.VALUE_WORKSPACE_PATH;
|
||||||
if(RESOLVED.equals(f))
|
if(RESOLVED.equals(f))
|
||||||
flags |= ICLanguageSettingEntry.RESOLVED;
|
flags |= ICLanguageSettingEntry.RESOLVED;
|
||||||
if(UNDEFINED.equals(f))
|
if(UNDEFINED.equals(f))
|
||||||
flags |= ICLanguageSettingEntry.UNDEFINED;
|
flags |= ICLanguageSettingEntry.UNDEFINED;
|
||||||
if(FRAMEWORK.equals(f))
|
if(FRAMEWORK.equals(f))
|
||||||
flags |= ICLanguageSettingEntry.FRAMEWORKS_MAC;
|
flags |= ICLanguageSettingEntry.FRAMEWORKS_MAC;
|
||||||
}
|
}
|
||||||
|
|
||||||
return flags;
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,8 @@ package org.eclipse.cdt.core;
|
||||||
* Helper abstract class serving as a base for creating a frame of executable class
|
* Helper abstract class serving as a base for creating a frame of executable class
|
||||||
* defined as an extension in plugin.xml.
|
* defined as an extension in plugin.xml.
|
||||||
*
|
*
|
||||||
|
* @since 5.4
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractExecutableExtensionBase {
|
public abstract class AbstractExecutableExtensionBase {
|
||||||
private String fId;
|
private String fId;
|
||||||
|
|
|
@ -529,6 +529,8 @@ public class CCorePlugin extends Plugin {
|
||||||
* </code>
|
* </code>
|
||||||
*
|
*
|
||||||
* @return CDT console adapter.
|
* @return CDT console adapter.
|
||||||
|
*
|
||||||
|
* @since 5.4
|
||||||
*/
|
*/
|
||||||
public IConsole getConsole(String extConsoleId, String contextId, String name, URL iconUrl) {
|
public IConsole getConsole(String extConsoleId, String contextId, String name, URL iconUrl) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -19,6 +19,8 @@ import org.eclipse.core.runtime.CoreException;
|
||||||
* can be without configurations, in that case IProject should be passed
|
* can be without configurations, in that case IProject should be passed
|
||||||
* to startup somehow. Perhaps another interface "IPConsoleParser" could
|
* to startup somehow. Perhaps another interface "IPConsoleParser" could
|
||||||
* be created when needed?
|
* be created when needed?
|
||||||
|
*
|
||||||
|
* @since 5.4
|
||||||
*/
|
*/
|
||||||
public interface ICConsoleParser extends IConsoleParser {
|
public interface ICConsoleParser extends IConsoleParser {
|
||||||
public void startup(ICConfigurationDescription cfgDescription) throws CoreException;
|
public void startup(ICConfigurationDescription cfgDescription) throws CoreException;
|
||||||
|
|
|
@ -47,7 +47,7 @@ import org.eclipse.swt.graphics.Image;
|
||||||
*
|
*
|
||||||
* @noextend This class is not intended to be subclassed by clients.
|
* @noextend This class is not intended to be subclassed by clients.
|
||||||
* @noinstantiate This class is not intended to be instantiated by clients.
|
* @noinstantiate This class is not intended to be instantiated by clients.
|
||||||
*
|
*
|
||||||
* @since 5.3
|
* @since 5.3
|
||||||
*/
|
*/
|
||||||
public class CDTSharedImages {
|
public class CDTSharedImages {
|
||||||
|
@ -116,6 +116,7 @@ public class CDTSharedImages {
|
||||||
public static final String IMG_OBJS_INCLUDES_FOLDER_WORKSPACE = "icons/obj16/wsp_includefolder.gif"; //$NON-NLS-1$
|
public static final String IMG_OBJS_INCLUDES_FOLDER_WORKSPACE = "icons/obj16/wsp_includefolder.gif"; //$NON-NLS-1$
|
||||||
public static final String IMG_OBJS_QUOTE_INCLUDES_FOLDER = "icons/obj16/hfolder_quote_obj.gif"; //$NON-NLS-1$
|
public static final String IMG_OBJS_QUOTE_INCLUDES_FOLDER = "icons/obj16/hfolder_quote_obj.gif"; //$NON-NLS-1$
|
||||||
public static final String IMG_OBJS_INCLUDES_FOLDER_SYSTEM = "icons/obj16/fldr_sys_obj.gif"; //$NON-NLS-1$
|
public static final String IMG_OBJS_INCLUDES_FOLDER_SYSTEM = "icons/obj16/fldr_sys_obj.gif"; //$NON-NLS-1$
|
||||||
|
/** @since 5.4 */
|
||||||
public static final String IMG_OBJS_FRAMEWORKS_FOLDER = "icons/obj16/frameworks.gif"; //$NON-NLS-1$
|
public static final String IMG_OBJS_FRAMEWORKS_FOLDER = "icons/obj16/frameworks.gif"; //$NON-NLS-1$
|
||||||
public static final String IMG_OBJS_MACROS_FILE= "icons/obj16/macros_file.gif"; //$NON-NLS-1$
|
public static final String IMG_OBJS_MACROS_FILE= "icons/obj16/macros_file.gif"; //$NON-NLS-1$
|
||||||
public static final String IMG_OBJS_LIBRARY_FOLDER= "icons/obj16/fldr_lib_obj.gif"; // $NON-NLS-1$ //$NON-NLS-1$
|
public static final String IMG_OBJS_LIBRARY_FOLDER= "icons/obj16/fldr_lib_obj.gif"; // $NON-NLS-1$ //$NON-NLS-1$
|
||||||
|
@ -185,21 +186,21 @@ public class CDTSharedImages {
|
||||||
public static final String IMG_OVR_ERROR = "icons/ovr16/error_co.gif"; //$NON-NLS-1$
|
public static final String IMG_OVR_ERROR = "icons/ovr16/error_co.gif"; //$NON-NLS-1$
|
||||||
public static final String IMG_OVR_SETTING = "icons/ovr16/setting_nav.gif"; //$NON-NLS-1$
|
public static final String IMG_OVR_SETTING = "icons/ovr16/setting_nav.gif"; //$NON-NLS-1$
|
||||||
public static final String IMG_OVR_INACTIVE = "icons/ovr16/inactive_co.gif"; //$NON-NLS-1$
|
public static final String IMG_OVR_INACTIVE = "icons/ovr16/inactive_co.gif"; //$NON-NLS-1$
|
||||||
|
|
||||||
// Pin & Clone
|
// Pin & Clone
|
||||||
public static final String IMG_THREAD_SUSPENDED_R_PINNED = "icons/obj16/threads_obj_r.gif"; //$NON-NLS-1$
|
public static final String IMG_THREAD_SUSPENDED_R_PINNED = "icons/obj16/threads_obj_r.gif"; //$NON-NLS-1$
|
||||||
public static final String IMG_THREAD_SUSPENDED_G_PINNED = "icons/obj16/threads_obj_g.gif"; //$NON-NLS-1$
|
public static final String IMG_THREAD_SUSPENDED_G_PINNED = "icons/obj16/threads_obj_g.gif"; //$NON-NLS-1$
|
||||||
public static final String IMG_THREAD_SUSPENDED_B_PINNED = "icons/obj16/threads_obj_b.gif"; //$NON-NLS-1$
|
public static final String IMG_THREAD_SUSPENDED_B_PINNED = "icons/obj16/threads_obj_b.gif"; //$NON-NLS-1$
|
||||||
|
|
||||||
public static final String IMG_THREAD_RUNNING_R_PINNED = "icons/obj16/thread_obj_r.gif"; //$NON-NLS-1$
|
public static final String IMG_THREAD_RUNNING_R_PINNED = "icons/obj16/thread_obj_r.gif"; //$NON-NLS-1$
|
||||||
public static final String IMG_THREAD_RUNNING_G_PINNED = "icons/obj16/thread_obj_g.gif"; //$NON-NLS-1$
|
public static final String IMG_THREAD_RUNNING_G_PINNED = "icons/obj16/thread_obj_g.gif"; //$NON-NLS-1$
|
||||||
public static final String IMG_THREAD_RUNNING_B_PINNED = "icons/obj16/thread_obj_b.gif"; //$NON-NLS-1$
|
public static final String IMG_THREAD_RUNNING_B_PINNED = "icons/obj16/thread_obj_b.gif"; //$NON-NLS-1$
|
||||||
|
|
||||||
public static final String IMG_CONTAINER_SUSPENDED_R_PINNED = "icons/obj16/debugts_obj_r.gif"; //$NON-NLS-1$
|
public static final String IMG_CONTAINER_SUSPENDED_R_PINNED = "icons/obj16/debugts_obj_r.gif"; //$NON-NLS-1$
|
||||||
public static final String IMG_CONTAINER_SUSPENDED_G_PINNED = "icons/obj16/debugts_obj_g.gif"; //$NON-NLS-1$
|
public static final String IMG_CONTAINER_SUSPENDED_G_PINNED = "icons/obj16/debugts_obj_g.gif"; //$NON-NLS-1$
|
||||||
public static final String IMG_CONTAINER_SUSPENDED_B_PINNED = "icons/obj16/debugts_obj_b.gif"; //$NON-NLS-1$
|
public static final String IMG_CONTAINER_SUSPENDED_B_PINNED = "icons/obj16/debugts_obj_b.gif"; //$NON-NLS-1$
|
||||||
|
|
||||||
public static final String IMG_CONTAINER_RUNNING_R_PINNED = "icons/obj16/debugt_obj_r.gif"; //$NON-NLS-1$
|
public static final String IMG_CONTAINER_RUNNING_R_PINNED = "icons/obj16/debugt_obj_r.gif"; //$NON-NLS-1$
|
||||||
public static final String IMG_CONTAINER_RUNNING_G_PINNED = "icons/obj16/debugt_obj_g.gif"; //$NON-NLS-1$
|
public static final String IMG_CONTAINER_RUNNING_G_PINNED = "icons/obj16/debugt_obj_g.gif"; //$NON-NLS-1$
|
||||||
public static final String IMG_CONTAINER_RUNNING_B_PINNED = "icons/obj16/debugt_obj_b.gif"; //$NON-NLS-1$
|
public static final String IMG_CONTAINER_RUNNING_B_PINNED = "icons/obj16/debugt_obj_b.gif"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
@ -210,20 +211,34 @@ public class CDTSharedImages {
|
||||||
public static final String IMG_VIEW_PIN_ACTION_MULTI = "icons/obj16/toolbar_pinned_multi.gif"; //$NON-NLS-1$
|
public static final String IMG_VIEW_PIN_ACTION_MULTI = "icons/obj16/toolbar_pinned_multi.gif"; //$NON-NLS-1$
|
||||||
|
|
||||||
// Language Settings Images
|
// Language Settings Images
|
||||||
|
/** @since 5.4 */
|
||||||
public static final String IMG_OBJS_LANG_SETTINGS_PROVIDER = "icons/obj16/ls_entries_provider.gif"; //$NON-NLS-1$
|
public static final String IMG_OBJS_LANG_SETTINGS_PROVIDER = "icons/obj16/ls_entries_provider.gif"; //$NON-NLS-1$
|
||||||
|
/** @since 5.4 */
|
||||||
public static final String IMG_ETOOL_PROJECT = "icons/etool16/prj_obj.gif"; //$NON-NLS-1$
|
public static final String IMG_ETOOL_PROJECT = "icons/etool16/prj_obj.gif"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
/** @since 5.4 */
|
||||||
public static final String IMG_OVR_GLOBAL = "icons/ovr16/global_ovr.gif"; //$NON-NLS-1$
|
public static final String IMG_OVR_GLOBAL = "icons/ovr16/global_ovr.gif"; //$NON-NLS-1$
|
||||||
|
/** @since 5.4 */
|
||||||
public static final String IMG_OVR_IMPORT = "icons/ovr16/import_co.gif"; //$NON-NLS-1$
|
public static final String IMG_OVR_IMPORT = "icons/ovr16/import_co.gif"; //$NON-NLS-1$
|
||||||
|
/** @since 5.4 */
|
||||||
public static final String IMG_OVR_LINK = "icons/ovr16/link_ovr.gif"; //$NON-NLS-1$
|
public static final String IMG_OVR_LINK = "icons/ovr16/link_ovr.gif"; //$NON-NLS-1$
|
||||||
|
/** @since 5.4 */
|
||||||
public static final String IMG_OVR_CONFIGURATION = "icons/ovr16/cfg_ovr.gif"; //$NON-NLS-1$
|
public static final String IMG_OVR_CONFIGURATION = "icons/ovr16/cfg_ovr.gif"; //$NON-NLS-1$
|
||||||
|
/** @since 5.4 */
|
||||||
public static final String IMG_OVR_PARENT = "icons/ovr16/path_inherit_co.gif"; //$NON-NLS-1$
|
public static final String IMG_OVR_PARENT = "icons/ovr16/path_inherit_co.gif"; //$NON-NLS-1$
|
||||||
|
/** @since 5.4 */
|
||||||
public static final String IMG_OVR_INDEXED = "icons/ovr16/indexedFile.gif"; //$NON-NLS-1$
|
public static final String IMG_OVR_INDEXED = "icons/ovr16/indexedFile.gif"; //$NON-NLS-1$
|
||||||
|
/** @since 5.4 */
|
||||||
public static final String IMG_OVR_REFERENCE = "icons/ovr16/referencedby_co.gif"; //$NON-NLS-1$
|
public static final String IMG_OVR_REFERENCE = "icons/ovr16/referencedby_co.gif"; //$NON-NLS-1$
|
||||||
|
/** @since 5.4 */
|
||||||
public static final String IMG_OVR_PROJECT = "icons/ovr16/project_co.gif"; //$NON-NLS-1$
|
public static final String IMG_OVR_PROJECT = "icons/ovr16/project_co.gif"; //$NON-NLS-1$
|
||||||
|
/** @since 5.4 */
|
||||||
public static final String IMG_OVR_CONTEXT = "icons/ovr16/overlay-has-context.gif"; //$NON-NLS-1$
|
public static final String IMG_OVR_CONTEXT = "icons/ovr16/overlay-has-context.gif"; //$NON-NLS-1$
|
||||||
|
/** @since 5.4 */
|
||||||
public static final String IMG_OVR_LOCK = "icons/ovr16/lock_ovr.gif"; //$NON-NLS-1$
|
public static final String IMG_OVR_LOCK = "icons/ovr16/lock_ovr.gif"; //$NON-NLS-1$
|
||||||
|
/** @since 5.4 */
|
||||||
public static final String IMG_OVR_EDITED = "icons/ovr16/edited_ov.gif"; //$NON-NLS-1$
|
public static final String IMG_OVR_EDITED = "icons/ovr16/edited_ov.gif"; //$NON-NLS-1$
|
||||||
|
/** @since 5.4 */
|
||||||
public static final String IMG_OVR_EMPTY = "icons/ovr16/empty_ovr.png"; //$NON-NLS-1$
|
public static final String IMG_OVR_EMPTY = "icons/ovr16/empty_ovr.png"; //$NON-NLS-1$
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -64,71 +64,72 @@ import org.eclipse.cdt.internal.ui.dialogs.StatusInfo;
|
||||||
import org.eclipse.cdt.internal.ui.newui.Messages;
|
import org.eclipse.cdt.internal.ui.newui.Messages;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* It is a parent for all standard property tabs
|
* It is a parent for all standard property tabs
|
||||||
* in new CDT model.
|
* in new CDT model.
|
||||||
*
|
*
|
||||||
* Although it's enough for new tabs to implement
|
* Although it's enough for new tabs to implement
|
||||||
* ICPropertyTab interface only, it would be better
|
* ICPropertyTab interface only, it would be better
|
||||||
* to extend them from this class.
|
* to extend them from this class.
|
||||||
*
|
*
|
||||||
* In this case, we'll able to use:
|
* In this case, we'll able to use:
|
||||||
* - a lot of utility methods via "provider" link.
|
* - a lot of utility methods via "provider" link.
|
||||||
* In particular, it allows to get current project,
|
* In particular, it allows to get current project,
|
||||||
* configuration etc. See ICPropertyProvider interface.
|
* configuration etc. See ICPropertyProvider interface.
|
||||||
* - a standard way to create buttons (ins/edit/del etc)
|
* - a standard way to create buttons (ins/edit/del etc)
|
||||||
* and to handle their events (see buttonPressed(int))
|
* and to handle their events (see buttonPressed(int))
|
||||||
* - several utility methods to create widgets in the
|
* - several utility methods to create widgets in the
|
||||||
* uniform manner (setupLabel(), setupText() etc).
|
* uniform manner (setupLabel(), setupText() etc).
|
||||||
* - means to handle control messages which are the main
|
* - means to handle control messages which are the main
|
||||||
* communication way for new CDT model pages and tabs.
|
* communication way for new CDT model pages and tabs.
|
||||||
*/
|
*/
|
||||||
public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
|
|
||||||
public static final Method GRAY_METHOD = getGrayEnabled();
|
public static final Method GRAY_METHOD = getGrayEnabled();
|
||||||
public static final int BUTTON_WIDTH = 120; // used as hint for all push buttons
|
public static final int BUTTON_WIDTH = 120; // used as hint for all push buttons
|
||||||
|
|
||||||
// commonly used button names
|
// commonly used button names
|
||||||
public static final String EMPTY_STR = ""; //$NON-NLS-1$
|
public static final String EMPTY_STR = ""; //$NON-NLS-1$
|
||||||
public static final String ADD_STR = Messages.FileListControl_add;
|
public static final String ADD_STR = Messages.FileListControl_add;
|
||||||
public static final String DEL_STR = Messages.FileListControl_delete;
|
public static final String DEL_STR = Messages.FileListControl_delete;
|
||||||
public static final String EDIT_STR = Messages.FileListControl_edit;
|
public static final String EDIT_STR = Messages.FileListControl_edit;
|
||||||
public static final String MOVEUP_STR = Messages.FileListControl_moveup;
|
public static final String MOVEUP_STR = Messages.FileListControl_moveup;
|
||||||
public static final String MOVEDOWN_STR = Messages.FileListControl_movedown;
|
public static final String MOVEDOWN_STR = Messages.FileListControl_movedown;
|
||||||
public static final String PROJECTBUTTON_NAME = "Project...";
|
/** @since 5.4 */
|
||||||
public static final String WORKSPACEBUTTON_NAME = Messages.FileListControl_button_workspace;
|
public static final String PROJECTBUTTON_NAME = "Project...";
|
||||||
public static final String FILESYSTEMBUTTON_NAME = Messages.FileListControl_button_fs;
|
public static final String WORKSPACEBUTTON_NAME = Messages.FileListControl_button_workspace;
|
||||||
public static final String VARIABLESBUTTON_NAME = Messages.AbstractCPropertyTab_1;
|
public static final String FILESYSTEMBUTTON_NAME = Messages.FileListControl_button_fs;
|
||||||
public static final String FILESYSTEM_DIR_DIALOG_MSG = Messages.BrowseEntryDialog_fs_dir_dlg_msg;
|
public static final String VARIABLESBUTTON_NAME = Messages.AbstractCPropertyTab_1;
|
||||||
public static final String FILESYSTEM_FILE_DIALOG_TITLE = EMPTY_STR;
|
public static final String FILESYSTEM_DIR_DIALOG_MSG = Messages.BrowseEntryDialog_fs_dir_dlg_msg;
|
||||||
public static final String WORKSPACE_DIR_DIALOG_TITLE = Messages.BrowseEntryDialog_wsp_dir_dlg_title;
|
public static final String FILESYSTEM_FILE_DIALOG_TITLE = EMPTY_STR;
|
||||||
public static final String WORKSPACE_FILE_DIALOG_TITLE = Messages.BrowseEntryDialog_wsp_file_dlg_title;
|
public static final String WORKSPACE_DIR_DIALOG_TITLE = Messages.BrowseEntryDialog_wsp_dir_dlg_title;
|
||||||
public static final String WORKSPACE_DIR_DIALOG_MSG = Messages.BrowseEntryDialog_wsp_dir_dlg_msg;
|
public static final String WORKSPACE_FILE_DIALOG_TITLE = Messages.BrowseEntryDialog_wsp_file_dlg_title;
|
||||||
public static final String WORKSPACE_FILE_DIALOG_MSG = Messages.BrowseEntryDialog_wsp_file_dlg_msg;
|
public static final String WORKSPACE_DIR_DIALOG_MSG = Messages.BrowseEntryDialog_wsp_dir_dlg_msg;
|
||||||
public static final String WORKSPACE_FILE_DIALOG_ERR = Messages.BrowseEntryDialog_wsp_file_dlg_err;
|
public static final String WORKSPACE_FILE_DIALOG_MSG = Messages.BrowseEntryDialog_wsp_file_dlg_msg;
|
||||||
public static final String WORKSPACE_DIR_DIALOG_ERR = Messages.BrowseEntryDialog_wsp_dir_dlg_err;
|
public static final String WORKSPACE_FILE_DIALOG_ERR = Messages.BrowseEntryDialog_wsp_file_dlg_err;
|
||||||
public static final String BACKGROUND_TEXT_DEFAULT = Messages.AbstractCPropertyTab_2;
|
public static final String WORKSPACE_DIR_DIALOG_ERR = Messages.BrowseEntryDialog_wsp_dir_dlg_err;
|
||||||
|
public static final String BACKGROUND_TEXT_DEFAULT = Messages.AbstractCPropertyTab_2;
|
||||||
public static final Color BACKGROUND_FOR_USER_VAR = new Color(Display.getDefault(), 255, 255, 200); // light yellow
|
public static final Color BACKGROUND_FOR_USER_VAR = new Color(Display.getDefault(), 255, 255, 200); // light yellow
|
||||||
|
|
||||||
private static final String PREFIX = "org.eclipse.cdt.ui."; //$NON-NLS-1$
|
private static final String PREFIX = "org.eclipse.cdt.ui."; //$NON-NLS-1$
|
||||||
|
|
||||||
public static final int TRI_UNKNOWN = 2;
|
public static final int TRI_UNKNOWN = 2;
|
||||||
public static final int TRI_YES = 1;
|
public static final int TRI_YES = 1;
|
||||||
public static final int TRI_NO = 0;
|
public static final int TRI_NO = 0;
|
||||||
|
|
||||||
protected static final String ENUM = "enum"; //$NON-NLS-1$
|
protected static final String ENUM = "enum"; //$NON-NLS-1$
|
||||||
protected static final String SSET = "set"; //$NON-NLS-1$
|
protected static final String SSET = "set"; //$NON-NLS-1$
|
||||||
|
|
||||||
private PageBook pageBook; // to select between background and usercomp.
|
private PageBook pageBook; // to select between background and usercomp.
|
||||||
private CLabel background;
|
private CLabel background;
|
||||||
private Composite userdata;
|
private Composite userdata;
|
||||||
|
|
||||||
protected Composite usercomp; // space where user can create widgets
|
protected Composite usercomp; // space where user can create widgets
|
||||||
protected Composite buttoncomp; // space for buttons on the right
|
protected Composite buttoncomp; // space for buttons on the right
|
||||||
private Button[] buttons; // buttons in buttoncomp
|
private Button[] buttons; // buttons in buttoncomp
|
||||||
public ICPropertyProvider page;
|
public ICPropertyProvider page;
|
||||||
protected Image icon = null;
|
protected Image icon = null;
|
||||||
private String helpId = EMPTY_STR;
|
private String helpId = EMPTY_STR;
|
||||||
|
|
||||||
protected boolean visible;
|
protected boolean visible;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -140,8 +141,8 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
/**
|
/**
|
||||||
* Creates basic widgets for property tab.
|
* Creates basic widgets for property tab.
|
||||||
* Descendants should, normally, override
|
* Descendants should, normally, override
|
||||||
* this method but call super.createControls().
|
* this method but call super.createControls().
|
||||||
*
|
*
|
||||||
* @param parent
|
* @param parent
|
||||||
*/
|
*/
|
||||||
protected void createControls(Composite parent) {
|
protected void createControls(Composite parent) {
|
||||||
|
@ -154,27 +155,27 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
GridData gd;
|
GridData gd;
|
||||||
userdata= new Composite(pageBook, SWT.NONE);
|
userdata= new Composite(pageBook, SWT.NONE);
|
||||||
userdata.setLayout(new GridLayout(2, false));
|
userdata.setLayout(new GridLayout(2, false));
|
||||||
|
|
||||||
usercomp = new Composite(userdata, SWT.NONE);
|
usercomp = new Composite(userdata, SWT.NONE);
|
||||||
usercomp.setLayoutData(gd= new GridData(GridData.FILL_BOTH));
|
usercomp.setLayoutData(gd= new GridData(GridData.FILL_BOTH));
|
||||||
gd.widthHint= 150;
|
gd.widthHint= 150;
|
||||||
|
|
||||||
buttoncomp = new Composite(userdata, SWT.NONE);
|
buttoncomp = new Composite(userdata, SWT.NONE);
|
||||||
buttoncomp.setLayoutData(gd= new GridData(GridData.END));
|
buttoncomp.setLayoutData(gd= new GridData(GridData.END));
|
||||||
// width hint must be set to one, otherwise subclasses that do not have buttons
|
// width hint must be set to one, otherwise subclasses that do not have buttons
|
||||||
// don't look pretty, bug 242408
|
// don't look pretty, bug 242408
|
||||||
gd.widthHint= 1;
|
gd.widthHint= 1;
|
||||||
|
|
||||||
pageBook.showPage(userdata);
|
pageBook.showPage(userdata);
|
||||||
|
|
||||||
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, helpId);
|
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, helpId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The common way to create buttons cluster
|
* The common way to create buttons cluster
|
||||||
* on the right of tab workspace.
|
* on the right of tab workspace.
|
||||||
* @param names : array of button names
|
* @param names : array of button names
|
||||||
* null instead of name means "skip place"
|
* null instead of name means "skip place"
|
||||||
*/
|
*/
|
||||||
protected void initButtons(String[] names) {
|
protected void initButtons(String[] names) {
|
||||||
initButtons(buttoncomp, names, 80);
|
initButtons(buttoncomp, names, 80);
|
||||||
|
@ -182,7 +183,7 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
protected void initButtons(String[] names, int width) {
|
protected void initButtons(String[] names, int width) {
|
||||||
initButtons(buttoncomp, names, width);
|
initButtons(buttoncomp, names, width);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ability to create standard button on any composite.
|
* Ability to create standard button on any composite.
|
||||||
* @param c
|
* @param c
|
||||||
|
@ -202,15 +203,15 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
gdb.grabExcessHorizontalSpace = false;
|
gdb.grabExcessHorizontalSpace = false;
|
||||||
gdb.horizontalAlignment = SWT.FILL;
|
gdb.horizontalAlignment = SWT.FILL;
|
||||||
gdb.minimumWidth = width;
|
gdb.minimumWidth = width;
|
||||||
|
|
||||||
if (names[i] != null)
|
if (names[i] != null)
|
||||||
buttons[i].setText(names[i]);
|
buttons[i].setText(names[i]);
|
||||||
else { // no button, but placeholder !
|
else { // no button, but placeholder !
|
||||||
buttons[i].setVisible(false);
|
buttons[i].setVisible(false);
|
||||||
buttons[i].setEnabled(false);
|
buttons[i].setEnabled(false);
|
||||||
gdb.heightHint = 10;
|
gdb.heightHint = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
buttons[i].setLayoutData(gdb);
|
buttons[i].setLayoutData(gdb);
|
||||||
buttons[i].addSelectionListener(new SelectionAdapter() {
|
buttons[i].addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -220,15 +221,15 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when user changes
|
* Called when user changes
|
||||||
* @param cfg - selected configuration
|
* @param cfg - selected configuration
|
||||||
*/
|
*/
|
||||||
private void configChanged(ICResourceDescription cfg) {
|
private void configChanged(ICResourceDescription cfg) {
|
||||||
if (visible) updateData(cfg);
|
if (visible) updateData(cfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disposes the SWT resources allocated by this dialog page.
|
* Disposes the SWT resources allocated by this dialog page.
|
||||||
*/
|
*/
|
||||||
|
@ -245,13 +246,13 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
visible = _visible;
|
visible = _visible;
|
||||||
if (visible) updateData(page.getResDesc());
|
if (visible) updateData(page.getResDesc());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Descendant tabs should implement this method so
|
* Descendant tabs should implement this method so
|
||||||
* that it copies it's data from one description
|
* that it copies it's data from one description
|
||||||
* to another. Only data affected by given tab
|
* to another. Only data affected by given tab
|
||||||
* should be copied.
|
* should be copied.
|
||||||
*
|
*
|
||||||
* @param src
|
* @param src
|
||||||
* @param dst
|
* @param dst
|
||||||
*/
|
*/
|
||||||
|
@ -273,32 +274,32 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method should be rewritten to handle button presses
|
* Method should be rewritten to handle button presses
|
||||||
* @param i : number of button pressed
|
* @param i : number of button pressed
|
||||||
*
|
*
|
||||||
* Does nothing by default.
|
* Does nothing by default.
|
||||||
* May (but not must) be overridden.
|
* May (but not must) be overridden.
|
||||||
*/
|
*/
|
||||||
protected void buttonPressed(int i) {}
|
protected void buttonPressed(int i) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks state of existing button.
|
* Checks state of existing button.
|
||||||
*
|
*
|
||||||
* @param i - button index
|
* @param i - button index
|
||||||
* @return - true if button exists and enabled
|
* @return - true if button exists and enabled
|
||||||
*/
|
*/
|
||||||
protected boolean buttonIsEnabled(int i) {
|
protected boolean buttonIsEnabled(int i) {
|
||||||
if (buttons == null || buttons.length <= i )
|
if (buttons == null || buttons.length <= i )
|
||||||
return false;
|
return false;
|
||||||
return buttons[i].isEnabled();
|
return buttons[i].isEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Changes state of existing button.
|
* Changes state of existing button.
|
||||||
* Does nothing if index is invalid
|
* Does nothing if index is invalid
|
||||||
*
|
*
|
||||||
* @param i - button index
|
* @param i - button index
|
||||||
* @param state - required state
|
* @param state - required state
|
||||||
*/
|
*/
|
||||||
|
@ -306,11 +307,11 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
if (buttons == null || buttons.length <= i ) return;
|
if (buttons == null || buttons.length <= i ) return;
|
||||||
buttons[i].setEnabled(state);
|
buttons[i].setEnabled(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Changes text of existing button
|
* Changes text of existing button
|
||||||
* Does nothing if index is invalid
|
* Does nothing if index is invalid
|
||||||
*
|
*
|
||||||
* @param i - button index
|
* @param i - button index
|
||||||
* @param text - text to display
|
* @param text - text to display
|
||||||
*/
|
*/
|
||||||
|
@ -346,13 +347,13 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
b.setLayoutData(g);
|
b.setLayoutData(g);
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Text setupText(Composite c, int span, int mode) {
|
protected Text setupText(Composite c, int span, int mode) {
|
||||||
Text t = new Text(c, SWT.SINGLE | SWT.BORDER);
|
Text t = new Text(c, SWT.SINGLE | SWT.BORDER);
|
||||||
setupControl(t, span, mode);
|
setupControl(t, span, mode);
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Group setupGroup(Composite c, String name, int cols, int mode) {
|
protected Group setupGroup(Composite c, String name, int cols, int mode) {
|
||||||
Group g = new Group(c, SWT.NONE);
|
Group g = new Group(c, SWT.NONE);
|
||||||
g.setText(name);
|
g.setText(name);
|
||||||
|
@ -360,7 +361,7 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
setupControl(g, 1, mode);
|
setupControl(g, 1, mode);
|
||||||
return g;
|
return g;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Button setupCheck(Composite c, String name, int span, int mode) {
|
protected Button setupCheck(Composite c, String name, int span, int mode) {
|
||||||
Button b = new Button(c, SWT.CHECK);
|
Button b = new Button(c, SWT.CHECK);
|
||||||
b.setText(name);
|
b.setText(name);
|
||||||
|
@ -376,23 +377,23 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Selection handler for checkbox created
|
* Selection handler for checkbox created
|
||||||
* by methods "setupCheck()" or "setupTri()"
|
* by methods "setupCheck()" or "setupTri()"
|
||||||
* Descendants should override this method
|
* Descendants should override this method
|
||||||
* if they use "setupCheck".
|
* if they use "setupCheck".
|
||||||
* Usually the method body will look like:
|
* Usually the method body will look like:
|
||||||
* {
|
* {
|
||||||
* Control b = (Control)e.widget;
|
* Control b = (Control)e.widget;
|
||||||
* if (b.equals(myFirstCheckbox) { ... }
|
* if (b.equals(myFirstCheckbox) { ... }
|
||||||
* else if (b.equals(mySecondCheckbox) { ... }
|
* else if (b.equals(mySecondCheckbox) { ... }
|
||||||
* ... }
|
* ... }
|
||||||
*/
|
*/
|
||||||
protected void checkPressed(SelectionEvent e) {
|
protected void checkPressed(SelectionEvent e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setupControl(Control c, int span, int mode) {
|
protected void setupControl(Control c, int span, int mode) {
|
||||||
// although we use GridLayout usually,
|
// although we use GridLayout usually,
|
||||||
// exceptions can occur: do nothing.
|
// exceptions can occur: do nothing.
|
||||||
if (c != null) {
|
if (c != null) {
|
||||||
if (span != 0) {
|
if (span != 0) {
|
||||||
GridData gd = new GridData(mode);
|
GridData gd = new GridData(mode);
|
||||||
|
@ -403,11 +404,11 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
c.setFont(p.getFont());
|
c.setFont(p.getFont());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A set of methods providing selection dialogs for files or dirs.
|
* A set of methods providing selection dialogs for files or dirs.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public static String getFileSystemDirDialog(Shell shell, String text) {
|
public static String getFileSystemDirDialog(Shell shell, String text) {
|
||||||
DirectoryDialog dialog = new DirectoryDialog(shell, SWT.OPEN|SWT.APPLICATION_MODAL);
|
DirectoryDialog dialog = new DirectoryDialog(shell, SWT.OPEN|SWT.APPLICATION_MODAL);
|
||||||
if(text != null && text.trim().length() != 0) dialog.setFilterPath(text);
|
if(text != null && text.trim().length() != 0) dialog.setFilterPath(text);
|
||||||
|
@ -432,12 +433,12 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
dialog.setText(FILESYSTEM_FILE_DIALOG_TITLE);
|
dialog.setText(FILESYSTEM_FILE_DIALOG_TITLE);
|
||||||
return dialog.open();
|
return dialog.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getVariableDialog(Shell shell, ICConfigurationDescription cfgd) {
|
public static String getVariableDialog(Shell shell, ICConfigurationDescription cfgd) {
|
||||||
|
|
||||||
ICdtVariableManager vm = CCorePlugin.getDefault().getCdtVariableManager();
|
ICdtVariableManager vm = CCorePlugin.getDefault().getCdtVariableManager();
|
||||||
BuildVarListDialog dialog = new BuildVarListDialog(shell, vm.getVariables(cfgd));
|
BuildVarListDialog dialog = new BuildVarListDialog(shell, vm.getVariables(cfgd));
|
||||||
dialog.setTitle(Messages.AbstractCPropertyTab_0);
|
dialog.setTitle(Messages.AbstractCPropertyTab_0);
|
||||||
if (dialog.open() == Window.OK) {
|
if (dialog.open() == Window.OK) {
|
||||||
Object[] selected = dialog.getResult();
|
Object[] selected = dialog.getResult();
|
||||||
if (selected.length > 0) {
|
if (selected.length > 0) {
|
||||||
|
@ -454,13 +455,19 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
public static String getWorkspaceFileDialog(Shell shell, String text) {
|
public static String getWorkspaceFileDialog(Shell shell, String text) {
|
||||||
return getWorkspaceDialog(shell, text, false, null);
|
return getWorkspaceDialog(shell, text, false, null);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @since 5.4
|
||||||
|
*/
|
||||||
public static String getProjectDirDialog(Shell shell, String text, IProject prj) {
|
public static String getProjectDirDialog(Shell shell, String text, IProject prj) {
|
||||||
return getWorkspaceDialog(shell, text, true, prj);
|
return getWorkspaceDialog(shell, text, true, prj);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @since 5.4
|
||||||
|
*/
|
||||||
public static String getProjectFileDialog(Shell shell, String text, IProject prj) {
|
public static String getProjectFileDialog(Shell shell, String text, IProject prj) {
|
||||||
return getWorkspaceDialog(shell, text, false, prj);
|
return getWorkspaceDialog(shell, text, false, prj);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String getWorkspaceDialog(Shell shell, String text, boolean dir, IProject prj) {
|
private static String getWorkspaceDialog(Shell shell, String text, boolean dir, IProject prj) {
|
||||||
String currentPathText;
|
String currentPathText;
|
||||||
IPath path;
|
IPath path;
|
||||||
|
@ -468,7 +475,7 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
/* Remove double quotes */
|
/* Remove double quotes */
|
||||||
currentPathText = currentPathText.replaceAll("\"", ""); //$NON-NLS-1$ //$NON-NLS-2$
|
currentPathText = currentPathText.replaceAll("\"", ""); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
path = new Path(currentPathText);
|
path = new Path(currentPathText);
|
||||||
|
|
||||||
ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(shell,
|
ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(shell,
|
||||||
new WorkbenchLabelProvider(), new WorkbenchContentProvider());
|
new WorkbenchLabelProvider(), new WorkbenchContentProvider());
|
||||||
|
|
||||||
|
@ -477,7 +484,7 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
else
|
else
|
||||||
dialog.setInput(prj);
|
dialog.setInput(prj);
|
||||||
dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
|
dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
|
||||||
|
|
||||||
if (dir) {
|
if (dir) {
|
||||||
IResource container = null;
|
IResource container = null;
|
||||||
if(path.isAbsolute()){
|
if(path.isAbsolute()){
|
||||||
|
@ -519,14 +526,14 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
}
|
}
|
||||||
if (dialog.open() == Window.OK) {
|
if (dialog.open() == Window.OK) {
|
||||||
IResource resource = (IResource) dialog.getFirstResult();
|
IResource resource = (IResource) dialog.getFirstResult();
|
||||||
if (resource != null) {
|
if (resource != null) {
|
||||||
StringBuffer buf = new StringBuffer();
|
StringBuffer buf = new StringBuffer();
|
||||||
return buf.append("${").append("workspace_loc:").append(resource.getFullPath()).append("}").toString(); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
|
return buf.append("${").append("workspace_loc:").append(resource.getFullPath()).append("}").toString(); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// shortcut to frequently-used method
|
// shortcut to frequently-used method
|
||||||
public ICResourceDescription getResDesc() {
|
public ICResourceDescription getResDesc() {
|
||||||
return page.getResDesc();
|
return page.getResDesc();
|
||||||
|
@ -560,19 +567,19 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
dispose();
|
dispose();
|
||||||
break;
|
break;
|
||||||
case ICPropertyTab.VISIBLE:
|
case ICPropertyTab.VISIBLE:
|
||||||
if (canBeVisible())
|
if (canBeVisible())
|
||||||
setVisible(data != null);
|
setVisible(data != null);
|
||||||
else
|
else
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
break;
|
break;
|
||||||
case ICPropertyTab.SET_ICON:
|
case ICPropertyTab.SET_ICON:
|
||||||
icon = (Image)data;
|
icon = (Image)data;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// By default, returns true (no visibility restriction)
|
// By default, returns true (no visibility restriction)
|
||||||
// But several pages should rewrite this functionality.
|
// But several pages should rewrite this functionality.
|
||||||
@Override
|
@Override
|
||||||
|
@ -594,20 +601,20 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets checkbox to appropriate state:
|
* Sets checkbox to appropriate state:
|
||||||
* unchecked or checked
|
* unchecked or checked
|
||||||
* @param b - checkbox to set
|
* @param b - checkbox to set
|
||||||
* @param state
|
* @param state
|
||||||
*/
|
*/
|
||||||
public static void setTriSelection(Button b, boolean state) {
|
public static void setTriSelection(Button b, boolean state) {
|
||||||
setTriSelection(b, state ? TRI_YES : TRI_NO);
|
setTriSelection(b, state ? TRI_YES : TRI_NO);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets checkbox to appropriate state:
|
* Sets checkbox to appropriate state:
|
||||||
* unchecked, checked or unknown (grayed)
|
* unchecked, checked or unknown (grayed)
|
||||||
* @param b - checkbox to set
|
* @param b - checkbox to set
|
||||||
* @param state
|
* @param state
|
||||||
*/
|
*/
|
||||||
public static void setTriSelection(Button b, int state) {
|
public static void setTriSelection(Button b, int state) {
|
||||||
switch (state) {
|
switch (state) {
|
||||||
|
@ -630,7 +637,7 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
* This method will be simplified after M5 release,
|
* This method will be simplified after M5 release,
|
||||||
* when Button.setGrayed() method will be accessible.
|
* when Button.setGrayed() method will be accessible.
|
||||||
* In this case, reflection will not be required.
|
* In this case, reflection will not be required.
|
||||||
*
|
*
|
||||||
* @param b
|
* @param b
|
||||||
* @param value
|
* @param value
|
||||||
* @deprecated call {@link Button#setGrayed(boolean)} instead
|
* @deprecated call {@link Button#setGrayed(boolean)} instead
|
||||||
|
@ -643,7 +650,7 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
/**
|
/**
|
||||||
* This method will be removed after M5 release,
|
* This method will be removed after M5 release,
|
||||||
* when Button.setGrayed() will be officially accessible.
|
* when Button.setGrayed() will be officially accessible.
|
||||||
*
|
*
|
||||||
* @return reference to Button.setGrayed() method
|
* @return reference to Button.setGrayed() method
|
||||||
*/
|
*/
|
||||||
private static Method getGrayEnabled() {
|
private static Method getGrayEnabled() {
|
||||||
|
@ -659,8 +666,8 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Utility method to show/hide working panes
|
* Utility method to show/hide working panes
|
||||||
* When panes are hidden, message becomes visible
|
* When panes are hidden, message becomes visible
|
||||||
*
|
*
|
||||||
* @param visible - true or false
|
* @param visible - true or false
|
||||||
* @param msg - text to be shown instead of panes
|
* @param msg - text to be shown instead of panes
|
||||||
*/
|
*/
|
||||||
|
@ -680,21 +687,21 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
b.setVisible(visible);
|
b.setVisible(visible);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows changing message on background pane,
|
* Allows changing message on background pane,
|
||||||
* which becomes visible after usercomp hidden
|
* which becomes visible after usercomp hidden
|
||||||
*
|
*
|
||||||
* @param s - text to display or null for default
|
* @param s - text to display or null for default
|
||||||
*/
|
*/
|
||||||
protected void setBackgroundText(String s) {
|
protected void setBackgroundText(String s) {
|
||||||
background.setText(s == null ? BACKGROUND_TEXT_DEFAULT : s);
|
background.setText(s == null ? BACKGROUND_TEXT_DEFAULT : s);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to display double-clickable buttons for multiple configurations
|
* Used to display double-clickable buttons for multiple configurations
|
||||||
* string list mode (see Multiple Configurations Edit Preference page).
|
* string list mode (see Multiple Configurations Edit Preference page).
|
||||||
*
|
*
|
||||||
* @deprecated as of CDT 8.0. This functionality is presented as links
|
* @deprecated as of CDT 8.0. This functionality is presented as links
|
||||||
* to the preference page, see {@link AbstractLangsListTab#updateStringListModeControl()}
|
* to the preference page, see {@link AbstractLangsListTab#updateStringListModeControl()}
|
||||||
*/
|
*/
|
||||||
|
@ -721,7 +728,7 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
* The writing mode for multiple configurations edits (configuration drop-down list
|
* The writing mode for multiple configurations edits (configuration drop-down list
|
||||||
* in project properties). This mode applies to lists of entries.
|
* in project properties). This mode applies to lists of entries.
|
||||||
* See preference Multiple Configurations Edit, String List Write Mode.
|
* See preference Multiple Configurations Edit, String List Write Mode.
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
* {@code true} if each list should be replaced as a whole with the
|
* {@code true} if each list should be replaced as a whole with the
|
||||||
* list user is currently working with in UI<br/>
|
* list user is currently working with in UI<br/>
|
||||||
|
@ -736,12 +743,12 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
public String getHelpContextId() {
|
public String getHelpContextId() {
|
||||||
return helpId;
|
return helpId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setHelpContextId(String id) {
|
public void setHelpContextId(String id) {
|
||||||
helpId = PREFIX + id;
|
helpId = PREFIX + id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Allows subclasses to inform the container about changes relevant to the indexer.
|
* Allows subclasses to inform the container about changes relevant to the indexer.
|
||||||
* The tab will be asked before the apply is performed. As a consequence of returning
|
* The tab will be asked before the apply is performed. As a consequence of returning
|
||||||
* <code>true</code> the user will be asked whether she wants to rebuild the index.
|
* <code>true</code> the user will be asked whether she wants to rebuild the index.
|
||||||
|
|
|
@ -33,12 +33,14 @@ import org.eclipse.cdt.internal.ui.workingsets.WorkingSetConfigurationManager;
|
||||||
public class CDTPrefUtil {
|
public class CDTPrefUtil {
|
||||||
// boolean keys (KEY_NO-s are to be inverted !)
|
// boolean keys (KEY_NO-s are to be inverted !)
|
||||||
public static final String KEY_NOSUPP = "wizard.show.unsupported.disable"; //$NON-NLS-1$
|
public static final String KEY_NOSUPP = "wizard.show.unsupported.disable"; //$NON-NLS-1$
|
||||||
|
/** @since 5.4 */ // AG FIXME - remove before CDT Juno release
|
||||||
public static final String KEY_NEWSD = "wizard.try.new.sd.enable"; //$NON-NLS-1$
|
public static final String KEY_NEWSD = "wizard.try.new.sd.enable"; //$NON-NLS-1$
|
||||||
public static final String KEY_OTHERS = "wizard.group.others.enable"; //$NON-NLS-1$
|
public static final String KEY_OTHERS = "wizard.group.others.enable"; //$NON-NLS-1$
|
||||||
public static final String KEY_NOMNG = "properties.manage.config.disable"; //$NON-NLS-1$
|
public static final String KEY_NOMNG = "properties.manage.config.disable"; //$NON-NLS-1$
|
||||||
public static final String KEY_DTREE = "properties.data.hierarchy.enable"; //$NON-NLS-1$
|
public static final String KEY_DTREE = "properties.data.hierarchy.enable"; //$NON-NLS-1$
|
||||||
public static final String KEY_NOTOOLM = "properties.toolchain.modification.disable"; //$NON-NLS-1$
|
public static final String KEY_NOTOOLM = "properties.toolchain.modification.disable"; //$NON-NLS-1$
|
||||||
public static final String KEY_EXPORT = "properties.export.page.enable"; //$NON-NLS-1$
|
public static final String KEY_EXPORT = "properties.export.page.enable"; //$NON-NLS-1$
|
||||||
|
/** @since 5.4 */
|
||||||
public static final String KEY_NO_SHOW_PROVIDERS = "properties.providers.tab.disable"; //$NON-NLS-1$
|
public static final String KEY_NO_SHOW_PROVIDERS = "properties.providers.tab.disable"; //$NON-NLS-1$
|
||||||
/** @since 5.2 Show the "Include Files" settings entry tab */
|
/** @since 5.2 Show the "Include Files" settings entry tab */
|
||||||
public static final String KEY_SHOW_INC_FILES = "properties.includefiles.page.enable"; //$NON-NLS-1$
|
public static final String KEY_SHOW_INC_FILES = "properties.includefiles.page.enable"; //$NON-NLS-1$
|
||||||
|
@ -52,34 +54,34 @@ public class CDTPrefUtil {
|
||||||
public static final int POSITION_SAVE_SIZE = 0;
|
public static final int POSITION_SAVE_SIZE = 0;
|
||||||
public static final int POSITION_SAVE_NONE = 2;
|
public static final int POSITION_SAVE_NONE = 2;
|
||||||
public static final int POSITION_SAVE_BOTH = 3;
|
public static final int POSITION_SAVE_BOTH = 3;
|
||||||
|
|
||||||
public static final String KEY_DISC_NAMES = "properties.discovery.naming"; //$NON-NLS-1$
|
public static final String KEY_DISC_NAMES = "properties.discovery.naming"; //$NON-NLS-1$
|
||||||
public static final int DISC_NAMING_UNIQUE_OR_BOTH = 0;
|
public static final int DISC_NAMING_UNIQUE_OR_BOTH = 0;
|
||||||
public static final int DISC_NAMING_UNIQUE_OR_IDS = 1;
|
public static final int DISC_NAMING_UNIQUE_OR_IDS = 1;
|
||||||
public static final int DISC_NAMING_ALWAYS_BOTH = 2;
|
public static final int DISC_NAMING_ALWAYS_BOTH = 2;
|
||||||
public static final int DISC_NAMING_ALWAYS_IDS = 3;
|
public static final int DISC_NAMING_ALWAYS_IDS = 3;
|
||||||
public static final int DISC_NAMING_DEFAULT = DISC_NAMING_UNIQUE_OR_BOTH;
|
public static final int DISC_NAMING_DEFAULT = DISC_NAMING_UNIQUE_OR_BOTH;
|
||||||
|
|
||||||
/** Property key used for string list display mode for multi-configuration edits (conjunction/disjunction) */
|
/** Property key used for string list display mode for multi-configuration edits (conjunction/disjunction) */
|
||||||
public static final String KEY_DMODE = "properties.multi.displ.mode"; //$NON-NLS-1$
|
public static final String KEY_DMODE = "properties.multi.displ.mode"; //$NON-NLS-1$
|
||||||
/** Conjunction implies showing only common elements (intersection) */
|
/** Conjunction implies showing only common elements (intersection) */
|
||||||
public static final int DMODE_CONJUNCTION = 1;
|
public static final int DMODE_CONJUNCTION = 1;
|
||||||
/** Disjunction implies showing all elements (union) */
|
/** Disjunction implies showing all elements (union) */
|
||||||
public static final int DMODE_DISJUNCTION = 2;
|
public static final int DMODE_DISJUNCTION = 2;
|
||||||
|
|
||||||
/** Property key used for string list write mode for multi-configuration edits (modify/replace) */
|
/** Property key used for string list write mode for multi-configuration edits (modify/replace) */
|
||||||
public static final String KEY_WMODE = "properties.multi.write.mode"; //$NON-NLS-1$
|
public static final String KEY_WMODE = "properties.multi.write.mode"; //$NON-NLS-1$
|
||||||
/** Modify implies changing only given elements and not changing any others */
|
/** Modify implies changing only given elements and not changing any others */
|
||||||
public static final int WMODE_MODIFY = 4;
|
public static final int WMODE_MODIFY = 4;
|
||||||
/** Replace implies replacing the whole list with the given one, overwriting old entries */
|
/** Replace implies replacing the whole list with the given one, overwriting old entries */
|
||||||
public static final int WMODE_REPLACE = 8;
|
public static final int WMODE_REPLACE = 8;
|
||||||
|
|
||||||
public static final String NULL = "NULL"; //$NON-NLS-1$
|
public static final String NULL = "NULL"; //$NON-NLS-1$
|
||||||
private static final IPreferenceStore pref = CUIPlugin.getDefault().getPreferenceStore();
|
private static final IPreferenceStore pref = CUIPlugin.getDefault().getPreferenceStore();
|
||||||
private static final String DELIMITER = " "; //$NON-NLS-1$
|
private static final String DELIMITER = " "; //$NON-NLS-1$
|
||||||
public static final String CONFSETDEL = "\f"; //$NON-NLS-1$
|
public static final String CONFSETDEL = "\f"; //$NON-NLS-1$
|
||||||
private static LinkedList<String> preferredTCs = null;
|
private static LinkedList<String> preferredTCs = null;
|
||||||
|
|
||||||
public static final Object[] EMPTY_ARRAY = new Object[0];
|
public static final Object[] EMPTY_ARRAY = new Object[0];
|
||||||
|
|
||||||
// low-level methods
|
// low-level methods
|
||||||
|
@ -95,40 +97,40 @@ public class CDTPrefUtil {
|
||||||
preferredTCs = new LinkedList<String>(Arrays.asList(getStr(KEY_PREFTC).split(DELIMITER)));
|
preferredTCs = new LinkedList<String>(Arrays.asList(getStr(KEY_PREFTC).split(DELIMITER)));
|
||||||
}
|
}
|
||||||
public static List<String> getPreferredTCs() {
|
public static List<String> getPreferredTCs() {
|
||||||
if (preferredTCs == null) readPreferredTCs();
|
if (preferredTCs == null) readPreferredTCs();
|
||||||
return preferredTCs;
|
return preferredTCs;
|
||||||
}
|
}
|
||||||
public static void delPreferredTC(String s) {
|
public static void delPreferredTC(String s) {
|
||||||
if (preferredTCs == null) readPreferredTCs();
|
if (preferredTCs == null) readPreferredTCs();
|
||||||
preferredTCs.remove(s);
|
preferredTCs.remove(s);
|
||||||
}
|
}
|
||||||
public static void addPreferredTC(String s) {
|
public static void addPreferredTC(String s) {
|
||||||
if (preferredTCs == null) readPreferredTCs();
|
if (preferredTCs == null) readPreferredTCs();
|
||||||
if (!preferredTCs.contains(s)) preferredTCs.add(s);
|
if (!preferredTCs.contains(s)) preferredTCs.add(s);
|
||||||
}
|
}
|
||||||
public static void cleanPreferredTCs() {
|
public static void cleanPreferredTCs() {
|
||||||
setStr(KEY_PREFTC, IPreferenceStore.STRING_DEFAULT_DEFAULT);
|
setStr(KEY_PREFTC, IPreferenceStore.STRING_DEFAULT_DEFAULT);
|
||||||
readPreferredTCs();
|
readPreferredTCs();
|
||||||
}
|
}
|
||||||
public static void savePreferredTCs() {
|
public static void savePreferredTCs() {
|
||||||
if (preferredTCs == null) return;
|
if (preferredTCs == null) return;
|
||||||
Iterator<String> it = preferredTCs.iterator();
|
Iterator<String> it = preferredTCs.iterator();
|
||||||
StringBuilder b = new StringBuilder();
|
StringBuilder b = new StringBuilder();
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
String s = it.next();
|
String s = it.next();
|
||||||
if (s == null) continue;
|
if (s == null) continue;
|
||||||
b.append(s);
|
b.append(s);
|
||||||
b.append(DELIMITER);
|
b.append(DELIMITER);
|
||||||
}
|
}
|
||||||
setStr(KEY_PREFTC, b.toString().trim());
|
setStr(KEY_PREFTC, b.toString().trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns string list display mode for multi-configuration edits (conjunction/disjunction).
|
* Returns string list display mode for multi-configuration edits (conjunction/disjunction).
|
||||||
*
|
*
|
||||||
* @return the mode which can be either {@link CDTPrefUtil#DMODE_CONJUNCTION} (default value)
|
* @return the mode which can be either {@link CDTPrefUtil#DMODE_CONJUNCTION} (default value)
|
||||||
* or else {@link CDTPrefUtil#DMODE_DISJUNCTION}.
|
* or else {@link CDTPrefUtil#DMODE_DISJUNCTION}.
|
||||||
*
|
*
|
||||||
* @since 5.3
|
* @since 5.3
|
||||||
*/
|
*/
|
||||||
public static int getMultiCfgStringListDisplayMode() {
|
public static int getMultiCfgStringListDisplayMode() {
|
||||||
|
@ -138,25 +140,25 @@ public class CDTPrefUtil {
|
||||||
}
|
}
|
||||||
return mode;
|
return mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets string list display mode for multi-configuration edits (conjunction/disjunction).
|
* Sets string list display mode for multi-configuration edits (conjunction/disjunction).
|
||||||
*
|
*
|
||||||
* @param mode must be either {@link CDTPrefUtil#DMODE_CONJUNCTION}
|
* @param mode must be either {@link CDTPrefUtil#DMODE_CONJUNCTION}
|
||||||
* or {@link CDTPrefUtil#DMODE_DISJUNCTION}.
|
* or {@link CDTPrefUtil#DMODE_DISJUNCTION}.
|
||||||
*
|
*
|
||||||
* @since 5.3
|
* @since 5.3
|
||||||
*/
|
*/
|
||||||
public static void setMultiCfgStringListDisplayMode(int mode) {
|
public static void setMultiCfgStringListDisplayMode(int mode) {
|
||||||
setInt(KEY_DMODE, mode);
|
setInt(KEY_DMODE, mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns string list write mode for multi-configuration edits (modify/replace).
|
* Returns string list write mode for multi-configuration edits (modify/replace).
|
||||||
*
|
*
|
||||||
* @return the mode which can be either {@link CDTPrefUtil#WMODE_MODIFY} (default value)
|
* @return the mode which can be either {@link CDTPrefUtil#WMODE_MODIFY} (default value)
|
||||||
* or else {@link CDTPrefUtil#WMODE_REPLACE}.
|
* or else {@link CDTPrefUtil#WMODE_REPLACE}.
|
||||||
*
|
*
|
||||||
* @since 5.3
|
* @since 5.3
|
||||||
*/
|
*/
|
||||||
public static int getMultiCfgStringListWriteMode() {
|
public static int getMultiCfgStringListWriteMode() {
|
||||||
|
@ -166,19 +168,19 @@ public class CDTPrefUtil {
|
||||||
}
|
}
|
||||||
return mode;
|
return mode;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets string list write mode for multi-configuration edits (modify/replace).
|
* Sets string list write mode for multi-configuration edits (modify/replace).
|
||||||
*
|
*
|
||||||
* @param mode must be either {@link CDTPrefUtil#WMODE_MODIFY}
|
* @param mode must be either {@link CDTPrefUtil#WMODE_MODIFY}
|
||||||
* or {@link CDTPrefUtil#WMODE_REPLACE}.
|
* or {@link CDTPrefUtil#WMODE_REPLACE}.
|
||||||
*
|
*
|
||||||
* @since 5.3
|
* @since 5.3
|
||||||
*/
|
*/
|
||||||
public static void setMultiCfgStringListWriteMode(int mode) {
|
public static void setMultiCfgStringListWriteMode(int mode) {
|
||||||
setInt(KEY_WMODE, mode);
|
setInt(KEY_WMODE, mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated as of CDT 8.0. Use {@link StringListModeControl} to display string list modes.
|
* @deprecated as of CDT 8.0. Use {@link StringListModeControl} to display string list modes.
|
||||||
*/
|
*/
|
||||||
|
@ -187,15 +189,15 @@ public class CDTPrefUtil {
|
||||||
String s = null;
|
String s = null;
|
||||||
switch(getMultiCfgStringListDisplayMode()) {
|
switch(getMultiCfgStringListDisplayMode()) {
|
||||||
case DMODE_CONJUNCTION:
|
case DMODE_CONJUNCTION:
|
||||||
s = Messages.EnvironmentTab_17;
|
s = Messages.EnvironmentTab_17;
|
||||||
break;
|
break;
|
||||||
case DMODE_DISJUNCTION:
|
case DMODE_DISJUNCTION:
|
||||||
s = Messages.EnvironmentTab_18;
|
s = Messages.EnvironmentTab_18;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return Messages.EnvironmentTab_19 + s;
|
return Messages.EnvironmentTab_19 + s;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated as of CDT 8.0. Use {@link StringListModeControl} to display string list modes.
|
* @deprecated as of CDT 8.0. Use {@link StringListModeControl} to display string list modes.
|
||||||
*/
|
*/
|
||||||
|
@ -204,15 +206,15 @@ public class CDTPrefUtil {
|
||||||
String s = null;
|
String s = null;
|
||||||
switch(getMultiCfgStringListWriteMode()) {
|
switch(getMultiCfgStringListWriteMode()) {
|
||||||
case WMODE_MODIFY:
|
case WMODE_MODIFY:
|
||||||
s = Messages.EnvironmentTab_24;
|
s = Messages.EnvironmentTab_24;
|
||||||
break;
|
break;
|
||||||
case WMODE_REPLACE:
|
case WMODE_REPLACE:
|
||||||
s = Messages.EnvironmentTab_21;
|
s = Messages.EnvironmentTab_21;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return Messages.EnvironmentTab_22 + s;
|
return Messages.EnvironmentTab_22 + s;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Toggle string list display mode: conjunction <-> disjunction.
|
* Toggle string list display mode: conjunction <-> disjunction.
|
||||||
*/
|
*/
|
||||||
|
@ -242,21 +244,21 @@ public class CDTPrefUtil {
|
||||||
public static final String[] getStrListForDisplay(String[][] input) {
|
public static final String[] getStrListForDisplay(String[][] input) {
|
||||||
return getStrListForDisplay(input, getMultiCfgStringListDisplayMode());
|
return getStrListForDisplay(input, getMultiCfgStringListDisplayMode());
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String[] getStrListForDisplay(String[][] input, int mode) {
|
private static final String[] getStrListForDisplay(String[][] input, int mode) {
|
||||||
Object[] ob = getListForDisplay(input, getMultiCfgStringListDisplayMode(), null);
|
Object[] ob = getListForDisplay(input, getMultiCfgStringListDisplayMode(), null);
|
||||||
String[] ss = new String[ob.length];
|
String[] ss = new String[ob.length];
|
||||||
System.arraycopy(ob, 0, ss, 0, ob.length);
|
System.arraycopy(ob, 0, ss, 0, ob.length);
|
||||||
return ss;
|
return ss;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Object[] getListForDisplay(Object[][] input, Comparator<Object> cmp) {
|
public static final Object[] getListForDisplay(Object[][] input, Comparator<Object> cmp) {
|
||||||
return getListForDisplay(input, getMultiCfgStringListDisplayMode(), cmp);
|
return getListForDisplay(input, getMultiCfgStringListDisplayMode(), cmp);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Utility method forms string list
|
* Utility method forms string list
|
||||||
* according to current list display mode
|
* according to current list display mode
|
||||||
*
|
*
|
||||||
* @param input - array of string arrays
|
* @param input - array of string arrays
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -270,11 +272,11 @@ public class CDTPrefUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
Object[] s1 = input[0];
|
Object[] s1 = input[0];
|
||||||
if (s1 == null ||
|
if (s1 == null ||
|
||||||
s1.length == 0)
|
s1.length == 0)
|
||||||
return EMPTY_ARRAY;
|
return EMPTY_ARRAY;
|
||||||
if (getMultiCfgStringListDisplayMode() == DMODE_CONJUNCTION)
|
if (getMultiCfgStringListDisplayMode() == DMODE_CONJUNCTION)
|
||||||
{
|
{
|
||||||
ArrayList<Object> lst = new ArrayList<Object>();
|
ArrayList<Object> lst = new ArrayList<Object>();
|
||||||
for (int i=0; i<s1.length; i++) {
|
for (int i=0; i<s1.length; i++) {
|
||||||
if (s1[i] == null)
|
if (s1[i] == null)
|
||||||
|
@ -309,7 +311,7 @@ public class CDTPrefUtil {
|
||||||
Arrays.sort(s1, cmp);
|
Arrays.sort(s1, cmp);
|
||||||
return s1;
|
return s1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated Use the {@link WorkingSetConfigurationManager} class, instead.
|
* @deprecated Use the {@link WorkingSetConfigurationManager} class, instead.
|
||||||
*/
|
*/
|
||||||
|
@ -317,15 +319,15 @@ public class CDTPrefUtil {
|
||||||
public static List<String> readConfigSets() {
|
public static List<String> readConfigSets() {
|
||||||
return new LinkedList<String>(Arrays.asList(getStr(KEY_CONFSET).split(CONFSETDEL)));
|
return new LinkedList<String>(Arrays.asList(getStr(KEY_CONFSET).split(CONFSETDEL)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated Use the {@link WorkingSetConfigurationManager} class, instead.
|
* @deprecated Use the {@link WorkingSetConfigurationManager} class, instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static void saveConfigSets(List<String> out) {
|
public static void saveConfigSets(List<String> out) {
|
||||||
StringBuilder b = new StringBuilder();
|
StringBuilder b = new StringBuilder();
|
||||||
for (String s : out) {
|
for (String s : out) {
|
||||||
if (s == null) continue;
|
if (s == null) continue;
|
||||||
b.append(s);
|
b.append(s);
|
||||||
b.append(CONFSETDEL);
|
b.append(CONFSETDEL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -497,6 +497,10 @@ import org.eclipse.cdt.internal.ui.newui.Messages;
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AG FIXME - remove before CDT Juno release.
|
||||||
|
* @since 5.4
|
||||||
|
*/
|
||||||
public boolean isTryingNewSD() {
|
public boolean isTryingNewSD() {
|
||||||
return checkBoxTryNewSD.getSelection();
|
return checkBoxTryNewSD.getSelection();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue