Suggestion: Scintilla Text Editor

Topics: Development, Ideas, suggestions and improvements
Developer
May 30, 2013 at 5:25 AM
I was looking at some of the designer source and noticed that this project currently uses a richTextBox control. A powerful tool that I have come across is the Scintilla Text Editor. It's a control derived from (I believe) the Systems.Windows.Forms.RichTextBox. It's an extremely nice tool for a project such as this one.


I program with C# on a daily basis and would be happy to contribute to this project.

Thanks,
Ro
Coordinator
May 30, 2013 at 7:27 AM
The RichTextBox was a placeholder while the UI was being completed, and now it is completed, but currently I haven't been focused on the syntax highlighting. You're welcome to work on it if you like, some of the potential features I was considering were autocomplete, syntax highlighting (obviously) and a few other things.

I'll add you as a developer, if you have any questions or are unsure about anything just post here.
Developer
May 30, 2013 at 11:56 AM
Aurora01 wrote:
The RichTextBox was a placeholder while the UI was being completed, and now it is completed, but currently I haven't been focused on the syntax highlighting. You're welcome to work on it if you like, some of the potential features I was considering were autocomplete, syntax highlighting (obviously) and a few other things.

I'll add you as a developer, if you have any questions or are unsure about anything just post here.
Alright. Are you just in design stages at the moment or is there anything specific you would like me to work on?
Coordinator
May 30, 2013 at 6:01 PM
If you're interested in the syntax highlighting etc, it would be great for you to work on that.
Developer
May 30, 2013 at 11:33 PM
Aurora01 wrote:
If you're interested in the syntax highlighting etc, it would be great for you to work on that.
Alright :)

I've started working on it for the RichTextBox control. Since this is my first time in an open-source project, don't hesitate to give feedback on my code :)

Thanks,
Ro
Developer
May 31, 2013 at 3:32 AM
Aurora01 wrote:
If you're interested in the syntax highlighting etc, it would be great for you to work on that.
I added a file for syntax highlighting. You can take a look.

File Name: OcularSyntaxHighlighting.cs

Again, it's not the best. I would recommend using Scintilla because it is extremely powerful and already has features for you to enable syntax highlighting for different langauges.

;)
Coordinator
May 31, 2013 at 7:41 AM
Oh, sorry, I thought you were already about to implement Scintilla. If you want to add Scintilla, please do. Then you could maybe focus on autocomplete?
Developer
May 31, 2013 at 2:19 PM
Aurora01 wrote:
Oh, sorry, I thought you were already about to implement Scintilla. If you want to add Scintilla, please do. Then you could maybe focus on autocomplete?
Sure, I'll implement Scintilla. I thought you wanted me to use the RTB control still. My fault for not reading correctly, I apologize. I will get started on that soon :).
Developer
Jun 2, 2013 at 2:17 AM
Aurora01 wrote:
Oh, sorry, I thought you were already about to implement Scintilla. If you want to add Scintilla, please do. Then you could maybe focus on autocomplete?
I've added Scintilla and syntax highlighting. I've also made some changes when you add a document so you can modify each panel's Scintilla textbox easier.

;)
Coordinator
Jun 2, 2013 at 7:25 AM
Great work! If you want a challenge you could start writing an intelligent autocomplete for HTML, e.g. closes tags that are open, suggests attributes, etc.
Developer
Jun 2, 2013 at 5:39 PM
Aurora01 wrote:
Great work! If you want a challenge you could start writing an intelligent autocomplete for HTML, e.g. closes tags that are open, suggests attributes, etc.
Alright, I've added an Auto-Complete feature :).

Feel free to review my code.

Thanks,
Ro
Coordinator
Jun 2, 2013 at 5:44 PM
That's good. Hmmm, maybe if you're interested you could add some of the logic for the toolbar buttons? Don't worry about the sidebar ones, I'll try and add their functionality later.
Developer
Jun 2, 2013 at 6:30 PM
Aurora01 wrote:
That's good. Hmmm, maybe if you're interested you could add some of the logic for the toolbar buttons? Don't worry about the sidebar ones, I'll try and add their functionality later.
Alright, sure. But is my code looking alright? Don't hesitate to criticize my code.
Coordinator
Jun 2, 2013 at 6:55 PM
There are no direct problems with it - the only improvement I could see is to take a more object oriented approach and have objects with data about each of the tags, and then you could manipulate them more easily in the long term, however the code does exactly what it needs to, and it's quite clean.
Developer
Jun 2, 2013 at 7:24 PM
Aurora01 wrote:
There are no direct problems with it - the only improvement I could see is to take a more object oriented approach and have objects with data about each of the tags, and then you could manipulate them more easily in the long term, however the code does exactly what it needs to, and it's quite clean.
Alright, thanks for the feedback :)
Developer
Jun 3, 2013 at 1:03 AM
Aurora01 wrote:
That's good. Hmmm, maybe if you're interested you could add some of the logic for the toolbar buttons? Don't worry about the sidebar ones, I'll try and add their functionality later.
I've added opening of files, saving of files, and quick saving of files. In addition, I've fixed a few bugs and added a few other things.

I'll make it automatically highlight the file based on it's extension and make it be able to run the html page in the user's default browser tomorrow.

Thanks,
Ro
Coordinator
Jun 7, 2013 at 6:52 PM
Hi, I'm just wondering if you're experiencing difficulty in modifying the frmDocument toolbars, or whether it is just an issue on my machine.
Coordinator
Jun 8, 2013 at 9:34 AM
I believe it's a bug of Krypton. I used Krypton instead of writing my own custom renderers to save time, but it appears that Krypton's Toolstrip renderer doesn't work well.
Coordinator
Jun 8, 2013 at 12:01 PM
I looked to see if other people had a similar problem. and I think I know the issue. I'll keep everyone informed on my progress.
Coordinator
Jun 8, 2013 at 12:31 PM
My original solution does not work as I had hoped, but there is a work around of deleting all the lines in the designer generated code that says "Readonly controls collection". It unfortunately requires this to be done every time you make a change in the designer.