01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.dialogs;
11:
12: /**
13: * Implementors of this interface answer one of the prescribed return codes
14: * when asked whether to overwrite a certain path string (which could
15: * represent a resource path, a file system path, etc).
16: */
17: public interface IOverwriteQuery {
18: /**
19: * Return code indicating the operation should be canceled.
20: */
21: public static final String CANCEL = "CANCEL"; //$NON-NLS-1$
22:
23: /**
24: * Return code indicating the entity should not be overwritten,
25: * but operation should not be canceled.
26: */
27: public static final String NO = "NO"; //$NON-NLS-1$
28:
29: /**
30: * Return code indicating the entity should be overwritten.
31: */
32: public static final String YES = "YES"; //$NON-NLS-1$
33:
34: /**
35: * Return code indicating the entity should be overwritten,
36: * and all subsequent entities should be overwritten without prompting.
37: */
38: public static final String ALL = "ALL"; //$NON-NLS-1$
39:
40: /**
41: * Return code indicating the entity should not be overwritten,
42: * and all subsequent entities should not be overwritten without prompting.
43: */
44: public static final String NO_ALL = "NOALL"; //$NON-NLS-1$
45:
46: /**
47: * Returns one of the return code constants declared on this interface,
48: * indicating whether the entity represented by the passed String should be overwritten.
49: * <p>
50: * This method may be called from a non-UI thread, in which case this method must run the query
51: * in a sync exec in the UI thread, if it needs to query the user.
52: * </p>
53: * @param pathString the path representing the entity to be overwritten
54: * @return one of the return code constants declared on this interface
55: */
56: String queryOverwrite(String pathString);
57: }
|