VisualCode is a developer tool which help to visually compose java code.
Tool converts Java methods to visual blocks which can have multiple input and multiple output ports. Using Visual Flow editor you connect blocks output and input ports. Resulting visual flow will be converted to executable Java method. Resulting method is like any other java method and can be called from ordinary java code.
Let's create simple block. We start with java static method.
public static double add(double a, double b) {
return a + b;
}
Next open java source file with ‘Code View’ editor and select Visual View tab. Now you see visual block.
We start with new java class ExampleFlow and add java stub method. Next open java file with ‘Flow View’ editor.
Next select method name and from context menu select ‘Convert to Flow’
Resize window to make whole flow visible and you see empty flow.
Rearrange editors to side by side, like this
Drag ‘add’ block from palette to flow canvas.
Connect flow input port ‘a’ to ‘add’ block input port ‘a’
When you drag new connection and your are near enough to target point you will see either green on red glow around the target port. Green means both ports data types are compatible and red means they are not. You should not connect incompatible ports.
Connect other ports.
Flow visual view
Blocks source code
Block visual view
Generated executable code.
VisualCode is under development and currently in alpha phase. Some functionality is not yet completed. And sometimes it doesn’t operate correctly.
VisualCode is implemented as Eclipse plugin.
https://marketplace.eclipse.org/content/visualcode
VisualCode uses JavaFX and for this reason you must add following line to your eclipse.ini file. -Dorg.osgi.framework.bundle.parent=ext
So your eclipse.ini file tail should look something like this:
...
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Dorg.osgi.framework.bundle.parent=ext
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Xms256m
-Xmx1024m
Linux users may need to set
export SWT_GTK3=0
before launching Eclipse
VisualCode is tested only under Windows and Linux (Ubuntu).
It may or may not work under other operating systems.
Eclipse versions:
Eclipse Oxygen (4.7)
Eclipse Neon (4.6)
Other Eclipse versions probably won’t work.