Skip to content

feat: Multiple IDE's support#2683

Merged
Kryptos-FR merged 10 commits into
stride3d:masterfrom
Jklawreszuk:better-ide-support
Mar 25, 2025
Merged

feat: Multiple IDE's support#2683
Kryptos-FR merged 10 commits into
stride3d:masterfrom
Jklawreszuk:better-ide-support

Conversation

@Jklawreszuk

Copy link
Copy Markdown
Collaborator

PR Details

PR offers the choice of opening projects from within GameStudio using two additional and very popular IDEs among .NET developers : Rider and VSCode/VSCodium

image

Purpose

  • Not everyone likes the VisualStudio product and Rider and VSCode can be good alternatives
  • This change also ensures non-Windows developers in the future will be able to open IDE's available on their OS (see Cross-platform editor rewrite - prototype #2034)

I also Introduced and move almost all classes from Stride.Core.VisualStudio into Stride.Core.CodeEditor - The previous namespace contained abstractions around .NET solution file. In fact, the namespace may have implied that 'Solution' is exclusive to Visual Studio only although this is not true - We can also manage them from dotnet cli, Rider or VSCode with Devkit plugin.

Other changes worth mentioning are :
(1) moving DefaultIDE into IDEInfo,
(2) Remove unused parameters in IDEInfo and introduce IDEType,
(3) VisualStudioVersions.AvailableInstances are returning value only on Windows
(4) New, neutral open IDE icon I made using Metro UI Icons - if you have a better idea for an icon I'm open for suggestions

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have built and run the editor to try this change out.
  • I have built and run VSPlugin installer

@Kryptos-FR Kryptos-FR self-requested a review March 21, 2025 21:06
@Kryptos-FR

Copy link
Copy Markdown
Member

Thanks. I'll review it soon. Others can also comment and/or try it out with different configurations.

@Kryptos-FR Kryptos-FR left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick review (incomplete).

Comment thread sources/Directory.Packages.props Outdated
using Stride.Assets;
using Stride.Graphics;
using Stride.Core.VisualStudio;
using Stride.Core.CodeEditor.VisualStudio;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure about the namespace CodeEditor. We will likely have an integrated code editor in the new studio. But here it's about supporting third parties. Maybe CodeEditorSupport or CodeEditing, or something else (CodeEditors)?

@Jklawreszuk Jklawreszuk Mar 22, 2025

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I also agree that it can be better expressed, naming sometimes is just hard😅
After some longer thought, I think it'd be valid to separate classes into two namespaces:

  1. Stride.Core.Solution(s) - Contains classes around Solution entity and Solution management
  2. Stride.Core.CodeEditorSupport - Contains classes related to Code Editor support

Let me know what you think about this change

Comment thread sources/core/Stride.Core.Design/CodeEditor/IDEType.cs Outdated
@Ethereal77

Copy link
Copy Markdown
Contributor

Maybe related to this and an interesting thing to take into account:
I think currently Game Studio manages solution files using old code from some library that allows to read/write .sln files.
Microsoft has just released as open source a library that allows to manage not only .sln files, but also the new .slnx format.

@Jklawreszuk

Copy link
Copy Markdown
Collaborator Author

Thanks for pointing out, this seems as a good feature in a separate PR 😅

@Kryptos-FR

Kryptos-FR commented Mar 24, 2025

Copy link
Copy Markdown
Member

VS Code is installed on my machine, yet it doesn't show as an option (opening an existing project). Do I need to change some config?

edit: I checked my PATH and code.cmd is available under %localappdata%\Programs\Microsoft VS Code\bin
edit 2: I'm dumb I used a command line to build without the nuget packages (-p:StrideSkipAutoPack=true).
edit 3: It crashes on start from the Launcher.
edit 4: It works when debugging from Visual Studio (abeit the issues mentioned in my review). Maybe my local build is corrupted which explain the Launcher crash. I'll investigate.
edit 5: It works from the Launcher after a full rebuild. Provided the issues are fixed, I'll then approve it. Thanks.

Comment thread sources/core/Stride.Core.Design/CodeEditorSupport/IDEInfo.cs Outdated
Comment thread sources/core/Stride.Core.Design/CodeEditorSupport/VSCode/VSCodeVersions.cs Outdated
Comment thread sources/core/Stride.Core.Design/CodeEditorSupport/Rider/RiderVersions.cs Outdated
Comment thread sources/core/Stride.Core.Design/CodeEditorSupport/VSCode/VSCodeVersions.cs Outdated
Comment thread sources/core/Stride.Core.Design/CodeEditorSupport/VSCode/VSCodeVersions.cs Outdated
@Jklawreszuk Jklawreszuk requested a review from Kryptos-FR March 24, 2025 16:54
@Kryptos-FR

Copy link
Copy Markdown
Member

@Jklawreszuk are you done with this PR? I saw the latest change. If it's ready we can merge it.

@Jklawreszuk

Copy link
Copy Markdown
Collaborator Author

@Kryptos-FR Yes, that's the last change that hides cmd window when running vscode. I believe my PR is now ready to merge 😀

@Kryptos-FR Kryptos-FR merged commit ccf4ff6 into stride3d:master Mar 25, 2025
@Jklawreszuk Jklawreszuk deleted the better-ide-support branch March 25, 2025 22:01
Jklawreszuk added a commit to Jklawreszuk/stride that referenced this pull request Mar 28, 2025
Jklawreszuk added a commit to Jklawreszuk/stride that referenced this pull request Mar 28, 2025
Jklawreszuk added a commit to Jklawreszuk/stride that referenced this pull request Mar 28, 2025
Jklawreszuk added a commit to Jklawreszuk/stride that referenced this pull request Mar 28, 2025
Kryptos-FR pushed a commit that referenced this pull request Mar 29, 2025
Kryptos-FR added a commit to Kryptos-FR/stride that referenced this pull request May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants