From: Thomas Walker Lynch Date: Tue, 3 Dec 2024 09:54:40 +0000 (+0000) Subject: A working IntelliJ IDEA configuration X-Git-Url: https://git.reasoningtechnology.com/style/static/%7Bstyle.link%7D?a=commitdiff_plain;h=2619dcad14050f05d7b744d42a80200605b0e540;p=Ariadne A working IntelliJ IDEA configuration --- diff --git a/$PROJECT_DIR$/developer/developer.iml b/$PROJECT_DIR$/developer/developer.iml deleted file mode 100644 index 9d3ebf5..0000000 --- a/$PROJECT_DIR$/developer/developer.iml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/document/IntelliJ.txt b/document/IntelliJ.txt deleted file mode 100644 index 1d2f4e6..0000000 --- a/document/IntelliJ.txt +++ /dev/null @@ -1,163 +0,0 @@ - --------------------------------------------------------------------------------- -Nomenclature - -IntelliJ paths. It always displays absolute path names. I was using - $PROJECT_DIR$ as a variable standing for the project directory, but ran into - problems with it so since then I use `~/Ariadne/...` or use the - browser to select paths. The browser seems to start either at /home or at / - rather than at the project. - -project directory - the directory with the .git file in it. Called $REPO_HOME in - RT scripts. Called $PROJECT_DIR$ (doesn't seem to be reliable) in IntelliJ - file paths. - -module directory - for RT projects examples include `~/Ariadne/developer' - `~/Ariadne/tester`. These are independent build environments. - - Careful, if Intellij scans directories it will not hesitate to pull things - from `tool_shared`/third_party or wherever else it finds things, and it will - make a big mess. - --------------------------------------------------------------------------------- -To install ItelliJ - - Download the tar file from - `https://www.jetbrains.com/idea/download/?section=linux` - into the - `$REPO_HOME/tool_shared/third_party/upstream` - directory. - - Expand it into - `$REPO_HOME/tool_shared/third_party` - - cd into the expanded directory, into `bin`, then `chmod u+x` and run `idea_inst`. - - set the env path to include - `$REPO_HOME/tool_shared/third_party/idea-IC*/bin` - - The executable is called `idea`. - - Consider setting a desktop short cut. Consider instead installing it in your - own bin directory. Easily done, just move the directory created by the tar - file expansion there. - - I prefer a user mode install, as there is no reason this tool should need - admin privileges. - --------------------------------------------------------------------------------- -Startup - - ./tool_shared/third_party/idea-IC-243.21565.193/bin/idea & - - Shows: Welcome screen - select "Open" as Ariadne already exists - - Shows: Open File or Project Browser - In top dialog box put full path to project directory. - - Hit [OK] at the bottom. Unlikely, but might be scrolled off the bottom of the screen. - - Shows: main window - Appears after hitting OK from the "Open File or Project" [ok]. - - Has a tool bar at the top. There is a double meat hamburger menu icon - at the left. Hitting this will replace the top bar with a vertical - menu for drop down menus. - - Careful, after the hamburger icon is pressed, the first drop down - menu instantly appears. Slide over to get the other drop downs. - - Careful, there is a Linux bug where the drop down menu will stay - on top no matter what widow or what virtual desktop a person is on. - Go to the application window and hit to make it go away. - - Under tool bar: - Far left is an icon bar. Then a file browser. And then a big box - describing hot keys. - --------------------------------------------------------------------------------- -Configuration - -** If you cloned the Ariadne project, you should already have the configuration -so you can stop here. - -------------- -Setup Project -Hamburger icon -> File dop-down --> Project Structure --> Project - - select project SDK from disk: - ~/Ariadne/tool_shared/third_party/jdk-11 - -------------- -Setup Modules - - Hamburger icon -> File dop-down --> Project Structure --> Modules - - Shows: "Project Structure" dialog - - Hit the '+' option that shows at the top of the second panel. - - New Module. - - Dialog pop-up - - Name: developer - - Location: (browse to the developer directory) - - alternatively enter the full path, ~/Ariadne, e.g. - - $PROJECT_DIR$ instead of, ~/Ariadne, worked when - entering the first module, but not the second. - - Dependencies: - Select the "Project SDK" from the drop down. - - Careful, the module won't be made until hitting [Create] at the bottom. - - As far as I can tell you can't get this panel again, rather delete and add - a new module if you need to change the entries. - - Shows: "Project Structure" dialog, again, now the third panel with information about the - developer module. - Third panel shows three choices: [Source] [Paths] [Dependencies] - - [Sources] is already selected. - - With Sources there are two panels. - - In second panel, on right side, the module root should show at the top. - Under if it lists any sources, use the button at the far right of the - listing to x it out. - - The first panel now shows a file browser for the module. - - Select the `javac` directory with a single click. Then, and only - after, look immediately the directory lists and click on [Sources] - - "Source Folders" will now appear in the second panel. The - javac folder will be listed. - - hit: [apply] at the bottom (or the form will reset to defaults next time) - - - Slide over to [Paths] - Copmiler Output - select [Use Module Compile Output Path] - Output Path: $PROJECT_DIR$/developer/scratchpad - Test Path: $PROJECT_DIR$/developer/test - - leave the exclude output checkbox, that means to exclude from repo - and from indexing for search - - hit: [apply] at the bottom - -------------- -Run/Debug - - -------------- -External Tools - - diff --git a/document/IntelliJ_IDEA.txt b/document/IntelliJ_IDEA.txt new file mode 100644 index 0000000..7218e1d --- /dev/null +++ b/document/IntelliJ_IDEA.txt @@ -0,0 +1,248 @@ + +This file describes the local install and configuration of IntelliJ_IDEA for +the Ariadne project. + +-------------------------------------------------------------------------------- +Some notes + +'project directory' - the directory with the .git file in it. Called $REPO_HOME in + RT scripts. Called $PROJECT_DIR$ (doesn't seem to be reliable) in IntelliJ + file paths. + +'module directory' - for RT projects examples include `~/Ariadne/developer' + `~/Ariadne/tester`. These are independent build environments. + + Careful, if Intellij scans directories it will not hesitate to pull things + from `tool_shared`/third_party or wherever else it finds things, and it will + make a big mess. + +IntelliJ paths on forms: + + I tried using $PROJECT_DIR$ as a variable standing for the project directory, + as this was suggested by an AI. However IntelliJ simply made a directory + with the literal variable name. + + Also tried using $REPO_HOME, as that was defined in the environment IntelliJ was run from. + It had the same effect as $PROJECT_DIR$. + + It will work with `~` for the home directory. So I have been using + `~/Ariadne/...` when typing out paths. + + There will be a browser icon at the right of a form entry boxes that take + paths. The browser tool starts from either /home or at / rather than at the + project. It inserts absolute path names. + +A GUI bug: + + There is a Gnome Linux bug where the drop down menu can stay on top no matter + what other window, application, or what virtual desktop a person is on. You + must go back to the IDEA application window and hit to make it go + away. + +The [OK] button at the bottom of dialogs: + + This closes the dialog. + + To apply changes hit [Apply]. + + Will [OK] apply changes before closing? Not sure. It does at least + sometimes. + +-------------------------------------------------------------------------------- +To install ItelliJ + + Download the tar file from + `https://www.jetbrains.com/idea/download/?section=linux` + into the + `$REPO_HOME/tool_shared/third_party/upstream` + directory. + + Expand it into + `$REPO_HOME/tool_shared/third_party` + + cd into the expanded directory, into `bin`, then `chmod u+x` and run `idea_inst`. + + set the env path to include + `$REPO_HOME/tool_shared/third_party/idea-IC*/bin` + + The executable is called `idea`. + + Consider setting a desktop short cut. Consider instead installing it in your + own bin directory. Easily done, just move the directory created by the tar + file expansion there. + + I prefer a user mode install, as there is no reason this tool should need + admin privileges. + +-------------------------------------------------------------------------------- +Startup + + ./tool_shared/third_party/idea-IC-243.21565.193/bin/idea & + + Shows: Welcome screen + select "Open" as Ariadne already exists + + Shows: Open File or Project Browser + In top dialog box put full path to project directory. + + Hit [OK] at the bottom. Unlikely, but might be scrolled off the bottom of the screen. + + Shows: main window + Appears after hitting OK from the "Open File or Project" [ok]. + + Has a tool bar at the top. There is a double meat hamburger menu icon + at the left. Hitting this will replace the top bar with a vertical + menu for drop down menus. + + Careful, after the hamburger icon is pressed, the first drop down + menu instantly appears. Slide over to get the other drop downs. + Don't click, slide! + + Under tool bar: + Far left is an icon bar. Then a file browser. And then a big box + describing hot keys. + +-------------------------------------------------------------------------------- +Configuration + +If you cloned the Ariadne project, the modules will already be configured, and +also probably some of the run configuration will already be configured. + + ------------- + Setup Project + Hamburger icon > File dop-down > Project Structure > Project + + select project SDK from disk: + ~/Ariadne/tool_shared/third_party/jdk-11 + + ------------- + Setup Modules + + Hamburger icon > File dop-down > Project Structure > Modules + + Shows: "Project Structure" dialog + + Hit the '+' option that shows at the top of the second panel. + + New Module. + + Dialog pop-up + + Name: developer + + Location: (browse to the developer directory) + + alternatively enter the full path, ~/Ariadne, e.g. + + $PROJECT_DIR$ instead of, ~/Ariadne, worked when + entering the first module, but not the second. + + Dependencies: + Select the "Project SDK" from the drop down. + + Careful, the module won't be made until hitting [Create] at the bottom. + + As far as I can tell you can't get this panel again, rather delete and add + a new module if you need to change the entries. + + Shows: "Project Structure" dialog, again, now the third panel with information about the + developer module. + Third panel shows three choices: [Source] [Paths] [Dependencies] + + [Sources] is already selected. + + With Sources there are two panels. + + In second panel, on right side, the module root should show at the top. + Under if it lists any sources, use the button at the far right of the + listing to x it out. + + The first panel now shows a file browser for the module. + + Select the `javac` directory with a single click. Then, and only + after, look immediately the directory lists and click on [Sources] + + "Source Folders" will now appear in the second panel. The + javac folder will be listed. + + hit: [apply] at the bottom (or the form will reset to defaults next time) + + + Slide over to [Paths] + Copmiler Output + select [Use Module Compile Output Path] + Output Path: $PROJECT_DIR$/developer/scratchpad + Test Path: $PROJECT_DIR$/developer/test + + leave the exclude output checkbox, that means to exclude from repo + and from indexing for search + + hit: [apply] at the bottom + + ------------- + To add an external tool, for example tester/tool/make: + + This is how we integrate the local tools. + + Note, even if a shell script runs then runs a java program, that jave program + was compiled with debug flags, and run in debug mode, it can't be debugged. It + won't stop at break points, etc. For that an 'application' must be added see + the next section. + + Hamburger> Run > edit configurations + Shows Run/Debug configurations dialog + Upper left hit '+' + Shows drop down + chose [Shell Script] second from bottom + Shows dialog, for example: + Name: tester make + Script Path: ~/Ariadne/tester/tool/make (better to chose with the browser tool) + Script Options: tester make + Working Directory: ~/Ariadne (location of the env source scripts that env_run uses) + Environment variabls: (none, env_run will source env_tester) + Interpreter: /bin/bash (left to default) + + ------------- + To add a program for debugging. + + Humburger > Run > edit configurations + Shows Run/Debug configurations dialog + Upper left hit '+' + Shows drop down + chose [Application] first choice + Shows dialog, for example: + Name: Test_Graph_0 + + next line are two boxes, they are not labeled, the defaults show: + [ module not specified ] [ -cp no module ] + I selected:: + [ java 11 SDk of 'tester' module] [ -cp tester ] + This can be confusing, as the modules are 'tester' and 'developer', but + here it asks for an SDK! Then the next box says it wants a class path, + but it wants a module name! + + next line one box, not labeled + [ main class [] ] + Note icon at right, it will give a list of class names, here in the tester module, + that have main calls, select one. + + next line, again not labeled + [ Program Arguments ] + Test_Graph_0 has no arguments so I left it blank. + + Working Directory: ~/Ariadne + + Environment Variables: + Left blank because the executable itself does not make use of any. I do + know at this point if variables set in the environment IDEA ran in are + inherited. + + 'Modify Options' with a drop down menu. (At the top right of the configuration dialog) + Scan down for the `Java` section. + Check: 'Do not build before run' + (To build this example, go to the Run menu and run `tester make'. Or run make directly + from a console prompt. Be sure to source env_tester first.) + + Next go to main window file browser, click on the file you want to debug, click on the line + to set a break point. Right click to get a menu, and + diff --git a/tester/jvm/Test_Ariadne.jar b/tester/jvm/Test_Ariadne.jar index 2b21d2c..cdb336f 100644 Binary files a/tester/jvm/Test_Ariadne.jar and b/tester/jvm/Test_Ariadne.jar differ diff --git a/tester/shell/test_log.txt b/tester/shell/test_log.txt index 798e911..58c80bc 100644 --- a/tester/shell/test_log.txt +++ b/tester/shell/test_log.txt @@ -34,3 +34,39 @@ Stream: stdout Output: path_find_cycle_0 method called + +2024-12-03T09:10:19.185333Z ----------------------------------------------------------- +Test: path_find_cycle_0 +Message: +Test logic error: com.sun.proxy.$Proxy0.path_find_cycle(com.ReasoningTechnology.Ariadne.Ariadne_LabelList) + +2024-12-03T09:10:19.199590Z ----------------------------------------------------------- +Test: path_find_cycle_0 +Stream: stdout +Output: +path_find_cycle_0 method called + + +2024-12-03T09:10:28.123334Z ----------------------------------------------------------- +Test: path_find_cycle_0 +Message: +Test logic error: com.sun.proxy.$Proxy0.path_find_cycle(com.ReasoningTechnology.Ariadne.Ariadne_LabelList) + +2024-12-03T09:10:28.135289Z ----------------------------------------------------------- +Test: path_find_cycle_0 +Stream: stdout +Output: +path_find_cycle_0 method called + + +2024-12-03T09:19:22.696482Z ----------------------------------------------------------- +Test: path_find_cycle_0 +Message: +Test logic error: com.sun.proxy.$Proxy0.path_find_cycle(com.ReasoningTechnology.Ariadne.Ariadne_LabelList) + +2024-12-03T09:19:22.708353Z ----------------------------------------------------------- +Test: path_find_cycle_0 +Stream: stdout +Output: +path_find_cycle_0 method called +