1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-25 18:05:33 +02:00

2004-05-18 Alain Magloire

Remove warnings and compatibility plugin
	to be full Eclipse-3.0 compliant.
This commit is contained in:
Alain Magloire 2004-05-18 16:06:30 +00:00
parent 8fea90aff6
commit b458ecd917
6 changed files with 25 additions and 20 deletions

View file

@ -15,7 +15,7 @@
<requires>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.cdt.core"/>
<import plugin="org.eclipse.core.runtime.compatibility"/>
<import plugin="org.eclipse.core.runtime"/>
</requires>

View file

@ -35,18 +35,19 @@ import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IPluginDescriptor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Preferences;
import org.eclipse.core.runtime.Status;
import org.osgi.framework.BundleContext;
/**
* The main plugin class to be used in the desktop.
*/
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$
private MakeTargetManager fTargetManager;
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.
*/
public MakeCorePlugin(IPluginDescriptor descriptor) {
super(descriptor);
public MakeCorePlugin() {
super();
plugin = this;
}
@ -95,9 +96,9 @@ public class MakeCorePlugin extends Plugin {
// If the default instance is not yet initialized,
// return a static identifier. This identifier must
// 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() {
@ -173,12 +174,15 @@ public class MakeCorePlugin extends Plugin {
//return PosixMakefile(file.getLocation);
}
public void shutdown() throws CoreException {
if ( fTargetManager != null) {
fTargetManager.shutdown();
fTargetManager = null;
public void stop(BundleContext context) throws Exception {
try {
if ( 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) {
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) {
IExtension[] extensions = extension.getExtensions();
for (int i = 0; i < extensions.length; i++) {
@ -243,7 +247,7 @@ public class MakeCorePlugin extends Plugin {
if (commandId == null || commandId.length() == 0) {
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) {
IExtension[] extensions = extension.getExtensions();
List parserIds = new ArrayList(extensions.length);
@ -268,7 +272,7 @@ public class MakeCorePlugin extends Plugin {
*/
public IScannerInfoConsoleParser getScannerInfoConsoleParser(String parserId) {
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) {
IExtension[] extensions = extension.getExtensions();
for (int i = 0; i < extensions.length; i++) {
@ -290,8 +294,8 @@ public class MakeCorePlugin extends Plugin {
/* (non-Javadoc)
* @see org.eclipse.core.runtime.Plugin#startup()
*/
public void startup() throws CoreException {
super.startup();
public void start(BundleContext context) throws Exception {
super.start(context);
//Set debug tracing options
configurePluginDebugOptions();

View file

@ -84,7 +84,7 @@ public class BuildInfoFactory {
protected String getBuildParameter(String name) {
IExtension extension =
Platform.getPluginRegistry().getExtension(
Platform.getExtensionRegistry().getExtension(
ResourcesPlugin.PI_RESOURCES,
ResourcesPlugin.PT_BUILDERS,
getBuilderID());

View file

@ -40,6 +40,7 @@ import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
public class MakeTargetManager implements IMakeTargetManager, IResourceChangeListener {
@ -278,7 +279,7 @@ public class MakeTargetManager implements IMakeTargetManager, IResourceChangeLis
protected void initializeBuilders() {
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();
for (int i = 0; i < ext.length; i++) {
IConfigurationElement[] element = ext[i].getConfigurationElements();

View file

@ -211,7 +211,7 @@ public class ScannerConfigInfoFactory {
protected String getESIProviderParameter(String name) {
IExtension extension =
Platform.getPluginRegistry().getExtension(
Platform.getExtensionRegistry().getExtension(
MakeCorePlugin.getUniqueIdentifier(),
MakeCorePlugin.EXTERNAL_SI_PROVIDER_SIMPLE_ID,
// TODO VMIR make this configurable

View file

@ -81,7 +81,7 @@ public class CygpathTranslator {
catch (IOException e) {
}
if (launcher.waitAndRead(output, output) != CommandLauncher.OK) {
String errMsg = launcher.getErrorMessage();
//String errMsg = launcher.getErrorMessage();
}
else
return output.toString().trim();