What is an addin?! – http://wiki.sharpdevelop.net/SharpDevelopGlossary.ashx
Add-in – (aka. plugin, component) The add-in is the basic building block of the SharpDevelop component model. An addin is defined by an .addin XML definition file, and typically one (or more) Assemblies.
Since the Clarion 7 IDE is based on SharpDevelop you can get a lot out of the existing documentation and source that is available. One trick to remember though, when compiling your assemblies for use in the Clarion IDE make sure your references are pointing the those core assemblies not the SharpDevelop 2.2 ones!
First, for the impatient, jump right in with some examples!
- Cancel Build/Generate buttons on the output pad
- Clear, Select All and Copy All buttons on the errors pad
- Insert Clarion Color
- Bringing back the Remove Line keyboard shortcut
- SharpSelectWord for Clarion7
Helpful SharpDevelop links
- The folder doc/technotes in the SharpDevelop source code download contains an AddIn writing guideline and other information.
- SharpDevelop – AddIn Writing Help – http://wiki.sharpdevelop.net/AddinWritingHelp.ashx?HL=addin
- Add-in Developer Quick Start Guide – http://wiki.sharpdevelop.net/AddinDeveloperQuickStart.ashx?HL=addin
- SharpDevelop – 3rd Party Addins – http://wiki.sharpdevelop.net/3rdPartyAddins.ashx?HL=addin
- SharpDevelop – Screen recordings for developers –http://wiki.sharpdevelop.net/ScreenRecordingsForDevelopers.ashx?HL=addin
- ProgramArchitecture.pdf – http://www.sharpdevelop.com/TechNotes/
- Free eBook – Dissecting a C# Application, Inside SharpDevelop – http://www.computer-books.us/csharp_3.php
Downloading the (SharpDevelop) source
- You can also use the git repository to checkout a copy of the source (it used to be SVN but recently they switched to git)
While there isn’t much around there certainly is some. See the help for these topics.
- Customizing the Command Line Interface (ClarionCL.EXE)
- User’s Guide to ClarionCL.exe
Also of interest might be a search in the help with the term “reflector”.
- Reflector – http://www.red-gate.com/products/reflector/
- A .Net IDE (I have not yet tried writing an addin using Clarion# though I suppose it should be possible!)
- A text editor with a good multiple file search capability.
Choose your IDE
- Visual Studio – Not necessary but certainly a nice IDE to work on .net code!
- SharpDevelop – Either v2.2 for authenticity or the latest beta seems to work fine too.
Not necessary but very useful for learning. You could probably learn most of what you need from the docs and Reflector but having the actual source (well… a close match in most cases) can be good. (See above for links to the source downloads)
SharpDevelop also comes with an addin project to get you started but it is really little more than a directory structure.
This is optional but if you are building and testing a generic addin, something that doesn’t use any of the clarion assemblies then it is one option. The main advantage you get is that you can run the IDE in debug mode with output to a console renderer.
Enable debug output for the Clarion IDE
- Edit the file "\Clarion7\bin\clarion.exe.config"
- Underneath this line:
<appender-ref ref="ColoredConsoleAppender" />”
<appender-ref ref="FileAppender" />
- If you want, you can also add this:
<appender-ref ref="OutputDebugStringAppender" />
A file called "SharpDevelopLog.txt" will be generated in your clarion.exe directory and/or you can capture the output using something like DebugView from Sysinternals.
The IDE uses Log4Net to produce this, it looks like a nice tool. I like how they use methods for the different log levels rather than a parameter or something. Simple but makes the code very readable: Logging.Info(‘message’), Logging.Debug(‘message’), etc…