Skip to content

Commit

Permalink
fix(build_error): fixed the error message in case the toolchains are …
Browse files Browse the repository at this point in the history
…missing
  • Loading branch information
alirana01 committed Oct 30, 2024
1 parent 6f313aa commit d0bcd4d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@
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.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.debug.core.DebugPlugin;
Expand Down Expand Up @@ -278,7 +280,12 @@ private IBinary[] getBuildOutput(final IBinaryContainer binaries, final IPath ou
public ICMakeToolChainFile getToolChainFile() throws CoreException
{
ICMakeToolChainManager manager = IDFCorePlugin.getService(ICMakeToolChainManager.class);
this.toolChainFile = manager.getToolChainFileFor(getToolChain());
IToolChain toolChain = getToolChain();
if (toolChain == null)
{
throw new CoreException(new Status(IStatus.ERROR, IDFCorePlugin.PLUGIN_ID, Messages.IDFToolChainsMissingErrorMsg));
}
this.toolChainFile = manager.getToolChainFileFor(toolChain);
return toolChainFile;
}

Expand Down Expand Up @@ -388,6 +395,8 @@ private boolean buildPrechecks(IConsole console) throws Exception

return false;
}



return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class Messages extends NLS
public static String ToolsInitializationDifferentPathMessageBoxTitle;
public static String ToolsInitializationDifferentPathMessageBoxOptionYes;
public static String ToolsInitializationDifferentPathMessageBoxOptionNo;
public static String IDFToolChainsMissingErrorMsg;

public static String RefreshingProjects_JobName;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ ToolsInitializationDifferentPathMessageBoxOptionYes=Use New Path
ToolsInitializationDifferentPathMessageBoxOptionNo=Use Old Path
RefreshingProjects_JobName=Refreshing Projects...
IDFBuildConfiguration_PreCheck_DifferentIdfPath=The project was built using the ESP-IDF located at the {0} path.\nThe currently active ESP-IDF path in the IDE is {1}.\nPlease clean the project using "ESP-IDF:Project Full Clean" menu option to use the active ESP-IDF configuration.
IDFToolChainsMissingErrorMsg=Toolchains are missing please verify that idf tools are installed

0 comments on commit d0bcd4d

Please sign in to comment.