Quantcast
Channel: SharpDevelop Community
Viewing all articles
Browse latest Browse all 1764

Extending/Reusing CodeEditor

$
0
0

Hello, first post here.

I've been working on building a WPF application with a scripting component, where I was hoping to reuse elements of SharpDevelop as an editor for sripts written in C#.

I'm writing a new assembly (called Client) that aims to load the addins AvalonEdit.AddIn, ICSharpCode.SharpDevelop, and CSharpBinding, all untouched from the latest SharpDevelop code on GitHub. Client itself directly references ICSharpCode.Core to build the AddInTree and use components from it. 

I'm apparently able to load all three addins using the AddIn architecture -  if I just place breakpoints and step through, it seems like everything is working fine there. To get to my question, I don't see what service allows creation of a new CodeEditor instance to be used in Client? AvalonEditControlService can create new SharpDevelopTextEditor's, which would seem to be as close as I can get. That's my first question. 

Second question is, assuming I can create new CodeEditors in Client, how would I actually reference properties of the same in Client? For example, I want to set the Filename for a CodeEditor but I can only cast to TextEditor (in ICSharpCode.AvalonEdit) since I cannot reference AvalonEdit.AddIn directly in Client without causing casting issues. 

Would certainly appreciate any guidance (realizing I may be missing fundamental things here). Thanks!

 

 

 

 

 


Viewing all articles
Browse latest Browse all 1764

Trending Articles