Skip to content

Commit ef4a3dc

Browse files
committed
code-cleanup and reformat
1 parent 6283d62 commit ef4a3dc

File tree

301 files changed

+2087
-1900
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

301 files changed

+2087
-1900
lines changed

.editorconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ ij_java_for_statement_wrap = normal
113113
ij_java_generate_final_locals = false
114114
ij_java_generate_final_parameters = false
115115
ij_java_if_brace_force = always
116-
ij_java_imports_layout = *, |, java.**, javax.**, jakarta.**, |, org.**, |, net.**, |, com.**, |, $*
116+
ij_java_imports_layout = $*, |, java.**, javax.**, jakarta.**, javafx.**, |, org.**, |, net.**, |, com.**, |, *
117117
ij_java_indent_case_from_switch = true
118118
ij_java_insert_inner_class_imports = true
119119
ij_java_insert_override_annotation = true
@@ -178,7 +178,7 @@ ij_java_space_after_comma_in_type_arguments = true
178178
ij_java_space_after_for_semicolon = true
179179
ij_java_space_after_quest = true
180180
ij_java_space_after_type_cast = true
181-
ij_java_space_before_annotation_array_initializer_left_brace = true
181+
ij_java_space_before_annotation_array_initializer_left_brace = false
182182
ij_java_space_before_annotation_parameter_list = false
183183
ij_java_space_before_array_initializer_left_brace = true
184184
ij_java_space_before_catch_keyword = true

.github/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ daysUntilStale: 30
88
daysUntilClose: 7
99

1010
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
11-
onlyLabels: []
11+
onlyLabels: [ ]
1212

1313
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
1414
exemptLabels:

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: CI build
2-
on:
2+
on:
33
push:
44
paths-ignore:
55
- 'documentation/**'

.github/workflows/nightly-build.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Nightly Build
22
on:
3-
workflow_dispatch:
4-
schedule:
5-
- cron: '0 2 * * *'
6-
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '0 2 * * *'
6+
77
jobs:
88
verify_commit:
99
runs-on: ubuntu-latest
@@ -24,7 +24,7 @@ jobs:
2424
if: ${{ needs.verify_commit.outputs.RUN_BUILD == 'true' }}
2525
strategy:
2626
matrix:
27-
os: [windows-latest, ubuntu-latest, macos-latest, macos-13]
27+
os: [ windows-latest, ubuntu-latest, macos-latest, macos-13 ]
2828

2929
steps:
3030
- uses: actions/checkout@v3
@@ -48,7 +48,7 @@ jobs:
4848

4949
build:
5050
name: Build Project and Deploy
51-
needs: [build-natives, verify_commit]
51+
needs: [ build-natives, verify_commit ]
5252
if: ${{ needs.verify_commit.outputs.RUN_BUILD == 'true' }}
5353
runs-on: ubuntu-latest
5454
steps:
@@ -61,7 +61,7 @@ jobs:
6161
with:
6262
java-version: '17'
6363
- uses: actions/download-artifact@v3
64-
- name: Make natives available and build project
64+
- name: Make natives available and build project
6565
run: |
6666
mvn -B -ntp -Dstyle.color=always install
6767
mv ./natives/* ./cli/target/
@@ -93,4 +93,4 @@ jobs:
9393
exit 1
9494
else
9595
echo "The last workflow succeeded. This workflow will succeed."
96-
fi
96+
fi

README.adoc

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,52 @@ image::documentation/images/logo.png["Logo",align="center",width=60%]
66

77
Tool to automate the setup and updates of a development environment for any project (Successor of https://github.com/devonfw/ide[devonfw-ide]).
88

9-
image:https://img.shields.io/github/license/devonfw/IDEasy.svg?label=License["Apache License, Version 2.0",link=https://github.com/devonfw/IDEasy/blob/master/LICENSE]
9+
image:https://img.shields.io/github/license/devonfw/IDEasy.svg?label=License["Apache License,Version 2.0",link=https://github.com/devonfw/IDEasy/blob/master/LICENSE]
1010
image:https://img.shields.io/maven-central/v/com.devonfw.tools.IDEasy/ide-cli.svg?label=Maven%20Central["Maven Central",link=https://search.maven.org/search?q=g:com.devonfw.tools.IDEasy+a:ide-cli]
1111
image:https://github.com/devonfw/IDEasy/actions/workflows/build.yml/badge.svg["Build Status",link="https://github.com/devonfw/IDEasy/actions/workflows/build.yml"]
1212
image:https://github.com/devonfw/IDEasy/actions/workflows/update-urls.yml/badge.svg["Update URLS Status",link="https://github.com/devonfw/IDEasy/actions/workflows/update-urls.yml"]
13-
image:https://github.com/devonfw/IDEasy/actions/workflows/nightly-build.yml/badge.svg["Nightly Release", link="https://github.com/devonfw/IDEasy/actions/workflows/nightly-build.yml"]
13+
image:https://github.com/devonfw/IDEasy/actions/workflows/nightly-build.yml/badge.svg["Nightly Release",link="https://github.com/devonfw/IDEasy/actions/workflows/nightly-build.yml"]
1414
image:https://coveralls.io/repos/github/devonfw/IDEasy/badge.svg?branch=main["Coverage Status",link="https://coveralls.io/github/devonfw/IDEasy?branch=main"]
1515

1616
toc::[]
1717

1818
== Pitch
19+
1920
With IDEasy you can create a very small git repo with the configuration of the dev environment of your software project.
2021
Developers can then setup your project using IDEasy with a single CLI command on Windows, Mac, or Linux and get all the tools needed for your project in the configured version and tailored to the projects demands.
2122

2223
No more manual steps to install and configure, no diff-wars, no more dev setup manuals, no more "its not working on my machine"!
2324

2425
Among many link:documentation/alternatives.adoc[alternatives] we believe IDEasy is the best solution for project centric software development needs esp. with its link:documentation/sandbox.adoc[sandbox concept].
2526

26-
Not yet convinced? See link:documentation/features.adoc[features].
27+
Not yet convinced?
28+
See link:documentation/features.adoc[features].
2729

2830
== Setup
2931

3032
=== Prerequisites
33+
3134
All you need before installing IDEasy is https://git-scm.com/download/[git].
3235

3336
=== Install
37+
3438
Download the latest version of `IDEasy` from https://github.com/devonfw/IDEasy/releases[here] and install it.
3539
(You can find all Releases in https://repo.maven.apache.org/maven2/com/devonfw/tools/IDEasy/ide-cli/[Maven Central])
3640

3741
=== Create projects
42+
3843
Once installed, you can setup a new project with the following command:
44+
3945
```
4046
ide create «project-name» [«settings-git-url»]
4147
```
48+
4249
If you do not have a `«settings-git-url»`, you can omit it to setup a standard Java project as demo.
4350

4451
==== Video Tutorial
52+
4553
ifdef::env-github[]
46-
image:https://img.youtube.com/vi/NG6TAmksBGI/0.jpg[link=https://www.youtube.com/watch?v=NG6TAmksBGI, width=640, height =360]
54+
image:https://img.youtube.com/vi/NG6TAmksBGI/0.jpg[link=https://www.youtube.com/watch?v=NG6TAmksBGI, width=640,height =360]
4755
endif::[]
4856

4957
ifndef::env-github[]
@@ -69,9 +77,11 @@ See also our latest video https://vimeo.com/808368450/88d4af9d18[devon ide updat
6977
* link:documentation/[Documentation]
7078

7179
== Contribution Guidelines
80+
7281
*If you want to contribute to `IDEasy` please read our https://github.com/devonfw/IDEasy/blob/main/documentation/IDEasy-contribution-getting-started.adoc[Contribution Guidelines].*
7382

7483
*We use https://github.com/devonfw/IDEasy/issues[GitHub Issues] to track bugs and submit feature requests.*
7584

7685
== License
86+
7787
* link:./LICENSE[License]

cli/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
44
<modelVersion>4.0.0</modelVersion>
55
<parent>
66
<groupId>com.devonfw.tools.IDEasy.dev</groupId>

cli/src/main/assembly/release.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</formats>
88
<includeBaseDirectory>false</includeBaseDirectory>
99
<fileSets>
10-
<fileSet>
10+
<fileSet>
1111
<directory>${project.build.directory}</directory>
1212
<outputDirectory>./bin</outputDirectory>
1313
<includes>

cli/src/main/java/com/devonfw/tools/ide/cli/CliException.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
package com.devonfw.tools.ide.cli;
22

33
/**
4-
* {@link RuntimeException} for to abort CLI process in expected situations. It allows to abort with a defined message
5-
* for the end user and a defined exit code. Unlike other exceptions a {@link CliException} is not treated as technical
6-
* error. Therefore by default (unless in debug mode) no stacktrace is printed.
4+
* {@link RuntimeException} for to abort CLI process in expected situations. It allows to abort with a defined message for the end user and a defined exit code.
5+
* Unlike other exceptions a {@link CliException} is not treated as technical error. Therefore by default (unless in debug mode) no stacktrace is printed.
76
*/
87
public class CliException extends RuntimeException {
98

cli/src/main/java/com/devonfw/tools/ide/cli/Ideasy.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ private IdeContext context() {
3939
}
4040

4141
/**
42-
* Non-static variant of {@link #main(String...) main method} without invoking {@link System#exit(int)} so it can be
43-
* tested.
42+
* Non-static variant of {@link #main(String...) main method} without invoking {@link System#exit(int)} so it can be tested.
4443
*
4544
* @param args the command-line arguments.
4645
* @return the exit code.
@@ -66,11 +65,11 @@ public int run(String... args) {
6665
title = error.getClass().getSimpleName() + ": " + title;
6766
}
6867
String message = "An unexpected error occurred!\n" //
69-
+ "We are sorry for the inconvenience.\n" //
70-
+ "Please check the error below, resolve it and try again.\n" //
71-
+ "If the error is not on your end (network connectivity, lack of permissions, etc.) please file a bug:\n" //
72-
+ "https://github.com/devonfw/ide/issues/new?assignees=&labels=bug&projects=&template=bug.md&title="
73-
+ URLEncoder.encode(title, StandardCharsets.UTF_8);
68+
+ "We are sorry for the inconvenience.\n" //
69+
+ "Please check the error below, resolve it and try again.\n" //
70+
+ "If the error is not on your end (network connectivity, lack of permissions, etc.) please file a bug:\n" //
71+
+ "https://github.com/devonfw/ide/issues/new?assignees=&labels=bug&projects=&template=bug.md&title="
72+
+ URLEncoder.encode(title, StandardCharsets.UTF_8);
7473
context().error(error, message);
7574
}
7675
return exitStatus;

cli/src/main/java/com/devonfw/tools/ide/commandlet/AbstractUpdateCommandlet.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
package com.devonfw.tools.ide.commandlet;
22

3+
import java.nio.file.Files;
4+
import java.nio.file.Path;
5+
import java.util.HashSet;
6+
import java.util.List;
7+
import java.util.Set;
8+
39
import com.devonfw.tools.ide.context.GitContext;
410
import com.devonfw.tools.ide.context.IdeContext;
511
import com.devonfw.tools.ide.property.FlagProperty;
@@ -10,12 +16,6 @@
1016
import com.devonfw.tools.ide.tool.ToolCommandlet;
1117
import com.devonfw.tools.ide.variable.IdeVariables;
1218

13-
import java.nio.file.Files;
14-
import java.nio.file.Path;
15-
import java.util.HashSet;
16-
import java.util.List;
17-
import java.util.Set;
18-
1919
/**
2020
* Abstract {@link Commandlet} base-class for both {@link UpdateCommandlet} and {@link CreateCommandlet}.
2121
*/
@@ -46,7 +46,7 @@ public void run() {
4646
updateSettings();
4747
updateConf();
4848

49-
if (skipTools.isTrue()) {
49+
if (this.skipTools.isTrue()) {
5050
this.context.info("Skipping installation/update of tools as specified by the user.");
5151
} else {
5252
updateSoftware();

cli/src/main/java/com/devonfw/tools/ide/commandlet/BuildCommandlet.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
package com.devonfw.tools.ide.commandlet;
22

3+
import static com.devonfw.tools.ide.variable.IdeVariables.GRADLE_BUILD_OPTS;
4+
import static com.devonfw.tools.ide.variable.IdeVariables.MVN_BUILD_OPTS;
5+
import static com.devonfw.tools.ide.variable.IdeVariables.NPM_BUILD_OPTS;
6+
7+
import java.nio.file.Files;
8+
import java.nio.file.Path;
9+
310
import com.devonfw.tools.ide.cli.CliException;
411
import com.devonfw.tools.ide.context.IdeContext;
512
import com.devonfw.tools.ide.property.StringProperty;
@@ -8,13 +15,6 @@
815
import com.devonfw.tools.ide.tool.mvn.Mvn;
916
import com.devonfw.tools.ide.tool.npm.Npm;
1017

11-
import java.nio.file.Files;
12-
import java.nio.file.Path;
13-
14-
import static com.devonfw.tools.ide.variable.IdeVariables.GRADLE_BUILD_OPTS;
15-
import static com.devonfw.tools.ide.variable.IdeVariables.MVN_BUILD_OPTS;
16-
import static com.devonfw.tools.ide.variable.IdeVariables.NPM_BUILD_OPTS;
17-
1818
/**
1919
* Build tool {@link Commandlet} for automatically detecting build configuration files and running the respective tool.
2020
*/

cli/src/main/java/com/devonfw/tools/ide/commandlet/Commandlet.java

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
package com.devonfw.tools.ide.commandlet;
22

3-
import com.devonfw.tools.ide.context.IdeContext;
4-
import com.devonfw.tools.ide.nls.NlsBundle;
5-
import com.devonfw.tools.ide.property.KeywordProperty;
6-
import com.devonfw.tools.ide.property.Property;
7-
import com.devonfw.tools.ide.tool.ToolCommandlet;
8-
import com.devonfw.tools.ide.version.VersionIdentifier;
9-
103
import java.util.ArrayList;
114
import java.util.Collections;
125
import java.util.HashMap;
136
import java.util.List;
147
import java.util.Map;
158
import java.util.Objects;
169

10+
import com.devonfw.tools.ide.context.IdeContext;
11+
import com.devonfw.tools.ide.nls.NlsBundle;
12+
import com.devonfw.tools.ide.property.KeywordProperty;
13+
import com.devonfw.tools.ide.property.Property;
14+
import com.devonfw.tools.ide.tool.ToolCommandlet;
15+
import com.devonfw.tools.ide.version.VersionIdentifier;
16+
1717
/**
1818
* A {@link Commandlet} is a sub-command of the IDE CLI.
1919
*/
@@ -79,8 +79,7 @@ public void clearProperties() {
7979
}
8080

8181
/**
82-
* @param nameOrAlias the potential {@link Property#getName() name} or {@link Property#getAlias() alias} of the
83-
* requested {@link Property}.
82+
* @param nameOrAlias the potential {@link Property#getName() name} or {@link Property#getAlias() alias} of the requested {@link Property}.
8483
* @return the requested {@link Property property} or {@code null} if not found.
8584
*/
8685
public Property<?> getOption(String nameOrAlias) {
@@ -112,7 +111,7 @@ protected void addKeyword(Property<?> property) {
112111
}
113112

114113
/**
115-
* @param <P> type of the {@link Property}.
114+
* @param <P> type of the {@link Property}.
116115
* @param property the {@link Property} to register.
117116
* @return the given {@link Property}.
118117
*/
@@ -165,7 +164,7 @@ public String getKeyword() {
165164
}
166165

167166
/**
168-
* @param <C> type of the {@link Commandlet}.
167+
* @param <C> type of the {@link Commandlet}.
169168
* @param commandletType the {@link Class} reflecting the requested {@link Commandlet}.
170169
* @return the requested {@link Commandlet}.
171170
* @see CommandletManager#getCommandlet(Class)
@@ -203,10 +202,10 @@ public boolean isSuppressStepSuccess() {
203202
}
204203

205204
/**
206-
* @return {@code true} if the output of this commandlet is (potentially) processed automatically from outside, {@code false} otherwise.
207-
* For example {@link CompleteCommandlet} logs the suggestions for auto-completion to a bash script. Also the {@link EnvironmentCommandlet}
208-
* logs the environment variables for the {@code ide} wrapper script. In such scenarios these logs shall not be spammed
209-
* with warnings like "IDE_ROOT is not set" that would break the processing of the output.
205+
* @return {@code true} if the output of this commandlet is (potentially) processed automatically from outside, {@code false} otherwise. For example
206+
* {@link CompleteCommandlet} logs the suggestions for auto-completion to a bash script. Also the {@link EnvironmentCommandlet} logs the environment variables
207+
* for the {@code ide} wrapper script. In such scenarios these logs shall not be spammed with warnings like "IDE_ROOT is not set" that would break the
208+
* processing of the output.
210209
*/
211210
public boolean isProcessableOutput() {
212211

cli/src/main/java/com/devonfw/tools/ide/commandlet/CommandletManager.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ public interface CommandletManager {
2626

2727
/**
2828
* @param keyword the first keyword argument.
29-
* @return a {@link Commandlet} having the first {@link Property} {@link Property#isRequired() required} and a
30-
* {@link KeywordProperty} with the given {@link Property#getName() name} or {@code null} if no such
31-
* {@link Commandlet} is registered.
29+
* @return a {@link Commandlet} having the first {@link Property} {@link Property#isRequired() required} and a {@link KeywordProperty} with the given
30+
* {@link Property#getName() name} or {@code null} if no such {@link Commandlet} is registered.
3231
*/
3332
Commandlet getCommandletByFirstKeyword(String keyword);
3433

cli/src/main/java/com/devonfw/tools/ide/commandlet/CommandletManagerImpl.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
package com.devonfw.tools.ide.commandlet;
22

3+
import java.util.Collection;
4+
import java.util.Collections;
5+
import java.util.HashMap;
6+
import java.util.List;
7+
import java.util.Map;
8+
39
import com.devonfw.tools.ide.context.IdeContext;
410
import com.devonfw.tools.ide.property.KeywordProperty;
511
import com.devonfw.tools.ide.property.Property;
@@ -33,12 +39,6 @@
3339
import com.devonfw.tools.ide.tool.tomcat.Tomcat;
3440
import com.devonfw.tools.ide.tool.vscode.Vscode;
3541

36-
import java.util.Collection;
37-
import java.util.Collections;
38-
import java.util.HashMap;
39-
import java.util.List;
40-
import java.util.Map;
41-
4242
/**
4343
* Implementation of {@link CommandletManager}.
4444
*/

cli/src/main/java/com/devonfw/tools/ide/commandlet/CompleteCommandlet.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
package com.devonfw.tools.ide.commandlet;
22

3+
import java.util.List;
4+
35
import com.devonfw.tools.ide.cli.CliArguments;
46
import com.devonfw.tools.ide.completion.CompletionCandidate;
57
import com.devonfw.tools.ide.context.AbstractIdeContext;
68
import com.devonfw.tools.ide.context.IdeContext;
79
import com.devonfw.tools.ide.property.StringProperty;
810

9-
import java.util.List;
10-
1111
/**
1212
* {@link Commandlet} for auto-completion.
1313
*/

0 commit comments

Comments
 (0)