Hello World!
F4 IDE
The official F4 IDE is no longer maintained by the original creators but can be attained from the Xored website, or an updated open source copy is available on Github.
The Windows version of the F4 IDE works fine for me, however I was unable to get the MacOS version to launch so working with this IDE on a Mac may prove to be a challenge.
If you are familiar with the Eclipse platform then F4 will look rather familiar. F4 is based on the Eclipse platform and functions relatively similar, just without a useful dark theme.
The default window configuration for F4 is almost identical to that of Eclipse and is fully customizable. The 'Fantom Explorer' on the left contains the file tree for all of your projects in your workspace. On the right, there is an 'Outline' view which shows the outline for the current Fantom Class file that you are working on including methods and functions. The 'Console' window and 'Error Log' window are at the bottom of the screen.
![]() |
| Click Image to Enlarge |
Creating a New Project
Creating a new Fantom project in F4 is simple. Simply click 'File' > 'New' > 'Fantom Project' to create a new project.
You can name the project what ever you chose and leave the rest of the settings default.
In the 'Fantom Explorer' window, you will now have a project file tree that contains everything in the project that you just created.
The 'fan' folder is where you want to create new 'Fantom Class' files, which are saved with the extension .fan. This folder is similar to the 'src' folder in Eclipse but without the option for packages.
Testing Your Code
When running .fan files in F4, make sure to select 'Fantom Class' from the pop-up window. If you select 'Fantom Testing' instead, you can right-click in the text editor window and select 'Run As' > '1 Fantom Class'.
Source Code
The way the classes are set up is very familiar to that of Java but with more simplification. Note here that Void is capitalized because Void is actually a class in Fantom. Methods are by default, public and the main() method does not need to be static nor does it need to take arguments like it does in Java.
echo() works the same way as System.out.println() in Java or Console.WriteLine() in C# by printing what is within the parentheses and starting a new line following the print in the console.
This:
Will therefore print this:
General Syntax Rules
- Fantom uses curly braces similarly to both Java and C#, the languages that it is based on.
- A semicolon at the end of a line is optional.
- Comments are made in Fandoc, which is Fantom's own version of Markdown.
- ** is used for comments within a single line and can also be used to span multiple lines, similar to /* */ in Java.
- This is also used for documentation within the F4 IDE in the same way you would use /** */ in Eclipse.








Do you get the sense that the Fantom IDE is relatively maintained as a Github project, or is it just an archive for interested parties?
ReplyDeleteIt seems that Xored ended official updates for the IDE in 2017 so all of the updates that have come since have been through the Github project from a small, very dedicated community.
Delete