Skip to content

Commit 25e4167

Browse files
committed
added stepContainer, update settings asks for link when no settingsfolder was found
1 parent c40042f commit 25e4167

File tree

5 files changed

+11
-19
lines changed

5 files changed

+11
-19
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ public String getName() {
4343
public void run() {
4444

4545
updateSettings();
46-
//updateSoftware();
47-
//updateRepositories();
46+
updateSoftware();
47+
updateRepositories();
4848
}
4949

5050

@@ -68,8 +68,9 @@ private void updateSettings() {
6868
this.context.info("https://github.com/devonfw/IDEasy/blob/main/documentation/settings.asciidoc");
6969
this.context.info("Please contact the technical lead of your project to get the SETTINGS_URL for your project.");
7070
this.context.info("In case you just want to test IDEasy you may simply hit return to install the default settings.");
71-
this.context.info();
72-
repository = this.context.read("Settings URL [" + DEFAULT_SETTINGS_REPO_URL +"]: ");
71+
this.context.info("");
72+
this.context.info("Settings URL [{}]:", DEFAULT_SETTINGS_REPO_URL);
73+
repository = this.context.readLine();
7374
}
7475
}
7576
if (repository.isBlank()) {

cli/src/main/java/com/devonfw/tools/ide/context/AbstractIdeContext.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -699,18 +699,6 @@ public <O> O question(String question, O... options) {
699699
}
700700

701701

702-
public String read(String msg) {
703-
704-
interaction(msg);
705-
return readLine();
706-
}
707-
708-
709-
/**
710-
* @return the input from the end-user (e.g. read from the console).
711-
*/
712-
protected abstract String readLine();
713-
714702
private static <O> void addMapping(Map<String, O> mapping, String key, O option) {
715703

716704
O duplicate = mapping.put(key, option);

cli/src/main/java/com/devonfw/tools/ide/context/IdeContext.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,10 @@ default boolean question(String question) {
177177
@SuppressWarnings("unchecked")
178178
<O> O question(String question, O... options);
179179

180-
String read(String message);
180+
/**
181+
* @return the input from the end-user (e.g. read from the console).
182+
*/
183+
String readLine();
181184

182185
/**
183186
* Will ask the given question. If the user answers with "yes" the method will return and the process can continue.

cli/src/main/java/com/devonfw/tools/ide/context/IdeContextConsole.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public IdeContextConsole(IdeLogLevel minLogLevel, Appendable out, boolean colore
3535
}
3636

3737
@Override
38-
protected String readLine() {
38+
public String readLine() {
3939

4040
if (this.scanner == null) {
4141
return System.console().readLine();

cli/src/test/java/com/devonfw/tools/ide/context/AbstractIdeTestContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public boolean isTest() {
4242
}
4343

4444
@Override
45-
protected String readLine() {
45+
public String readLine() {
4646

4747
if (this.answerIndex >= this.answers.length) {
4848
throw new IllegalStateException("End of answers reached!");

0 commit comments

Comments
 (0)