1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 06:02:11 +02:00

Fix API tooling problems and first pass and cleanup of the Executables view sources. Does not yet include all changes from the patch in bug 265796

This commit is contained in:
Ken Ryall 2009-02-25 15:24:14 +00:00
parent a1d528d6c7
commit 412ba1852c
25 changed files with 263 additions and 171 deletions

View file

@ -20,9 +20,15 @@
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
<buildCommand>
<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec> </buildSpec>
<natures> <natures>
<nature>org.eclipse.jdt.core.javanature</nature> <nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature> <nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
</natures> </natures>
</projectDescription> </projectDescription>

View file

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2 Bundle-ManifestVersion: 2
Bundle-Name: %pluginName Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.debug.core; singleton:=true Bundle-SymbolicName: org.eclipse.cdt.debug.core; singleton:=true
Bundle-Version: 5.0.100.qualifier Bundle-Version: 6.0.0.qualifier
Bundle-Activator: org.eclipse.cdt.debug.core.CDebugCorePlugin Bundle-Activator: org.eclipse.cdt.debug.core.CDebugCorePlugin
Bundle-Vendor: %providerName Bundle-Vendor: %providerName
Bundle-Localization: plugin Bundle-Localization: plugin
@ -18,7 +18,7 @@ Export-Package: org.eclipse.cdt.debug.core,
org.eclipse.cdt.debug.core.sourcelookup, org.eclipse.cdt.debug.core.sourcelookup,
org.eclipse.cdt.debug.internal.core, org.eclipse.cdt.debug.internal.core,
org.eclipse.cdt.debug.internal.core.breakpoints, org.eclipse.cdt.debug.internal.core.breakpoints,
org.eclipse.cdt.debug.internal.core.model, org.eclipse.cdt.debug.internal.core.model;x-internal:=true,
org.eclipse.cdt.debug.internal.core.sourcelookup org.eclipse.cdt.debug.internal.core.sourcelookup
Require-Bundle: org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)", Require-Bundle: org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
org.eclipse.debug.core;bundle-version="[3.2.0,4.0.0)", org.eclipse.debug.core;bundle-version="[3.2.0,4.0.0)",

View file

@ -26,6 +26,7 @@ package org.eclipse.cdt.debug.core.cdi.model;
* <li>{@link ICDIStackFrame} * <li>{@link ICDIStackFrame}
* <li>{@link ICDIThread} * <li>{@link ICDIThread}
* </ul> * </ul>
* @since 6.0
*/ */
public interface ICDIDisposable { public interface ICDIDisposable {
/** /**

View file

@ -16,6 +16,7 @@ import org.eclipse.cdt.debug.core.cdi.ICDILocation;
/** /**
* Provides the ability to perform a jump without changing the run state of a thread or debug target. * Provides the ability to perform a jump without changing the run state of a thread or debug target.
* @since 6.0
*/ */
public interface ICDIExecuteMoveInstructionPointer { public interface ICDIExecuteMoveInstructionPointer {

View file

@ -16,6 +16,7 @@ import org.eclipse.cdt.debug.core.cdi.ICDILocation;
/** /**
* Provides the ability to resume a thread or debug target. * Provides the ability to resume a thread or debug target.
* @since 6.0
*/ */
public interface ICDIExecuteResume { public interface ICDIExecuteResume {

View file

@ -16,7 +16,7 @@ package org.eclipse.cdt.debug.core.cdi.model.type;
* *
* Represents the value of a variable. * Represents the value of a variable.
* *
* @since Nov 18, 2008 * @since Nov 6.0 , 2008
*/ */
public interface ICDIBigIntegerValue extends ICDIIntegralValue { public interface ICDIBigIntegerValue extends ICDIIntegralValue {

View file

@ -20,6 +20,11 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import org.eclipse.cdt.debug.core.CDebugCorePlugin; import org.eclipse.cdt.debug.core.CDebugCorePlugin;
import org.eclipse.cdt.debug.internal.core.executables.ExecutablesChangeEvent;
import org.eclipse.cdt.debug.internal.core.executables.StandardExecutableImporter;
import org.eclipse.cdt.debug.internal.core.executables.StandardExecutableProvider;
import org.eclipse.cdt.debug.internal.core.executables.StandardSourceFileRemapping;
import org.eclipse.cdt.debug.internal.core.executables.StandardSourceFilesProvider;
import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.IStatus;
@ -101,10 +106,16 @@ public class ExecutablesManager extends PlatformObject {
executableProviders.add(provider); executableProviders.add(provider);
} }
/**
* @since 6.0
*/
public void addSourceFilesProvider(ISourceFilesProvider provider) { public void addSourceFilesProvider(ISourceFilesProvider provider) {
sourceFileProviders.add(provider); sourceFileProviders.add(provider);
} }
/**
* @since 6.0
*/
public void removeSourceFilesProvider(ISourceFilesProvider provider) { public void removeSourceFilesProvider(ISourceFilesProvider provider) {
sourceFileProviders.remove(provider); sourceFileProviders.remove(provider);
} }
@ -178,6 +189,9 @@ public class ExecutablesManager extends PlatformObject {
} }
} }
/**
* @since 6.0
*/
public String remapSourceFile(Executable executable, String filePath) { public String remapSourceFile(Executable executable, String filePath) {
synchronized (sourceFileRemappings) { synchronized (sourceFileRemappings) {
for (ISourceFileRemapping remapping : sourceFileRemappings) { for (ISourceFileRemapping remapping : sourceFileRemappings) {
@ -231,6 +245,9 @@ public class ExecutablesManager extends PlatformObject {
return executableProviders.toArray(new IExecutableProvider[executableProviders.size()]); return executableProviders.toArray(new IExecutableProvider[executableProviders.size()]);
} }
/**
* @since 6.0
*/
public ISourceFilesProvider[] getSourceFileProviders() { public ISourceFilesProvider[] getSourceFileProviders() {
return sourceFileProviders.toArray(new ISourceFilesProvider[sourceFileProviders.size()]); return sourceFileProviders.toArray(new ISourceFilesProvider[sourceFileProviders.size()]);
} }
@ -254,6 +271,9 @@ public class ExecutablesManager extends PlatformObject {
} }
} }
/**
* @since 6.0
*/
public String[] getSourceFiles(final Executable executable, public String[] getSourceFiles(final Executable executable,
IProgressMonitor monitor) { IProgressMonitor monitor) {
String[] result = new String[0]; String[] result = new String[0];
@ -284,6 +304,9 @@ public class ExecutablesManager extends PlatformObject {
return result; return result;
} }
/**
* @since 6.0
*/
public IStatus removeExecutables(Executable[] executables, IProgressMonitor monitor) { public IStatus removeExecutables(Executable[] executables, IProgressMonitor monitor) {
IExecutableProvider[] exeProviders = getExecutableProviders(); IExecutableProvider[] exeProviders = getExecutableProviders();
@ -326,6 +349,9 @@ public class ExecutablesManager extends PlatformObject {
return result; return result;
} }
/**
* @since 6.0
*/
public void setRefreshNeeded(boolean refresh) { public void setRefreshNeeded(boolean refresh) {
refreshNeeded = true; refreshNeeded = true;
} }

View file

@ -14,9 +14,18 @@ import org.eclipse.core.runtime.IProgressMonitor;
public interface IExecutableImporter { public interface IExecutableImporter {
static int LOW_PRIORITY = 25; /**
static int NORMAL_PRIORITY = 50; * @since 6.0
static int HIGH_PRIORITY = 75; */
public static final int LOW_PRIORITY = 25;
/**
* @since 6.0
*/
public static final int NORMAL_PRIORITY = 50;
/**
* @since 6.0
*/
public static final int HIGH_PRIORITY = 75;
/** /**
* Gets the priority to be used when importing these executables. * Gets the priority to be used when importing these executables.
@ -26,9 +35,13 @@ public interface IExecutableImporter {
* *
* @param executable * @param executable
* @return the priority level to be used for this ISourceFilesProvider * @return the priority level to be used for this ISourceFilesProvider
* @since 6.0
*/ */
int getPriority(String[] fileNames); int getPriority(String[] fileNames);
/**
* @since 6.0
*/
public abstract boolean importExecutables(String[] fileNames, IProgressMonitor monitor); public abstract boolean importExecutables(String[] fileNames, IProgressMonitor monitor);
} }

View file

@ -22,9 +22,18 @@ import org.eclipse.core.runtime.IStatus;
*/ */
public interface IExecutableProvider { public interface IExecutableProvider {
static int LOW_PRIORITY = 25; /**
static int NORMAL_PRIORITY = 50; * @since 6.0
static int HIGH_PRIORITY = 75; */
public static final int LOW_PRIORITY = 25;
/**
* @since 6.0
*/
public static final int NORMAL_PRIORITY = 50;
/**
* @since 6.0
*/
public static final int HIGH_PRIORITY = 75;
/** /**
* Gets the priority to be used when providing a list of executables. * Gets the priority to be used when providing a list of executables.
@ -33,11 +42,18 @@ public interface IExecutableProvider {
* *
* @param executable * @param executable
* @return the priority level to be used for this ISourceFilesProvider * @return the priority level to be used for this ISourceFilesProvider
* @since 6.0
*/ */
int getPriority(); int getPriority();
/**
* @since 6.0
*/
Executable[] getExecutables(IProgressMonitor monitor); Executable[] getExecutables(IProgressMonitor monitor);
/**
* @since 6.0
*/
IStatus removeExecutable(Executable executable, IProgressMonitor monitor); IStatus removeExecutable(Executable executable, IProgressMonitor monitor);
} }

View file

@ -11,9 +11,16 @@
package org.eclipse.cdt.debug.core.executables; package org.eclipse.cdt.debug.core.executables;
public interface IExecutablesChangeEvent { public interface IExecutablesChangeEvent {
/**
* @since 6.0
*/
public Executable[] getCurrentExecutables(); public Executable[] getCurrentExecutables();
/**
* @since 6.0
*/
public Executable[] getPreviousExecutables(); public Executable[] getPreviousExecutables();
} }

View file

@ -10,6 +10,7 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.debug.core.executables; package org.eclipse.cdt.debug.core.executables;
/** /**
* ISourceFileRemapping is used by the Executables Manager when finding missing * ISourceFileRemapping is used by the Executables Manager when finding missing
* source files. * source files.
@ -19,6 +20,9 @@ package org.eclipse.cdt.debug.core.executables;
*/ */
public interface ISourceFileRemapping { public interface ISourceFileRemapping {
/**
* @since 6.0
*/
String remapSourceFile(Executable executable, String filePath); String remapSourceFile(Executable executable, String filePath);
} }

View file

@ -16,14 +16,15 @@ import org.eclipse.core.runtime.IProgressMonitor;
* ISourceFileProvider supplies a list of source files used by a given Executable. * ISourceFileProvider supplies a list of source files used by a given Executable.
* *
* @author Ken Ryall * @author Ken Ryall
* @since 6.0
* *
*/ */
public interface ISourceFilesProvider { public interface ISourceFilesProvider {
static int LOW_PRIORITY = 25; public static final int LOW_PRIORITY = 25;
static int NORMAL_PRIORITY = 50; public static final int NORMAL_PRIORITY = 50;
static int HIGH_PRIORITY = 75; public static final int HIGH_PRIORITY = 75;
/** /**
* Gets the priority to be used for this executable. * Gets the priority to be used for this executable.

View file

@ -15,6 +15,7 @@ import org.eclipse.debug.core.DebugException;
/** /**
* Provides the ability to move the instruction pointer of a debug target to the given address. * Provides the ability to move the instruction pointer of a debug target to the given address.
* @since 6.0
*/ */
public interface IMoveToAddress { public interface IMoveToAddress {

View file

@ -14,6 +14,7 @@ import org.eclipse.debug.core.DebugException;
/** /**
* Provides the ability to move the instruction pointer of a debug target to the given line. * Provides the ability to move the instruction pointer of a debug target to the given line.
* @since 6.0
*/ */
public interface IMoveToLine { public interface IMoveToLine {

View file

@ -15,6 +15,7 @@ import org.eclipse.debug.core.DebugException;
/** /**
* Provides the ability to resume a debug target at the given address. * Provides the ability to resume a debug target at the given address.
* @since 6.0
*/ */
public interface IResumeAtAddress { public interface IResumeAtAddress {

View file

@ -15,6 +15,7 @@ import org.eclipse.debug.core.DebugException;
/** /**
* Provides the ability to resume a debug target at the given line. * Provides the ability to resume a debug target at the given line.
* @since 6.0
*/ */
public interface IResumeAtLine { public interface IResumeAtLine {

View file

@ -8,8 +8,10 @@
* Contributors: * Contributors:
* Nokia - Initial API and implementation * Nokia - Initial API and implementation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.debug.core.executables; package org.eclipse.cdt.debug.internal.core.executables;
import org.eclipse.cdt.debug.core.executables.Executable;
import org.eclipse.cdt.debug.core.executables.IExecutablesChangeEvent;
import org.eclipse.core.runtime.PlatformObject; import org.eclipse.core.runtime.PlatformObject;
public class ExecutablesChangeEvent extends PlatformObject implements IExecutablesChangeEvent { public class ExecutablesChangeEvent extends PlatformObject implements IExecutablesChangeEvent {

View file

@ -8,7 +8,7 @@
* Contributors: * Contributors:
* Nokia - Initial API and implementation * Nokia - Initial API and implementation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.debug.core.executables; package org.eclipse.cdt.debug.internal.core.executables;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
@ -21,6 +21,9 @@ import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.core.settings.model.ICConfigExtensionReference; import org.eclipse.cdt.core.settings.model.ICConfigExtensionReference;
import org.eclipse.cdt.core.settings.model.ICProjectDescription; import org.eclipse.cdt.core.settings.model.ICProjectDescription;
import org.eclipse.cdt.debug.core.CDebugCorePlugin; import org.eclipse.cdt.debug.core.CDebugCorePlugin;
import org.eclipse.cdt.debug.core.executables.Executable;
import org.eclipse.cdt.debug.core.executables.ExecutablesManager;
import org.eclipse.cdt.debug.core.executables.IExecutableImporter;
import org.eclipse.core.filesystem.EFS; import org.eclipse.core.filesystem.EFS;
import org.eclipse.core.filesystem.IFileStore; import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IContainer;

View file

@ -9,7 +9,7 @@
* Nokia - Initial API and implementation * Nokia - Initial API and implementation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.debug.core.executables; package org.eclipse.cdt.debug.internal.core.executables;
import java.util.ArrayList; import java.util.ArrayList;
@ -21,6 +21,9 @@ import org.eclipse.cdt.core.settings.model.CProjectDescriptionEvent;
import org.eclipse.cdt.core.settings.model.ICProjectDescription; import org.eclipse.cdt.core.settings.model.ICProjectDescription;
import org.eclipse.cdt.core.settings.model.ICProjectDescriptionListener; import org.eclipse.cdt.core.settings.model.ICProjectDescriptionListener;
import org.eclipse.cdt.debug.core.CDebugCorePlugin; import org.eclipse.cdt.debug.core.CDebugCorePlugin;
import org.eclipse.cdt.debug.core.executables.Executable;
import org.eclipse.cdt.debug.core.executables.ExecutablesManager;
import org.eclipse.cdt.debug.core.executables.IExecutableProvider;
import org.eclipse.cdt.internal.core.model.CModelManager; import org.eclipse.cdt.internal.core.model.CModelManager;
import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResource;

View file

@ -9,9 +9,11 @@
* Nokia - Initial API and implementation * Nokia - Initial API and implementation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.debug.core.executables; package org.eclipse.cdt.debug.internal.core.executables;
import org.eclipse.cdt.debug.core.CDebugCorePlugin; import org.eclipse.cdt.debug.core.CDebugCorePlugin;
import org.eclipse.cdt.debug.core.executables.Executable;
import org.eclipse.cdt.debug.core.executables.ISourceFileRemapping;
import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocator; import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocator;
import org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceLookupDirector; import org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceLookupDirector;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;

View file

@ -1,4 +1,4 @@
package org.eclipse.cdt.debug.core.executables; package org.eclipse.cdt.debug.internal.core.executables;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
@ -8,6 +8,8 @@ import java.io.InputStream;
import org.eclipse.cdt.core.IBinaryParser; import org.eclipse.cdt.core.IBinaryParser;
import org.eclipse.cdt.core.ISymbolReader; import org.eclipse.cdt.core.ISymbolReader;
import org.eclipse.cdt.core.IBinaryParser.IBinaryFile; import org.eclipse.cdt.core.IBinaryParser.IBinaryFile;
import org.eclipse.cdt.debug.core.executables.Executable;
import org.eclipse.cdt.debug.core.executables.ISourceFilesProvider;
import org.eclipse.cdt.internal.core.model.BinaryParserConfig; import org.eclipse.cdt.internal.core.model.BinaryParserConfig;
import org.eclipse.cdt.internal.core.model.CModelManager; import org.eclipse.cdt.internal.core.model.CModelManager;
import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFile;

View file

@ -18,7 +18,7 @@ Export-Package: org.eclipse.cdt.debug.mi.core,
org.eclipse.cdt.debug.mi.core.command.factories.win32, org.eclipse.cdt.debug.mi.core.command.factories.win32,
org.eclipse.cdt.debug.mi.core.event, org.eclipse.cdt.debug.mi.core.event,
org.eclipse.cdt.debug.mi.core.output org.eclipse.cdt.debug.mi.core.output
Require-Bundle: org.eclipse.cdt.debug.core;bundle-version="[5.0.0,6.0.0)", Require-Bundle: org.eclipse.cdt.debug.core;bundle-version="[6.0.0,7.0.0)",
org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)", org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
org.eclipse.debug.core;bundle-version="[3.2.0,4.0.0)", org.eclipse.debug.core;bundle-version="[3.2.0,4.0.0)",
org.eclipse.cdt.core;bundle-version="[5.0.0,6.0.0)", org.eclipse.cdt.core;bundle-version="[5.0.0,6.0.0)",

View file

@ -16,7 +16,7 @@ Require-Bundle: org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
org.eclipse.ui;bundle-version="[3.2.0,4.0.0)", org.eclipse.ui;bundle-version="[3.2.0,4.0.0)",
org.eclipse.cdt.debug.mi.core;bundle-version="[5.0.0,6.0.0)", org.eclipse.cdt.debug.mi.core;bundle-version="[5.0.0,6.0.0)",
org.eclipse.cdt.debug.ui;bundle-version="[5.0.0,6.0.0)", org.eclipse.cdt.debug.ui;bundle-version="[5.0.0,6.0.0)",
org.eclipse.cdt.debug.core;bundle-version="[5.0.0,6.0.0)", org.eclipse.cdt.debug.core;bundle-version="[6.0.0,7.0.0)",
org.eclipse.cdt.core;bundle-version="[5.0.0,6.0.0)", org.eclipse.cdt.core;bundle-version="[5.0.0,6.0.0)",
org.eclipse.cdt.ui;bundle-version="[5.0.0,6.0.0)", org.eclipse.cdt.ui;bundle-version="[5.0.0,6.0.0)",
org.eclipse.debug.core;bundle-version="[3.2.0,4.0.0)", org.eclipse.debug.core;bundle-version="[3.2.0,4.0.0)",

View file

@ -33,7 +33,7 @@ Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.2.0,4.0.0)",
org.eclipse.ui;bundle-version="[3.2.0,4.0.0)", org.eclipse.ui;bundle-version="[3.2.0,4.0.0)",
org.eclipse.debug.ui;bundle-version="[3.3.100,4.0.0)", org.eclipse.debug.ui;bundle-version="[3.3.100,4.0.0)",
org.eclipse.debug.core;bundle-version="[3.4.0,4.0.0)", org.eclipse.debug.core;bundle-version="[3.4.0,4.0.0)",
org.eclipse.cdt.debug.core;bundle-version="[5.0.0,6.0.0)", org.eclipse.cdt.debug.core;bundle-version="[6.0.0,7.0.0)",
org.eclipse.cdt.ui;bundle-version="[5.0.0,6.0.0)", org.eclipse.cdt.ui;bundle-version="[5.0.0,6.0.0)",
org.eclipse.cdt.core;bundle-version="[5.0.0,6.0.0)", org.eclipse.cdt.core;bundle-version="[5.0.0,6.0.0)",
org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)", org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",

View file

@ -18,7 +18,7 @@ Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.2.0,4.0.0)",
org.eclipse.ui;bundle-version="[3.2.0,4.0.0)", org.eclipse.ui;bundle-version="[3.2.0,4.0.0)",
org.eclipse.cdt.core;bundle-version="[5.0.0,6.0.0)", org.eclipse.cdt.core;bundle-version="[5.0.0,6.0.0)",
org.eclipse.cdt.ui;bundle-version="[5.0.0,6.0.0)", org.eclipse.cdt.ui;bundle-version="[5.0.0,6.0.0)",
org.eclipse.cdt.debug.core;bundle-version="[5.0.0,6.0.0)", org.eclipse.cdt.debug.core;bundle-version="[6.0.0,7.0.0)",
org.eclipse.cdt.debug.ui;bundle-version="[5.0.0,6.0.0)", org.eclipse.cdt.debug.ui;bundle-version="[5.0.0,6.0.0)",
org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)", org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
org.eclipse.core.variables;bundle-version="[3.1.100,4.0.0)" org.eclipse.core.variables;bundle-version="[3.1.100,4.0.0)"