mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Bug 274184 Deprecate public ICDescriptor related methods.
Equivalent functionality exists as part of ICConfigurationDescription (obtained from the ICProjectDescription). ICDescriptor storage modules are stored in _every_ configuration in a project so use should be discouraged.
This commit is contained in:
parent
afa454ec63
commit
b25aa7413b
8 changed files with 45 additions and 4 deletions
|
@ -610,7 +610,7 @@ public class CCorePlugin extends Plugin {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated use getCProjetDescription(IProject project, boolean create)
|
||||
* @deprecated use {@link #getProjectDescription(IProject, boolean)} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public ICDescriptor getCProjectDescription(IProject project) throws CoreException {
|
||||
|
@ -618,14 +618,19 @@ public class CCorePlugin extends Plugin {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the ICDescriptor for the given project, if <b>create</b> is <b>true</b> then a descriptor will be created
|
||||
* if one does not exist.
|
||||
*
|
||||
* Please use {@link #getProjectDescription(IProject, boolean)} to fetch the
|
||||
* ICProjectDescription for the project. And use {@link ICProjectDescription#getConfigurations()}
|
||||
* to get an array of ICConfigurationDescriptions, which have similar API to ICDescriptor,
|
||||
* allowing you to store settings and configure extensions at the Configuration level
|
||||
* rather than at the project level.
|
||||
*
|
||||
* @param project
|
||||
* @param create
|
||||
* @return ICDescriptor or <b>null</b> if <b>create</b> is <b>false</b> and no .cdtproject file exists on disk.
|
||||
* @throws CoreException
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public ICDescriptor getCProjectDescription(IProject project, boolean create) throws CoreException {
|
||||
return fNewCProjectDescriptionManager.getDescriptorManager().getDescriptor(project, create);
|
||||
}
|
||||
|
@ -642,6 +647,16 @@ public class CCorePlugin extends Plugin {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Settings should be set per ICConfigurationDescription rather than
|
||||
* global to the project. Please use {@link #getProjectDescription(IProject, boolean)}
|
||||
* to fetch the ICProjectDescription for the project. And use
|
||||
* {@link ICProjectDescription#getConfigurations()} to get an array of
|
||||
* ICConfigurationDescriptions, which have similar API to ICDescriptor,
|
||||
* allowing you to store settings and configure extensions at the Configuration level
|
||||
* rather than at the project level.
|
||||
*/
|
||||
@Deprecated
|
||||
public ICDescriptorManager getCDescriptorManager() {
|
||||
return fNewCProjectDescriptionManager.getDescriptorManager();
|
||||
}
|
||||
|
|
|
@ -12,10 +12,15 @@ package org.eclipse.cdt.core;
|
|||
|
||||
import java.util.EventObject;
|
||||
|
||||
import org.eclipse.cdt.core.settings.model.CProjectDescriptionEvent;
|
||||
import org.eclipse.cdt.core.settings.model.ICProjectDescriptionListener;
|
||||
|
||||
/**
|
||||
* @noextend This class is not intended to be subclassed by clients.
|
||||
* @noinstantiate This class is not intended to be instantiated by clients.
|
||||
* @deprecated register {@link ICProjectDescriptionListener} for {@link CProjectDescriptionEvent}
|
||||
*/
|
||||
@Deprecated
|
||||
public class CDescriptorEvent extends EventObject {
|
||||
|
||||
/**
|
||||
|
|
|
@ -30,7 +30,11 @@ import org.w3c.dom.Element;
|
|||
*
|
||||
* @noextend This interface is not intended to be extended by clients.
|
||||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
* @deprecated as this API is not configuration aware. Replaced by
|
||||
* {@link ICConfigurationDescription} which can be fetched with
|
||||
* {@link ICProjectDescription#getConfigurations()}
|
||||
*/
|
||||
@Deprecated
|
||||
public interface ICDescriptor {
|
||||
public ICOwnerInfo getProjectOwner();
|
||||
public String getPlatform();
|
||||
|
|
|
@ -10,6 +10,13 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core;
|
||||
|
||||
import org.eclipse.cdt.core.settings.model.CProjectDescriptionEvent;
|
||||
import org.eclipse.cdt.core.settings.model.ICProjectDescriptionListener;
|
||||
|
||||
/**
|
||||
* @deprecated register {@link ICProjectDescriptionListener} for {@link CProjectDescriptionEvent}
|
||||
*/
|
||||
@Deprecated
|
||||
public interface ICDescriptorListener {
|
||||
public void descriptorChanged(CDescriptorEvent event);
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
package org.eclipse.cdt.core;
|
||||
|
||||
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
|
@ -19,7 +20,9 @@ import org.eclipse.core.runtime.IProgressMonitor;
|
|||
/**
|
||||
* @noextend This interface is not intended to be extended by clients.
|
||||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
* @deprecated replace with {@link ICProjectDescriptionManager} & {@link ICProjectDescription}
|
||||
*/
|
||||
@Deprecated
|
||||
public interface ICDescriptorManager {
|
||||
|
||||
public void configure(IProject project, String id) throws CoreException;
|
||||
|
|
|
@ -18,7 +18,9 @@ import org.eclipse.core.runtime.IProgressMonitor;
|
|||
/**
|
||||
* @noextend This interface is not intended to be extended by clients.
|
||||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public interface ICDescriptorOperation {
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
package org.eclipse.cdt.core;
|
||||
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigExtensionReference;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IConfigurationElement;
|
||||
|
||||
|
@ -27,7 +28,9 @@ import org.eclipse.core.runtime.IConfigurationElement;
|
|||
*
|
||||
* @noextend This interface is not intended to be extended by clients.
|
||||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
* @deprecated replaced with {@link ICConfigExtensionReference} obtained from an {@link ICConfigurationDescription}
|
||||
*/
|
||||
@Deprecated
|
||||
public interface ICExtensionReference {
|
||||
|
||||
/**
|
||||
|
|
|
@ -15,7 +15,9 @@ import org.eclipse.core.runtime.CoreException;
|
|||
/**
|
||||
* @noextend This interface is not intended to be extended by clients.
|
||||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public interface ICOwner {
|
||||
public void configure(ICDescriptor cproject) throws CoreException;
|
||||
public void update(ICDescriptor cproject, String extensionID) throws CoreException;
|
||||
|
|
Loading…
Add table
Reference in a new issue