Skip to content

Commit 1711379

Browse files
committed
Improve API coherence by moving related classes in the same package
1 parent 3d4dce2 commit 1711379

File tree

75 files changed

+99
-113
lines changed

Some content is hidden

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

75 files changed

+99
-113
lines changed

spring-shell-autoconfigure/src/main/java/org/springframework/shell/boot/CompleterAutoConfiguration.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
import org.springframework.beans.factory.annotation.Autowired;
2727
import org.springframework.boot.autoconfigure.AutoConfiguration;
2828
import org.springframework.context.annotation.Bean;
29-
import org.springframework.shell.core.CompletingParsedLine;
30-
import org.springframework.shell.core.CompletionContext;
31-
import org.springframework.shell.core.CompletionProposal;
29+
import org.springframework.shell.core.jline.CompletingParsedLine;
30+
import org.springframework.shell.core.completion.CompletionContext;
31+
import org.springframework.shell.core.completion.CompletionProposal;
3232
import org.springframework.shell.core.Shell;
3333

3434
/**

spring-shell-autoconfigure/src/main/java/org/springframework/shell/boot/SpringShellAutoConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
import org.springframework.context.annotation.Bean;
2828
import org.springframework.context.annotation.Import;
2929
import org.springframework.core.convert.support.DefaultConversionService;
30-
import org.springframework.shell.core.ResultHandler;
31-
import org.springframework.shell.core.ResultHandlerService;
30+
import org.springframework.shell.core.result.ResultHandler;
31+
import org.springframework.shell.core.result.ResultHandlerService;
3232
import org.springframework.shell.core.Shell;
3333
import org.springframework.shell.core.command.CommandRegistry;
3434
import org.springframework.shell.core.config.ShellConversionServiceSupplier;

spring-shell-autoconfigure/src/main/java/org/springframework/shell/boot/StandardAPIAutoConfiguration.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
import org.springframework.boot.autoconfigure.AutoConfiguration;
2121
import org.springframework.context.annotation.Bean;
2222
import org.springframework.shell.core.command.CommandRegistry;
23-
import org.springframework.shell.standard.CommandValueProvider;
24-
import org.springframework.shell.standard.EnumValueProvider;
25-
import org.springframework.shell.standard.FileValueProvider;
26-
import org.springframework.shell.standard.ValueProvider;
23+
import org.springframework.shell.core.CommandValueProvider;
24+
import org.springframework.shell.core.EnumValueProvider;
25+
import org.springframework.shell.core.FileValueProvider;
26+
import org.springframework.shell.core.ValueProvider;
2727

2828
/**
2929
* Sets up all required beans for supporting the standard Shell API.

spring-shell-core/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@
4646
<artifactId>jline</artifactId>
4747
<version>${jline.version}</version>
4848
</dependency>
49+
<dependency>
50+
<groupId>org.antlr</groupId>
51+
<artifactId>ST4</artifactId>
52+
<version>${antlr-st4.version}</version>
53+
</dependency>
4954
<dependency>
5055
<groupId>org.slf4j</groupId>
5156
<artifactId>slf4j-api</artifactId>
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.shell.standard;
17+
package org.springframework.shell.core;
1818

1919
import java.util.List;
2020
import java.util.stream.Collectors;
2121

22-
import org.springframework.shell.core.CompletionContext;
23-
import org.springframework.shell.core.CompletionProposal;
2422
import org.springframework.shell.core.command.CommandRegistry;
23+
import org.springframework.shell.core.completion.CompletionContext;
24+
import org.springframework.shell.core.completion.CompletionProposal;
2525

2626
/**
2727
* A {@link ValueProvider} that can be used to auto-complete names of shell commands.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.shell.standard;
17+
package org.springframework.shell.core;
1818

1919
import java.util.ArrayList;
2020
import java.util.List;
2121

2222
import org.springframework.core.ResolvableType;
23-
import org.springframework.shell.core.CompletionContext;
24-
import org.springframework.shell.core.CompletionProposal;
2523
import org.springframework.shell.core.command.CommandOption;
24+
import org.springframework.shell.core.completion.CompletionContext;
25+
import org.springframework.shell.core.completion.CompletionProposal;
2626

2727
/**
2828
* A {@link ValueProvider} that knows how to complete values for {@link Enum} typed parameters.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.shell.standard;
17+
package org.springframework.shell.core;
1818

1919
import java.io.File;
2020
import java.io.IOException;
@@ -25,8 +25,8 @@
2525
import java.util.List;
2626
import java.util.stream.Collectors;
2727

28-
import org.springframework.shell.core.CompletionContext;
29-
import org.springframework.shell.core.CompletionProposal;
28+
import org.springframework.shell.core.completion.CompletionContext;
29+
import org.springframework.shell.core.completion.CompletionProposal;
3030
import org.springframework.util.StringUtils;
3131

3232
import static java.nio.file.FileVisitOption.FOLLOW_LINKS;

spring-shell-core/src/main/java/org/springframework/shell/core/Shell.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,15 @@
4242
import org.springframework.shell.core.command.CommandRegistry;
4343
import org.springframework.shell.core.command.CommandExecution.CommandExecutionException;
4444
import org.springframework.shell.core.command.CommandExecution.CommandExecutionHandlerMethodArgumentResolvers;
45+
import org.springframework.shell.core.completion.CompletionContext;
46+
import org.springframework.shell.core.completion.CompletionProposal;
4547
import org.springframework.shell.core.completion.CompletionResolver;
4648
import org.springframework.shell.core.context.InteractionMode;
4749
import org.springframework.shell.core.context.ShellContext;
4850
import org.springframework.shell.core.exit.ExitCodeExceptionProvider;
4951
import org.springframework.shell.core.exit.ExitCodeMappings;
52+
import org.springframework.shell.core.result.ResultHandler;
53+
import org.springframework.shell.core.result.ResultHandlerService;
5054
import org.springframework.util.StringUtils;
5155

5256
/**
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package org.springframework.shell.standard;
16+
package org.springframework.shell.core;
1717

1818
import java.util.List;
1919

20-
import org.springframework.shell.core.CompletionContext;
21-
import org.springframework.shell.core.CompletionProposal;
20+
import org.springframework.shell.core.completion.CompletionContext;
21+
import org.springframework.shell.core.completion.CompletionProposal;
2222

2323
/**
2424
* Beans implementing this interface are queried during TAB completion to gather

spring-shell-core/src/main/java/org/springframework/shell/core/Command.java renamed to spring-shell-core/src/main/java/org/springframework/shell/core/command/Command.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package org.springframework.shell.core;
17+
package org.springframework.shell.core.command;
1818

1919
import java.util.Objects;
2020

0 commit comments

Comments
 (0)