Skip to content

Commit 95a5cbd

Browse files
Apply Spotless formatting
1 parent c86c907 commit 95a5cbd

85 files changed

Lines changed: 3782 additions & 3849 deletions

File tree

Some content is hidden

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

src/main/java/com/mycmd/App.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55

66
/** Entry point for MyCMD-GUI. */
77
public class App {
8-
public static void main(String[] args) {
9-
// Security check to prevent CMD access
10-
String launchedFrom = System.getenv("MYCMD_LAUNCHED");
11-
if (launchedFrom == null || !launchedFrom.equalsIgnoreCase("true")) {
12-
System.out.println("❌ MyCMD-GUI cannot be run directly from CMD.");
13-
System.out.println("➡️ Please use the official launcher (MyCMD.bat).");
14-
return;
15-
}
8+
public static void main(String[] args) {
9+
// Security check to prevent CMD access
10+
String launchedFrom = System.getenv("MYCMD_LAUNCHED");
11+
if (launchedFrom == null || !launchedFrom.equalsIgnoreCase("true")) {
12+
System.out.println("❌ MyCMD-GUI cannot be run directly from CMD.");
13+
System.out.println("➡️ Please use the official launcher (MyCMD.bat).");
14+
return;
15+
}
1616

17-
// Launch JavaFX GUI
18-
Application.launch(MainApp.class, args);
19-
}
17+
// Launch JavaFX GUI
18+
Application.launch(MainApp.class, args);
19+
}
2020
}

src/main/java/com/mycmd/Command.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
/** Interfaace for all commands. Every command impleements this */
66
public interface Command {
7-
void execute(String[] args, ShellContext context) throws IOException;
7+
void execute(String[] args, ShellContext context) throws IOException;
88

9-
String description();
9+
String description();
1010

11-
String usage();
11+
String usage();
1212
}

src/main/java/com/mycmd/CommandRegistry.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55

66
/** Registers and retrieves commands by name. */
77
public class CommandRegistry {
8-
private final Map<String, Command> commands = new HashMap<>();
8+
private final Map<String, Command> commands = new HashMap<>();
99

10-
public void register(String name, Command cmd) {
11-
commands.put(name.toLowerCase(), cmd);
12-
}
10+
public void register(String name, Command cmd) {
11+
commands.put(name.toLowerCase(), cmd);
12+
}
1313

14-
public Command get(String name) {
15-
return commands.get(name.toLowerCase());
16-
}
14+
public Command get(String name) {
15+
return commands.get(name.toLowerCase());
16+
}
1717

18-
public Map<String, Command> getAll() {
19-
return commands;
20-
}
18+
public Map<String, Command> getAll() {
19+
return commands;
20+
}
2121
}

src/main/java/com/mycmd/ConsoleShell.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@
55
/** Developer console mode for debugging. */
66
public class ConsoleShell {
77

8-
public static void main(String[] args) {
9-
CommandRegistry registry = new CommandRegistry();
10-
ShellContext context = new ShellContext();
11-
ShellEngine engine = new ShellEngine(registry, context);
8+
public static void main(String[] args) {
9+
CommandRegistry registry = new CommandRegistry();
10+
ShellContext context = new ShellContext();
11+
ShellEngine engine = new ShellEngine(registry, context);
1212

13-
Scanner sc = new Scanner(System.in);
14-
System.out.println("MyCMD Developer Console Mode\n(Type 'exit' to quit)");
13+
Scanner sc = new Scanner(System.in);
14+
System.out.println("MyCMD Developer Console Mode\n(Type 'exit' to quit)");
1515

16-
while (true) {
17-
System.out.print("> ");
18-
String input = sc.nextLine();
19-
if (input.equalsIgnoreCase("exit")) break;
20-
engine.execute(input);
21-
}
16+
while (true) {
17+
System.out.print("> ");
18+
String input = sc.nextLine();
19+
if (input.equalsIgnoreCase("exit")) break;
20+
engine.execute(input);
21+
}
2222

23-
sc.close();
24-
}
23+
sc.close();
24+
}
2525
}

0 commit comments

Comments
 (0)