562 |
563 |
--------------------------------------------------------------------------------
/.mvn/wrapper/MavenWrapperDownloader.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2007-present the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | import java.net.*;
17 | import java.io.*;
18 | import java.nio.channels.*;
19 | import java.util.Properties;
20 |
21 | public class MavenWrapperDownloader {
22 |
23 | private static final String WRAPPER_VERSION = "0.5.6";
24 | /**
25 | * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
26 | */
27 | private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
28 | + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
29 |
30 | /**
31 | * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
32 | * use instead of the default one.
33 | */
34 | private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
35 | ".mvn/wrapper/maven-wrapper.properties";
36 |
37 | /**
38 | * Path where the maven-wrapper.jar will be saved to.
39 | */
40 | private static final String MAVEN_WRAPPER_JAR_PATH =
41 | ".mvn/wrapper/maven-wrapper.jar";
42 |
43 | /**
44 | * Name of the property which should be used to override the default download url for the wrapper.
45 | */
46 | private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
47 |
48 | public static void main(String args[]) {
49 | System.out.println("- Downloader started");
50 | File baseDirectory = new File(args[0]);
51 | System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
52 |
53 | // If the maven-wrapper.properties exists, read it and check if it contains a custom
54 | // wrapperUrl parameter.
55 | File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
56 | String url = DEFAULT_DOWNLOAD_URL;
57 | if(mavenWrapperPropertyFile.exists()) {
58 | FileInputStream mavenWrapperPropertyFileInputStream = null;
59 | try {
60 | mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
61 | Properties mavenWrapperProperties = new Properties();
62 | mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
63 | url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
64 | } catch (IOException e) {
65 | System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
66 | } finally {
67 | try {
68 | if(mavenWrapperPropertyFileInputStream != null) {
69 | mavenWrapperPropertyFileInputStream.close();
70 | }
71 | } catch (IOException e) {
72 | // Ignore ...
73 | }
74 | }
75 | }
76 | System.out.println("- Downloading from: " + url);
77 |
78 | File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
79 | if(!outputFile.getParentFile().exists()) {
80 | if(!outputFile.getParentFile().mkdirs()) {
81 | System.out.println(
82 | "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
83 | }
84 | }
85 | System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
86 | try {
87 | downloadFileFromURL(url, outputFile);
88 | System.out.println("Done");
89 | System.exit(0);
90 | } catch (Throwable e) {
91 | System.out.println("- Error downloading");
92 | e.printStackTrace();
93 | System.exit(1);
94 | }
95 | }
96 |
97 | private static void downloadFileFromURL(String urlString, File destination) throws Exception {
98 | if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
99 | String username = System.getenv("MVNW_USERNAME");
100 | char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
101 | Authenticator.setDefault(new Authenticator() {
102 | @Override
103 | protected PasswordAuthentication getPasswordAuthentication() {
104 | return new PasswordAuthentication(username, password);
105 | }
106 | });
107 | }
108 | URL website = new URL(urlString);
109 | ReadableByteChannel rbc;
110 | rbc = Channels.newChannel(website.openStream());
111 | FileOutputStream fos = new FileOutputStream(destination);
112 | fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
113 | fos.close();
114 | rbc.close();
115 | }
116 |
117 | }
118 |
--------------------------------------------------------------------------------
/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BenHerbst/idaesbasic/bc4b0db4eca43b0ed1181c297f84516d97716cf5/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip
2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
3 |
--------------------------------------------------------------------------------
/.mvn/wrapper/wrapper.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to Idaesbasic
2 | - Everyone can contribute to Idaesbasic, by making a fork, make some changes, commit them and create a pull request
3 | - After pull requesting, we will review your code, and add some comments
4 | - If everything is nice, we add your commit to the original code
5 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright 2021 Ben Herbst
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 | 
3 | 
4 | 
5 | 
6 | 
7 | # Idaesbasic - Project-Managment redefined
8 |
9 | Use the 0.9.1 branch if you want to see the code before Kotlin rewrite!
10 |
11 |
12 |
17 |
18 | ## Everything is a file 💾
19 | With this project managment tool, everything is a file. Your todolists are .todo files and your kanbans .knbn ...
20 | You can store everything local on you computer and directly in your project. For example: figures/player/player.todo, if you are a Game-Developer and you want to manage planning of the player.
21 |
22 |
23 |
24 |
25 |
26 |
27 | ## Big tool set ⚒️
28 |
29 | There will be lot of tools in Idaesbasic:
30 | - Todolist
31 | - Kanban
32 | - Whiteboard
33 | - Video call
34 | - Chatting
35 | - Calendar
36 | - Email
37 | - Messenges
38 | - ...
39 |
40 | 
41 | 
42 | 
43 | 
44 |
45 | _At the moment, todolist, calendar and kanban are implemented, more are coming soon!_
46 |
47 | ## Support me ( PayPal )
48 | |[Donate](https://www.paypal.com/donate/?hosted_button_id=C5X9LBEM7XZ64)|
49 | |---|
50 |
51 | ## Compare with other tools
52 |
53 | | Has feature | ✅ |
54 | | ----------- | -- |
55 | | Doesn't have feature | ❌ |
56 | | Feature is coming soon | ⏱️ |
57 | | Not completly implemented | 😑 |
58 |
59 | | Feature | *Idaesbasic* | Zenkit | Trello | Todoist |
60 | | ------- | ------------ | ------ | ------ | ------- |
61 | | Save into files | ✅ | 😑 ( Only markdowns from Hypernotes ) | 😑 ( Not directly, you must use import and export ) | ❌ |
62 | | Kanbans | ✅ | ✅ | ✅ | ✅ |
63 | | Calendars | ✅ | ✅ | ✅ | ❌ |
64 | | Todolists | ✅ | ✅ | ❌ | ✅ |
65 | | Whiteboards | ⏱️ | ❌ | ❌ | ❌ |
66 | | Mindmaps | ⏱️ | ✅ | ❌ |
67 | | No electron | ✅ | ❌ | ❌ | ❌|
68 |
69 |
70 | ## Get started 🛫
71 | (1) Downloaad and install the app for windows or linux.
72 |
73 | _How do I do that?_
74 |
75 | **For Windows:**
76 |
77 | Download the .exe file at https://github.com/BenHerbst/idaesbasic/releases/tag/0.9.1.
78 |
79 | You maybe have to expand the "Assets" menu.
80 |
81 | Then Open the Explorer and go to "Downloads". There you should find the .exe if it got downloaded. If not, download the .exe again!
82 |
83 | Then, if downloaded and found in the Explorer, double click on it and an installer pops up.
84 |
85 | There you just have to follow the steps and Idaesbasic is ready to use!
86 |
87 | **For Linux:**
88 |
89 | Download the .deb ( currently unavaible ) or .jar file at https://github.com/BenHerbst/idaesbasic/releases/tag/0.9.1. ( .deb is only for Debian or Debian based Linux like Ubuntu, Linux Mint or Pop!_OS )
90 |
91 | Then open your file explorer. Go to "Downloads" and find the .deb or .jar file
92 |
93 | If you downloaded the .deb for Debian or Debian based Linux, just double click the .deb and follow the install instructions.
94 |
95 | If you got the .jar, which also runs on Arch, Manjaro or VOID Linux, you also have to get Java 17.
96 | The best way to install it is to go to https://jdk.java.net/17/ and read the install instructions there or go to Google and check how to install Java 17 or Openjdk 17 on your system.
97 |
98 | There is also jdk-openjdk on Arch and Manjaro: pacman -S jdk-openjdk.
99 |
100 | After the installation of Java 17, go to the file explorer, find the .jar and double click it. If that not work, open a Terminal window and execute:
101 |
102 | 1. cd Downloads
103 | 2. java -jar (" The file name of the .jar file ")
104 | 3. if Idaesbasic doesn't start, copy the text of the Terminal window of take a screenshot and report it at https://github.com/BenHerbst/idaesbasic/issues. You have to get a Github account.
105 |
106 | _I would love it when anyone could help me creating a flatpak of this project!_
107 |
108 | **Macos:**
109 | There is currently **no** Macos version. You have to self compile it with Maven and Java 17 from https://github.com/BenHerbst/idaesbasic/tree/0.9.1.
110 |
111 | I don't own a Macos device. Apple restricts you to own a Macos device to create a package for Macos.
112 |
113 | Maybe someone with a Mac device could help me?
114 |
115 |
116 | (2) Click on "Projects" -> "Add project" and select a folder
117 |
118 | (3) Create a new todolist via "File" -> "New" -> "New todolist"
119 |
120 | (4) Name the file and set the file location
121 |
122 | (5) Create your todos, and click on "File" -> "Save" to save them
123 |
124 |
125 | _To update the file browser, click on "Projects" -> "Project list" -> [Project location]_
126 |
127 | It is recommended to create a idaes-files folder under your project, as it helps keeping focus, after I tested the both methods: At same place as tasks working folder under project or as, recommended, seperate folder for Idaesbasic.
128 |
129 | ## Free and open source 🗽
130 |
131 | Idaesbasic is free and open source software.
132 | - Everyone can make a pull request and we will add it
133 | - Everyone can see the code
134 | - Everyone can change the code and build the software perfect for her / his needs
135 |
136 | ## For everyone 🧑🧑🦰🧑🦱🧑🦳🧑🦲🧔🧟
137 | - If you want to use the software to manage your personal tasks, go and use the todolist.
138 | - If you are a big tech company and you want to manage a website, go and use the kanban and team features, and change the code to your needs.
139 | - If you are a single person that is famous, manage all your interviews etc. in the todolist and calendar.
140 | - If you are a single developer, manage the tasks for your project directly in the project it selfes and create kanbans.
141 |
142 | ## License
143 | The software is provided under the Apache 2.0 License
144 |
145 | ## Contributing
146 | If you want to contribute to Idaesbasic, see CONTRIBUTING.md first!
147 |
148 | ## Build with javafx 💪
149 | The software is build with javafx 17:
150 | - Faster than web app
151 | - Small, doesnt have a browser inside
152 | - Less ram
153 | - Can access your files
154 |
155 | ## Website
156 | The website of the project is avaible under https://benherbst.github.io/idaesbasic
157 |
158 | ## Future
159 |
160 | ### Version 1.0.0 Stable:
161 | - Todolists with time and tags
162 | - Whiteboard
163 | - Email managment
164 | - Faster, Optimized
165 | - Bug fixes
166 | - ...
167 |
168 | This is my first real Github project I started as a side project, I still maintain some times and do things here and there and I hope you like it!
169 |
--------------------------------------------------------------------------------
/bin/.gitignore:
--------------------------------------------------------------------------------
1 | /main/
2 | /test/
3 |
--------------------------------------------------------------------------------
/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BenHerbst/idaesbasic/bc4b0db4eca43b0ed1181c297f84516d97716cf5/icon.png
--------------------------------------------------------------------------------
/icon.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
99 |
--------------------------------------------------------------------------------
/idaesbasic.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/mvnw:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # ----------------------------------------------------------------------------
3 | # Licensed to the Apache Software Foundation (ASF) under one
4 | # or more contributor license agreements. See the NOTICE file
5 | # distributed with this work for additional information
6 | # regarding copyright ownership. The ASF licenses this file
7 | # to you under the Apache License, Version 2.0 (the
8 | # "License"); you may not use this file except in compliance
9 | # with the License. You may obtain a copy of the License at
10 | #
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing,
14 | # software distributed under the License is distributed on an
15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | # KIND, either express or implied. See the License for the
17 | # specific language governing permissions and limitations
18 | # under the License.
19 | # ----------------------------------------------------------------------------
20 |
21 | # ----------------------------------------------------------------------------
22 | # Maven Start Up Batch script
23 | #
24 | # Required ENV vars:
25 | # ------------------
26 | # JAVA_HOME - location of a JDK home dir
27 | #
28 | # Optional ENV vars
29 | # -----------------
30 | # M2_HOME - location of maven2's installed home dir
31 | # MAVEN_OPTS - parameters passed to the Java VM when running Maven
32 | # e.g. to debug Maven itself, use
33 | # set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
34 | # MAVEN_SKIP_RC - flag to disable loading of mavenrc files
35 | # ----------------------------------------------------------------------------
36 |
37 | if [ -z "$MAVEN_SKIP_RC" ] ; then
38 |
39 | if [ -f /etc/mavenrc ] ; then
40 | . /etc/mavenrc
41 | fi
42 |
43 | if [ -f "$HOME/.mavenrc" ] ; then
44 | . "$HOME/.mavenrc"
45 | fi
46 |
47 | fi
48 |
49 | # OS specific support. $var _must_ be set to either true or false.
50 | cygwin=false;
51 | darwin=false;
52 | mingw=false
53 | case "`uname`" in
54 | CYGWIN*) cygwin=true ;;
55 | MINGW*) mingw=true;;
56 | Darwin*) darwin=true
57 | # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
58 | # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
59 | if [ -z "$JAVA_HOME" ]; then
60 | if [ -x "/usr/libexec/java_home" ]; then
61 | export JAVA_HOME="`/usr/libexec/java_home`"
62 | else
63 | export JAVA_HOME="/Library/Java/Home"
64 | fi
65 | fi
66 | ;;
67 | esac
68 |
69 | if [ -z "$JAVA_HOME" ] ; then
70 | if [ -r /etc/gentoo-release ] ; then
71 | JAVA_HOME=`java-config --jre-home`
72 | fi
73 | fi
74 |
75 | if [ -z "$M2_HOME" ] ; then
76 | ## resolve links - $0 may be a link to maven's home
77 | PRG="$0"
78 |
79 | # need this for relative symlinks
80 | while [ -h "$PRG" ] ; do
81 | ls=`ls -ld "$PRG"`
82 | link=`expr "$ls" : '.*-> \(.*\)$'`
83 | if expr "$link" : '/.*' > /dev/null; then
84 | PRG="$link"
85 | else
86 | PRG="`dirname "$PRG"`/$link"
87 | fi
88 | done
89 |
90 | saveddir=`pwd`
91 |
92 | M2_HOME=`dirname "$PRG"`/..
93 |
94 | # make it fully qualified
95 | M2_HOME=`cd "$M2_HOME" && pwd`
96 |
97 | cd "$saveddir"
98 | # echo Using m2 at $M2_HOME
99 | fi
100 |
101 | # For Cygwin, ensure paths are in UNIX format before anything is touched
102 | if $cygwin ; then
103 | [ -n "$M2_HOME" ] &&
104 | M2_HOME=`cygpath --unix "$M2_HOME"`
105 | [ -n "$JAVA_HOME" ] &&
106 | JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
107 | [ -n "$CLASSPATH" ] &&
108 | CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
109 | fi
110 |
111 | # For Mingw, ensure paths are in UNIX format before anything is touched
112 | if $mingw ; then
113 | [ -n "$M2_HOME" ] &&
114 | M2_HOME="`(cd "$M2_HOME"; pwd)`"
115 | [ -n "$JAVA_HOME" ] &&
116 | JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
117 | fi
118 |
119 | if [ -z "$JAVA_HOME" ]; then
120 | javaExecutable="`which javac`"
121 | if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
122 | # readlink(1) is not available as standard on Solaris 10.
123 | readLink=`which readlink`
124 | if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
125 | if $darwin ; then
126 | javaHome="`dirname \"$javaExecutable\"`"
127 | javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
128 | else
129 | javaExecutable="`readlink -f \"$javaExecutable\"`"
130 | fi
131 | javaHome="`dirname \"$javaExecutable\"`"
132 | javaHome=`expr "$javaHome" : '\(.*\)/bin'`
133 | JAVA_HOME="$javaHome"
134 | export JAVA_HOME
135 | fi
136 | fi
137 | fi
138 |
139 | if [ -z "$JAVACMD" ] ; then
140 | if [ -n "$JAVA_HOME" ] ; then
141 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
142 | # IBM's JDK on AIX uses strange locations for the executables
143 | JAVACMD="$JAVA_HOME/jre/sh/java"
144 | else
145 | JAVACMD="$JAVA_HOME/bin/java"
146 | fi
147 | else
148 | JAVACMD="`which java`"
149 | fi
150 | fi
151 |
152 | if [ ! -x "$JAVACMD" ] ; then
153 | echo "Error: JAVA_HOME is not defined correctly." >&2
154 | echo " We cannot execute $JAVACMD" >&2
155 | exit 1
156 | fi
157 |
158 | if [ -z "$JAVA_HOME" ] ; then
159 | echo "Warning: JAVA_HOME environment variable is not set."
160 | fi
161 |
162 | CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
163 |
164 | # traverses directory structure from process work directory to filesystem root
165 | # first directory with .mvn subdirectory is considered project base directory
166 | find_maven_basedir() {
167 |
168 | if [ -z "$1" ]
169 | then
170 | echo "Path not specified to find_maven_basedir"
171 | return 1
172 | fi
173 |
174 | basedir="$1"
175 | wdir="$1"
176 | while [ "$wdir" != '/' ] ; do
177 | if [ -d "$wdir"/.mvn ] ; then
178 | basedir=$wdir
179 | break
180 | fi
181 | # workaround for JBEAP-8937 (on Solaris 10/Sparc)
182 | if [ -d "${wdir}" ]; then
183 | wdir=`cd "$wdir/.."; pwd`
184 | fi
185 | # end of workaround
186 | done
187 | echo "${basedir}"
188 | }
189 |
190 | # concatenates all lines of a file
191 | concat_lines() {
192 | if [ -f "$1" ]; then
193 | echo "$(tr -s '\n' ' ' < "$1")"
194 | fi
195 | }
196 |
197 | BASE_DIR=`find_maven_basedir "$(pwd)"`
198 | if [ -z "$BASE_DIR" ]; then
199 | exit 1;
200 | fi
201 |
202 | ##########################################################################################
203 | # Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
204 | # This allows using the maven wrapper in projects that prohibit checking in binary data.
205 | ##########################################################################################
206 | if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
207 | if [ "$MVNW_VERBOSE" = true ]; then
208 | echo "Found .mvn/wrapper/maven-wrapper.jar"
209 | fi
210 | else
211 | if [ "$MVNW_VERBOSE" = true ]; then
212 | echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
213 | fi
214 | if [ -n "$MVNW_REPOURL" ]; then
215 | jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
216 | else
217 | jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
218 | fi
219 | while IFS="=" read key value; do
220 | case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
221 | esac
222 | done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
223 | if [ "$MVNW_VERBOSE" = true ]; then
224 | echo "Downloading from: $jarUrl"
225 | fi
226 | wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
227 | if $cygwin; then
228 | wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
229 | fi
230 |
231 | if command -v wget > /dev/null; then
232 | if [ "$MVNW_VERBOSE" = true ]; then
233 | echo "Found wget ... using wget"
234 | fi
235 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
236 | wget "$jarUrl" -O "$wrapperJarPath"
237 | else
238 | wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
239 | fi
240 | elif command -v curl > /dev/null; then
241 | if [ "$MVNW_VERBOSE" = true ]; then
242 | echo "Found curl ... using curl"
243 | fi
244 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
245 | curl -o "$wrapperJarPath" "$jarUrl" -f
246 | else
247 | curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
248 | fi
249 |
250 | else
251 | if [ "$MVNW_VERBOSE" = true ]; then
252 | echo "Falling back to using Java to download"
253 | fi
254 | javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
255 | # For Cygwin, switch paths to Windows format before running javac
256 | if $cygwin; then
257 | javaClass=`cygpath --path --windows "$javaClass"`
258 | fi
259 | if [ -e "$javaClass" ]; then
260 | if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
261 | if [ "$MVNW_VERBOSE" = true ]; then
262 | echo " - Compiling MavenWrapperDownloader.java ..."
263 | fi
264 | # Compiling the Java class
265 | ("$JAVA_HOME/bin/javac" "$javaClass")
266 | fi
267 | if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
268 | # Running the downloader
269 | if [ "$MVNW_VERBOSE" = true ]; then
270 | echo " - Running MavenWrapperDownloader.java ..."
271 | fi
272 | ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
273 | fi
274 | fi
275 | fi
276 | fi
277 | ##########################################################################################
278 | # End of extension
279 | ##########################################################################################
280 |
281 | export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
282 | if [ "$MVNW_VERBOSE" = true ]; then
283 | echo $MAVEN_PROJECTBASEDIR
284 | fi
285 | MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
286 |
287 | # For Cygwin, switch paths to Windows format before running java
288 | if $cygwin; then
289 | [ -n "$M2_HOME" ] &&
290 | M2_HOME=`cygpath --path --windows "$M2_HOME"`
291 | [ -n "$JAVA_HOME" ] &&
292 | JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
293 | [ -n "$CLASSPATH" ] &&
294 | CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
295 | [ -n "$MAVEN_PROJECTBASEDIR" ] &&
296 | MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
297 | fi
298 |
299 | # Provide a "standardized" way to retrieve the CLI args that will
300 | # work with both Windows and non-Windows executions.
301 | MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
302 | export MAVEN_CMD_LINE_ARGS
303 |
304 | WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
305 |
306 | exec "$JAVACMD" \
307 | $MAVEN_OPTS \
308 | -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
309 | "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
310 | ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
311 |
--------------------------------------------------------------------------------
/mvnw.cmd:
--------------------------------------------------------------------------------
1 | @REM ----------------------------------------------------------------------------
2 | @REM Licensed to the Apache Software Foundation (ASF) under one
3 | @REM or more contributor license agreements. See the NOTICE file
4 | @REM distributed with this work for additional information
5 | @REM regarding copyright ownership. The ASF licenses this file
6 | @REM to you under the Apache License, Version 2.0 (the
7 | @REM "License"); you may not use this file except in compliance
8 | @REM with the License. You may obtain a copy of the License at
9 | @REM
10 | @REM http://www.apache.org/licenses/LICENSE-2.0
11 | @REM
12 | @REM Unless required by applicable law or agreed to in writing,
13 | @REM software distributed under the License is distributed on an
14 | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | @REM KIND, either express or implied. See the License for the
16 | @REM specific language governing permissions and limitations
17 | @REM under the License.
18 | @REM ----------------------------------------------------------------------------
19 |
20 | @REM ----------------------------------------------------------------------------
21 | @REM Maven Start Up Batch script
22 | @REM
23 | @REM Required ENV vars:
24 | @REM JAVA_HOME - location of a JDK home dir
25 | @REM
26 | @REM Optional ENV vars
27 | @REM M2_HOME - location of maven2's installed home dir
28 | @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
29 | @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
30 | @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
31 | @REM e.g. to debug Maven itself, use
32 | @REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
33 | @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
34 | @REM ----------------------------------------------------------------------------
35 |
36 | @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
37 | @echo off
38 | @REM set title of command window
39 | title %0
40 | @REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
41 | @if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
42 |
43 | @REM set %HOME% to equivalent of $HOME
44 | if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
45 |
46 | @REM Execute a user defined script before this one
47 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
48 | @REM check for pre script, once with legacy .bat ending and once with .cmd ending
49 | if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
50 | if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
51 | :skipRcPre
52 |
53 | @setlocal
54 |
55 | set ERROR_CODE=0
56 |
57 | @REM To isolate internal variables from possible post scripts, we use another setlocal
58 | @setlocal
59 |
60 | @REM ==== START VALIDATION ====
61 | if not "%JAVA_HOME%" == "" goto OkJHome
62 |
63 | echo.
64 | echo Error: JAVA_HOME not found in your environment. >&2
65 | echo Please set the JAVA_HOME variable in your environment to match the >&2
66 | echo location of your Java installation. >&2
67 | echo.
68 | goto error
69 |
70 | :OkJHome
71 | if exist "%JAVA_HOME%\bin\java.exe" goto init
72 |
73 | echo.
74 | echo Error: JAVA_HOME is set to an invalid directory. >&2
75 | echo JAVA_HOME = "%JAVA_HOME%" >&2
76 | echo Please set the JAVA_HOME variable in your environment to match the >&2
77 | echo location of your Java installation. >&2
78 | echo.
79 | goto error
80 |
81 | @REM ==== END VALIDATION ====
82 |
83 | :init
84 |
85 | @REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
86 | @REM Fallback to current working directory if not found.
87 |
88 | set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
89 | IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
90 |
91 | set EXEC_DIR=%CD%
92 | set WDIR=%EXEC_DIR%
93 | :findBaseDir
94 | IF EXIST "%WDIR%"\.mvn goto baseDirFound
95 | cd ..
96 | IF "%WDIR%"=="%CD%" goto baseDirNotFound
97 | set WDIR=%CD%
98 | goto findBaseDir
99 |
100 | :baseDirFound
101 | set MAVEN_PROJECTBASEDIR=%WDIR%
102 | cd "%EXEC_DIR%"
103 | goto endDetectBaseDir
104 |
105 | :baseDirNotFound
106 | set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
107 | cd "%EXEC_DIR%"
108 |
109 | :endDetectBaseDir
110 |
111 | IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
112 |
113 | @setlocal EnableExtensions EnableDelayedExpansion
114 | for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
115 | @endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
116 |
117 | :endReadAdditionalConfig
118 |
119 | SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
120 | set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
121 | set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
122 |
123 | set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
124 |
125 | FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
126 | IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
127 | )
128 |
129 | @REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
130 | @REM This allows using the maven wrapper in projects that prohibit checking in binary data.
131 | if exist %WRAPPER_JAR% (
132 | if "%MVNW_VERBOSE%" == "true" (
133 | echo Found %WRAPPER_JAR%
134 | )
135 | ) else (
136 | if not "%MVNW_REPOURL%" == "" (
137 | SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
138 | )
139 | if "%MVNW_VERBOSE%" == "true" (
140 | echo Couldn't find %WRAPPER_JAR%, downloading it ...
141 | echo Downloading from: %DOWNLOAD_URL%
142 | )
143 |
144 | powershell -Command "&{"^
145 | "$webclient = new-object System.Net.WebClient;"^
146 | "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
147 | "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
148 | "}"^
149 | "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
150 | "}"
151 | if "%MVNW_VERBOSE%" == "true" (
152 | echo Finished downloading %WRAPPER_JAR%
153 | )
154 | )
155 | @REM End of extension
156 |
157 | @REM Provide a "standardized" way to retrieve the CLI args that will
158 | @REM work with both Windows and non-Windows executions.
159 | set MAVEN_CMD_LINE_ARGS=%*
160 |
161 | %MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
162 | if ERRORLEVEL 1 goto error
163 | goto end
164 |
165 | :error
166 | set ERROR_CODE=1
167 |
168 | :end
169 | @endlocal & set ERROR_CODE=%ERROR_CODE%
170 |
171 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
172 | @REM check for post script, once with legacy .bat ending and once with .cmd ending
173 | if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
174 | if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
175 | :skipRcPost
176 |
177 | @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
178 | if "%MAVEN_BATCH_PAUSE%" == "on" pause
179 |
180 | if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
181 |
182 | exit /B %ERROR_CODE%
183 |
--------------------------------------------------------------------------------
/nbactions.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | run
5 |
6 | jar
7 |
8 |
9 | process-classes
10 | org.codehaus.mojo:exec-maven-plugin:3.0.0:exec
11 |
12 |
13 |
14 | ${exec.vmArgs} -classpath %classpath ${exec.mainClass} ${exec.appArgs}
15 |
16 | org.idaesbasic.Main
17 | java
18 |
19 |
20 |
21 | debug
22 |
23 | jar
24 |
25 |
26 | process-classes
27 | org.codehaus.mojo:exec-maven-plugin:3.0.0:exec
28 |
29 |
30 | -agentlib:jdwp=transport=dt_socket,server=n,address=${jpda.address}
31 | ${exec.vmArgs} -classpath %classpath ${exec.mainClass} ${exec.appArgs}
32 |
33 | org.idaesbasic.Main
34 | java
35 | true
36 |
37 |
38 |
39 | profile
40 |
41 | jar
42 |
43 |
44 | process-classes
45 | org.codehaus.mojo:exec-maven-plugin:3.0.0:exec
46 |
47 |
48 |
49 | ${exec.vmArgs} -classpath %classpath ${exec.mainClass} ${exec.appArgs}
50 | org.idaesbasic.Main
51 | java
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
4 | 4.0.0
5 | idaesbasic
6 | idaesbasic
7 | 0.9.4-SNAPSHOT
8 |
9 |
10 | 1.5.31
11 | 16
12 | 16
13 | UTF-8
14 |
15 |
16 |
17 |
18 | mvnrepo
19 | https://mvnrepository.com/artifact/
20 |
21 |
22 | sonatype
23 | https://oss.sonatype.org/content/repositories/snapshots
24 |
25 |
26 |
27 |
28 |
29 |
30 | org.openjfx
31 | javafx-maven-plugin
32 | 0.0.8
33 |
34 | org.idaesbasic.Main
35 |
36 |
37 |
38 | org.apache.maven.plugins
39 | maven-shade-plugin
40 | 3.2.4
41 |
42 |
43 |
44 | shade
45 |
46 |
47 | true
48 |
49 |
50 |
52 | org.idaesbasic.Main
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | org.jetbrains.kotlin
61 | kotlin-maven-plugin
62 | ${kotlin.version}
63 |
64 |
65 | compile
66 | compile
67 |
68 | compile
69 |
70 |
71 |
72 | src/main/java
73 | src/main/kotlin
74 |
75 |
76 |
77 |
78 | test-compile
79 | test-compile
80 |
81 | test-compile
82 |
83 |
84 |
85 |
86 | ${maven.compiler.target}
87 |
88 |
89 |
90 | org.apache.maven.plugins
91 | maven-compiler-plugin
92 | 3.8.1
93 |
94 |
95 |
96 | default-compile
97 | none
98 |
99 |
100 |
101 | default-testCompile
102 | none
103 |
104 |
105 | java-compile
106 | compile
107 |
108 | compile
109 |
110 |
111 |
112 | java-test-compile
113 | test-compile
114 |
115 | testCompile
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 | org.jetbrains.kotlin
125 | kotlin-reflect
126 | 1.5.31
127 |
128 |
129 |
130 | no.tornado
131 | tornadofx
132 | 2.0.0-SNAPSHOT
133 |
134 |
135 |
136 | org.openjfx
137 | javafx
138 | 17.0.1
139 | pom
140 |
141 |
142 |
143 | org.openjfx
144 | javafx-base
145 | 17.0.1
146 |
147 |
148 |
149 | org.openjfx
150 | javafx-controls
151 | 17.0.1
152 |
153 |
154 |
155 | org.fxmisc.richtext
156 | richtextfx
157 | 0.10.7
158 |
159 |
160 |
161 | org.kordamp.ikonli
162 | ikonli-core
163 | 12.3.0
164 |
165 |
166 |
167 | org.kordamp.ikonli
168 | ikonli-javafx
169 | 12.3.0
170 |
171 |
172 |
173 | org.kordamp.ikonli
174 | ikonli-fontawesome-pack
175 | 12.3.0
176 |
177 |
178 | no.tornado
179 | tornadofx-controlsfx
180 | 0.1
181 |
182 |
183 |
--------------------------------------------------------------------------------
/releases/calendars/beta.ics:
--------------------------------------------------------------------------------
1 | BEGIN:VCALENDAR
2 | PRODID:-//Ben Fortuna//iCal4j 1.0//EN
3 | CALSCALE:GREGORIAN
4 | VERSION:2.0
5 | BEGIN:VEVENT
6 | DTSTAMP:20211114T001815Z
7 | DTSTART:20211114T180000
8 | DTEND:20211114T190000
9 | SUMMARY:0.9.1
10 | UID:13
11 | END:VEVENT
12 | END:VCALENDAR
13 |
--------------------------------------------------------------------------------
/releases/roadmaps/0.9.1.todo:
--------------------------------------------------------------------------------
1 | [x] New folder option 2021-11-14
2 | [x] Write compare why use idaesbasic and not other apps No date picked
3 | [ ] Do you really want to quit dialog 2021-11-14
4 | [x] Remove folders option 2021-11-20
5 |
--------------------------------------------------------------------------------
/releases/roadmaps/0.9.2.todo:
--------------------------------------------------------------------------------
1 | [ ] Optional dates 2021-11-14
2 | [ ] Tags 2021-11-14
3 | [ ] Modifiable tasks 2021-11-14
4 | [ ] Side menu 2021-11-14
5 | [ ] Time option 2021-11-14
6 | [ ] Add settings
--------------------------------------------------------------------------------
/run.bat:
--------------------------------------------------------------------------------
1 | mvn exec:java -D"exec.mainClass"="org.idaesbasic.Main"
--------------------------------------------------------------------------------
/src/main/kotlin/module-info.java:
--------------------------------------------------------------------------------
1 | module idaesbasic.org.idaesbasic {
2 | requires javafx.base;
3 | requires javafx.controls;
4 | requires javafx.graphics;
5 | requires tornadofx;
6 | requires org.fxmisc.richtext;
7 | requires kotlin.stdlib;
8 | requires org.kordamp.ikonli.core;
9 | requires org.kordamp.ikonli.javafx;
10 | requires org.kordamp.ikonli.fontawesome;
11 | requires tornadofx.controlsfx;
12 | requires wellbehavedfx;
13 |
14 | opens org.idaesbasic to tornadofx;
15 | opens org.idaesbasic.buffer to tornadofx;
16 | opens org.idaesbasic.buffer.run to tornadofx;
17 | opens org.idaesbasic.sidepanel to tornadofx;
18 | opens org.idaesbasic.powerline to tornadofx;
19 |
20 | exports org.idaesbasic;
21 | }
--------------------------------------------------------------------------------
/src/main/kotlin/org/idaesbasic/Main.kt:
--------------------------------------------------------------------------------
1 | package org.idaesbasic
2 |
3 | import javafx.stage.Stage
4 | import tornadofx.App
5 | import tornadofx.launch
6 |
7 | class IdaesbasicApp : App(MainView::class, MainStyle::class) {
8 |
9 | override fun start(stage: Stage) {
10 | stage.apply {
11 | width = 1000.0
12 | height = 800.0
13 | }
14 |
15 | super.start(stage)
16 | }
17 | }
18 |
19 | object Main {
20 | @JvmStatic
21 | fun main(args: Array) {
22 | launch(args)
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/kotlin/org/idaesbasic/MainStyle.kt:
--------------------------------------------------------------------------------
1 | package org.idaesbasic
2 |
3 | import tornadofx.*
4 |
5 | class MainStyle: Stylesheet() {
6 |
7 | companion object {
8 | val styledTextArea by cssclass()
9 | val caret by cssclass()
10 | val squeezebox by cssclass()
11 | val form by cssclass()
12 | val lineno by cssclass()
13 |
14 | private val draculaBackgroundColor = c("#282a36")
15 | private val draculaForegroundColor = c("#44475a")
16 | private val draculaSelectColor = c("#6272a4")
17 | private val draculaTextColor = c("#f8f8f2")
18 | }
19 |
20 | init {
21 | button {
22 | backgroundColor = multi(draculaForegroundColor)
23 | textFill = draculaTextColor
24 | and (hover) {
25 | backgroundColor = multi(draculaSelectColor)
26 | }
27 | }
28 | toolBar {
29 | backgroundColor = multi(draculaBackgroundColor)
30 | }
31 | textField {
32 | backgroundColor = multi(draculaForegroundColor)
33 | textFill = draculaTextColor
34 | }
35 | styledTextArea {
36 | backgroundColor = multi(draculaBackgroundColor)
37 | textFill = draculaTextColor
38 | fontSize = 14.px
39 | text {
40 | fill = draculaTextColor
41 | }
42 | }
43 | caret {
44 | stroke = draculaTextColor
45 | }
46 | squeezebox {
47 | backgroundColor = multi(draculaBackgroundColor)
48 | }
49 | titledPane {
50 | textFill = draculaTextColor
51 | title {
52 | backgroundColor = multi(draculaBackgroundColor)
53 | }
54 | content {
55 | borderColor = multi(box(draculaBackgroundColor))
56 | backgroundColor = multi(draculaBackgroundColor)
57 | }
58 | }
59 | root {
60 | backgroundColor = multi(draculaBackgroundColor)
61 | }
62 | form {
63 | backgroundColor = multi(draculaBackgroundColor)
64 | textFill = draculaTextColor
65 | }
66 | label {
67 | textFill = draculaTextColor
68 | }
69 | lineno {
70 | backgroundColor = multi(draculaBackgroundColor)
71 | }
72 | }
73 | }
--------------------------------------------------------------------------------
/src/main/kotlin/org/idaesbasic/MainView.kt:
--------------------------------------------------------------------------------
1 | package org.idaesbasic
2 |
3 | import javafx.application.Platform
4 | import javafx.beans.property.SimpleIntegerProperty
5 | import javafx.event.Event
6 | import javafx.geometry.Insets
7 | import javafx.scene.input.KeyCode
8 | import javafx.scene.input.KeyEvent
9 | import javafx.scene.layout.Priority
10 | import javafx.scene.paint.Color
11 | import javafx.stage.FileChooser
12 | import org.fxmisc.richtext.CodeArea
13 | import org.fxmisc.richtext.LineNumberFactory
14 | import org.fxmisc.wellbehaved.event.EventPattern.anyOf
15 | import org.fxmisc.wellbehaved.event.EventPattern.keyPressed
16 | import org.fxmisc.wellbehaved.event.InputMap
17 | import org.fxmisc.wellbehaved.event.Nodes
18 | import org.idaesbasic.buffer.NewBufferView
19 | import org.idaesbasic.buffer.file.FileModel
20 | import org.idaesbasic.buffer.run.ExecutionSetupView
21 | import org.idaesbasic.buffer.run.RunConfigController
22 | import org.idaesbasic.intelline.IntellineView
23 | import org.idaesbasic.powerline.PowerLineView
24 | import org.idaesbasic.sidepanel.SidepanelView
25 | import org.kordamp.ikonli.javafx.FontIcon
26 | import tornadofx.*
27 | import java.nio.file.Files
28 | import java.nio.file.Path
29 | import java.nio.file.Paths
30 | import java.util.regex.Matcher
31 | import java.util.regex.Pattern
32 |
33 | class MainView : View() {
34 | val controller: MainController by inject()
35 |
36 | override val root = borderpane {
37 | top {
38 | toolbar {
39 | // Left side
40 | button {
41 | prefWidth = 30.0
42 | prefHeight = prefWidth
43 | graphic = FontIcon().apply {
44 | iconLiteral = "fa-caret-left"
45 | iconColor = Color.web("#f8f8f2")
46 | }
47 | action {
48 | if (controller.currentBufferIndexProperty.get() > 0) {
49 | controller.currentBufferIndexProperty.value -= 1
50 | controller.openCurrentBufferIndexBuffer()
51 | }
52 | }
53 | }
54 | button {
55 | prefWidth = 30.0
56 | prefHeight = prefWidth
57 | graphic = FontIcon().apply {
58 | iconLiteral = "fa-caret-right"
59 | iconColor = Color.web("#f8f8f2")
60 | }
61 | action {
62 | if (controller.currentBufferIndexProperty.value + 1 < controller.buffers.size) {
63 | controller.currentBufferIndexProperty.value += 1
64 | controller.openCurrentBufferIndexBuffer()
65 | }
66 | }
67 | }
68 | button {
69 | prefWidth = 30.0
70 | prefHeight = prefWidth
71 | action {
72 | newBuffer()
73 | }
74 | graphic = FontIcon().apply {
75 | iconLiteral = "fa-plus"
76 | iconColor = Color.web("#f8f8f2")
77 | }
78 | }
79 | button {
80 | prefWidth = 30.0
81 | prefHeight = prefWidth
82 | action {
83 | controller.removeBuffer(controller.currentBufferIndexProperty.get())
84 | }
85 | graphic = FontIcon().apply {
86 | iconLiteral = "fa-minus"
87 | iconColor = Color.web("#f8f8f2")
88 | }
89 | }
90 | button {
91 | prefWidth = 30.0
92 | prefHeight = prefWidth
93 | action {
94 | val currentEditor: Editor = controller.getCurrentBuffer() as Editor
95 | showSaveDialogAndSaveText(
96 | extensions = arrayOf(
97 | FileChooser.ExtensionFilter("All", "*"),
98 | FileChooser.ExtensionFilter("Plain text", "*.txt"),
99 | FileChooser.ExtensionFilter("Java class", "*.java"),
100 | FileChooser.ExtensionFilter("Python", "*.py"),
101 | FileChooser.ExtensionFilter("Kotlin class", "*.kt")
102 | ),
103 | text = currentEditor.root.text,
104 | file = currentEditor.fileObject
105 | )
106 | }
107 | graphic = FontIcon().apply {
108 | iconLiteral = "fa-save"
109 | iconColor = Color.web("#f8f8f2")
110 | }
111 | }
112 | // Space
113 | pane {
114 | hboxConstraints {
115 | hgrow = Priority.SOMETIMES
116 | }
117 | }
118 | // Center
119 | add(IntellineView().root)
120 | // Space
121 | pane {
122 | hboxConstraints {
123 | hgrow = Priority.SOMETIMES
124 | }
125 | }
126 | // Right side
127 | button {
128 | prefWidth = 30.0
129 | prefHeight = prefWidth
130 | val configsController = find(RunConfigController::class)
131 | val contextMenu = contextmenu {
132 | item("Change config") {
133 | action {
134 | ExecutionSetupView().openWindow()
135 | }
136 | }
137 | }
138 | val runContextToggleGroup = togglegroup { }
139 | configsController.configs.onChange() {
140 | // Update context menu to the changed config
141 | it.next()
142 | if (it.wasAdded()) {
143 | val config = configsController.configs[it.to - 1]
144 | contextMenu.radiomenuitem(config.nameProperty.value, runContextToggleGroup) {
145 | action {
146 | check(true)
147 | configsController.currentConfig = config
148 | configsController.runCurrentConfig()
149 | }
150 | }
151 | }
152 | }
153 | action {
154 | configsController.runCurrentConfig()
155 | }
156 | }
157 | checkbox {
158 | val sidepanelView = SidepanelView()
159 | prefWidth = 30.0
160 | prefHeight = prefWidth
161 | action {
162 | if (isSelected) {
163 | // Show sidepanel
164 | sidepanelView.openWindow()?.apply {
165 | this.width = 400.0
166 | this.height = 700.0
167 | this.x = currentStage?.x!! + (currentStage?.width!! - this.width - 50.0)
168 | this.y = currentStage?.y!! + (currentStage?.height!! - this.height) / 2
169 | this.isAlwaysOnTop = true
170 | }
171 | } else {
172 | // Hide sidepanel
173 | sidepanelView.currentWindow?.hide()
174 | }
175 | }
176 | }
177 | }
178 | }
179 | bottom()
180 | }
181 |
182 | private fun showSaveDialogAndSaveText(extensions: Array, text: String, file: FileModel) {
183 | if (file.directory == null) {
184 | val fileArray = chooseFile(
185 | title = "Save file",
186 | filters = extensions,
187 | mode = FileChooserMode.Save
188 | )
189 | if (fileArray.isNotEmpty()) {
190 | val newDirectory = fileArray[0]
191 | file.directory = Paths.get(newDirectory.path)
192 | }
193 | }
194 | if (file.directory != null) {
195 | controller.saveTextToFile(text, file.directory!!)
196 | }
197 | }
198 |
199 | fun newEditor(bufferIndex: Int, file: FileModel) {
200 | val textEditor = Editor(file)
201 | if (controller.buffers.size >= bufferIndex) {
202 | // Replace the given buffer index
203 | controller.buffers[bufferIndex] = textEditor
204 | } else {
205 | // Add as new buffer
206 | controller.buffers.add(textEditor)
207 | }
208 | }
209 |
210 | fun newBuffer() {
211 | val newBuffer = NewBufferView()
212 | controller.buffers.add(newBuffer)
213 | controller.currentBufferIndexProperty.set(controller.buffers.size - 1)
214 | controller.openCurrentBufferIndexBuffer()
215 | }
216 |
217 | fun switchCenterToBufferView(bufferView: Fragment) {
218 | root.center = bufferView.root
219 | }
220 | }
221 |
222 | class MainViewModel : ItemViewModel() {
223 | val root = bind(MainView::root)
224 | }
225 |
226 | class Editor(file: FileModel) : Fragment() {
227 | override val root = CodeArea()
228 | lateinit var fileObject: FileModel
229 |
230 | init {
231 | root.setParagraphGraphicFactory(LineNumberFactory.get(root))
232 | fileObject = file
233 | root.padding = Insets(20.0, 20.0, 20.0, 20.0)
234 | root.appendText(file.text)
235 | val preventTab: InputMap = InputMap.consume(
236 | anyOf(
237 | // Prevent tab to replace with 4 spaces indentation
238 | keyPressed(KeyCode.TAB)
239 | )
240 | )
241 | Nodes.addInputMap(root, preventTab)
242 | val whiteSpace: Pattern = Pattern.compile("^\\s+")
243 | root.addEventHandler(KeyEvent.KEY_PRESSED) { KE ->
244 | // Vim movement
245 | if (KE.code === KeyCode.H) {
246 | Platform.runLater {
247 | val caretPosition: Int = root.caretPosition
248 | root.deleteText(caretPosition - 1, caretPosition)
249 | root.moveTo(caretPosition - 2)
250 | }
251 | }
252 | if (KE.code === KeyCode.L) {
253 | Platform.runLater {
254 | val caretPosition: Int = root.caretPosition
255 | root.deleteText(caretPosition - 1, caretPosition)
256 | root.moveTo(caretPosition)
257 | }
258 | }
259 | // Four spaces for tab
260 | if (KE.code === KeyCode.TAB) {
261 | val caretPosition: Int = root.caretPosition
262 | root.insertText(caretPosition, " ")
263 | }
264 | // Auto-indent after pressing enter from the last line
265 | if (KE.code === KeyCode.ENTER) {
266 | val caretPosition: Int = root.caretPosition
267 | val currentParagraph: Int = root.currentParagraph
268 | val m0: Matcher = whiteSpace.matcher(root.getParagraph(currentParagraph - 1).getSegments()[0])
269 | if (m0.find()) Platform.runLater { root.insertText(caretPosition, m0.group()) }
270 | }
271 | //TODO: Implement backspaces that remove 4 space indentations
272 | }
273 | }
274 | }
275 |
276 | class MainController : Controller() {
277 |
278 | var buffers = SortedFilteredList()
279 | var currentBufferIndexProperty = SimpleIntegerProperty(-1)
280 |
281 | fun getCurrentBuffer(): Fragment {
282 | return buffers[currentBufferIndexProperty.get()]
283 | }
284 |
285 | fun openCurrentBufferIndexBuffer() {
286 | find(MainView::class).switchCenterToBufferView(getCurrentBuffer())
287 | }
288 |
289 | fun removeBuffer(index: Int) {
290 | buffers.removeAt(index)
291 | if (currentBufferIndexProperty.get() >= index && currentBufferIndexProperty.get() != 0) {
292 | currentBufferIndexProperty.value -= 1
293 | }
294 | openCurrentBufferIndexBuffer()
295 | }
296 |
297 | fun saveTextToFile(text: String, file: Path) {
298 | Files.writeString(file, text)
299 | }
300 | }
301 |
--------------------------------------------------------------------------------
/src/main/kotlin/org/idaesbasic/buffer/NewBufferView.kt:
--------------------------------------------------------------------------------
1 | package org.idaesbasic.buffer
2 |
3 | import javafx.beans.property.SimpleStringProperty
4 | import org.idaesbasic.MainView
5 | import javafx.stage.FileChooser
6 | import org.idaesbasic.buffer.file.FileModel
7 | import tornadofx.*
8 | import java.nio.file.Files
9 | import java.nio.file.Paths
10 |
11 | class NewBufferView : Fragment() {
12 | private val loadDirectory = SimpleStringProperty()
13 | private val loadFile = SimpleStringProperty()
14 | private val controller: NewBufferController by inject()
15 |
16 | override val root = squeezebox {
17 | fold("New file", expanded = true) {
18 | val newFileName = SimpleStringProperty()
19 | form {
20 | fieldset("Basic file configuration") {
21 | field("Filename") {
22 | textfield(newFileName)
23 | }
24 | field("Language") {
25 | label("Plain text")
26 | }
27 | }
28 | fieldset("Advanced file configuration") {
29 |
30 | }
31 | button("Create") {
32 | action {
33 | val mainView = find(MainView::class)
34 | val file = FileModel(newFileName.get(), null, null)
35 | mainView.newEditor(mainView.controller.currentBufferIndexProperty.get(), file)
36 | mainView.controller.openCurrentBufferIndexBuffer()
37 | }
38 | }
39 | }
40 | }
41 | fold("Load file", expanded = true) {
42 | form {
43 | fieldset("Location") {
44 | field("Directory") {
45 | hbox {
46 | textfield(loadDirectory)
47 | }
48 | }
49 | field("File name") {
50 | hbox {
51 | textfield(loadFile)
52 | }
53 | }
54 | button("Auto pick") {
55 | action {
56 | val extensions = arrayOf(
57 | FileChooser.ExtensionFilter("All", "*"),
58 | FileChooser.ExtensionFilter("Plain text", "*.txt"),
59 | FileChooser.ExtensionFilter("Java class", "*.java"),
60 | FileChooser.ExtensionFilter("Python", "*.py"),
61 | FileChooser.ExtensionFilter("Kotlin class", "*.kt")
62 | )
63 | val fileArray = chooseFile(
64 | "Save file",
65 | extensions,
66 | null,
67 | null,
68 | FileChooserMode.Single
69 | )
70 | if (fileArray.isNotEmpty()) {
71 | loadDirectory.set(fileArray[0].path.replace(fileArray[0].name, ""))
72 | loadFile.set(fileArray[0].name)
73 | }
74 | }
75 | }
76 | }
77 | button("Load file") {
78 | action {
79 | controller.loadFileInEditor("${loadDirectory.value}${loadFile.value}")
80 | }
81 | }
82 | }
83 | }
84 | }
85 | }
86 |
87 | class NewBufferController : Controller() {
88 | fun loadFileInEditor(location: String) {
89 | val mainView = find(MainView::class)
90 | val openedFile = Paths.get(location)
91 | val file = FileModel(openedFile.fileName.toString(), openedFile, Files.readString(openedFile))
92 | mainView.newEditor(mainView.controller.currentBufferIndexProperty.get(), file)
93 | mainView.controller.openCurrentBufferIndexBuffer()
94 | }
95 | }
96 |
--------------------------------------------------------------------------------
/src/main/kotlin/org/idaesbasic/buffer/file/FileModel.kt:
--------------------------------------------------------------------------------
1 | package org.idaesbasic.buffer.file
2 |
3 | import java.nio.file.Path
4 |
5 | class FileModel(filename: String?, filedirectory: Path?, text: String?) {
6 | var text: String = ""
7 | var directory: Path? = null
8 | var name: String? = null
9 |
10 | init {
11 | if (text != null) {
12 | this.text = text
13 | }
14 | if (filename != null) {
15 | this.name = filename
16 | }
17 | if (filedirectory != null) {
18 | this.directory = filedirectory
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/src/main/kotlin/org/idaesbasic/buffer/run/ExecutionSetupView.kt:
--------------------------------------------------------------------------------
1 | package org.idaesbasic.buffer.run
2 |
3 | import javafx.beans.property.SimpleStringProperty
4 | import tornadofx.*
5 |
6 | class ExecutionSetupView : View() {
7 | private val controller: RunConfigController by inject()
8 |
9 | private val configName = SimpleStringProperty()
10 | private val configCommand = SimpleStringProperty()
11 |
12 | override val root = squeezebox {
13 | fold("Existing configs") {
14 | listview(controller.configs) {
15 | isEditable = true
16 | cellFragment(RunConfigFragment::class)
17 | }
18 | }
19 | fold("New config") {
20 | form {
21 | fieldset("Information") {
22 | field("Name of config") {
23 | textfield(configName)
24 | }
25 | field("Command") {
26 | textfield(configCommand)
27 | }
28 | }
29 | button("Create config") {
30 | action {
31 | controller.addConfig(RunConfigModel(configName.value, configCommand.value))
32 | configName.set("")
33 | configCommand.set("")
34 | }
35 | }
36 | }
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/kotlin/org/idaesbasic/buffer/run/RunConfigController.kt:
--------------------------------------------------------------------------------
1 | package org.idaesbasic.buffer.run
2 |
3 | import tornadofx.Controller
4 | import tornadofx.SortedFilteredList
5 |
6 | class RunConfigController : Controller() {
7 | val configs = SortedFilteredList()
8 | var currentConfig: RunConfigModel? = null
9 |
10 | fun addConfig(config: RunConfigModel) {
11 | // Add a new run config
12 | configs.add(config)
13 | }
14 |
15 | fun runCurrentConfig() {
16 | currentConfig?.let { run(it) }
17 | }
18 |
19 | fun run(config: RunConfigModel) {
20 | // Executes the given config by command
21 | Runtime.getRuntime().exec(config.commandProperty.value)
22 | }
23 | }
--------------------------------------------------------------------------------
/src/main/kotlin/org/idaesbasic/buffer/run/RunConfigFragment.kt:
--------------------------------------------------------------------------------
1 | package org.idaesbasic.buffer.run
2 |
3 | import tornadofx.Fragment
4 | import tornadofx.ListCellFragment
5 | import tornadofx.hbox
6 | import tornadofx.label
7 |
8 | class RunConfigFragment : ListCellFragment() {
9 | val runConfigModel = RunConfigProperty(itemProperty)
10 |
11 | override val root = hbox {
12 | label (runConfigModel.name) { }
13 | }
14 | }
--------------------------------------------------------------------------------
/src/main/kotlin/org/idaesbasic/buffer/run/RunConfigModel.kt:
--------------------------------------------------------------------------------
1 | package org.idaesbasic.buffer.run
2 |
3 | import javafx.beans.property.ObjectProperty
4 | import javafx.beans.property.SimpleStringProperty
5 | import tornadofx.ItemViewModel
6 |
7 | class RunConfigModel (name: String, runCommand: String?) {
8 | var nameProperty = SimpleStringProperty(name)
9 | var commandProperty = SimpleStringProperty(runCommand)
10 | }
11 |
12 | class RunConfigProperty(property: ObjectProperty) : ItemViewModel(itemProperty = property) {
13 | val name = bind(autocommit = true) { item?.nameProperty }
14 | }
--------------------------------------------------------------------------------
/src/main/kotlin/org/idaesbasic/intelline/IntellineView.kt:
--------------------------------------------------------------------------------
1 | package org.idaesbasic.intelline
2 |
3 | import javafx.scene.Parent
4 | import javafx.scene.input.KeyCode
5 | import javafx.scene.input.KeyEvent
6 | import org.idaesbasic.MainView
7 | import org.idaesbasic.buffer.file.FileModel
8 | import tornadofx.View
9 | import tornadofx.textfield
10 |
11 | class IntellineView : View() {
12 | override val root = textfield () {
13 | prefWidth = 600.0
14 | prefHeight = 30.0
15 | addEventFilter(KeyEvent.KEY_RELEASED) { event ->
16 | if (event.code == KeyCode.ENTER) {
17 | // Execute the command
18 | val commands = text.split(" ")
19 | when (commands[0]) {
20 | "create" -> {
21 | when (commands[1]) {
22 | "file" -> {
23 | // TODO Create controller
24 | // Create new blank file
25 | val mainView = find(MainView::class)
26 | val currentBuffersSize = mainView.controller.buffers.size
27 | mainView.newEditor(currentBuffersSize + 1, FileModel(null, null, null))
28 | mainView.controller.currentBufferIndexProperty.value = currentBuffersSize
29 | mainView.controller.openCurrentBufferIndexBuffer()
30 | }
31 | }
32 | }
33 | }
34 | text = ""
35 | }
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/src/main/kotlin/org/idaesbasic/powerline/PowerLineController.kt:
--------------------------------------------------------------------------------
1 | package org.idaesbasic.powerline
2 |
3 | import org.idaesbasic.MainView
4 | import tornadofx.Controller
5 |
6 | class PowerLineController : Controller() {
7 | val mainView: MainView by inject()
8 | }
--------------------------------------------------------------------------------
/src/main/kotlin/org/idaesbasic/powerline/PowerLineView.kt:
--------------------------------------------------------------------------------
1 | package org.idaesbasic.powerline
2 |
3 | import javafx.beans.property.SimpleStringProperty
4 | import org.idaesbasic.Editor
5 | import org.idaesbasic.MainController
6 | import tornadofx.View
7 | import tornadofx.label
8 | import tornadofx.onChange
9 | import tornadofx.toolbar
10 |
11 | class PowerLineView : View() {
12 | private val fileNameProperty = SimpleStringProperty()
13 | private val mainController: MainController by inject()
14 |
15 | override val root = toolbar {
16 | // Listen to changes
17 | // On current buffer got replaced
18 | mainController.buffers.onChange { change ->
19 | change.next()
20 | if (change.wasReplaced()) {
21 | setFileName()
22 | }
23 | }
24 | // On buffer switched
25 | mainController.currentBufferIndexProperty.onChange { _ ->
26 | setFileName()
27 | }
28 | label(fileNameProperty)
29 | }
30 |
31 | private fun setFileName() {
32 | val currentBuffer = mainController.getCurrentBuffer()
33 | fileNameProperty.value = if (currentBuffer is Editor) {
34 | currentBuffer.fileObject.name
35 | } else {
36 | "No file opened"
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/kotlin/org/idaesbasic/sidepanel/SidepanelView.kt:
--------------------------------------------------------------------------------
1 | package org.idaesbasic.sidepanel
2 |
3 | import tornadofx.View
4 | import tornadofx.vbox
5 |
6 | class SidepanelView : View() {
7 | override val root = vbox { }
8 | }
--------------------------------------------------------------------------------
/src/main/resources/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BenHerbst/idaesbasic/bc4b0db4eca43b0ed1181c297f84516d97716cf5/src/main/resources/icon.png
--------------------------------------------------------------------------------
/techstack.md:
--------------------------------------------------------------------------------
1 |
26 |