Package org.springframework.roo.shell

Examples of org.springframework.roo.shell.Completion


                    locale.getLanguage());
            if (locale.getCountry() == null || locale.getCountry().length() > 0) {
                localeString.append("_").append(
                        locale.getCountry().toUpperCase());
            }
            completions.add(new Completion(localeString.toString()));
        }
        return true;
    }
View Full Code Here


            Class<?> targetType, String existingData, String optionContext,
            MethodTarget target) {
        for (final CloudProviderId id : operations.getProvidersId()) {
            if (existingData.isEmpty() || id.getId().equals(existingData)
                    || id.getId().startsWith(existingData)) {
                completions.add(new Completion(id.getId()));
            }
        }
        return true;
    }
View Full Code Here

                otherModuleName + MODULE_PATH_SEPARATOR + "~.web",
                OptionContexts.PROJECT, null);

        // Check
        verify(mockCompletions).add(
                new Completion(focusedModuleName + MODULE_PATH_SEPARATOR,
                        AnsiEscapeCode
                                .decorate(focusedModuleName
                                        + MODULE_PATH_SEPARATOR,
                                        AnsiEscapeCode.FG_CYAN), "Modules", 0));
        // prefix + topLevelPackage, formattedPrefix + topLevelPackage, heading
        final String formattedPrefix = decorate(otherModuleName
                + MODULE_PATH_SEPARATOR, FG_CYAN);
        final String prefix = otherModuleName + MODULE_PATH_SEPARATOR;
        verify(mockCompletions).add(
                new Completion(prefix + topLevelPackage, formattedPrefix
                        + topLevelPackage, "", 1));
        verify(mockCompletions).add(
                new Completion(prefix + "~.web.ShouldBeFound", formattedPrefix
                        + "~.web.ShouldBeFound", "", 1));
        verifyNoMoreInteractions(mockCompletions);
    }
View Full Code Here

        converter.getAllPossibleValues(mockCompletions, JavaType.class, "",
                OptionContexts.PROJECT, null);

        // Check
        verify(mockCompletions).add(
                new Completion(otherModuleName + MODULE_PATH_SEPARATOR,
                        AnsiEscapeCode
                                .decorate(otherModuleName
                                        + MODULE_PATH_SEPARATOR,
                                        AnsiEscapeCode.FG_CYAN), "Modules", 0));
        verify(mockCompletions).add(
                new Completion(topLevelPackage, topLevelPackage,
                        focusedModuleName, 1));
        verify(mockCompletions).add(
                new Completion("~.Foo", "~.Foo", focusedModuleName, 1));
        verify(mockCompletions).add(
                new Completion("~.sub.Bar", "~.sub.Bar", focusedModuleName, 1));
        verifyNoMoreInteractions(mockCompletions);
    }
View Full Code Here

                "com.example.web.VoteController"));
        when(mockProjectOperations.getPoms()).thenReturn(
                Arrays.asList(mockPom1, mockPom2));

        // Invoke and check
        assertGetAllPossibleValues(true, new Completion("com.example.domain"),
                new Completion("com.example.web"));
    }
View Full Code Here

TOP

Related Classes of org.springframework.roo.shell.Completion

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.