1 /*******************************************************************************
2  * Copyright (c) 2003, 2006 IBM Corporation and others.
3  *
4  * This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License 2.0
6  * which accompanies this distribution, and is available at
7  * https://www.eclipse.org/legal/epl-2.0/
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  *     IBM Corporation - initial API and implementation
13  *******************************************************************************/
14 package org.eclipse.team.tests.ccvs.core.subscriber;
15 
16 import org.eclipse.compare.structuremergeviewer.IDiffElement;
17 import org.eclipse.team.core.synchronize.SyncInfoSet;
18 import org.eclipse.team.internal.ccvs.ui.subscriber.OverrideAndUpdateSubscriberOperation;
19 
20 public class TestOverrideAndUpdateOperation extends OverrideAndUpdateSubscriberOperation {
21 
22 	private boolean prompted = false;
23 
TestOverrideAndUpdateOperation(IDiffElement[] elements)24 	protected TestOverrideAndUpdateOperation(IDiffElement[] elements) {
25 		super(null, elements);
26 	}
27 
28 	@Override
canRunAsJob()29 	protected boolean canRunAsJob() {
30 		return false;
31 	}
32 
33 	@Override
promptForOverwrite(SyncInfoSet syncSet)34 	protected boolean promptForOverwrite(SyncInfoSet syncSet) {
35 		TestOverrideAndUpdateOperation.this.prompted = true;
36 		return true;
37 	}
38 
isPrompted()39 	public boolean isPrompted() {
40 		return this.prompted;
41 	}
42 }
43