Running and Debugging Archi - archimatetool/archi GitHub Wiki
Pre-requisites
Before you proceed make sure you've set up your Eclipse environment as explained in Setting up the Eclipse Environment and have imported the code as explained in Importing the Code.
Setting up the Target Platform
Once you have the projects imported into Eclipse you need to set up the target platform that will tell Eclipse how to run or debug Archi and what plug-ins to include and exclude in the configuration.
To set up the target platform:
- In Eclipse's Package Explorer find the target file, "com.archimatetool.editor.product/archi.target", and open the file in the Eclipse Target Editor (if you cannot see that option please verify if your Eclipse distribution has the PDE plug-in installed through Help -> Install New Software).
- In the editor, at the top-right, click "Set as Active Target Platform". NOTE - in some cases this may read "Reload Target Platform"
- Now let Eclipse download all the required dependencies. This might take a while, so be patient! Progress can be seen in the lower right part of the status bar.
Running Archi from Eclipse
Once you have set up the target platform you can now run and debug Archi from within Eclipse.
To Run/Debug Archi from Eclipse:
- In Eclipse's Package Explorer find the product file, "com.archimatetool.editor.product/archi.product", and open the file in the Eclipse Product Configuration Editor
- In the editor, click "Launch an Eclipse Application in Debug mode" (bottom left of the editor)
Note - each time that you run Archi from the "Launch an Eclipse Application in Debug mode" link in the archi.product file it will reset any customisations that you might have made in the Debug/Run Configuration. If you have manually added other plug-ins or fragments to the Debug/Run Configuration they will be removed. To fix this, once you have run Archi from the archi.product file, edit and customise the Debug/Run Configuration and, thereafter, run it from the Eclipse toolbar or Run menu.
Other Settings
To simulate 200% scaling on a non Hi-DPI monitor use the program argument -Dswt.autoScale=200
on Windows and set the environment setting GDK_SCALE=2
on Linux.
Run/Debug Archi on Mac in dark mode
If you're launching Archi from Eclipse and have macOS set to dark mode, Archi's UI will not render properly. This is because there is no Info.plist
file with the setting NSRequiresAquaSystemAppearance
set to true. To fix this problem, you need to have a runtime binary of Archi installed on your system and to edit the Launch configuration and add an environment variable.
- Ensure that you have a runtime binary version of Archi (
Archi.app
) installed on your system, say in theApplications
folder. - In Eclipse open the "Debug Configurations..." menu item
- Edit the
archi.product
launch configuration (it might be named something else if you renamed it) - Select the
Environment
tab in the dialog - Add a new entry with the variable name as
CFProcessPath
and the value as/Applications/Archi.app/Contents
(or the path to wherever you have installed Archi) - Click "Apply"
- Launch Archi from Eclipse
For more information read this.