创建源代码编辑器我需要了解什么?
假设我想为 ocaml 编程语言创建一个源代码编辑器,我从哪里开始?我希望为 Windows 平台创建一个编辑器作为一个业余爱好项目。我的主要技能是网络开发。我很久以前就开发过Windows应用程序。我不知道如何使用当今可用的工具来完成它。我有 Visual Studio 2008,C# 是我选择的语言。
Say I want to create a source code editor for ocaml programming language, where do I start? I am looking to create an editor for the Windows platform as a hobby project. My primary skill is in web development. I have developed windows apps long time ago. I have no clue how it is done with todays available tools. I have visual studio 2008 and C# is my language of choice.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您需要知道:
您可能想看看一些开源编辑器,如 dev-c++ 或 gedit
另外,由于您个人更喜欢 web-devvy,您可能想要开始创建一个在网络浏览器中运行的程序。这通常更容易,并且可以帮助您了解创建代码编辑器的基础知识。稍后您可以随时为桌面编写一个。
You need to know:
You might want to take look at some open source editors like dev-c++ or gedit
Also, as you in person are more web-devvy, you might want to start creating one which runs in a web browser. This is often easier and helps you understand the basics of creating a code editor. Later you can always write one for desktops.
如果您最熟悉 Visual Studio,那么您可以使用 Visual Studio Shell 在此基础上创建您自己的 IDE。
这是一个播客,提供了很好的概述:
http://www.code- magazine.com/codecast/index.aspx?messageid=32b9401a-140d-4acb-95bb-6accd3a3dafc
另外,作为参考,IronPython Studio 是使用 Visual Studio 2008 Shell 创建的:
http://ironpythonstudio.codeplex.com/
浏览源代码应该会给你一个很好的起点。
If you are most comfortable in Visual Studio, then you can use the Visual Studio Shell to create your own IDE based on that foundation.
Here is a podcast that gives a good overview:
http://www.code-magazine.com/codecast/index.aspx?messageid=32b9401a-140d-4acb-95bb-6accd3a3dafc
Also, as a reference, the IronPython Studio was created using the Visual Studio 2008 Shell:
http://ironpythonstudio.codeplex.com/
Browsing that source code should give you a good starting point.
一个更轻量级的替代方案是使用 RichEdit 控件
示例:
http://www.codeproject.com/Messages/3401956/NET- Richedit-Control.aspx
a lighter-weight alternative is to use the RichEdit control
example:
http://www.codeproject.com/Messages/3401956/NET-Richedit-Control.aspx
您可以使用 Scintilla。它具有语法突出显示和其他一些功能。此外,此处还提供了 .NET 版本。
另一个不错的工具是Alsing Syntax Box:
使用 Alsing Syntax Box,您可以定义语法文件(就像 这个用于 C#),后来有一个 智能感知之类的功能。
您可以为您的编辑器从其中之一开始。
You could use Scintilla. It has syntax highlighting and some other features. Also, it has a .NET Version available here.
Another good tool is Alsing Syntax Box:
With Alsing Syntax Box, you can define a syntax file (just like this one for C#) and later have a intellisense like feature.
You can start with one of them for your editor.