mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-02 22:05:44 +02:00
Make no toolchain error handling more generic and reuse with Qt
In particular when Qt Installs are missing. This is a similar scenario to when toolchains are missing. Change-Id: Ic78f71436e46c73900a556133c3883df807784d9
This commit is contained in:
parent
6f06e634c4
commit
2198597a98
4 changed files with 6 additions and 4 deletions
|
@ -126,7 +126,7 @@ public class CCorePlugin extends Plugin {
|
|||
*
|
||||
* @since 6.4
|
||||
*/
|
||||
public static final int STATUS_TOOLCHAIN_NOT_FOUND = 5;
|
||||
public static final int STATUS_BUILD_CONFIG_NOT_VALID = 5;
|
||||
|
||||
public static final String PLUGIN_ID = "org.eclipse.cdt.core"; //$NON-NLS-1$
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ public abstract class CBuildConfiguration extends PlatformObject
|
|||
tc = tcs.iterator().next();
|
||||
} else {
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID,
|
||||
CCorePlugin.STATUS_TOOLCHAIN_NOT_FOUND,
|
||||
CCorePlugin.STATUS_BUILD_CONFIG_NOT_VALID,
|
||||
String.format(Messages.CBuildConfiguration_ToolchainMissing, config.getName()),
|
||||
null));
|
||||
}
|
||||
|
|
|
@ -209,7 +209,7 @@ public class CBuildConfigurationManager implements ICBuildConfigurationManager,
|
|||
} catch (CoreException e) {
|
||||
IStatus status = e.getStatus();
|
||||
if (!status.getPlugin().equals(CCorePlugin.PLUGIN_ID)
|
||||
|| status.getCode() != CCorePlugin.STATUS_TOOLCHAIN_NOT_FOUND) {
|
||||
|| status.getCode() != CCorePlugin.STATUS_BUILD_CONFIG_NOT_VALID) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.ConsoleOutputStream;
|
||||
import org.eclipse.cdt.core.ErrorParserManager;
|
||||
import org.eclipse.cdt.core.IConsoleParser;
|
||||
|
@ -114,7 +115,8 @@ public class QtBuildConfiguration extends CBuildConfiguration
|
|||
|
||||
if (getQtInstall() == null) {
|
||||
throw new CoreException(
|
||||
Activator.error(String.format(Messages.QtBuildConfiguration_ConfigNotFound, name)));
|
||||
new Status(IStatus.ERROR, Activator.ID, CCorePlugin.STATUS_BUILD_CONFIG_NOT_VALID,
|
||||
String.format(Messages.QtBuildConfiguration_ConfigNotFound, name), null));
|
||||
}
|
||||
|
||||
String oldLaunchMode = settings.get(LAUNCH_MODE, null);
|
||||
|
|
Loading…
Add table
Reference in a new issue