mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-09 09:15:38 +02:00
2004-05-18 Alain Magloire
Remove warnings and compatibility plugin to be full Eclipse-3.0 compliant.
This commit is contained in:
parent
8fea90aff6
commit
b458ecd917
6 changed files with 25 additions and 20 deletions
|
@ -15,7 +15,7 @@
|
||||||
<requires>
|
<requires>
|
||||||
<import plugin="org.eclipse.core.resources"/>
|
<import plugin="org.eclipse.core.resources"/>
|
||||||
<import plugin="org.eclipse.cdt.core"/>
|
<import plugin="org.eclipse.cdt.core"/>
|
||||||
<import plugin="org.eclipse.core.runtime.compatibility"/>
|
<import plugin="org.eclipse.core.runtime"/>
|
||||||
</requires>
|
</requires>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -35,18 +35,19 @@ import org.eclipse.core.runtime.IConfigurationElement;
|
||||||
import org.eclipse.core.runtime.IExtension;
|
import org.eclipse.core.runtime.IExtension;
|
||||||
import org.eclipse.core.runtime.IExtensionPoint;
|
import org.eclipse.core.runtime.IExtensionPoint;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
import org.eclipse.core.runtime.IPluginDescriptor;
|
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.core.runtime.Path;
|
import org.eclipse.core.runtime.Path;
|
||||||
import org.eclipse.core.runtime.Platform;
|
import org.eclipse.core.runtime.Platform;
|
||||||
import org.eclipse.core.runtime.Plugin;
|
import org.eclipse.core.runtime.Plugin;
|
||||||
import org.eclipse.core.runtime.Preferences;
|
import org.eclipse.core.runtime.Preferences;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
|
import org.osgi.framework.BundleContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The main plugin class to be used in the desktop.
|
* The main plugin class to be used in the desktop.
|
||||||
*/
|
*/
|
||||||
public class MakeCorePlugin extends Plugin {
|
public class MakeCorePlugin extends Plugin {
|
||||||
|
public static final String PLUGIN_ID = "org.eclipse.cdt.make.core"; //$NON-NLS-1$
|
||||||
public static final String MAKE_PROJECT_ID = MakeCorePlugin.getUniqueIdentifier() + ".make"; //$NON-NLS-1$
|
public static final String MAKE_PROJECT_ID = MakeCorePlugin.getUniqueIdentifier() + ".make"; //$NON-NLS-1$
|
||||||
private MakeTargetManager fTargetManager;
|
private MakeTargetManager fTargetManager;
|
||||||
public static final String OLD_BUILDER_ID = "org.eclipse.cdt.core.cbuilder"; //$NON-NLS-1$
|
public static final String OLD_BUILDER_ID = "org.eclipse.cdt.core.cbuilder"; //$NON-NLS-1$
|
||||||
|
@ -63,8 +64,8 @@ public class MakeCorePlugin extends Plugin {
|
||||||
/**
|
/**
|
||||||
* The constructor.
|
* The constructor.
|
||||||
*/
|
*/
|
||||||
public MakeCorePlugin(IPluginDescriptor descriptor) {
|
public MakeCorePlugin() {
|
||||||
super(descriptor);
|
super();
|
||||||
plugin = this;
|
plugin = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,9 +96,9 @@ public class MakeCorePlugin extends Plugin {
|
||||||
// If the default instance is not yet initialized,
|
// If the default instance is not yet initialized,
|
||||||
// return a static identifier. This identifier must
|
// return a static identifier. This identifier must
|
||||||
// match the plugin id defined in plugin.xml
|
// match the plugin id defined in plugin.xml
|
||||||
return "org.eclipse.cdt.make.core"; //$NON-NLS-1$
|
return PLUGIN_ID;
|
||||||
}
|
}
|
||||||
return getDefault().getDescriptor().getUniqueIdentifier();
|
return getDefault().getBundle().getSymbolicName();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void initializeDefaultPluginPreferences() {
|
protected void initializeDefaultPluginPreferences() {
|
||||||
|
@ -173,12 +174,15 @@ public class MakeCorePlugin extends Plugin {
|
||||||
//return PosixMakefile(file.getLocation);
|
//return PosixMakefile(file.getLocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void shutdown() throws CoreException {
|
public void stop(BundleContext context) throws Exception {
|
||||||
if ( fTargetManager != null) {
|
try {
|
||||||
fTargetManager.shutdown();
|
if ( fTargetManager != null) {
|
||||||
fTargetManager = null;
|
fTargetManager.shutdown();
|
||||||
|
fTargetManager = null;
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
super.stop(context);
|
||||||
}
|
}
|
||||||
super.shutdown();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -210,7 +214,7 @@ public class MakeCorePlugin extends Plugin {
|
||||||
*/
|
*/
|
||||||
public IExternalScannerInfoProvider getExternalScannerInfoProvider(String id) {
|
public IExternalScannerInfoProvider getExternalScannerInfoProvider(String id) {
|
||||||
try {
|
try {
|
||||||
IExtensionPoint extension = getDescriptor().getExtensionPoint(EXTERNAL_SI_PROVIDER_SIMPLE_ID);
|
IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(PLUGIN_ID, EXTERNAL_SI_PROVIDER_SIMPLE_ID);
|
||||||
if (extension != null) {
|
if (extension != null) {
|
||||||
IExtension[] extensions = extension.getExtensions();
|
IExtension[] extensions = extension.getExtensions();
|
||||||
for (int i = 0; i < extensions.length; i++) {
|
for (int i = 0; i < extensions.length; i++) {
|
||||||
|
@ -243,7 +247,7 @@ public class MakeCorePlugin extends Plugin {
|
||||||
if (commandId == null || commandId.length() == 0) {
|
if (commandId == null || commandId.length() == 0) {
|
||||||
commandId = "all"; //$NON-NLS-1$
|
commandId = "all"; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
IExtensionPoint extension = getDescriptor().getExtensionPoint(SI_CONSOLE_PARSER_SIMPLE_ID);
|
IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(PLUGIN_ID, SI_CONSOLE_PARSER_SIMPLE_ID);
|
||||||
if (extension != null) {
|
if (extension != null) {
|
||||||
IExtension[] extensions = extension.getExtensions();
|
IExtension[] extensions = extension.getExtensions();
|
||||||
List parserIds = new ArrayList(extensions.length);
|
List parserIds = new ArrayList(extensions.length);
|
||||||
|
@ -268,7 +272,7 @@ public class MakeCorePlugin extends Plugin {
|
||||||
*/
|
*/
|
||||||
public IScannerInfoConsoleParser getScannerInfoConsoleParser(String parserId) {
|
public IScannerInfoConsoleParser getScannerInfoConsoleParser(String parserId) {
|
||||||
try {
|
try {
|
||||||
IExtensionPoint extension = getDescriptor().getExtensionPoint(SI_CONSOLE_PARSER_SIMPLE_ID);
|
IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(PLUGIN_ID, SI_CONSOLE_PARSER_SIMPLE_ID);
|
||||||
if (extension != null) {
|
if (extension != null) {
|
||||||
IExtension[] extensions = extension.getExtensions();
|
IExtension[] extensions = extension.getExtensions();
|
||||||
for (int i = 0; i < extensions.length; i++) {
|
for (int i = 0; i < extensions.length; i++) {
|
||||||
|
@ -290,8 +294,8 @@ public class MakeCorePlugin extends Plugin {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.core.runtime.Plugin#startup()
|
* @see org.eclipse.core.runtime.Plugin#startup()
|
||||||
*/
|
*/
|
||||||
public void startup() throws CoreException {
|
public void start(BundleContext context) throws Exception {
|
||||||
super.startup();
|
super.start(context);
|
||||||
|
|
||||||
//Set debug tracing options
|
//Set debug tracing options
|
||||||
configurePluginDebugOptions();
|
configurePluginDebugOptions();
|
||||||
|
|
|
@ -84,7 +84,7 @@ public class BuildInfoFactory {
|
||||||
|
|
||||||
protected String getBuildParameter(String name) {
|
protected String getBuildParameter(String name) {
|
||||||
IExtension extension =
|
IExtension extension =
|
||||||
Platform.getPluginRegistry().getExtension(
|
Platform.getExtensionRegistry().getExtension(
|
||||||
ResourcesPlugin.PI_RESOURCES,
|
ResourcesPlugin.PI_RESOURCES,
|
||||||
ResourcesPlugin.PT_BUILDERS,
|
ResourcesPlugin.PT_BUILDERS,
|
||||||
getBuilderID());
|
getBuilderID());
|
||||||
|
|
|
@ -40,6 +40,7 @@ import org.eclipse.core.runtime.IExtension;
|
||||||
import org.eclipse.core.runtime.IExtensionPoint;
|
import org.eclipse.core.runtime.IExtensionPoint;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
|
import org.eclipse.core.runtime.Platform;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
|
|
||||||
public class MakeTargetManager implements IMakeTargetManager, IResourceChangeListener {
|
public class MakeTargetManager implements IMakeTargetManager, IResourceChangeListener {
|
||||||
|
@ -278,7 +279,7 @@ public class MakeTargetManager implements IMakeTargetManager, IResourceChangeLis
|
||||||
|
|
||||||
protected void initializeBuilders() {
|
protected void initializeBuilders() {
|
||||||
builderMap = new HashMap();
|
builderMap = new HashMap();
|
||||||
IExtensionPoint point = MakeCorePlugin.getDefault().getDescriptor().getExtensionPoint(MakeTargetManager.TARGET_BUILD_EXT);
|
IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(MakeCorePlugin.PLUGIN_ID, MakeTargetManager.TARGET_BUILD_EXT);
|
||||||
IExtension[] ext = point.getExtensions();
|
IExtension[] ext = point.getExtensions();
|
||||||
for (int i = 0; i < ext.length; i++) {
|
for (int i = 0; i < ext.length; i++) {
|
||||||
IConfigurationElement[] element = ext[i].getConfigurationElements();
|
IConfigurationElement[] element = ext[i].getConfigurationElements();
|
||||||
|
|
|
@ -211,7 +211,7 @@ public class ScannerConfigInfoFactory {
|
||||||
|
|
||||||
protected String getESIProviderParameter(String name) {
|
protected String getESIProviderParameter(String name) {
|
||||||
IExtension extension =
|
IExtension extension =
|
||||||
Platform.getPluginRegistry().getExtension(
|
Platform.getExtensionRegistry().getExtension(
|
||||||
MakeCorePlugin.getUniqueIdentifier(),
|
MakeCorePlugin.getUniqueIdentifier(),
|
||||||
MakeCorePlugin.EXTERNAL_SI_PROVIDER_SIMPLE_ID,
|
MakeCorePlugin.EXTERNAL_SI_PROVIDER_SIMPLE_ID,
|
||||||
// TODO VMIR make this configurable
|
// TODO VMIR make this configurable
|
||||||
|
|
|
@ -81,7 +81,7 @@ public class CygpathTranslator {
|
||||||
catch (IOException e) {
|
catch (IOException e) {
|
||||||
}
|
}
|
||||||
if (launcher.waitAndRead(output, output) != CommandLauncher.OK) {
|
if (launcher.waitAndRead(output, output) != CommandLauncher.OK) {
|
||||||
String errMsg = launcher.getErrorMessage();
|
//String errMsg = launcher.getErrorMessage();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return output.toString().trim();
|
return output.toString().trim();
|
||||||
|
|
Loading…
Add table
Reference in a new issue