Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.console.MessageConsoleStream;
import org.eclipse.ui.ide.IDE;
import org.eclipse.ui.intro.IIntroPart;
import org.osgi.service.prefs.Preferences;

import com.espressif.idf.core.IDFEnvironmentVariables;
Expand All @@ -37,6 +39,7 @@
import com.espressif.idf.core.tools.EimLoader;
import com.espressif.idf.core.tools.ToolInitializer;
import com.espressif.idf.core.tools.exceptions.EimVersionMismatchException;
import com.espressif.idf.core.tools.launch.LaunchResult;
import com.espressif.idf.core.tools.vo.EimJson;
import com.espressif.idf.core.tools.watcher.EimJsonWatchService;
import com.espressif.idf.core.util.IDFUtil;
Expand All @@ -49,8 +52,6 @@
import com.espressif.idf.ui.tools.manager.EimEditorInput;
import com.espressif.idf.ui.tools.watcher.EimJsonUiChangeHandler;

import com.espressif.idf.core.tools.launch.LaunchResult;

/**
* Startup class to handle the tools
*
Expand All @@ -71,6 +72,7 @@ public class EspressifToolStartup implements IStartup
@Override
public void earlyStartup()
{
restoreIntroPage();
preferences = org.eclipse.core.runtime.preferences.InstanceScope.INSTANCE.getNode(UIPlugin.PLUGIN_ID);
toolInitializer = new ToolInitializer(preferences);
standardConsoleStream = getConsoleStream(false);
Expand Down Expand Up @@ -128,6 +130,20 @@ else if (toolInitializer.isEimIdfJsonPresent() && !toolInitializer.isEspIdfSet()

}

private void restoreIntroPage()
{
Display.getDefault().asyncExec(() -> {
IIntroPart introPart = PlatformUI.getWorkbench().getIntroManager().getIntro();

if (introPart != null)
{
PlatformUI.getWorkbench().getIntroManager().closeIntro(introPart);
PlatformUI.getWorkbench().getIntroManager()
.showIntro(PlatformUI.getWorkbench().getActiveWorkbenchWindow(), false);
}
});
}

private boolean checkIfEimPathMacOsIsInApplications()
{
if (!Platform.getOS().equals(Platform.OS_MACOSX))
Expand Down