1
0
Fork 0
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:
Andrew Gvozdev 2011-12-17 11:18:35 -05:00
parent 2559c118ec
commit cec50f2b6e
34 changed files with 632 additions and 516 deletions

View file

@ -40,6 +40,8 @@ import org.eclipse.core.runtime.jobs.Job;
*
* Note: IErrorParser interface is used here to work around {@link ConsoleOutputSniffer} having
* no access from CDT core to build packages. TODO - elaborate?
*
* @since 7.2
*/
public abstract class AbstractBuildCommandParser extends AbstractLanguageSettingsOutputScanner
implements ICConsoleParser, IErrorParser {

View file

@ -67,6 +67,9 @@ import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.core.runtime.jobs.Job;
import org.w3c.dom.Element;
/**
* @since 7.2
*/
public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSettingsOutputScanner implements ICListenerAgent {
public static final Object JOB_FAMILY_BUILTIN_SPECS_DETECTOR = "org.eclipse.cdt.make.core.scannerconfig.AbstractBuiltinSpecsDetector";

View file

@ -54,6 +54,9 @@ import org.eclipse.core.runtime.content.IContentType;
import org.eclipse.core.runtime.content.IContentTypeManager;
import org.w3c.dom.Element;
/**
* @since 7.2
*/
public abstract class AbstractLanguageSettingsOutputScanner extends LanguageSettingsSerializableProvider {
protected static final String ATTR_EXPAND_RELATIVE_PATHS = "expand-relative-paths"; //$NON-NLS-1$

View file

@ -46,6 +46,7 @@ public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesCont
// Schema element names
public static final String CONFIGURATION_ELEMENT_NAME = "configuration"; //$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 EXTENSION = "artifactExtension"; //$NON-NLS-1$
public static final String PARENT = "parent"; //$NON-NLS-1$
@ -171,6 +172,7 @@ public interface IConfiguration extends IBuildObject, IBuildObjectPropertiesCont
*/
public String[] getErrorParserList();
/** @since 8.1 */
public String getDefaultLanguageSettingsProvidersIds();
/**

View file

@ -53,6 +53,7 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
// The attribute name for the scanner info collector
public static final String SCANNER_CONFIG_PROFILE_ID = "scannerConfigDiscoveryProfileId"; //$NON-NLS-1$
/** @since 8.1 */
public static final String LANGUAGE_SETTINGS_PROVIDERS = "languageSettingsProviders";
/**
@ -267,6 +268,8 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
* Returns the default language settings providers IDs.
*
* @return the default language settings providers IDs separated by semicolon or {@code null} if none.
*
* @since 8.1
*/
public String getDefaultLanguageSettingsProvidersIds();

View file

@ -21,6 +21,9 @@ import org.eclipse.cdt.managedbuilder.core.IToolChain;
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
/**
* @since 8.1
*/
public abstract class ToolchainBuiltinSpecsDetector extends AbstractBuiltinSpecsDetector {
private Map<String, ITool> toolMap = new HashMap<String, ITool>();
/**

View file

@ -94,6 +94,7 @@ public class MBSWizardHandler extends CWizardHandler {
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";
/** @since 8.1 */
public static final String MBS_LANGUAGE_SETTINGS_PROVIDER = "org.eclipse.cdt.managedbuilder.core.LanguageSettingsProvider";
private static final String LANGUAGE_SETTINGS_PROVIDER_DELIMITER = ";";
@ -885,6 +886,9 @@ public class MBSWizardHandler extends CWizardHandler {
return "";
}
/**
* @since 8.1
*/
public static List<ILanguageSettingsProvider> getLanguageSettingsProviders(IConfiguration cfg) {
List<ILanguageSettingsProvider> providers = new ArrayList<ILanguageSettingsProvider>();

View file

@ -233,6 +233,10 @@ public class NewMakeProjFromExistingPage extends WizardPage {
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() {
return checkBoxTryNewSD.getSelection();
}

View 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>

View file

@ -25,6 +25,8 @@ import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
* Implementers are to create a specific listener and register it to
* appropriate event manager in {@link #registerListener(ICConfigurationDescription)}
* then unregister and dispose in {@link #unregisterListener()}.
*
* @since 5.4
*/
public interface ICListenerAgent {
/**

View file

@ -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
* with {@link ILanguageSettingsChangeEvent}.
*
* @since 5.4
*/
public interface ILanguageSettingsBroadcastingProvider extends ILanguageSettingsProvider {
@Override

View file

@ -28,6 +28,8 @@ import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
*
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
*
* @since 5.4
*/
public interface ILanguageSettingsChangeEvent {
/**

View file

@ -17,6 +17,8 @@ import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
*
* @see LanguageSettingsManager#registerLanguageSettingsChangeListener(ILanguageSettingsChangeListener)
* @see LanguageSettingsManager#unregisterLanguageSettingsChangeListener(ILanguageSettingsChangeListener)
*
* @since 5.4
*/
public interface ILanguageSettingsChangeListener {
/**

View file

@ -22,6 +22,8 @@ import org.eclipse.core.resources.IResource;
* contrary to some subclasses of {@link LanguageSettingsSerializableProvider} managing
* their settings themselves and not providing such option to the user.
*
* @since 5.4
*
*/
public interface ILanguageSettingsEditableProvider extends ILanguageSettingsBroadcastingProvider, Cloneable {
@Override

View file

@ -39,6 +39,8 @@ import org.eclipse.core.resources.IResource;
* plugins {@code AbstractBuildCommandParser} and {@code AbstractBuiltinSpecsDetector} which
* serve as a base for output parsers and built-in compiler language settings detectors.
* See also extension point schema description LanguageSettingsProvider.exsd.
*
* @since 5.4
*/
public interface ILanguageSettingsProvider {
/**

View file

@ -18,6 +18,8 @@ import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
* Providers.
* @see ILanguageSettingsProvider
*
* @since 5.4
*
*/
public interface ILanguageSettingsProvidersKeeper {
/**

View file

@ -29,6 +29,8 @@ import org.eclipse.core.resources.IResource;
*
* This implementation supports "static" list of entries for languages specified in
* the extension point.
*
* @since 5.4
*/
public class LanguageSettingsBaseProvider extends AbstractExecutableExtensionBase implements ILanguageSettingsProvider {
/** Language scope, i.e. list of languages the entries will be provided for. */

View file

@ -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
* 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}.
*
* @since 5.4
*/
final public class LanguageSettingsGenericProvider extends LanguageSettingsSerializableProvider
implements ILanguageSettingsEditableProvider {

View file

@ -34,6 +34,8 @@ import org.eclipse.core.runtime.IPath;
/**
* A collection of utility methods to manage language settings providers.
* See {@link ILanguageSettingsProvider}.
*
* @since 5.4
*/
public class LanguageSettingsManager {
/**

View file

@ -38,6 +38,8 @@ import org.w3c.dom.NodeList;
* design. Implement {@link ILanguageSettingsEditableProvider} interface for that.
* For more on the suggested way of extending this class see the description of
* {@link ILanguageSettingsProvider}.
*
* @since 5.4
*/
public class LanguageSettingsSerializableProvider extends LanguageSettingsBaseProvider implements ILanguageSettingsBroadcastingProvider {
protected static final String ATTR_ID = LanguageSettingsProvidersSerializer.ATTR_ID;

View file

@ -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}.
*
* @since 5.4
*/
public class LanguageSettingsStorage implements Cloneable {
/** Storage to keep settings entries. */

View file

@ -29,6 +29,8 @@ import org.osgi.service.prefs.Preferences;
*
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*
* @since 5.4
*/
public class ScannerDiscoveryLegacySupport {
/** Name of MBS language settings provider (from org.eclipse.cdt.managedbuilder.core) */

View file

@ -36,7 +36,9 @@ public abstract class ACExclusionFilterEntry extends ACPathEntry implements ICEx
this.exclusionPatterns = exclusionPatterns != null ? (IPath[])exclusionPatterns.clone() : new IPath[0];
}
/** @since 5.3 */
/**
* @since 5.4
*/
@Override
public final boolean isFile() {
return false;

View file

@ -68,7 +68,7 @@ public abstract class ACPathEntry extends ACSettingEntry implements ICPathEntry
}
/**
* @since 5.3
* @since 5.4
*/
public abstract boolean isFile();

View file

@ -10,7 +10,10 @@
*******************************************************************************/
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 {
/*
* delta kinds
@ -49,6 +52,7 @@ public interface ICDescriptionDelta {
// int PATH = 1 << 3;
int LANGUAGE_ID = 1 << 4;
int SOURCE_CONTENT_TYPE = 1 << 5;
/** @since 5.4 */
int SOURCE_EXTENSIONS = 1 << 6;
/** @deprecated Use ICDescriptionDelta.SOURCE_EXTENSIONS */
@Deprecated
@ -69,6 +73,7 @@ public interface ICDescriptionDelta {
int OWNER = 1 << 20;
int INDEX_CFG = 1 << 21;
int SETTING_CFG = INDEX_CFG;
/** @since 5.4 */
int LANGUAGE_SETTINGS_PROVIDERS = 1 << 22;
/**

View file

@ -12,6 +12,10 @@ package org.eclipse.cdt.core.settings.model;
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 {
/**
* Flag {@code BUILTIN} indicates settings built in a tool (compiler) itself.
@ -50,14 +54,15 @@ public interface ICSettingEntry {
* Flag {@code UNDEFINED} indicates that the entry should not be defined.
* It's main purpose to provide the means to negate entries defined elsewhere.
*
* @since 6.0
* @since 5.4
*/
int UNDEFINED = 1 << 5;
/**
* 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.
* .
*
* @since 5.4
*/
int FRAMEWORKS_MAC = 1 << 6;

View file

@ -297,6 +297,9 @@ public class LanguageSettingEntriesSerializer {
return buf.toString();
}
/**
* @since 5.4
*/
public static int composeFlags(String flagsString){
if(flagsString == null || flagsString.length() == 0)
return 0;

View file

@ -15,6 +15,8 @@ package org.eclipse.cdt.core;
* Helper abstract class serving as a base for creating a frame of executable class
* defined as an extension in plugin.xml.
*
* @since 5.4
*
*/
public abstract class AbstractExecutableExtensionBase {
private String fId;

View file

@ -529,6 +529,8 @@ public class CCorePlugin extends Plugin {
* </code>
*
* @return CDT console adapter.
*
* @since 5.4
*/
public IConsole getConsole(String extConsoleId, String contextId, String name, URL iconUrl) {
try {

View file

@ -19,6 +19,8 @@ import org.eclipse.core.runtime.CoreException;
* can be without configurations, in that case IProject should be passed
* to startup somehow. Perhaps another interface "IPConsoleParser" could
* be created when needed?
*
* @since 5.4
*/
public interface ICConsoleParser extends IConsoleParser {
public void startup(ICConfigurationDescription cfgDescription) throws CoreException;

View file

@ -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_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$
/** @since 5.4 */
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_LIBRARY_FOLDER= "icons/obj16/fldr_lib_obj.gif"; // $NON-NLS-1$ //$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$
// Language Settings Images
/** @since 5.4 */
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$
/** @since 5.4 */
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$
/** @since 5.4 */
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$
/** @since 5.4 */
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$
/** @since 5.4 */
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$
/** @since 5.4 */
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$
/** @since 5.4 */
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$
/**

View file

@ -94,6 +94,7 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
public static final String EDIT_STR = Messages.FileListControl_edit;
public static final String MOVEUP_STR = Messages.FileListControl_moveup;
public static final String MOVEDOWN_STR = Messages.FileListControl_movedown;
/** @since 5.4 */
public static final String PROJECTBUTTON_NAME = "Project...";
public static final String WORKSPACEBUTTON_NAME = Messages.FileListControl_button_workspace;
public static final String FILESYSTEMBUTTON_NAME = Messages.FileListControl_button_fs;
@ -454,9 +455,15 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
public static String getWorkspaceFileDialog(Shell shell, String text) {
return getWorkspaceDialog(shell, text, false, null);
}
/**
* @since 5.4
*/
public static String getProjectDirDialog(Shell shell, String text, IProject prj) {
return getWorkspaceDialog(shell, text, true, prj);
}
/**
* @since 5.4
*/
public static String getProjectFileDialog(Shell shell, String text, IProject prj) {
return getWorkspaceDialog(shell, text, false, prj);
}

View file

@ -33,12 +33,14 @@ import org.eclipse.cdt.internal.ui.workingsets.WorkingSetConfigurationManager;
public class CDTPrefUtil {
// boolean keys (KEY_NO-s are to be inverted !)
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_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_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_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$
/** @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$

View file

@ -497,6 +497,10 @@ import org.eclipse.cdt.internal.ui.newui.Messages;
return items;
}
/**
* AG FIXME - remove before CDT Juno release.
* @since 5.4
*/
public boolean isTryingNewSD() {
return checkBoxTryNewSD.getSelection();
}