Skip to content

Package: ECPFileDialogHelper

ECPFileDialogHelper

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2014 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. 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: * Johannes Faltermeier - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.internal.ui.util;
15:
16: import org.eclipse.swt.widgets.Shell;
17:
18: /**
19: * Interface defining methods for retrieving Filepaths from a {@link org.eclipse.swt.widgets.FileDialog FileDialog}.
20: *
21: * @author jfaltermeier
22: *
23: */
24: public interface ECPFileDialogHelper {
25:
26:         /**
27:          * Returns the absolute file path of the file selected by the user.
28:          *
29:          * @param shell The shell to open the {@link org.eclipse.swt.widgets.FileDialog FileDialog}
30:          * @return the absolute filename or <code>null</code> if no file was selected
31:          */
32:         String getPathForImport(Shell shell);
33:
34:         /**
35:          * Returns the file path to export a model element to.
36:          *
37:          * @param shell The shell to open the {@link org.eclipse.swt.widgets.FileDialog FileDialog}
38:          * @param fileName a proposed filename for the export
39:          * @return the file path
40:          */
41:         String getPathForExport(Shell shell, String fileName);
42: }