1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Moved build-specific classes to managedbuilder (Warning: Incompatible

changes for existing workspaces)
This commit is contained in:
Andrew Gvozdev 2012-04-03 00:38:05 -04:00
parent e157e1a63e
commit cddee53cf1
37 changed files with 223 additions and 222 deletions

View file

@ -5,8 +5,7 @@ Bundle-SymbolicName: org.eclipse.cdt.make.core.tests;singleton:=true
Bundle-Version: 7.0.0.qualifier
Bundle-Activator: org.eclipse.cdt.make.core.tests.MakeTestsPlugin
Export-Package: org.eclipse.cdt.make.builder.tests,
org.eclipse.cdt.make.core.tests,
org.eclipse.cdt.make.language.settings.providers
org.eclipse.cdt.make.core.tests
Require-Bundle: org.eclipse.core.runtime,
org.junit,
org.eclipse.cdt.make.core,

View file

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
id="org.eclipse.cdt.make.core.tests.ErrorParsers"
name="org.eclipse.cdt.make.core.tests ErrorParsers"
point="org.eclipse.cdt.core.ErrorParser">
<errorparser
class="org.eclipse.cdt.make.core.language.settings.providers.GCCBuildCommandParser$GCCBuildCommandPatternHighlighter"
id="org.eclipse.cdt.core.tests.make.core.GCCBuildCommandPatternHighlighter"
name="Test Plugin GCC BOP Patterns Highlighter">
</errorparser>
</extension>
</plugin>

View file

@ -1,27 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010, 2011 Andrew Gvozdev and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Andrew Gvozdev - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.make.language.settings.providers;
import junit.framework.TestSuite;
public class AllLanguageSettingsProvidersMakeCoreTests extends TestSuite {
public static TestSuite suite() {
return new AllLanguageSettingsProvidersMakeCoreTests();
}
public AllLanguageSettingsProvidersMakeCoreTests() {
super(AllLanguageSettingsProvidersMakeCoreTests.class.getName());
addTestSuite(GCCBuildCommandParserTest.class);
addTestSuite(BuiltinSpecsDetectorTest.class);
}
}

View file

@ -7,7 +7,6 @@ Bundle-Activator: org.eclipse.cdt.make.core.MakeCorePlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Export-Package: org.eclipse.cdt.make.core,
org.eclipse.cdt.make.core.language.settings.providers,
org.eclipse.cdt.make.core.makefile,
org.eclipse.cdt.make.core.makefile.gnu,
org.eclipse.cdt.make.core.scannerconfig,

View file

@ -182,15 +182,5 @@
class="org.eclipse.cdt.make.internal.core.dataprovider.MakeConfigurationDataProvider"
/>
</extension>
<extension
point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider
class="org.eclipse.cdt.make.core.language.settings.providers.GCCBuildCommandParser"
id="org.eclipse.cdt.make.core.GCCBuildCommandParser"
name="CDT GCC Build Output Parser"
parameter="(gcc)|([gc]\+\+)"
prefer-non-shared="true">
</provider>
</extension>
</plugin>

View file

@ -35,8 +35,7 @@ Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.2.0,4.0.0)",
org.eclipse.debug.ui;bundle-version="[3.2.0,4.0.0)",
org.eclipse.ui.navigator;bundle-version="[3.2.0,4.0.0)";resolution:=optional,
org.eclipse.compare;bundle-version="[3.3.0,4.0.0)",
org.eclipse.core.filesystem;bundle-version="1.2.0",
org.eclipse.ui.console;bundle-version="3.5.100"
org.eclipse.core.filesystem;bundle-version="1.2.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: com.ibm.icu.text

Binary file not shown.

Before

Width:  |  Height:  |  Size: 347 B

View file

@ -44,9 +44,6 @@ PreferenceBuildSettings.name=Settings
ErrorParsersTab.name=Error Parsers
ErrorParsersTab.tooltip=Error Parsers scan build output and report errors in Problems view
LanguageSettingsProvidersTab.name=Discovery
LanguageSettingsProvidersTab.tooltip=Language settings providers
PreferenceMakeProject.name=New Make Projects
PreferenceMake.name=Make Targets
PreferenceMakefileEditor.name=Makefile Editor

View file

@ -470,14 +470,6 @@
tooltip="%ErrorParsersTab.tooltip"
weight="020">
</tab>
<tab
class="org.eclipse.cdt.internal.ui.language.settings.providers.LanguageSettingsProviderTab"
icon="icons/obj16/search.gif"
name="%LanguageSettingsProvidersTab.name"
parent="org.eclipse.cdt.make.internal.ui.preferences.BuildSettingsPreferencePage"
tooltip="%LanguageSettingsProvidersTab.tooltip"
weight="000">
</tab>
</extension>
<extension
@ -540,35 +532,4 @@
</description>
</fontDefinition>
</extension>
<extension
point="org.eclipse.cdt.ui.LanguageSettingsProviderAssociation">
<class-association
class="org.eclipse.cdt.make.core.language.settings.providers.AbstractBuildCommandParser"
icon="icons/obj16/log_obj.gif"
page="org.eclipse.cdt.make.internal.ui.language.settings.providers.GCCBuildCommandParserOptionPage"
ui-clear-entries="true"
ui-edit-entries="false">
</class-association>
<class-association
class="org.eclipse.cdt.make.core.language.settings.providers.AbstractBuiltinSpecsDetector"
icon="icons/obj16/inspect_system.gif"
page="org.eclipse.cdt.make.internal.ui.language.settings.providers.BuiltinSpecsDetectorOptionPage"
ui-clear-entries="true"
ui-edit-entries="false">
</class-association>
</extension>
<extension
point="org.eclipse.cdt.core.CBuildConsole">
<CBuildConsole
id="org.eclipse.cdt.make.internal.ui.scannerconfig.ScannerDiscoveryConsole"
class="org.eclipse.cdt.make.internal.ui.language.settings.providers.ScannerDiscoveryConsole">
</CBuildConsole>
</extension>
<extension
point="org.eclipse.cdt.core.CBuildConsole">
<CBuildConsole
id="org.eclipse.cdt.make.internal.ui.scannerconfig.ScannerDiscoveryGlobalConsole"
class="org.eclipse.cdt.make.internal.ui.language.settings.providers.ScannerDiscoveryGlobalConsole">
</CBuildConsole>
</extension>
</plugin>

View file

@ -9301,4 +9301,14 @@
</matchObject>
</conflictDefinition>
</extension>
<extension
id="org.eclipse.cdt.managedbuilder.core.tests.ErrorParsers"
name="org.eclipse.cdt.managedbuilder.core.tests ErrorParsers"
point="org.eclipse.cdt.core.ErrorParser">
<errorparser
class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser$GCCBuildCommandPatternHighlighter"
id="org.eclipse.cdt.core.tests.managedbuilder.core.GCCBuildCommandPatternHighlighter"
name="Test Plugin GCC BOP Patterns Highlighter">
</errorparser>
</extension>
</plugin>

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2010, 2011 Andrew Gvozdev and others.
* Copyright (c) 2010, 2012 Andrew Gvozdev and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -23,6 +23,8 @@ public class AllLanguageSettingsProvidersMBSTests extends TestSuite {
super(AllLanguageSettingsProvidersMBSTests.class.getName());
addTestSuite(LanguageSettingsProvidersMBSTest.class);
addTestSuite(GCCBuildCommandParserTest.class);
addTestSuite(BuiltinSpecsDetectorTest.class);
addTestSuite(GCCBuiltinSpecsDetectorTest.class);
}
}

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2010, 2011 Andrew Gvozdev and others.
* Copyright (c) 2010, 2012 Andrew Gvozdev and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -8,7 +8,7 @@
* Contributors:
* Andrew Gvozdev - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.make.language.settings.providers;
package org.eclipse.cdt.managedbuilder.language.settings.providers.tests;
import java.io.IOException;
import java.io.OutputStream;
@ -34,7 +34,7 @@ import org.eclipse.cdt.core.settings.model.ICSettingEntry;
import org.eclipse.cdt.core.testplugin.ResourceHelper;
import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
import org.eclipse.cdt.internal.core.XmlUtil;
import org.eclipse.cdt.make.core.language.settings.providers.AbstractBuiltinSpecsDetector;
import org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;

View file

@ -8,7 +8,7 @@
* Contributors:
* Andrew Gvozdev - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.make.language.settings.providers;
package org.eclipse.cdt.managedbuilder.language.settings.providers.tests;
import java.net.URI;
import java.util.ArrayList;
@ -38,8 +38,8 @@ import org.eclipse.cdt.core.testplugin.ResourceHelper;
import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
import org.eclipse.cdt.internal.core.XmlUtil;
import org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager;
import org.eclipse.cdt.make.core.language.settings.providers.AbstractBuildCommandParser;
import org.eclipse.cdt.make.core.language.settings.providers.GCCBuildCommandParser;
import org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuildCommandParser;
import org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
@ -56,7 +56,7 @@ import org.w3c.dom.Element;
public class GCCBuildCommandParserTest extends BaseTestCase {
// ID of the parser taken from the extension point
private static final String GCC_BUILD_COMMAND_PARSER_EXT = "org.eclipse.cdt.make.core.GCCBuildCommandParser"; //$NON-NLS-1$
private static final String GCC_BUILD_COMMAND_PARSER_EXT = "org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"; //$NON-NLS-1$
private static final String PROVIDER_ID = "provider.id";
private static final String PROVIDER_NAME = "provider name";

View file

@ -24,8 +24,8 @@ import org.eclipse.cdt.core.settings.model.ICProjectDescriptionManager;
import org.eclipse.cdt.core.settings.model.ICSettingEntry;
import org.eclipse.cdt.core.testplugin.ResourceHelper;
import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
import org.eclipse.cdt.managedbuilder.internal.language.settings.providers.GCCBuiltinSpecsDetector;
import org.eclipse.cdt.managedbuilder.internal.language.settings.providers.GCCBuiltinSpecsDetectorCygwin;
import org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;

View file

@ -606,7 +606,7 @@
name="CDT Managed Build Setting Entries">
</provider>
<provider
class="org.eclipse.cdt.managedbuilder.internal.language.settings.providers.GCCBuiltinSpecsDetector"
class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector"
id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector"
name="CDT GCC Builtin Compiler Settings"
parameter="${COMMAND} -E -P -v -dD ${INPUTS}">
@ -621,6 +621,13 @@
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
<provider
class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser"
id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"
name="CDT GCC Build Output Parser"
parameter="(gcc)|([gc]\+\+)"
prefer-non-shared="true">
</provider>
</extension>
<extension
id="scanner.discovery.problem"

View file

@ -50,7 +50,6 @@ import javax.xml.transform.stream.StreamResult;
import org.eclipse.cdt.core.AbstractCExtension;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.IConsoleParser;
import org.eclipse.cdt.core.language.settings.providers.ICBuildOutputParser;
import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsProvider;
import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsProvidersKeeper;
import org.eclipse.cdt.core.language.settings.providers.IWorkingDirectoryTracker;
@ -105,6 +104,7 @@ import org.eclipse.cdt.managedbuilder.internal.dataprovider.ConfigurationDataPro
import org.eclipse.cdt.managedbuilder.internal.envvar.EnvironmentVariableProvider;
import org.eclipse.cdt.managedbuilder.internal.macros.BuildMacroProvider;
import org.eclipse.cdt.managedbuilder.internal.tcmodification.ToolChainModificationManager;
import org.eclipse.cdt.managedbuilder.language.settings.providers.ICBuildOutputParser;
import org.eclipse.cdt.managedbuilder.macros.IBuildMacroProvider;
import org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator;
import org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator;

View file

@ -15,6 +15,7 @@ import java.lang.reflect.InvocationTargetException;
import java.util.Map;
import org.eclipse.cdt.build.internal.core.scannerconfig.CfgDiscoveredPathManager;
import org.eclipse.cdt.make.core.MakeCorePlugin;
import org.eclipse.cdt.managedbuilder.internal.buildmodel.BuildStateManager;
import org.eclipse.cdt.managedbuilder.internal.buildmodel.DbgUtil;
import org.eclipse.cdt.managedbuilder.internal.core.BuilderFactory;
@ -26,6 +27,7 @@ import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResourceChangeEvent;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
@ -283,12 +285,10 @@ public class ManagedBuilderCorePlugin extends Plugin {
ProjectConverter.convertOldStdMakeToNewStyle(project, monitor);
}
// public IDiscoveredPathManager getDiscoveryManager() {
// if ( fDiscoveryPathManager == null) {
// fDiscoveryPathManager = new DiscoveredPathManager();
// fDiscoveryPathManager.startup();
// }
// return fDiscoveryPathManager;
// }
/**
* @since 8.1
*/
public static IPath getWorkingDirectory() {
return MakeCorePlugin.getDefault().getStateLocation();
}
}

View file

@ -14,11 +14,12 @@ package org.eclipse.cdt.managedbuilder.internal.language.settings.providers;
import java.net.URI;
import java.net.URISyntaxException;
import org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector;
import org.eclipse.core.resources.IResource;
/**
* Class to detect built-in compiler settings.
* The paths are converted to cygwin "filesystem" representation.
* The paths are converted to cygwin "file-system" representation.
*
*/
public class GCCBuiltinSpecsDetectorCygwin extends GCCBuiltinSpecsDetector {

View file

@ -9,7 +9,7 @@
* Andrew Gvozdev - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.make.core.language.settings.providers;
package org.eclipse.cdt.managedbuilder.language.settings.providers;
import java.util.ArrayList;
import java.util.Arrays;
@ -26,7 +26,7 @@ import org.eclipse.cdt.core.errorparsers.RegexErrorParser;
import org.eclipse.cdt.core.errorparsers.RegexErrorPattern;
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsManager;
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
import org.eclipse.cdt.make.core.MakeCorePlugin;
import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
@ -42,10 +42,10 @@ import org.eclipse.core.runtime.jobs.Job;
* Abstract class for providers parsing compiler option from build command when it
* is present in build output.
*
* @since 7.2
* @since 8.1
*/
public abstract class AbstractBuildCommandParser extends AbstractLanguageSettingsOutputScanner {
public static final Object JOB_FAMILY_BUILD_COMMAND_PARSER = "org.eclipse.cdt.make.core.scannerconfig.AbstractBuildCommandParser";
public static final Object JOB_FAMILY_BUILD_COMMAND_PARSER = "org.eclipse.cdt.managedbuilder.AbstractBuildCommandParser"; //$NON-NLS-1$
private static final String ATTR_PARAMETER = "parameter"; //$NON-NLS-1$
private static final String LEADING_PATH_PATTERN = "\\S+[/\\\\]"; //$NON-NLS-1$
@ -205,7 +205,7 @@ public abstract class AbstractBuildCommandParser extends AbstractLanguageSetting
if (settingsFolder.isAccessible())
rule = currentProject.getFile(".settings/language.settings.xml");
} catch (CoreException e) {
MakeCorePlugin.log(e);
ManagedBuilderCorePlugin.log(e);
}
}
}

View file

@ -9,7 +9,7 @@
* Andrew Gvozdev - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.make.core.language.settings.providers;
package org.eclipse.cdt.managedbuilder.language.settings.providers;
import java.io.IOException;
import java.io.OutputStream;
@ -25,7 +25,6 @@ import org.eclipse.cdt.core.ICommandLauncher;
import org.eclipse.cdt.core.IConsoleParser;
import org.eclipse.cdt.core.IMarkerGenerator;
import org.eclipse.cdt.core.ProblemMarkerInfo;
import org.eclipse.cdt.core.language.settings.providers.ICBuildOutputParser;
import org.eclipse.cdt.core.language.settings.providers.ICListenerAgent;
import org.eclipse.cdt.core.language.settings.providers.IWorkingDirectoryTracker;
import org.eclipse.cdt.core.model.ILanguage;
@ -38,7 +37,7 @@ import org.eclipse.cdt.core.settings.model.ICProjectDescription;
import org.eclipse.cdt.internal.core.BuildRunnerHelper;
import org.eclipse.cdt.internal.core.XmlUtil;
import org.eclipse.cdt.internal.core.language.settings.providers.LanguageSettingsLogger;
import org.eclipse.cdt.make.core.MakeCorePlugin;
import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
import org.eclipse.cdt.utils.CommandLineUtil;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
@ -65,11 +64,11 @@ import org.w3c.dom.Element;
* Abstract parser capable to execute compiler command printing built-in compiler
* specs and parse built-in language settings out of it.
*
* @since 7.2
* @since 8.1
*/
public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSettingsOutputScanner implements ICListenerAgent {
// TODO - refine id after settling with the plugin
public static final String JOB_FAMILY_BUILTIN_SPECS_DETECTOR = "org.eclipse.cdt.make.core.scannerconfig.AbstractBuiltinSpecsDetector";
public static final String JOB_FAMILY_BUILTIN_SPECS_DETECTOR = "org.eclipse.cdt.managedbuilder.AbstractBuiltinSpecsDetector"; //$NON-NLS-1$
protected static final String COMPILER_MACRO = "${COMMAND}"; //$NON-NLS-1$
protected static final String SPEC_FILE_MACRO = "${INPUTS}"; //$NON-NLS-1$
@ -83,13 +82,12 @@ public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSetti
private static final int TICKS_OUTPUT_PARSING = 1 * MONITOR_SCALE;
private static final int TICKS_EXECUTE_COMMAND = 1 * MONITOR_SCALE;
private static final String CDT_MAKE_UI_PLUGIN_ID = "org.eclipse.cdt.make.ui"; //$NON-NLS-1$
private static final String CDT_MANAGEDBUILDER_UI_PLUGIN_ID = "org.eclipse.cdt.managedbuilder.ui"; //$NON-NLS-1$
private static final String DEFAULT_CONSOLE_ICON = "icons/obj16/inspect_system.gif"; //$NON-NLS-1$
private static final String GMAKE_ERROR_PARSER_ID = "org.eclipse.cdt.core.GmakeErrorParser"; //$NON-NLS-1$
private static final String ATTR_PARAMETER = "parameter"; //$NON-NLS-1$
private static final String ATTR_CONSOLE = "console"; //$NON-NLS-1$
private static final String NEWLINE = System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
protected URI mappedRootURI = null;
protected URI buildDirURI = null;
@ -139,7 +137,7 @@ public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSetti
}
}
} catch (CoreException e) {
return new Status(Status.ERROR, MakeCorePlugin.getUniqueIdentifier(), "Error checking markers.", e); //$NON-NLS-1$
return new Status(Status.ERROR, ManagedBuilderCorePlugin.PLUGIN_ID, "Error checking markers.", e); //$NON-NLS-1$
}
try {
@ -154,7 +152,7 @@ public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSetti
marker.setAttribute(IMarker.LOCATION, "Project Properties, C++ Preprocessor Include.../Providers, [" + providerName + "] options");
}
} catch (CoreException e) {
return new Status(Status.ERROR, MakeCorePlugin.getUniqueIdentifier(), "Error adding markers.", e); //$NON-NLS-1$
return new Status(Status.ERROR, ManagedBuilderCorePlugin.PLUGIN_ID, "Error adding markers.", e); //$NON-NLS-1$
}
return Status.OK_STATUS;
@ -175,7 +173,7 @@ public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSetti
}
}
} catch (CoreException e) {
MakeCorePlugin.log(new Status(Status.ERROR, MakeCorePlugin.getUniqueIdentifier(), "Error deleting markers.", e)); //$NON-NLS-1$
ManagedBuilderCorePlugin.log(new Status(Status.ERROR, ManagedBuilderCorePlugin.PLUGIN_ID, "Error deleting markers.", e)); //$NON-NLS-1$
}
}
@ -338,8 +336,8 @@ public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSetti
startup(currentCfgDescription, null);
status = runForEachLanguage(monitor);
} catch (CoreException e) {
MakeCorePlugin.log(e);
status = new Status(IStatus.ERROR, MakeCorePlugin.PLUGIN_ID, IStatus.ERROR, "Error running Builtin Specs Detector", e);
ManagedBuilderCorePlugin.log(e);
status = new Status(IStatus.ERROR, ManagedBuilderCorePlugin.PLUGIN_ID, IStatus.ERROR, "Error running Builtin Specs Detector", e);
} finally {
shutdown();
}
@ -377,7 +375,7 @@ public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSetti
* TODO
*/
protected IStatus runForEachLanguage(IProgressMonitor monitor) {
MultiStatus status = new MultiStatus(MakeCorePlugin.PLUGIN_ID, IStatus.OK, "Problem running CDT Scanner Discovery provider " + getId(), null);
MultiStatus status = new MultiStatus(ManagedBuilderCorePlugin.PLUGIN_ID, IStatus.OK, "Problem running CDT Scanner Discovery provider " + getId(), null);
if (monitor == null) {
monitor = new NullProgressMonitor();
@ -405,8 +403,8 @@ public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSetti
startupForLanguage(languageId);
runForLanguage(new SubProgressMonitor(monitor, TICKS_RUN_FOR_ONE_LANGUAGE));
} catch (Exception e) {
IStatus s = new Status(IStatus.ERROR, MakeCorePlugin.PLUGIN_ID, IStatus.ERROR, "Error running Builtin Specs Detector", e); //$NON-NLS-1$
MakeCorePlugin.log(s);
IStatus s = new Status(IStatus.ERROR, ManagedBuilderCorePlugin.PLUGIN_ID, IStatus.ERROR, "Error running Builtin Specs Detector", e); //$NON-NLS-1$
ManagedBuilderCorePlugin.log(s);
status.merge(s);
} finally {
shutdownForLanguage();
@ -431,8 +429,8 @@ public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSetti
} catch (OperationCanceledException e) {
// user chose to cancel operation, do not threaten them with red error signs
} catch (Exception e) {
status.merge(new Status(IStatus.ERROR, MakeCorePlugin.PLUGIN_ID, IStatus.ERROR, "Error running Builtin Specs Detector", e));
MakeCorePlugin.log(status);
status.merge(new Status(IStatus.ERROR, ManagedBuilderCorePlugin.PLUGIN_ID, IStatus.ERROR, "Error running Builtin Specs Detector", e));
ManagedBuilderCorePlugin.log(status);
} finally {
monitor.done();
}
@ -485,7 +483,7 @@ public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSetti
console = startProviderConsole();
} else {
// that looks in extension points registry and won't find the id, this console is not shown
console = CCorePlugin.getDefault().getConsole(MakeCorePlugin.PLUGIN_ID + ".console.hidden"); //$NON-NLS-1$
console = CCorePlugin.getDefault().getConsole(ManagedBuilderCorePlugin.PLUGIN_ID + ".console.hidden"); //$NON-NLS-1$
}
console.start(currentProject);
@ -526,13 +524,13 @@ public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSetti
buildRunnerHelper.goodbye();
} catch (Exception e) {
Status status = new Status(IStatus.ERROR, MakeCorePlugin.PLUGIN_ID, "Internal error running scanner discovery", e);
MakeCorePlugin.log(new CoreException(status));
Status status = new Status(IStatus.ERROR, ManagedBuilderCorePlugin.PLUGIN_ID, "Internal error running scanner discovery", e);
ManagedBuilderCorePlugin.log(new CoreException(status));
} finally {
try {
buildRunnerHelper.close();
} catch (IOException e) {
MakeCorePlugin.log(e);
ManagedBuilderCorePlugin.log(e);
}
monitor.done();
}
@ -553,19 +551,38 @@ public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSetti
}
private IConsole startProviderConsole() {
IConsole console = null;
if (isConsoleEnabled && currentLanguageId != null) {
String extConsoleId;
if (currentProject != null) {
extConsoleId = "org.eclipse.cdt.make.internal.ui.scannerconfig.ScannerDiscoveryConsole";
extConsoleId = "org.eclipse.cdt.managedbuilder.ScannerDiscoveryConsole";
} else {
// TODO This console is not colored!
extConsoleId = "org.eclipse.cdt.make.internal.ui.scannerconfig.ScannerDiscoveryGlobalConsole";
extConsoleId = "org.eclipse.cdt.managedbuilder.ScannerDiscoveryGlobalConsole";
}
ILanguage ld = LanguageManager.getInstance().getLanguage(currentLanguageId);
String consoleId = MakeCorePlugin.PLUGIN_ID + '.' + getId() + '.' + currentLanguageId;
if (ld != null) {
String consoleId = ManagedBuilderCorePlugin.PLUGIN_ID + '.' + getId() + '.' + currentLanguageId;
String consoleName = getName() + ", " + ld.getName();
URL defaultIcon = Platform.getBundle(CDT_MAKE_UI_PLUGIN_ID).getEntry(DEFAULT_CONSOLE_ICON);
URL defaultIcon = Platform.getBundle(CDT_MANAGEDBUILDER_UI_PLUGIN_ID).getEntry(DEFAULT_CONSOLE_ICON);
if (defaultIcon == null) {
@SuppressWarnings("nls")
String msg = "Unable to find icon " + DEFAULT_CONSOLE_ICON + " in plugin " + CDT_MANAGEDBUILDER_UI_PLUGIN_ID;
ManagedBuilderCorePlugin.log(new Status(IStatus.ERROR, ManagedBuilderCorePlugin.PLUGIN_ID, msg));
}
console = CCorePlugin.getDefault().getConsole(extConsoleId, consoleId, consoleName, defaultIcon);
}
}
if (console == null) {
// that looks in extension points registry and won't find the id, this console is not shown
console = CCorePlugin.getDefault().getConsole(ManagedBuilderCorePlugin.PLUGIN_ID + ".console.hidden"); //$NON-NLS-1$
}
IConsole console = CCorePlugin.getDefault().getConsole(extConsoleId, consoleId, consoleName, defaultIcon);
return console;
}
@ -577,7 +594,7 @@ public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSetti
}
String specFileName = SPEC_FILE_BASE + ext;
IPath workingLocation = MakeCorePlugin.getWorkingDirectory();
IPath workingLocation = ManagedBuilderCorePlugin.getWorkingDirectory();
IPath fileLocation = workingLocation.append(specFileName);
specFile = new java.io.File(fileLocation.toOSString());
@ -587,7 +604,7 @@ public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSetti
try {
specFile.createNewFile();
} catch (IOException e) {
MakeCorePlugin.log(e);
ManagedBuilderCorePlugin.log(e);
}
}
@ -615,7 +632,7 @@ public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSetti
}
if (ext == null) {
MakeCorePlugin.log(new Status(IStatus.ERROR, MakeCorePlugin.PLUGIN_ID, "Unable to find file extension for language " + languageId)); //$NON-NLS-1$
ManagedBuilderCorePlugin.log(new Status(IStatus.ERROR, ManagedBuilderCorePlugin.PLUGIN_ID, "Unable to find file extension for language " + languageId)); //$NON-NLS-1$
}
return ext;
}

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2009, 2011 Andrew Gvozdev and others.
* Copyright (c) 2009, 2012 Andrew Gvozdev and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -9,7 +9,7 @@
* Andrew Gvozdev - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.make.core.language.settings.providers;
package org.eclipse.cdt.managedbuilder.language.settings.providers;
import java.io.File;
import java.io.IOException;
@ -27,7 +27,6 @@ import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.ErrorParserManager;
import org.eclipse.cdt.core.cdtvariables.CdtVariableException;
import org.eclipse.cdt.core.cdtvariables.ICdtVariableManager;
import org.eclipse.cdt.core.language.settings.providers.ICBuildOutputParser;
import org.eclipse.cdt.core.language.settings.providers.IWorkingDirectoryTracker;
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsManager;
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsSerializableProvider;
@ -37,7 +36,7 @@ import org.eclipse.cdt.core.settings.model.ICSettingEntry;
import org.eclipse.cdt.core.settings.model.util.CDataUtil;
import org.eclipse.cdt.internal.core.XmlUtil;
import org.eclipse.cdt.internal.core.language.settings.providers.LanguageSettingsLogger;
import org.eclipse.cdt.make.core.MakeCorePlugin;
import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
import org.eclipse.cdt.utils.EFSExtensionManager;
import org.eclipse.core.filesystem.EFS;
import org.eclipse.core.resources.IContainer;
@ -54,7 +53,7 @@ import org.w3c.dom.Element;
/**
* Abstract class for providers capable to parse build output.
*
* @since 7.2
* @since 8.1
*/
public abstract class AbstractLanguageSettingsOutputScanner extends LanguageSettingsSerializableProvider implements ICBuildOutputParser {
protected static final String ATTR_KEEP_RELATIVE_PATHS = "keep-relative-paths"; //$NON-NLS-1$
@ -295,7 +294,7 @@ public abstract class AbstractLanguageSettingsOutputScanner extends LanguageSett
}
} catch (Throwable e) {
// protect from rogue parsers extending this class
MakeCorePlugin.log(e);
ManagedBuilderCorePlugin.log(e);
}
}
}
@ -496,11 +495,13 @@ public abstract class AbstractLanguageSettingsOutputScanner extends LanguageSett
ICdtVariableManager vmanager = CCorePlugin.getDefault().getCdtVariableManager();
builderCWD = vmanager.resolveValue(builderCWD, "", null, currentCfgDescription); //$NON-NLS-1$
} catch (CdtVariableException e) {
MakeCorePlugin.log(e);
ManagedBuilderCorePlugin.log(e);
}
if (builderCWD != null && !builderCWD.isEmpty()) {
buildDirURI = org.eclipse.core.filesystem.URIUtil.toURI(builderCWD);
}
}
}
// if not found - try directory of the current project
if (buildDirURI == null && currentProject != null) {
@ -709,7 +710,7 @@ public abstract class AbstractLanguageSettingsOutputScanner extends LanguageSett
fileURI.getPort(), path + '/', fileURI.getQuery(), fileURI.getFragment());
} catch (URISyntaxException e) {
// It should be valid URI here or something is wrong
MakeCorePlugin.log(e);
ManagedBuilderCorePlugin.log(e);
}
return cwdURI;
@ -851,7 +852,7 @@ public abstract class AbstractLanguageSettingsOutputScanner extends LanguageSett
String canonicalPathStr = file.getCanonicalPath();
return new Path(canonicalPathStr);
} catch (Exception e) {
MakeCorePlugin.log(e);
ManagedBuilderCorePlugin.log(e);
}
return null;
}

View file

@ -8,7 +8,7 @@
* Contributors:
* Andrew Gvozdev - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.make.core.language.settings.providers;
package org.eclipse.cdt.managedbuilder.language.settings.providers;
import org.eclipse.cdt.core.errorparsers.RegexErrorPattern;
@ -16,7 +16,7 @@ import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsEditabl
import org.eclipse.cdt.core.settings.model.ICSettingEntry;
/**
* @since 7.2
* @since 8.1
*/
public class GCCBuildCommandParser extends AbstractBuildCommandParser implements ILanguageSettingsEditableProvider {
@SuppressWarnings("nls")
@ -53,7 +53,7 @@ public class GCCBuildCommandParser extends AbstractBuildCommandParser implements
public static class GCCBuildCommandPatternHighlighter extends AbstractBuildCommandParser.AbstractBuildCommandPatternHighlighter {
// ID of the parser taken from the existing extension point
private static final String GCC_BUILD_COMMAND_PARSER_EXT = "org.eclipse.cdt.make.core.GCCBuildCommandParser"; //$NON-NLS-1$
private static final String GCC_BUILD_COMMAND_PARSER_EXT = "org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"; //$NON-NLS-1$
public GCCBuildCommandPatternHighlighter() {
super(GCC_BUILD_COMMAND_PARSER_EXT);

View file

@ -9,7 +9,7 @@
* Andrew Gvozdev - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.managedbuilder.internal.language.settings.providers;
package org.eclipse.cdt.managedbuilder.language.settings.providers;
import java.util.ArrayList;
import java.util.List;
@ -18,11 +18,12 @@ import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsEditabl
import org.eclipse.cdt.core.language.settings.providers.IWorkingDirectoryTracker;
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
import org.eclipse.cdt.core.settings.model.ICSettingEntry;
import org.eclipse.cdt.managedbuilder.language.settings.providers.ToolchainBuiltinSpecsDetector;
import org.eclipse.core.runtime.CoreException;
/**
* Language settings provider to detect built-in compiler settings for GCC compiler.
*
* @since 8.1
*/
public class GCCBuiltinSpecsDetector extends ToolchainBuiltinSpecsDetector implements ILanguageSettingsEditableProvider {
// ID must match the toolchain definition in org.eclipse.cdt.managedbuilder.core.buildDefinitions extension point

View file

@ -9,16 +9,17 @@
* Andrew Gvozdev - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.core.language.settings.providers;
package org.eclipse.cdt.managedbuilder.language.settings.providers;
import org.eclipse.cdt.core.IConsoleParser;
import org.eclipse.cdt.core.language.settings.providers.IWorkingDirectoryTracker;
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
import org.eclipse.core.runtime.CoreException;
/**
* Console parser interface extended to support language settings providers.
*
* @since 5.4
* @since 8.1
*/
public interface ICBuildOutputParser extends IConsoleParser {
/**

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2009, 2011 Andrew Gvozdev and others.
* Copyright (c) 2009, 2012 Andrew Gvozdev and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@ -14,7 +14,6 @@ package org.eclipse.cdt.managedbuilder.language.settings.providers;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.cdt.make.core.language.settings.providers.AbstractBuiltinSpecsDetector;
import org.eclipse.cdt.managedbuilder.core.IInputType;
import org.eclipse.cdt.managedbuilder.core.ITool;
import org.eclipse.cdt.managedbuilder.core.IToolChain;

View file

@ -1704,7 +1704,7 @@
<toolChain
archList="all"
id="cdt.managedbuild.toolchain.gnu.base"
languageSettingsProviders="org.eclipse.cdt.make.core.GCCBuildCommandParser;org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector"
languageSettingsProviders="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser;org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector"
name="%ToolChainName.Linux"
osList="linux,hpux,aix,qnx"
targetTool="cdt.managedbuild.tool.gnu.c.linker;cdt.managedbuild.tool.gnu.cpp.linker;cdt.managedbuild.tool.gnu.archiver">
@ -1772,7 +1772,7 @@
configurationEnvironmentSupplier="org.eclipse.cdt.managedbuilder.gnu.cygwin.GnuCygwinConfigurationEnvironmentSupplier"
id="cdt.managedbuild.toolchain.gnu.cygwin.base"
isToolChainSupported="org.eclipse.cdt.managedbuilder.gnu.cygwin.IsGnuCygwinToolChainSupported"
languageSettingsProviders="org.eclipse.cdt.make.core.GCCBuildCommandParser;org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetectorCygwin"
languageSettingsProviders="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser;org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetectorCygwin"
name="%ToolChainName.Cygwin"
osList="win32"
targetTool="cdt.managedbuild.tool.gnu.cpp.linker.cygwin.base;cdt.managedbuild.tool.gnu.c.linker.cygwin.base;cdt.managedbuild.tool.gnu.archiver">
@ -1842,7 +1842,7 @@
configurationEnvironmentSupplier="org.eclipse.cdt.managedbuilder.gnu.mingw.MingwEnvironmentVariableSupplier"
id="cdt.managedbuild.toolchain.gnu.mingw.base"
isToolChainSupported="org.eclipse.cdt.managedbuilder.gnu.mingw.MingwIsToolChainSupported"
languageSettingsProviders="org.eclipse.cdt.make.core.GCCBuildCommandParser;org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector"
languageSettingsProviders="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser;org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetector"
name="%ToolChainName.MinGW"
osList="win32"
targetTool="cdt.managedbuild.tool.gnu.cpp.linker.mingw.base;cdt.managedbuild.tool.gnu.c.linker.mingw.base;cdt.managedbuild.tool.gnu.archiver">
@ -2086,7 +2086,7 @@
<configuration
cleanCommand="rm -rf"
id="cdt.managedbuild.config.gnu.base"
languageSettingsProviders="org.eclipse.cdt.ui.UserLanguageSettingsProvider;org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider;${Toolchain};-org.eclipse.cdt.make.core.GCCBuildCommandParser">
languageSettingsProviders="org.eclipse.cdt.ui.UserLanguageSettingsProvider;org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider;${Toolchain};-org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser">
<enablement type="CONTAINER_ATTRIBUTE"
attribute="artifactExtension"
value="so"
@ -2484,7 +2484,7 @@
artifactExtension="exe"
cleanCommand="rm -rf"
id="cdt.managedbuild.config.gnu.cygwin.base"
languageSettingsProviders="org.eclipse.cdt.ui.UserLanguageSettingsProvider;org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider;${Toolchain};-org.eclipse.cdt.make.core.GCCBuildCommandParser">
languageSettingsProviders="org.eclipse.cdt.ui.UserLanguageSettingsProvider;org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider;${Toolchain};-org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser">
<enablement type="CONTAINER_ATTRIBUTE"
attribute="artifactExtension"
value="dll"
@ -2882,7 +2882,7 @@
artifactExtension="exe"
cleanCommand="rm -rf"
id="cdt.managedbuild.config.gnu.mingw.base"
languageSettingsProviders="org.eclipse.cdt.ui.UserLanguageSettingsProvider;org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider;${Toolchain};-org.eclipse.cdt.make.core.GCCBuildCommandParser">
languageSettingsProviders="org.eclipse.cdt.ui.UserLanguageSettingsProvider;org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider;${Toolchain};-org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser">
<enablement type="CONTAINER_ATTRIBUTE"
attribute="artifactExtension"
value="dll"

View file

@ -14,6 +14,7 @@ Export-Package: org.eclipse.cdt.managedbuilder.ui.preferences,
Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.2.0,4.0.0)",
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.console;bundle-version="[3.5.100,4.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.managedbuilder.core;bundle-version="[8.1.0,9.0.0)",

View file

Before

Width:  |  Height:  |  Size: 553 B

After

Width:  |  Height:  |  Size: 553 B

View file

Before

Width:  |  Height:  |  Size: 335 B

After

Width:  |  Height:  |  Size: 335 B

View file

@ -93,6 +93,8 @@ Output.location=Output Location
Binary.parsers=Binary Parsers
Error.parsers=Error Parsers
Language.settings.providers=Discovery
LanguageSettingsProvidersTab.name=Discovery
LanguageSettingsProvidersTab.tooltip=Language settings providers
Data.hierarchy=Data Hierarchy
Preferred.toolchains=Preferred Toolchains
Wizard.defaults=Wizard Defaults

View file

@ -456,6 +456,15 @@
helpId="cdt_u_pref_multi_cfg"
parent="org.eclipse.cdt.managedbuilder.ui.preferences.PrefPage_MultiConfig">
</tab>
<!-- AG FIXME - rather use managedbuilder page ??? -->
<tab
class="org.eclipse.cdt.internal.ui.language.settings.providers.LanguageSettingsProviderTab"
icon="icons/obj16/search.gif"
name="%LanguageSettingsProvidersTab.name"
parent="org.eclipse.cdt.make.internal.ui.preferences.BuildSettingsPreferencePage"
tooltip="%LanguageSettingsProvidersTab.tooltip"
weight="000">
</tab>
</extension>
<extension
@ -625,6 +634,7 @@
name="%MBSPerProjectProfile.name"
profileId="org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP"/>
</extension>
<extension
point="org.eclipse.cdt.ui.workingSetConfigurations">
<projectConfigurationFactory
@ -648,6 +658,7 @@
</description>
</wizard>
</extension>
<extension
point="org.eclipse.cdt.ui.LanguageSettingsProviderAssociation">
<id-association
@ -656,7 +667,36 @@
ui-clear-entries="false"
ui-edit-entries="false">
</id-association>
<class-association
class="org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuildCommandParser"
icon="icons/obj16/log_obj.gif"
page="org.eclipse.cdt.managedbuilder.internal.ui.language.settings.providers.GCCBuildCommandParserOptionPage"
ui-clear-entries="true"
ui-edit-entries="false">
</class-association>
<class-association
class="org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector"
icon="icons/obj16/inspect_system.gif"
page="org.eclipse.cdt.managedbuilder.internal.ui.language.settings.providers.BuiltinSpecsDetectorOptionPage"
ui-clear-entries="true"
ui-edit-entries="false">
</class-association>
</extension>
<extension
point="org.eclipse.cdt.core.CBuildConsole">
<CBuildConsole
id="org.eclipse.cdt.managedbuilder.ScannerDiscoveryConsole"
class="org.eclipse.cdt.managedbuilder.internal.ui.language.settings.providers.ScannerDiscoveryConsole">
</CBuildConsole>
</extension>
<extension
point="org.eclipse.cdt.core.CBuildConsole">
<CBuildConsole
id="org.eclipse.cdt.managedbuilder.ScannerDiscoveryGlobalConsole"
class="org.eclipse.cdt.managedbuilder.internal.ui.language.settings.providers.ScannerDiscoveryGlobalConsole">
</CBuildConsole>
</extension>
<extension
point="org.eclipse.cdt.ui.projectTypePages">
<projectTypePage

View file

@ -9,13 +9,13 @@
* Andrew Gvozdev - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.make.internal.ui.language.settings.providers;
package org.eclipse.cdt.managedbuilder.internal.ui.language.settings.providers;
import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsProvider;
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsManager;
import org.eclipse.cdt.internal.ui.language.settings.providers.AbstractLanguageSettingProviderOptionPage;
import org.eclipse.cdt.internal.ui.newui.StatusMessageLine;
import org.eclipse.cdt.make.core.language.settings.providers.AbstractBuiltinSpecsDetector;
import org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector;
import org.eclipse.cdt.utils.ui.controls.ControlFactory;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;

View file

@ -9,13 +9,13 @@
* Andrew Gvozdev - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.make.internal.ui.language.settings.providers;
package org.eclipse.cdt.managedbuilder.internal.ui.language.settings.providers;
import org.eclipse.cdt.core.language.settings.providers.ILanguageSettingsProvider;
import org.eclipse.cdt.core.language.settings.providers.LanguageSettingsManager;
import org.eclipse.cdt.internal.ui.language.settings.providers.AbstractLanguageSettingProviderOptionPage;
import org.eclipse.cdt.internal.ui.newui.StatusMessageLine;
import org.eclipse.cdt.make.core.language.settings.providers.AbstractBuildCommandParser;
import org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuildCommandParser;
import org.eclipse.cdt.utils.ui.controls.ControlFactory;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;

View file

@ -9,7 +9,7 @@
* Andrew Gvozdev - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.make.internal.ui.language.settings.providers;
package org.eclipse.cdt.managedbuilder.internal.ui.language.settings.providers;
import java.net.URL;

View file

@ -9,7 +9,7 @@
* Andrew Gvozdev - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.make.internal.ui.language.settings.providers;
package org.eclipse.cdt.managedbuilder.internal.ui.language.settings.providers;
import java.io.IOException;
import java.net.URL;
@ -21,6 +21,7 @@ import org.eclipse.cdt.ui.CDTSharedImages;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.console.ConsolePlugin;
import org.eclipse.ui.console.IConsole;
import org.eclipse.ui.console.IConsoleManager;
@ -103,11 +104,18 @@ public class ScannerDiscoveryGlobalConsole implements ICConsole {
if (console==null) {
URL iconUrl = LanguageSettingsProviderAssociationManager.getImageUrl(consoleId);
if (iconUrl==null) {
if (iconUrl == null) {
iconUrl = defaultIconUrl;
}
console = new MessageConsole(name, CDTSharedImages.getImageDescriptor(iconUrl.toString()));
ImageDescriptor imageDescriptor;
if (iconUrl != null) {
imageDescriptor = CDTSharedImages.getImageDescriptor(iconUrl.toString());
} else {
imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
}
console = new MessageConsole(name, imageDescriptor);
console.activate();
consoleManager.addConsoles(new IConsole[]{ console });
}

View file

@ -18,6 +18,7 @@ import java.util.Map;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
import org.eclipse.cdt.internal.core.LocalProjectScope;
import org.eclipse.cdt.internal.core.language.settings.providers.LanguageSettingsExtensionManager;
import org.eclipse.cdt.internal.core.language.settings.providers.LanguageSettingsProvidersSerializer;
@ -108,7 +109,13 @@ public class ScannerDiscoveryLegacySupport {
* which is not intended to be referenced by clients.
*/
public static boolean isLegacyScannerDiscoveryOn(ICConfigurationDescription cfgDescription) {
IProject project = cfgDescription != null ? cfgDescription.getProjectDescription().getProject() : null;
IProject project = null;
if (cfgDescription != null) {
ICProjectDescription prjDescription = cfgDescription.getProjectDescription();
if (prjDescription != null) {
project = prjDescription.getProject();
}
}
return isLanguageSettingsProvidersFunctionalityEnabled(project) || isMbsLanguageSettingsProviderOn(cfgDescription);
}

View file

@ -87,7 +87,7 @@
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
<provider
class="org.eclipse.cdt.make.core.language.settings.providers.GCCBuildCommandParser"
class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser"
id="org.eclipse.cdt.managedbuilder.xlc.core.XlcBuildCommandParser"
name="%XlcBuildCommandParserName"
parameter="xl[cC]"