Open kuiperzone opened 1 year ago
Hi! This sounds like a cool idea! Unfortunately I don't have much time to implement this either, but I agree it would be interesting.
In principle, it would be as simple as using a CSharpEditor.Editor
control instead of a CodeTextBox
to for C# code files. However, at present CSharpEditor only supports individual source files (basically, I just needed a way for users to create simple scripts, hence I didn't bother with making it possible to work with full solutions. It shouldn't be too hard to implement this, though - basically, one would just need a good way of exposing the workspace that is created in the CSharpSourceEditor
constructor, in order to add multiple Projects
and Documents
to it and to reuse it for multiple editor controls. The autocompletion and intellisense features should then be able to pick up any classes or methods defined in those other projects or source files.
As you mention, CSharpEditor is currently released under a GPLv3 licence, but I wouldn't mind releasing under LGPLv3 if it helps - I just need to double-check that all of the dependencies have compatible licenses.
Hey thanks for reply. Will keep it in mind for the future when I have some time.
I think GPLv3 is good. Avant Garde is also GPL, so compatible. Actually Mark Rendle convinced me that MIT was a bad idea: https://youtu.be/hCvHTrUh4os?t=2601
Not an issue, more of a thought and suggestion (and possible note to self for the future). But first, well done on writing this component. Just found found it and it gave me an idea.
Am thinking that it might be good to combine this with the following project of which I am the author:
https://github.com/kuiperzone/AvantGarde
This is an Avalonia XAML previewer. But the thing is that it is almost a fully fledged IDE. You can see below, it shows an open project with a view of C# text file (read-only).
Now, I wrote this with the intention that it should be a standalone XAML previewer to be used in conjunction with an existing IDE, rather than be an IDE plugin. In doing so, I ended up with many of the features of an IDE, including a "project explorer".
I intentionally restricted the application to viewing project files only (it is a previewer after all). Moreover, by default (it can be unset in the preferences [NB]) the app only shows AXAML files. However, I saw that it was the most natural thing in the world to want to start editing the AXAML files in the application. But once I allowed this, I realised that people would then need to edit *.cs files, and then they would need syntax, intellisense and autocompletion. I chose not to go down that route and keep things read-only because I did not want to write and support these features.
However, your C# Editor looks like that it might provide the C# editing features I was so fearful of ... and if it and Avant Garde were to be combined, that would give a fully fledged IDE on LINUX (and Windows) with an Avalonia previewer and project explorer. Presumably?
Both our projects are GPLv3. Am busy with commercial work at moment, but this is something I may have a shot at later. Alternatively, it would be great it someone else took on the idea and I would be supportive of it.
[NB] In the "Solution Preferences" (below) the default "Include File Patterns" should be set to "*" and the project explorer will then show all files in the project, including C#, binaries and text files (as seen in the screenie above). By default, only AXAML and image files are shown, but if you change this setting as just described, you will find that there are built in icons for all project files types (I know cos I drew them all!).