Following this question Click Here. I thought of creating a simple IDE for groovy and Java. Code is reproduced here for easy reference:
import groovy.swing.SwingBuilder
import java.awt.BorderLayout as BL
import static javax.swing.JFrame.EXIT_ON_CLOSE
import org.fife.ui.rsyntaxtextarea.*
RSyntaxTextArea textArea = new RSyntaxTextArea()
textArea.syntaxEditingStyle = SyntaxConstants.SYNTAX_STYLE_JAVA
swing = new SwingBuilder()
frame = swing.frame(title:"test", defaultCloseOperation:EXIT_ON_CLOSE, size:[600,400], show:true ) {
borderLayout()
panel( constraints:BL.CENTER ) {
borderLayout()
scrollPane( constraints:BL.CENTER ) {
widget textArea
}
}
}
Now I have all the codings entered by the user in textarea
which is an Object of RSynataxTextArea
, how i should perform compilation for all the code written by the user? Is there any class for this purpose or any ways of doing it in Groovy?
Thanks in advance.