简体   繁体   English

在swing应用程序中嵌入范围有限的java代码编辑器?

[英]embed a java code editor with limited scope in a swing application?

Here's what I want to do. 这就是我想要做的。 I want to store code objects in my hibernate driven java swing application. 我想在我的hibernate驱动的java swing应用程序中存储代码对象。 I want to allow the user to create code objects that can affect the data with a limited scope, like in a function with only access to members of that member's class. 我想允许用户创建可以在有限范围内影响数据的代码对象,例如只能访问该成员类的成员的函数。 I'd even really like to have a full on little ide (though scaled down with all the irrelevencies hidden) in there which would allow auto-completion and have a button to compile and check, then have all that wrapped so I can drop the thing in my database and schedule it's execution. 我甚至真的希望在那里有一个完整的小i​​de(虽然缩小了所有隐藏的无意义),这将允许自动完成并有一个按钮进行编译和检查,然后将所有包装,所以我可以删除在我的数据库中的事情并安排它的执行。

Anyone have a good idea, know a good component or way to use eclipse or some such to accomplish this without having a roll out a solution myself? 任何人都有一个好主意,知道一个很好的组件或方法来使用eclipse或其他一些方法来实现这一点,而无需自己推出解决方案?

you may use Eclipse RCP editor, it has lots of functionality available for reuse. 您可以使用Eclipse RCP编辑器,它有许多可供重用的功能。 eg text highlighting, pair constructions highlighting, text hovers, completion assist, etc. its a lot more powerful, but a lot heavier. 例如文本突出显示,配对突出显示,文本悬停,完成辅助等等,它更强大,但更重。 and RCP is not only editor... 而RCP不仅仅是编辑......

To achieve code highlighting and some simple auto complete functionality it would be worth looking at the jsyntaxpane component. 要实现代码突出显示和一些简单的自动完成功能,值得查看jsyntaxpane组件。

It's pretty simple and easy to use but you're not going to get the compile functionality from that. 它非常简单易用,但你不会从中获得编译功能。

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

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