KickJava   Java API By Example, From Geeks To Geeks.

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


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.DirectoryDialog;
15
16 /**
17  * Prompts the user to choose a folder and expands the selection
18  */

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

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