Package org.gradle.gradleplugin.foundation.favorites

Examples of org.gradle.gradleplugin.foundation.favorites.FavoritesEditor.editFavorite()


        }});

        editor.addFavoriteTasksObserver(observer, false);

        //now perform the edit.
        editor.editFavorite(favoriteTask, new FavoritesEditor.EditFavoriteInteraction() {
            public boolean editFavorite(FavoritesEditor.EditibleFavoriteTask favoriteTask) {
                favoriteTask.alwaysShowOutput = false;
                favoriteTask.displayName = "newname";
                favoriteTask.fullCommandLine
                        = "myrootproject:mysubproject1:mysubsubproject:lib";   //change the task's full name
View Full Code Here


        }});

        editor.addFavoriteTasksObserver(observer, false);

        //now perform the edit.
        editor.editFavorite(favoriteTask, new FavoritesEditor.EditFavoriteInteraction() {
            public boolean editFavorite(FavoritesEditor.EditibleFavoriteTask favoriteTask) {
                favoriteTask.displayName = "newname";
                favoriteTask.fullCommandLine = "nonexistanttask";   //change the task's full name
                return true;
            }
View Full Code Here

        context.checking(new Expectations() {{
            one(observer).favoritesChanged();
        }});

        //now perform the edit.
        editor.editFavorite(favoriteTask, new FavoritesEditor.EditFavoriteInteraction() {
            public boolean editFavorite(FavoritesEditor.EditibleFavoriteTask favoriteTask) {
                favoriteTask.displayName = "newname";
                favoriteTask.fullCommandLine = "mysubproject1:compile";   //change the task's full name
                return true;
            }
View Full Code Here

                FavoritesEditor.FavoriteTasksObserver.class);

        editor.addFavoriteTasksObserver(observer, false);

        //now perform the edit, but cancel out.
        editor.editFavorite(favoriteTask, new FavoritesEditor.EditFavoriteInteraction() {
            public boolean editFavorite(FavoritesEditor.EditibleFavoriteTask favoriteTask) {
                favoriteTask.displayName = "newname";
                favoriteTask.fullCommandLine = "nonexistanttask";   //change the task's full name
                favoriteTask.alwaysShowOutput = !favoriteTask.alwaysShowOutput;
                return false//return false to cancel!
View Full Code Here

        String originalFullName = favoriteTaskToEdit.getFullCommandLine();

        ValidationErrorTestEditFavoriteInteraction interaction = new ValidationErrorTestEditFavoriteInteraction(newName,
                newFullName);
        //now perform the edit.
        editor.editFavorite(favoriteTaskToEdit, interaction);

        //make sure we did get an error message.
        Assert.assertFalse(interaction.receivedErrorMessage);

        //make sure the settings were changed. We'll go by what the editor has, not just our local favoriteTaskToEdit.
View Full Code Here

        //add two tasks
        FavoriteTask favoriteTask1 = originalEditor.addFavorite(mySubProject1Comple, true);
        FavoriteTask favoriteTask2 = originalEditor.addFavorite(mySubSubProjectLib, false);

        //now change the display name so its not the same as the full name, just so know each field is working.
        originalEditor.editFavorite(favoriteTask1, new FavoritesEditor.EditFavoriteInteraction() {
            public boolean editFavorite(FavoritesEditor.EditibleFavoriteTask favoriteTask) {
                favoriteTask.displayName = "favorite 1";
                return true;
            }
View Full Code Here

        }});

        editor.addFavoriteTasksObserver(observer, false);

        //now perform the edit.
        editor.editFavorite(favoriteTask, new FavoritesEditor.EditFavoriteInteraction() {
            public boolean editFavorite(FavoritesEditor.EditibleFavoriteTask favoriteTask) {
                favoriteTask.alwaysShowOutput = false;
                favoriteTask.displayName = "newname";
                favoriteTask.fullCommandLine
                        = "myrootproject:mysubproject1:mysubsubproject:lib";   //change the task's full name
View Full Code Here

        }});

        editor.addFavoriteTasksObserver(observer, false);

        //now perform the edit.
        editor.editFavorite(favoriteTask, new FavoritesEditor.EditFavoriteInteraction() {
            public boolean editFavorite(FavoritesEditor.EditibleFavoriteTask favoriteTask) {
                favoriteTask.displayName = "newname";
                favoriteTask.fullCommandLine = "nonexistanttask";   //change the task's full name
                return true;
            }
View Full Code Here

        context.checking(new Expectations() {{
            one(observer).favoritesChanged();
        }});

        //now perform the edit.
        editor.editFavorite(favoriteTask, new FavoritesEditor.EditFavoriteInteraction() {
            public boolean editFavorite(FavoritesEditor.EditibleFavoriteTask favoriteTask) {
                favoriteTask.displayName = "newname";
                favoriteTask.fullCommandLine = "mysubproject1:compile";   //change the task's full name
                return true;
            }
View Full Code Here

                FavoritesEditor.FavoriteTasksObserver.class);

        editor.addFavoriteTasksObserver(observer, false);

        //now perform the edit, but cancel out.
        editor.editFavorite(favoriteTask, new FavoritesEditor.EditFavoriteInteraction() {
            public boolean editFavorite(FavoritesEditor.EditibleFavoriteTask favoriteTask) {
                favoriteTask.displayName = "newname";
                favoriteTask.fullCommandLine = "nonexistanttask";   //change the task's full name
                favoriteTask.alwaysShowOutput = !favoriteTask.alwaysShowOutput;
                return false//return false to cancel!
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.