-
Notifications
You must be signed in to change notification settings - Fork 133
IEP-1669 Automatically Run IDF Activation Script on Terminal Startup #1388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
795b7d8
feat: using activation scrip for esp-idf terminal
sigmaaa dc57bfb
fix: adding mementoHandler back
sigmaaa e82bd5b
fix: change assertTrue to see actual test output
sigmaaa c955716
fix: add smart check for encoding in tests
sigmaaa 72f48b5
feat: added color presets to the terminal
sigmaaa d1ee2fa
fix: getting selected ID from env variables
sigmaaa fa20ea3
fix: code cleanup and possible NPE fix
sigmaaa c087a41
feat: added assert to restore check to provide user friendly msg
sigmaaa a10e5ac
fix: change the assert order
sigmaaa 10eb743
fix: removed empty duplicate property
sigmaaa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
....terminal.connector/src/com/espressif/idf/terminal/connector/controls/messages.properties
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,4 @@ | ||
| IDFConsoleWizardConfigurationPanel_MissingProjectErrorMsg=Please create and select an ESP-IDF Project first. | ||
| IDFConsoleWizardConfigurationPanel_IDFConsoleWizardConfigurationPanel_ProjectLabel=Project name: | ||
| IDFConsoleWizardConfigurationPanel_IDFConsoleWizardConfigurationPanel_ProjectLabel=Project name: | ||
| IDFConsoleWizardConfigurationPanel_TerminalColorPresetsLbl=Terminal Color Presets | ||
| IDFConsoleWizardConfigurationPanel_TerminalColorPresetsNote=Note: This setting applies globally to all Terminal views in the workspace. |
75 changes: 75 additions & 0 deletions
75
...minal.connector/src/com/espressif/idf/terminal/connector/controls/themes/CustomTheme.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| package com.espressif.idf.terminal.connector.controls.themes; | ||
|
|
||
| import java.util.EnumMap; | ||
| import java.util.Map; | ||
|
|
||
| import org.eclipse.jface.preference.IPreferenceStore; | ||
| import org.eclipse.terminal.model.TerminalColor; | ||
|
|
||
| /** | ||
| * Base class for defining a terminal theme using a Map. | ||
| */ | ||
| public class CustomTheme implements ITerminalTheme { | ||
|
|
||
| private final String id; | ||
| private final String label; | ||
| protected final Map<TerminalColor, String> colorMap = new EnumMap<>(TerminalColor.class); | ||
|
|
||
| public CustomTheme(String id, String label) { | ||
| this.id = id; | ||
| this.label = label; | ||
| loadDefaults(); | ||
| configure(); | ||
| } | ||
|
|
||
| /** | ||
| * Subclasses should override this to set their specific colors. | ||
| */ | ||
| protected void configure() { | ||
| // Default implementation does nothing | ||
| } | ||
|
|
||
| @Override | ||
| public String getId() { | ||
| return id; | ||
| } | ||
|
|
||
| @Override | ||
| public String getLabel() { | ||
| return label; | ||
| } | ||
|
|
||
| /** | ||
| * Helper to set a color. | ||
| */ | ||
| protected void set(TerminalColor color, int r, int g, int b) { | ||
| colorMap.put(color, r + "," + g + "," + b); //$NON-NLS-1$ //$NON-NLS-2$ | ||
| } | ||
|
|
||
| @Override | ||
| public void apply(IPreferenceStore store) { | ||
| for (Map.Entry<TerminalColor, String> entry : colorMap.entrySet()) { | ||
| store.setValue(entry.getKey().name(), entry.getValue()); | ||
| } | ||
| } | ||
|
|
||
| private void loadDefaults() { | ||
| set(TerminalColor.BLACK, 0, 0, 0); | ||
| set(TerminalColor.RED, 205, 0, 0); | ||
| set(TerminalColor.GREEN, 0, 205, 0); | ||
| set(TerminalColor.YELLOW, 205, 205, 0); | ||
| set(TerminalColor.BLUE, 0, 0, 238); | ||
| set(TerminalColor.MAGENTA, 205, 0, 205); | ||
| set(TerminalColor.CYAN, 0, 205, 205); | ||
| set(TerminalColor.WHITE, 229, 229, 229); | ||
|
|
||
| set(TerminalColor.BRIGHT_BLACK, 0, 0, 0); | ||
| set(TerminalColor.BRIGHT_RED, 255, 0, 0); | ||
| set(TerminalColor.BRIGHT_GREEN, 0, 255, 0); | ||
| set(TerminalColor.BRIGHT_YELLOW, 255, 255, 0); | ||
| set(TerminalColor.BRIGHT_BLUE, 92, 92, 255); | ||
| set(TerminalColor.BRIGHT_MAGENTA, 255, 0, 255); | ||
| set(TerminalColor.BRIGHT_CYAN, 0, 255, 255); | ||
| set(TerminalColor.BRIGHT_WHITE, 255, 255, 255); | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check if this is already a pre-requisite plugin during the update site?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Kondal, we are already using com.google.gson and have it in the update site dependencies