Search in sources :

Example 1 with GitScopeOperation

use of org.eclipse.egit.ui.internal.operations.GitScopeOperation in project egit by eclipse.

the class GitScopeUtilTest method setup.

@Before
public void setup() throws Exception {
    SWTBotView view = TestUtil.showExplorerView();
    part = view.getViewReference().getPart(false);
    repositoryFile = createProjectAndCommitToRepository();
    GitScopeOperationFactory.setFactory(new GitScopeOperationFactory() {

        @Override
        public GitScopeOperation createGitScopeOperation(IWorkbenchPart workbenchPart, SubscriberScopeManager manager) {
            return new GitScopeOperation(workbenchPart, manager) {

                @Override
                protected boolean promptForInputChange(String requestPreviewMessage, IProgressMonitor monitor) {
                    // we will avoid the confirmation prompt in the tests
                    return false;
                }
            };
        }
    });
}
Also used : IProgressMonitor(org.eclipse.core.runtime.IProgressMonitor) GitScopeOperationFactory(org.eclipse.egit.ui.internal.operations.GitScopeOperationFactory) IWorkbenchPart(org.eclipse.ui.IWorkbenchPart) SubscriberScopeManager(org.eclipse.team.core.subscribers.SubscriberScopeManager) SWTBotView(org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView) GitScopeOperation(org.eclipse.egit.ui.internal.operations.GitScopeOperation) Before(org.junit.Before)

Aggregations

IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)1 GitScopeOperation (org.eclipse.egit.ui.internal.operations.GitScopeOperation)1 GitScopeOperationFactory (org.eclipse.egit.ui.internal.operations.GitScopeOperationFactory)1 SWTBotView (org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView)1 SubscriberScopeManager (org.eclipse.team.core.subscribers.SubscriberScopeManager)1 IWorkbenchPart (org.eclipse.ui.IWorkbenchPart)1 Before (org.junit.Before)1