Examples of Completion


Examples of org.springframework.roo.shell.Completion

                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

Examples of org.springframework.roo.shell.Completion

        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

Examples of org.springframework.roo.shell.Completion

                "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

Examples of org.springframework.shell.core.Completion

  @Override
  public boolean getAllPossibleValues(List<Completion> completions, Class<?> targetType, String existingData, String optionContext, MethodTarget target) {
    Set<String> hosts = client.getHostNames().keySet();
    for (String host : hosts) {
      completions.add(new Completion(host));
    }
    return true;
  }
View Full Code Here

Examples of org.springframework.shell.core.Completion

  @Override
  public boolean getAllPossibleValues(List<Completion> completions, Class<?> targetType, String existingData, String optionContext, MethodTarget target) {
    Set<String> blueprints = client.getBlueprintsMap().keySet();
    for (String blueprint : blueprints) {
      completions.add(new Completion(blueprint));
    }
    return true;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.