douyunjiaok300404 2012-11-06 07:47
浏览 85
已采纳

使用代码完成功能构建文本编辑器

Presently I'm trying to build up a text editor for the PHP language which should have the feature of code completion, i.e. if i start to type a word a dynamically created drop down list will display all available keywords starts with my typed letters. Can any body suggest me how it can be done. Idea will be enough for me. If possible please provide me a link to such simple application build in C#.

  • 写回答

2条回答 默认 最新

  • dsznndq4912405 2012-11-06 07:58
    关注

    Considering that in general it's not an easy task, so there is no some "easy" application.

    Even if in general idea is not a rocket science. You need to define a dictionary of words, corresponding to some key. When you type "." (in C#) you have to pick from the dictionary all words corresponding to the key equal to the word found on left side from the "."

    To do it real working applicaiton is not so easy. By the way I can recommend to have a look on MonoDevlop look on their editor.

    I worked with it years ago to make a simple editor for DSL company needed, and spend not small amount of time to correctly understand intenals, integrate well "my new language", "detach" control from Mono and inject into our applicaitons, like a dockable window.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?