mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 09:46:02 +02:00
Implement ordering of toolchains.
Introduce toolchain types independent of providers. Change-Id: I2cf3145920fcf4e7132468b6e653d7ea3e211127
This commit is contained in:
parent
9a9e80e115
commit
76e1842644
15 changed files with 501 additions and 342 deletions
|
@ -15,6 +15,14 @@
|
||||||
class="org.eclipse.cdt.build.gcc.core.GCCUserToolChainProvider"
|
class="org.eclipse.cdt.build.gcc.core.GCCUserToolChainProvider"
|
||||||
id="org.eclipse.cdt.build.gcc.core.provider.user">
|
id="org.eclipse.cdt.build.gcc.core.provider.user">
|
||||||
</provider>
|
</provider>
|
||||||
|
<type
|
||||||
|
id="org.eclipse.cdt.build.gcc"
|
||||||
|
name="GCC">
|
||||||
|
</type>
|
||||||
|
<type
|
||||||
|
id="org.eclipse.cdt.build.clang"
|
||||||
|
name="clang">
|
||||||
|
</type>
|
||||||
</extension>
|
</extension>
|
||||||
|
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015, 2017 QNX Software Systems 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
|
||||||
|
*******************************************************************************/
|
||||||
|
package org.eclipse.cdt.build.gcc.core;
|
||||||
|
|
||||||
|
import java.nio.file.Path;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.core.build.IToolChainProvider;
|
||||||
|
import org.eclipse.cdt.core.envvar.IEnvironmentVariable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Clang toolchain. There's little different from the GCC toolchain other
|
||||||
|
* than the toolchain type and name.
|
||||||
|
*
|
||||||
|
* @author dschaefer
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ClangToolChain extends GCCToolChain {
|
||||||
|
|
||||||
|
private static final String TYPE_ID = "org.eclipse.cdt.build.clang"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
public ClangToolChain(IToolChainProvider provider, Path pathToToolChain, String arch,
|
||||||
|
IEnvironmentVariable[] envVars) {
|
||||||
|
super(provider, pathToToolChain, arch, envVars);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTypeId() {
|
||||||
|
return TYPE_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -51,6 +51,8 @@ import org.eclipse.core.runtime.PlatformObject;
|
||||||
*/
|
*/
|
||||||
public class GCCToolChain extends PlatformObject implements IToolChain {
|
public class GCCToolChain extends PlatformObject implements IToolChain {
|
||||||
|
|
||||||
|
public static final String TYPE_ID = "org.eclipse.cdt.build.gcc"; //$NON-NLS-1$
|
||||||
|
|
||||||
private final IToolChainProvider provider;
|
private final IToolChainProvider provider;
|
||||||
private final String id;
|
private final String id;
|
||||||
private final Path path;
|
private final Path path;
|
||||||
|
@ -144,6 +146,11 @@ public class GCCToolChain extends PlatformObject implements IToolChain {
|
||||||
this.envVars = envVars;
|
this.envVars = envVars;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTypeId() {
|
||||||
|
return TYPE_ID;
|
||||||
|
}
|
||||||
|
|
||||||
public Path getPath() {
|
public Path getPath() {
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
@ -165,21 +172,20 @@ public class GCCToolChain extends PlatformObject implements IToolChain {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
StringBuilder name = new StringBuilder("GCC"); //$NON-NLS-1$
|
StringBuilder name = new StringBuilder(); // $NON-NLS-1$
|
||||||
String os = getProperty(ATTR_OS);
|
String os = getProperty(ATTR_OS);
|
||||||
if (os != null) {
|
if (os != null) {
|
||||||
name.append(' ');
|
|
||||||
name.append(os);
|
name.append(os);
|
||||||
|
name.append(' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
String arch = getProperty(ATTR_ARCH);
|
String arch = getProperty(ATTR_ARCH);
|
||||||
if (arch != null) {
|
if (arch != null) {
|
||||||
name.append(' ');
|
|
||||||
name.append(arch);
|
name.append(arch);
|
||||||
|
name.append(' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path != null) {
|
if (path != null) {
|
||||||
name.append(' ');
|
|
||||||
name.append(path.toString());
|
name.append(path.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@ import java.io.Writer;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
@ -201,16 +200,6 @@ public class GCCUserToolChainProvider implements IUserToolChainProvider {
|
||||||
manager.removeToolChain(toolChain);
|
manager.removeToolChain(toolChain);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IToolChain getToolChain(String id) throws CoreException {
|
|
||||||
Collection<IToolChain> tcs = manager.getToolChains(PROVIDER_ID, id);
|
|
||||||
if (tcs.isEmpty()) {
|
|
||||||
return null;
|
|
||||||
} else {
|
|
||||||
return tcs.iterator().next();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void saveJsonFile() throws IOException {
|
private void saveJsonFile() throws IOException {
|
||||||
try (Writer writer = new FileWriter(getJsonFile())) {
|
try (Writer writer = new FileWriter(getJsonFile())) {
|
||||||
writer.write(new Gson().toJson(toolChains));
|
writer.write(new Gson().toJson(toolChains));
|
||||||
|
|
|
@ -46,6 +46,14 @@
|
||||||
</message_arguments>
|
</message_arguments>
|
||||||
</filter>
|
</filter>
|
||||||
</resource>
|
</resource>
|
||||||
|
<resource path="src/org/eclipse/cdt/core/build/IToolChain.java" type="org.eclipse.cdt.core.build.IToolChain">
|
||||||
|
<filter id="404000815">
|
||||||
|
<message_arguments>
|
||||||
|
<message_argument value="org.eclipse.cdt.core.build.IToolChain"/>
|
||||||
|
<message_argument value="getTypeId()"/>
|
||||||
|
</message_arguments>
|
||||||
|
</filter>
|
||||||
|
</resource>
|
||||||
<resource path="src/org/eclipse/cdt/core/build/IToolChainProvider.java" type="org.eclipse.cdt.core.build.IToolChainProvider">
|
<resource path="src/org/eclipse/cdt/core/build/IToolChainProvider.java" type="org.eclipse.cdt.core.build.IToolChainProvider">
|
||||||
<filter comment="This interface is still pretty new. Assuming low risk." id="404000815">
|
<filter comment="This interface is still pretty new. Assuming low risk." id="404000815">
|
||||||
<message_arguments>
|
<message_arguments>
|
||||||
|
@ -65,10 +73,5 @@
|
||||||
<message_argument value="removeToolChain(IToolChain)"/>
|
<message_argument value="removeToolChain(IToolChain)"/>
|
||||||
</message_arguments>
|
</message_arguments>
|
||||||
</filter>
|
</filter>
|
||||||
<filter comment="This is a newish interface. Assuming low risk." id="1211105284">
|
|
||||||
<message_arguments>
|
|
||||||
<message_argument value="removeToolChain(IToolChain)"/>
|
|
||||||
</message_arguments>
|
|
||||||
</filter>
|
|
||||||
</resource>
|
</resource>
|
||||||
</component>
|
</component>
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
<complexType>
|
<complexType>
|
||||||
<sequence minOccurs="1" maxOccurs="unbounded">
|
<sequence minOccurs="1" maxOccurs="unbounded">
|
||||||
<element ref="provider"/>
|
<element ref="provider"/>
|
||||||
|
<element ref="type"/>
|
||||||
</sequence>
|
</sequence>
|
||||||
<attribute name="point" type="string" use="required">
|
<attribute name="point" type="string" use="required">
|
||||||
<annotation>
|
<annotation>
|
||||||
|
@ -69,6 +70,28 @@
|
||||||
</complexType>
|
</complexType>
|
||||||
</element>
|
</element>
|
||||||
|
|
||||||
|
<element name="type">
|
||||||
|
<complexType>
|
||||||
|
<attribute name="id" type="string" use="required">
|
||||||
|
<annotation>
|
||||||
|
<documentation>
|
||||||
|
|
||||||
|
</documentation>
|
||||||
|
</annotation>
|
||||||
|
</attribute>
|
||||||
|
<attribute name="name" type="string" use="required">
|
||||||
|
<annotation>
|
||||||
|
<documentation>
|
||||||
|
|
||||||
|
</documentation>
|
||||||
|
<appInfo>
|
||||||
|
<meta.attribute translatable="true"/>
|
||||||
|
</appInfo>
|
||||||
|
</annotation>
|
||||||
|
</attribute>
|
||||||
|
</complexType>
|
||||||
|
</element>
|
||||||
|
|
||||||
<annotation>
|
<annotation>
|
||||||
<appInfo>
|
<appInfo>
|
||||||
<meta.section type="since"/>
|
<meta.section type="since"/>
|
||||||
|
|
|
@ -23,7 +23,6 @@ import java.nio.file.Path;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -119,11 +118,8 @@ public abstract class CBuildConfiguration extends PlatformObject
|
||||||
|
|
||||||
if (tc == null) {
|
if (tc == null) {
|
||||||
// check for other versions
|
// check for other versions
|
||||||
Collection<IToolChain> tcs = toolChainManager.getToolChains(typeId, id);
|
tc = toolChainManager.getToolChain(typeId, id);
|
||||||
if (!tcs.isEmpty()) {
|
if (tc == null) {
|
||||||
// TODO grab the newest version
|
|
||||||
tc = tcs.iterator().next();
|
|
||||||
} else {
|
|
||||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID,
|
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID,
|
||||||
CCorePlugin.STATUS_BUILD_CONFIG_NOT_VALID,
|
CCorePlugin.STATUS_BUILD_CONFIG_NOT_VALID,
|
||||||
String.format(Messages.CBuildConfiguration_ToolchainMissing, config.getName()),
|
String.format(Messages.CBuildConfiguration_ToolchainMissing, config.getName()),
|
||||||
|
|
|
@ -62,8 +62,10 @@ public interface IToolChain extends IAdaptable {
|
||||||
/**
|
/**
|
||||||
* The version of the toolchain
|
* The version of the toolchain
|
||||||
*
|
*
|
||||||
|
* @deprecated the version doesn't matter. id's for a given type must be unique.
|
||||||
* @return toolchain version
|
* @return toolchain version
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
String getVersion();
|
String getVersion();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -73,6 +75,18 @@ public interface IToolChain extends IAdaptable {
|
||||||
*/
|
*/
|
||||||
String getName();
|
String getName();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The type id for the toolchain. The combination of type id and toolchain id
|
||||||
|
* uniquely identify the toolchain in the system.
|
||||||
|
*
|
||||||
|
* @since 6.4
|
||||||
|
*/
|
||||||
|
default String getTypeId() {
|
||||||
|
// Subclasses really need to override this. There can be multiple providers for
|
||||||
|
// a given toolchain type.
|
||||||
|
return getProvider().getId();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an property of the toolchain. Used to determine applicability of
|
* Returns an property of the toolchain. Used to determine applicability of
|
||||||
* a toolchain for a given situation.
|
* a toolchain for a given situation.
|
||||||
|
|
|
@ -32,10 +32,19 @@ public interface IToolChainManager {
|
||||||
*/
|
*/
|
||||||
IToolChainProvider getProvider(String providerId) throws CoreException;
|
IToolChainProvider getProvider(String providerId) throws CoreException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the UI label for the toolchain type.
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* type toolchain type id
|
||||||
|
* @return name of the type
|
||||||
|
* @since 6.4
|
||||||
|
*/
|
||||||
|
String getToolChainTypeName(String typeId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the toolchain from the given provider with the given id and version.
|
* Return the toolchain from the given provider with the given id and version.
|
||||||
*
|
*
|
||||||
* @deprecated Version is now irrelevant. id's are unique.
|
|
||||||
* @param providerId
|
* @param providerId
|
||||||
* id of provider
|
* id of provider
|
||||||
* @param id
|
* @param id
|
||||||
|
@ -44,6 +53,7 @@ public interface IToolChainManager {
|
||||||
* version of toolchain
|
* version of toolchain
|
||||||
* @return the toolchain
|
* @return the toolchain
|
||||||
* @throws CoreException
|
* @throws CoreException
|
||||||
|
* @deprecated version is now irrelevant. id's are unique.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
default IToolChain getToolChain(String providerId, String id, String version) throws CoreException {
|
default IToolChain getToolChain(String providerId, String id, String version) throws CoreException {
|
||||||
|
@ -51,17 +61,17 @@ public interface IToolChainManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the toolChain from the given provider with the given id.
|
* Return the toolChain with the given type and id.
|
||||||
*
|
*
|
||||||
* @param providerId
|
* @param typeId
|
||||||
* id of provider
|
* id of toolchain type
|
||||||
* @param id
|
* @param id
|
||||||
* id of toolchain
|
* id of toolchain
|
||||||
* @return the toolchain
|
* @return the toolchain
|
||||||
* @throws CoreException
|
* @throws CoreException
|
||||||
* @since 6.4
|
* @since 6.4
|
||||||
*/
|
*/
|
||||||
IToolChain getToolChain(String providerId, String id) throws CoreException;
|
IToolChain getToolChain(String typeId, String id) throws CoreException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the toolchains provided by the given provider
|
* Return the toolchains provided by the given provider
|
||||||
|
@ -70,8 +80,12 @@ public interface IToolChainManager {
|
||||||
* id of provider
|
* id of provider
|
||||||
* @return toolchains the provider provides
|
* @return toolchains the provider provides
|
||||||
* @throws CoreException
|
* @throws CoreException
|
||||||
|
* @deprecated we no longer organize toolchains by provider id.
|
||||||
*/
|
*/
|
||||||
Collection<IToolChain> getToolChains(String providerId) throws CoreException;
|
@Deprecated
|
||||||
|
default Collection<IToolChain> getToolChains(String providerId) throws CoreException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return all versions of toolchains with the given id provided by the given
|
* Return all versions of toolchains with the given id provided by the given
|
||||||
|
@ -83,8 +97,12 @@ public interface IToolChainManager {
|
||||||
* id of toolchains
|
* id of toolchains
|
||||||
* @return toolchains with the given id provided by the provider
|
* @return toolchains with the given id provided by the provider
|
||||||
* @throws CoreException
|
* @throws CoreException
|
||||||
|
* @deprecated toolchains no longer have multiple versions per id
|
||||||
*/
|
*/
|
||||||
Collection<IToolChain> getToolChains(String providerId, String id) throws CoreException;
|
@Deprecated
|
||||||
|
default Collection<IToolChain> getToolChains(String providerId, String id) throws CoreException {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the list of toolchains that have the given properties.
|
* Returns the list of toolchains that have the given properties.
|
||||||
|
|
|
@ -36,28 +36,16 @@ public interface IToolChainProvider {
|
||||||
/**
|
/**
|
||||||
* Called by the manager to dynamically create the toolchain.
|
* Called by the manager to dynamically create the toolchain.
|
||||||
*
|
*
|
||||||
* @deprecated We have dropped the concept of version. All ids must be unique.
|
|
||||||
* @param id
|
* @param id
|
||||||
* the id of the toolchain
|
* the id of the toolchain
|
||||||
* @param version
|
* @param version
|
||||||
* the version of the toolchain
|
* the version of the toolchain
|
||||||
* @return the toolchain initialized with the settings.
|
* @return the toolchain initialized with the settings.
|
||||||
|
* @deprecated providers do not manage toolchains, call
|
||||||
|
* IToolManager.getToolChain() instead.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
default IToolChain getToolChain(String id, String version) throws CoreException {
|
default IToolChain getToolChain(String id, String version) throws CoreException {
|
||||||
return getToolChain(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Called by the manager to dynamically create the toolchain.
|
|
||||||
*
|
|
||||||
* @param id
|
|
||||||
* the id of the toolchain
|
|
||||||
* @return the toolchain initialized with the settings.
|
|
||||||
* @since 6.4
|
|
||||||
*/
|
|
||||||
default IToolChain getToolChain(String id) throws CoreException {
|
|
||||||
// By default, assumes all toolchains were added at init time.
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ package org.eclipse.cdt.internal.core.build;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -24,12 +25,16 @@ import org.eclipse.core.runtime.IExtensionRegistry;
|
||||||
import org.eclipse.core.runtime.ISafeRunnable;
|
import org.eclipse.core.runtime.ISafeRunnable;
|
||||||
import org.eclipse.core.runtime.Platform;
|
import org.eclipse.core.runtime.Platform;
|
||||||
import org.eclipse.core.runtime.SafeRunner;
|
import org.eclipse.core.runtime.SafeRunner;
|
||||||
|
import org.eclipse.core.runtime.preferences.InstanceScope;
|
||||||
|
import org.osgi.service.prefs.BackingStoreException;
|
||||||
|
import org.osgi.service.prefs.Preferences;
|
||||||
|
|
||||||
public class ToolChainManager implements IToolChainManager {
|
public class ToolChainManager implements IToolChainManager {
|
||||||
|
|
||||||
private Map<String, IConfigurationElement> providerElements;
|
private Map<String, IConfigurationElement> providerElements;
|
||||||
private Map<String, IToolChainProvider> providers;
|
private Map<String, IToolChainProvider> providers;
|
||||||
private Map<List<String>, IToolChain> toolChains;
|
private Map<String, Map<String, IToolChain>> toolChains;
|
||||||
|
private Map<String, String> toolChainTypeNames = new HashMap<>();
|
||||||
private List<IToolChain> orderedToolChains;
|
private List<IToolChain> orderedToolChains;
|
||||||
private List<ISafeRunnable> listeners = new ArrayList<>();
|
private List<ISafeRunnable> listeners = new ArrayList<>();
|
||||||
|
|
||||||
|
@ -49,39 +54,110 @@ public class ToolChainManager implements IToolChainManager {
|
||||||
|
|
||||||
// Load the discovered toolchains
|
// Load the discovered toolchains
|
||||||
toolChains = new HashMap<>();
|
toolChains = new HashMap<>();
|
||||||
orderedToolChains = new ArrayList<>();
|
|
||||||
for (IConfigurationElement element : providerElements.values()) {
|
for (IConfigurationElement element : providerElements.values()) {
|
||||||
// TODO check for enablement
|
switch (element.getName()) {
|
||||||
|
case "provider": //$NON-NLS-1$
|
||||||
|
// TODO check for enablement
|
||||||
|
try {
|
||||||
|
IToolChainProvider provider = (IToolChainProvider) element
|
||||||
|
.createExecutableExtension("class"); //$NON-NLS-1$
|
||||||
|
providers.put(element.getAttribute("id"), provider); //$NON-NLS-1$
|
||||||
|
provider.init(this);
|
||||||
|
} catch (CoreException e) {
|
||||||
|
CCorePlugin.log(e);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "type": //$NON-NLS-1$
|
||||||
|
toolChainTypeNames.put(element.getAttribute("id"), element.getAttribute("name")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
orderedToolChains = new ArrayList<>();
|
||||||
|
Preferences prefs = InstanceScope.INSTANCE.getNode(CCorePlugin.PLUGIN_ID)
|
||||||
|
.node(getClass().getSimpleName()).node("order"); //$NON-NLS-1$
|
||||||
|
String nString = prefs.get("n", ""); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
if (!nString.isEmpty()) {
|
||||||
try {
|
try {
|
||||||
IToolChainProvider provider = (IToolChainProvider) element
|
int n = Integer.parseInt(nString);
|
||||||
.createExecutableExtension("class"); //$NON-NLS-1$
|
for (int i = 0; i < n; ++i) {
|
||||||
providers.put(element.getAttribute("id"), provider); //$NON-NLS-1$
|
String typeId = prefs.get(Integer.toString(i) + ".type", ""); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
provider.init(this);
|
String id = prefs.get(Integer.toString(i) + ".id", ""); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
} catch (CoreException e) {
|
IToolChain toolChain = getToolChain(typeId, id);
|
||||||
|
if (toolChain != null) {
|
||||||
|
orderedToolChains.add(toolChain);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
CCorePlugin.log(e);
|
CCorePlugin.log(e);
|
||||||
|
} catch (CoreException e) {
|
||||||
|
CCorePlugin.log(e.getStatus());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Map<String, IToolChain> type : toolChains.values()) {
|
||||||
|
for (IToolChain toolChain : type.values()) {
|
||||||
|
if (!orderedToolChains.contains(toolChain)) {
|
||||||
|
orderedToolChains.add(toolChain);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<String> getId(IToolChain toolChain) {
|
@Override
|
||||||
List<String> id = new ArrayList<>(3);
|
public String getToolChainTypeName(String typeId) {
|
||||||
id.add(toolChain.getProvider().getId());
|
init();
|
||||||
id.add(toolChain.getId());
|
String name = toolChainTypeNames.get(typeId);
|
||||||
return id;
|
return name != null ? name : typeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void saveToolChainOrder() {
|
||||||
|
Preferences prefs = InstanceScope.INSTANCE.getNode(CCorePlugin.PLUGIN_ID)
|
||||||
|
.node(getClass().getSimpleName()).node("order"); //$NON-NLS-1$
|
||||||
|
prefs.put("n", Integer.toString(orderedToolChains.size())); //$NON-NLS-1$
|
||||||
|
int i = 0;
|
||||||
|
for (IToolChain toolChain : orderedToolChains) {
|
||||||
|
prefs.put(Integer.toString(i) + ".type", toolChain.getTypeId()); //$NON-NLS-1$
|
||||||
|
prefs.put(Integer.toString(i) + ".id", toolChain.getId()); //$NON-NLS-1$
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
prefs.flush();
|
||||||
|
} catch (BackingStoreException e) {
|
||||||
|
CCorePlugin.log(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addToolChain(IToolChain toolChain) {
|
public void addToolChain(IToolChain toolChain) {
|
||||||
orderedToolChains.add(toolChain);
|
Map<String, IToolChain> type = toolChains.get(toolChain.getTypeId());
|
||||||
toolChains.put(getId(toolChain), toolChain);
|
if (type == null) {
|
||||||
|
type = new HashMap<>();
|
||||||
|
toolChains.put(toolChain.getTypeId(), type);
|
||||||
|
}
|
||||||
|
type.put(toolChain.getId(), toolChain);
|
||||||
|
|
||||||
|
if (orderedToolChains != null) {
|
||||||
|
// is null at init time where order will be established later
|
||||||
|
orderedToolChains.add(toolChain);
|
||||||
|
saveToolChainOrder();
|
||||||
|
}
|
||||||
|
|
||||||
fireChange();
|
fireChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void removeToolChain(IToolChain toolChain) {
|
public void removeToolChain(IToolChain toolChain) {
|
||||||
orderedToolChains.remove(toolChain);
|
Map<String, IToolChain> type = toolChains.get(toolChain.getTypeId());
|
||||||
toolChains.remove(getId(toolChain));
|
if (type != null) {
|
||||||
|
type.remove(toolChain.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (orderedToolChains.remove(toolChain)) {
|
||||||
|
saveToolChainOrder();
|
||||||
|
}
|
||||||
|
|
||||||
fireChange();
|
fireChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,95 +176,47 @@ public class ToolChainManager implements IToolChainManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IToolChain getToolChain(String providerId, String id) throws CoreException {
|
public IToolChain getToolChain(String typeId, String id) throws CoreException {
|
||||||
init();
|
init();
|
||||||
List<String> tid = new ArrayList<>(3);
|
Map<String, IToolChain> type = toolChains.get(typeId);
|
||||||
tid.add(providerId);
|
return type != null ? type.get(id) : null;
|
||||||
tid.add(id);
|
|
||||||
|
|
||||||
IToolChain toolChain = toolChains.get(tid);
|
|
||||||
if (toolChain != null) {
|
|
||||||
return toolChain;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Try the provider
|
|
||||||
IToolChainProvider realProvider = providers.get(providerId);
|
|
||||||
if (realProvider != null) {
|
|
||||||
toolChain = realProvider.getToolChain(id);
|
|
||||||
if (toolChain != null) {
|
|
||||||
toolChains.put(getId(toolChain), toolChain);
|
|
||||||
return toolChain;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<IToolChain> getToolChainsMatching(Map<String, String> properties) {
|
public Collection<IToolChain> getToolChainsMatching(Map<String, String> properties) {
|
||||||
init();
|
init();
|
||||||
List<IToolChain> tcs = new ArrayList<>();
|
List<IToolChain> tcs = new ArrayList<>();
|
||||||
for (IToolChain toolChain : toolChains.values()) {
|
for (Map<String, IToolChain> type : toolChains.values()) {
|
||||||
boolean matches = true;
|
for (IToolChain toolChain : type.values()) {
|
||||||
for (Map.Entry<String, String> property : properties.entrySet()) {
|
boolean matches = true;
|
||||||
String tcProperty = toolChain.getProperty(property.getKey());
|
for (Map.Entry<String, String> property : properties.entrySet()) {
|
||||||
if (tcProperty != null) {
|
String tcProperty = toolChain.getProperty(property.getKey());
|
||||||
if (!property.getValue().equals(tcProperty)) {
|
if (tcProperty != null) {
|
||||||
matches = false;
|
if (!property.getValue().equals(tcProperty)) {
|
||||||
break;
|
matches = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if (matches) {
|
||||||
if (matches) {
|
tcs.add(toolChain);
|
||||||
tcs.add(toolChain);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allow 32-bit compilers on 64-bit machines
|
|
||||||
// TODO is there a cleaner way to do this?
|
|
||||||
if ("x86_64".equals(properties.get(IToolChain.ATTR_ARCH))) { //$NON-NLS-1$
|
|
||||||
Map<String, String> properties32 = new HashMap<>(properties);
|
|
||||||
properties32.put(IToolChain.ATTR_ARCH, "x86"); //$NON-NLS-1$
|
|
||||||
tcs.addAll(getToolChainsMatching(properties32));
|
|
||||||
}
|
|
||||||
|
|
||||||
return tcs;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Collection<IToolChain> getToolChains(String providerId) {
|
|
||||||
init();
|
|
||||||
List<IToolChain> tcs = new ArrayList<>();
|
|
||||||
for (IToolChain toolChain : toolChains.values()) {
|
|
||||||
if (toolChain.getProvider().getId().equals(providerId)) {
|
|
||||||
tcs.add(toolChain);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return tcs;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Collection<IToolChain> getToolChains(String providerId, String id) throws CoreException {
|
|
||||||
init();
|
|
||||||
List<IToolChain> tcs = new ArrayList<>();
|
|
||||||
for (IToolChain toolChain : toolChains.values()) {
|
|
||||||
if (toolChain.getProvider().getId().equals(providerId) && toolChain.getId().equals(id)) {
|
|
||||||
tcs.add(toolChain);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return tcs;
|
return tcs;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Collection<IToolChain> getAllToolChains() throws CoreException {
|
public Collection<IToolChain> getAllToolChains() throws CoreException {
|
||||||
init();
|
init();
|
||||||
return orderedToolChains;
|
return Collections.unmodifiableCollection(orderedToolChains);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setToolChainOrder(List<IToolChain> orderedToolchains) throws CoreException {
|
public void setToolChainOrder(List<IToolChain> orderedToolchains) throws CoreException {
|
||||||
// TODO Auto-generated method stub
|
this.orderedToolChains = orderedToolchains;
|
||||||
|
saveToolChainOrder();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -79,6 +79,7 @@ public final class CUIMessages extends NLS {
|
||||||
public static String ToolChainPreferencePage_Remove1;
|
public static String ToolChainPreferencePage_Remove1;
|
||||||
public static String ToolChainPreferencePage_RemoveToolchain;
|
public static String ToolChainPreferencePage_RemoveToolchain;
|
||||||
public static String ToolChainPreferencePage_Toolchains;
|
public static String ToolChainPreferencePage_Toolchains;
|
||||||
|
public static String ToolChainPreferencePage_Type;
|
||||||
public static String ToolChainPreferencePage_Up;
|
public static String ToolChainPreferencePage_Up;
|
||||||
public static String ToolChainPreferencePage_UserDefinedToolchains;
|
public static String ToolChainPreferencePage_UserDefinedToolchains;
|
||||||
public static String OptionalMessageDialog_dontShowAgain;
|
public static String OptionalMessageDialog_dontShowAgain;
|
||||||
|
|
|
@ -79,6 +79,7 @@ ToolChainPreferencePage_Remove=Remove
|
||||||
ToolChainPreferencePage_Remove1=Remove
|
ToolChainPreferencePage_Remove1=Remove
|
||||||
ToolChainPreferencePage_RemoveToolchain=Remove Toolchain
|
ToolChainPreferencePage_RemoveToolchain=Remove Toolchain
|
||||||
ToolChainPreferencePage_Toolchains=Toolchains
|
ToolChainPreferencePage_Toolchains=Toolchains
|
||||||
|
ToolChainPreferencePage_Type=Type
|
||||||
ToolChainPreferencePage_Up=Up
|
ToolChainPreferencePage_Up=Up
|
||||||
ToolChainPreferencePage_UserDefinedToolchains=User Defined Toolchains
|
ToolChainPreferencePage_UserDefinedToolchains=User Defined Toolchains
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,9 @@ public class ToolChainPreferencePage extends PreferencePage implements IWorkbenc
|
||||||
private Button userEdit;
|
private Button userEdit;
|
||||||
private Button userRemove;
|
private Button userRemove;
|
||||||
|
|
||||||
private IToolChainManager manager = CUIPlugin.getService(IToolChainManager.class);
|
private List<IToolChain> toolChains;
|
||||||
|
|
||||||
|
private static IToolChainManager manager = CUIPlugin.getService(IToolChainManager.class);
|
||||||
|
|
||||||
private ISafeRunnable tcListener = () -> Display.getDefault().asyncExec(() -> {
|
private ISafeRunnable tcListener = () -> Display.getDefault().asyncExec(() -> {
|
||||||
availTable.refresh();
|
availTable.refresh();
|
||||||
|
@ -90,10 +92,12 @@ public class ToolChainPreferencePage extends PreferencePage implements IWorkbenc
|
||||||
IToolChain toolChain = (IToolChain) element;
|
IToolChain toolChain = (IToolChain) element;
|
||||||
switch (columnIndex) {
|
switch (columnIndex) {
|
||||||
case 0:
|
case 0:
|
||||||
return toolChain.getName();
|
return manager.getToolChainTypeName(toolChain.getTypeId());
|
||||||
case 1:
|
case 1:
|
||||||
return toolChain.getProperty(IToolChain.ATTR_OS);
|
return toolChain.getName();
|
||||||
case 2:
|
case 2:
|
||||||
|
return toolChain.getProperty(IToolChain.ATTR_OS);
|
||||||
|
case 3:
|
||||||
return toolChain.getProperty(IToolChain.ATTR_ARCH);
|
return toolChain.getProperty(IToolChain.ATTR_ARCH);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -118,25 +122,19 @@ public class ToolChainPreferencePage extends PreferencePage implements IWorkbenc
|
||||||
availGroup.setLayout(new GridLayout(2, false));
|
availGroup.setLayout(new GridLayout(2, false));
|
||||||
|
|
||||||
availTable = createToolChainTable(availGroup);
|
availTable = createToolChainTable(availGroup);
|
||||||
|
availTable.setLabelProvider(new TableLabelProvider());
|
||||||
|
availTable.setContentProvider(new IStructuredContentProvider() {
|
||||||
|
@Override
|
||||||
|
public Object[] getElements(Object inputElement) {
|
||||||
|
return toolChains.toArray();
|
||||||
|
}
|
||||||
|
});
|
||||||
availTable.getTable().addSelectionListener(new SelectionAdapter() {
|
availTable.getTable().addSelectionListener(new SelectionAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
updateButtons();
|
updateButtons();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
availTable.setLabelProvider(new TableLabelProvider());
|
|
||||||
availTable.setContentProvider(new IStructuredContentProvider() {
|
|
||||||
@Override
|
|
||||||
public Object[] getElements(Object inputElement) {
|
|
||||||
try {
|
|
||||||
return manager.getAllToolChains().toArray();
|
|
||||||
} catch (CoreException e) {
|
|
||||||
CUIPlugin.log(e.getStatus());
|
|
||||||
return new Object[0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
Composite availButtonComp = new Composite(availGroup, SWT.NONE);
|
Composite availButtonComp = new Composite(availGroup, SWT.NONE);
|
||||||
availButtonComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true));
|
availButtonComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true));
|
||||||
|
@ -145,10 +143,38 @@ public class ToolChainPreferencePage extends PreferencePage implements IWorkbenc
|
||||||
availUp = new Button(availButtonComp, SWT.PUSH);
|
availUp = new Button(availButtonComp, SWT.PUSH);
|
||||||
availUp.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, false, false));
|
availUp.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, false, false));
|
||||||
availUp.setText(CUIMessages.ToolChainPreferencePage_Up);
|
availUp.setText(CUIMessages.ToolChainPreferencePage_Up);
|
||||||
|
availUp.addSelectionListener(new SelectionAdapter() {
|
||||||
|
@Override
|
||||||
|
public void widgetSelected(SelectionEvent e) {
|
||||||
|
int i = availTable.getTable().getSelectionIndex();
|
||||||
|
if (i < 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
IToolChain tc = toolChains.get(i - 1);
|
||||||
|
toolChains.set(i - 1, toolChains.get(i));
|
||||||
|
toolChains.set(i, tc);
|
||||||
|
availTable.refresh();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
availDown = new Button(availButtonComp, SWT.PUSH);
|
availDown = new Button(availButtonComp, SWT.PUSH);
|
||||||
availDown.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, false, false));
|
availDown.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, false, false));
|
||||||
availDown.setText(CUIMessages.ToolChainPreferencePage_Down);
|
availDown.setText(CUIMessages.ToolChainPreferencePage_Down);
|
||||||
|
availDown.addSelectionListener(new SelectionAdapter() {
|
||||||
|
@Override
|
||||||
|
public void widgetSelected(SelectionEvent e) {
|
||||||
|
int i = availTable.getTable().getSelectionIndex();
|
||||||
|
if (i < 0 || i > toolChains.size() - 2) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
IToolChain tc = toolChains.get(i + 1);
|
||||||
|
toolChains.set(i + 1, toolChains.get(i));
|
||||||
|
toolChains.set(i, tc);
|
||||||
|
availTable.refresh();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Group userGroup = new Group(control, SWT.NONE);
|
Group userGroup = new Group(control, SWT.NONE);
|
||||||
userGroup.setText(CUIMessages.ToolChainPreferencePage_UserDefinedToolchains);
|
userGroup.setText(CUIMessages.ToolChainPreferencePage_UserDefinedToolchains);
|
||||||
|
@ -156,12 +182,6 @@ public class ToolChainPreferencePage extends PreferencePage implements IWorkbenc
|
||||||
userGroup.setLayout(new GridLayout(2, false));
|
userGroup.setLayout(new GridLayout(2, false));
|
||||||
|
|
||||||
userTable = createToolChainTable(userGroup);
|
userTable = createToolChainTable(userGroup);
|
||||||
userTable.getTable().addSelectionListener(new SelectionAdapter() {
|
|
||||||
@Override
|
|
||||||
public void widgetSelected(SelectionEvent e) {
|
|
||||||
updateButtons();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
userTable.setLabelProvider(new TableLabelProvider());
|
userTable.setLabelProvider(new TableLabelProvider());
|
||||||
userTable.setContentProvider(new IStructuredContentProvider() {
|
userTable.setContentProvider(new IStructuredContentProvider() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -179,6 +199,12 @@ public class ToolChainPreferencePage extends PreferencePage implements IWorkbenc
|
||||||
return tcs.toArray();
|
return tcs.toArray();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
userTable.getTable().addSelectionListener(new SelectionAdapter() {
|
||||||
|
@Override
|
||||||
|
public void widgetSelected(SelectionEvent e) {
|
||||||
|
updateButtons();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Composite userButtonComp = new Composite(userGroup, SWT.NONE);
|
Composite userButtonComp = new Composite(userGroup, SWT.NONE);
|
||||||
userButtonComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true));
|
userButtonComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true));
|
||||||
|
@ -256,6 +282,13 @@ public class ToolChainPreferencePage extends PreferencePage implements IWorkbenc
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
toolChains = new ArrayList<IToolChain>();
|
||||||
|
try {
|
||||||
|
toolChains.addAll(manager.getAllToolChains());
|
||||||
|
} catch (CoreException e) {
|
||||||
|
CUIPlugin.log(e.getStatus());
|
||||||
|
}
|
||||||
|
|
||||||
availTable.setInput(manager);
|
availTable.setInput(manager);
|
||||||
userTable.setInput(manager);
|
userTable.setInput(manager);
|
||||||
updateButtons();
|
updateButtons();
|
||||||
|
@ -269,6 +302,24 @@ public class ToolChainPreferencePage extends PreferencePage implements IWorkbenc
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean performOk() {
|
||||||
|
if (!super.performOk()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (!toolChains.equals(manager.getAllToolChains())) {
|
||||||
|
manager.setToolChainOrder(toolChains);
|
||||||
|
}
|
||||||
|
} catch (CoreException e) {
|
||||||
|
CUIPlugin.log(e.getStatus());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
private TableViewer createToolChainTable(Composite parent) {
|
private TableViewer createToolChainTable(Composite parent) {
|
||||||
Composite tableComp = new Composite(parent, SWT.NONE);
|
Composite tableComp = new Composite(parent, SWT.NONE);
|
||||||
tableComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
|
tableComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
|
||||||
|
@ -280,9 +331,13 @@ public class ToolChainPreferencePage extends PreferencePage implements IWorkbenc
|
||||||
|
|
||||||
TableColumnLayout tableLayout = new TableColumnLayout();
|
TableColumnLayout tableLayout = new TableColumnLayout();
|
||||||
|
|
||||||
|
TableColumn tableTypeColumn = new TableColumn(table, SWT.LEAD);
|
||||||
|
tableTypeColumn.setText(CUIMessages.ToolChainPreferencePage_Type);
|
||||||
|
tableLayout.setColumnData(tableTypeColumn, new ColumnWeightData(2));
|
||||||
|
|
||||||
TableColumn tableNameColumn = new TableColumn(table, SWT.LEAD);
|
TableColumn tableNameColumn = new TableColumn(table, SWT.LEAD);
|
||||||
tableNameColumn.setText(CUIMessages.ToolChainPreferencePage_Name);
|
tableNameColumn.setText(CUIMessages.ToolChainPreferencePage_Name);
|
||||||
tableLayout.setColumnData(tableNameColumn, new ColumnWeightData(6));
|
tableLayout.setColumnData(tableNameColumn, new ColumnWeightData(10));
|
||||||
|
|
||||||
TableColumn tableOSColumn = new TableColumn(table, SWT.LEAD);
|
TableColumn tableOSColumn = new TableColumn(table, SWT.LEAD);
|
||||||
tableOSColumn.setText(CUIMessages.ToolChainPreferencePage_OS);
|
tableOSColumn.setText(CUIMessages.ToolChainPreferencePage_OS);
|
||||||
|
@ -298,9 +353,9 @@ public class ToolChainPreferencePage extends PreferencePage implements IWorkbenc
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateButtons() {
|
private void updateButtons() {
|
||||||
boolean availSelected = availTable.getTable().getSelectionCount() > 0;
|
int i = availTable.getTable().getSelectionIndex();
|
||||||
availUp.setEnabled(availSelected);
|
availUp.setEnabled(i > 0);
|
||||||
availDown.setEnabled(availSelected);
|
availDown.setEnabled(i >= 0 && i < toolChains.size() - 2);
|
||||||
|
|
||||||
boolean userSelected = userTable.getTable().getSelectionCount() > 0;
|
boolean userSelected = userTable.getTable().getSelectionCount() > 0;
|
||||||
userEdit.setEnabled(userSelected);
|
userEdit.setEnabled(userSelected);
|
||||||
|
|
|
@ -12,7 +12,6 @@ import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.build.IToolChain;
|
|
||||||
import org.eclipse.cdt.core.build.IToolChainManager;
|
import org.eclipse.cdt.core.build.IToolChainManager;
|
||||||
import org.eclipse.cdt.core.build.IToolChainProvider;
|
import org.eclipse.cdt.core.build.IToolChainProvider;
|
||||||
import org.eclipse.cdt.msw.build.Activator;
|
import org.eclipse.cdt.msw.build.Activator;
|
||||||
|
@ -72,10 +71,4 @@ public class MSVCToolChainProvider implements IToolChainProvider {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IToolChain getToolChain(String id, String version) throws CoreException {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return IToolChainProvider.super.getToolChain(id, version);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue