KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > stringsubstitution > FilePrompt


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 Matt Conway and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * Matt Conway - initial implementation
10  * IBM Corporation - integration and code cleanup
11  *******************************************************************************/

12 package org.eclipse.debug.internal.ui.stringsubstitution;
13
14 import org.eclipse.swt.widgets.FileDialog;
15
16 /**
17  * Prompts the user to choose a file and expands the selection
18  */

19 public class FilePrompt extends PromptingResolver {
20
21     /**
22      * Prompts the user to choose a file
23      * @see PromptExpanderBase#prompt()
24      */

25     public void prompt() {
26         FileDialog dialog = new FileDialog(getShell());
27         dialog.setText(dialogMessage);
28         dialog.setFileName(lastValue == null ? defaultValue : lastValue);
29         dialogResultString = dialog.open();
30     }
31
32 }
33
Popular Tags