Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for askBooleanQuestion (0.28 sec)

  1. platforms/core-runtime/daemon-services/src/test/groovy/org/gradle/api/internal/tasks/userinput/DefaultUserInputHandlerTest.groovy

            0 * userInputHandler._
    
            and:
            input == null
        }
    
        def "can ask yes/no question"() {
            when:
            def input = ask { it.askBooleanQuestion(TEXT, true) }
    
            then:
            1 * outputEventBroadcaster.onOutput(_ as UserInputRequestEvent)
            1 * outputEventBroadcaster.onOutput(_) >> { BooleanQuestionPromptEvent event ->
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 09 04:50:46 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  2. platforms/core-runtime/daemon-services/src/main/java/org/gradle/api/internal/tasks/userinput/NonInteractiveUserInputHandler.java

        }
    
        @Override
        public void finish() {
        }
    
        @Override
        public Boolean askYesNoQuestion(String question) {
            return null;
        }
    
        @Override
        public boolean askBooleanQuestion(String question, boolean defaultValue) {
            return defaultValue;
        }
    
        @Override
        public <T> T selectOption(String question, Collection<T> options, T defaultOption) {
            return defaultOption;
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 09 04:50:46 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  3. platforms/software/build-init/src/main/java/org/gradle/buildinit/tasks/InitBuild.java

                if (isNotEmptyDirectory) {
                    boolean fileOverwriteAllowed = getAllowFileOverwrite().get();
                    if (!fileOverwriteAllowed) {
                        fileOverwriteAllowed = userQuestions.askBooleanQuestion("Found existing files in the project directory: '" + projectDirFile +
                            "'." + System.lineSeparator() + "Directory will be modified and existing files may be overwritten.  Continue?", false);
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri May 10 12:58:10 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  4. platforms/core-runtime/daemon-services/src/main/java/org/gradle/api/internal/tasks/userinput/UserQuestions.java

         * @return the answer or the given default if not connected to a console.
         */
        boolean askBooleanQuestion(String question, boolean defaultValue);
    
        /**
         * Asks the user to select an option from the given list and returns the answer.
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 09 04:50:46 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  5. platforms/core-runtime/daemon-services/src/main/java/org/gradle/api/internal/tasks/userinput/DefaultUserInputHandler.java

                return prompt(prompt, BooleanUtils::toBoolean);
            }
    
            @Override
            public boolean askBooleanQuestion(String question, final boolean defaultValue) {
                BooleanQuestionPromptEvent prompt = new BooleanQuestionPromptEvent(clock.getCurrentTime(), question, defaultValue);
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 09 04:50:46 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  6. subprojects/core/src/integTest/groovy/org/gradle/api/internal/tasks/userinput/UserInputHandlingIntegrationTest.groovy

                    doLast {
                        println "result = " + result.getOrElse("<default>")
                    }
                }
    
                task askBoolean {
                    def result = handler.askUser { it.askBooleanQuestion("thing?", true) }
                    doLast {
                        println "result = " + result.get()
                    }
                }
    
                task askInt {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon May 20 11:16:24 UTC 2024
    - 13.4K bytes
    - Viewed (0)
Back to top