简体   繁体   English

蚀文本编辑器上的拖放

[英]eclipse drag and drop on text editor

I have a requirement for creating drag and drop plugin (just like window builder) where I have a view with buttons in it. 我需要创建拖放插件(就像窗口构建器一样),在其中有一个带有按钮的视图。 And if I drag a button and drop from the view I should be able to generate some code on the java text editor. 而且,如果我从视图中拖放一个按钮,则应该能够在Java文本编辑器上生成一些代码。

I want to create this plugin for generating the code. 我想创建这个插件来生成代码。 I don't have any knowledge in Eclipse plugin development. 我对Eclipse插件开发不了解。 I have gone through http://www.eclipse.org/articles/viewArticle/ViewArticle2.html , but I am not sure where to store the code to be generated. 我已经浏览过http://www.eclipse.org/articles/viewArticle/ViewArticle2.html ,但是我不确定要在哪里存储要生成的代码。 Will it be somewhere in a text file, or somewhere else? 它会在文本文件中的某个位置还是其他位置?

A site from 2001 will not help you alot. 一个2001年以来的站点将无济于事。 Today PDE does not need much experience, its self-describing. 如今,PDE不需要太多经验,它可以自我描述。

  1. Go "File"->"New"->"Others" 转到“文件”->“新建”->“其他”
  2. Choose "Plug-in Development" -> "Plug-in Project" 选择“插件开发”->“插件项目”
  3. Enter a name, press Next,Next 输入名称,然后按下一步,下一步
  4. Choose the Template "Plug-in with a View" or "Plug-in with an editor" (what you prefer) 选择模板“使用视图插入”或“使用编辑器插入”(您喜欢的模板)

Read and write. 读和写。

AS per my understaning you want to develop graphical editor for some domain language. 按照我的理解,您想为某些领域的语言开发图形编辑器。 Options you have for this 您为此拥有的选择

  1. Eclipse GEF Eclipse全球环境基金
  2. Eclipse GMF Eclipse GMF
  3. Eclipse Graphiti Eclipse Graphiti

basically code will be stored in same file but you will have graphical editor. 基本上,代码将存储在同一文件中,但是您将拥有图形编辑器。

PS: Developing graphical editors can be pretty tricky :) PS:开发图形编辑器可能非常棘手:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM