espressif / idf-eclipse-plugin

Espressif-IDE (based on Eclipse CDT) for ESP-IDF CMake based projects 4.x and above
Eclipse Public License 2.0
302 stars 121 forks source link

IEP-1103: Fix for opening multiple files in sdkconfig editor and association of all the file starting with sdkconfig to the editor #884

Closed alirana01 closed 7 months ago

alirana01 commented 8 months ago

Description

By default the sdkconfig editor was only opening the sdkconfing file and even when manually opening other files with editor it was only showing contents of the default sdkconfig.

I have added required changes to configuration server to launch and handle different files at the same time on same project.

Fixes # (IEP-1103)

Type of change

Please delete options that are not relevant.

How has this been tested?

Test 🧪
Open the sdkconfig in editor, change some settings, and build the project.
Open a different file, for example sdkconfig.old, make changes, and verify that changes do not affect other files.
Try opening and editing two files simultaneously in the editor.
Verify that any file starting with the name sdkconfig is opened in the sdkconfig editor when double-clicked.
Ensure that the tab in the editor is showing the file name to avoid confusion when editing different files.

Test Configuration:

Checklist

Summary by CodeRabbit

coderabbitai[bot] commented 8 months ago

Walkthrough

The changes across various files in the Espressif IDF Eclipse plugin enhance the management of the configuration server. They introduce a more granular file-based control for the JSON configuration server, including a new key type for server mapping and additional parameters for server operations. This suggests a shift towards a more file-centric approach for managing configurations.

Changes

File Path Change Summary
bundles/com.espressif.idf.sdk.config.core/src/com/espressif/idf/sdk/config/core/IDFConstants.java Added a comment to the declaration of ESP_CORE_DUMP_SCRIPT in the IDFConstants interface.
bundles/com.espressif.idf.sdk.config.core/src/com/espressif/idf/sdk/config/core/SDKConfigPropertyTester.java Added import statement for StringUtil, refactored logic in test method.
bundles/com.espressif.idf.sdk.config.core/src/com/espressif/idf/sdk/config/core/server/ConfigServerManager.java Replaced map key type, modified methods to accept both IProject and IFile, introduced ProjectFileMapKey class.
bundles/com.espressif.idf.sdk.config.core/src/com/espressif/idf/sdk/config/core/server/JsonConfigServer.java Added imports, declarations, modified constructor, methods for handling file-based configuration.
bundles/com.espressif.idf.sdk.config.ui/src/com/espressif/idf/sdk/config/ui/ConfigContentProvider.java Updated ConfigContentProvider to accept IFile parameter in constructor.
bundles/com.espressif.idf.sdk.config.ui/src/com/espressif/idf/sdk/config/ui/LoadSdkConfigHandler.java Refactored code to handle resource selection, updated method calls.
bundles/com.espressif.idf.sdk.config.ui/src/com/espressif/idf/sdk/config/ui/SDKConfigurationEditor.java Added import, modified methods to include file handling.

Related issues

"In code's woven warren, changes hop and bound,
🌟 With files and functions, new paths are found.
A rabbit's touch, so deft, so slight,
Config servers dance in the moonlit night."

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

Tips ### Chat There are 3 ways to chat with CodeRabbit: - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit .` - `Generate unit-tests for this file.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit tests for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai generate interesting stats about this repository from git and render them as a table.` - `@coderabbitai show all the console.log statements in this repository.` - `@coderabbitai read src/utils.ts and generate unit tests.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (invoked as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai help` to get help. Additionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Configration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - The JSON schema for the configuration file is available [here](https://coderabbit.ai/integrations/coderabbit-overrides.v2.json). - If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json` ### CodeRabbit Discord Community Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback.
kolipakakondal commented 8 months ago

@AndriiFilippov Can you verify this? Create a seperate configuration file for each target, maintain different settings, and then try to open them and save. See if you are able to save them to the same file that you have opened.

AndriiFilippov commented 7 months ago

@alirana01 hi !

Steps: Create project - build project - change some settings in sdkconfg file - build project - delete sdk file - change some settings in sdk old file - build project - sdk.old.old created instead of sdkconfig. So it use sdk.old during build process instead of using sdkconfig file.

image

Once Build folder is deleted - build project - sdkconfig file created as it should be.

AndriiFilippov commented 7 months ago

@alirana01 hi!

Steps:

Create project - build - open sdk and change some settings - build again - open sdk file - close sdk file - open sdk.old file - close sdk.old file - build project - it re-build entire project again.

kolipakakondal commented 7 months ago
  • close sdk.old file - build project - it re-build entire project again.

Does it mean that sdk.old overwritting some of the settings in the original sdk file as well?