Update of /cvsroot/metamorphosis/ruper2/src/java/eclipse/org/krysalis/ruper2/eclipse/util
In directory sc8-pr-cvs1:/tmp/cvs-serv28552/src/java/eclipse/org/krysalis/ruper2/eclipse/util
Modified Files:
RuperEclipseHelper.java
Log Message:
Browser action
Index: RuperEclipseHelper.java
===================================================================
RCS file: /cvsroot/metamorphosis/ruper2/src/java/eclipse/org/krysalis/ruper2/eclipse/util/RuperEclipseHelper.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** RuperEclipseHelper.java 23 Oct 2003 15:01:18 -0000 1.7
--- RuperEclipseHelper.java 27 Oct 2003 21:50:21 -0000 1.8
***************
*** 18,22 ****
--- 18,28 ----
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
+ import org.eclipse.jface.dialogs.InputDialog;
+ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.pde.internal.core.PDECore;
+ import org.eclipse.swt.widgets.DirectoryDialog;
+ import org.eclipse.swt.widgets.Shell;
+ import org.eclipse.ui.IWorkbenchWindow;
+ import org.eclipse.ui.PlatformUI;
import org.krysalis.ruper2.util.io.FileUtils;
import org.krysalis.version.log.Logger;
***************
*** 173,176 ****
--- 179,214 ----
public void setEclipsePathStr(String string) {
m_eclipsePathStr = string;
+ }
+
+ public static String directoryBrowse()
+ {
+ DirectoryDialog directoryDialog = new DirectoryDialog(getShell());
+ return ( directoryDialog.open() ).trim();
+ }
+
+ public static void messageDialog(String msg)
+ {
+ MessageDialog.openInformation(getShell(), "Resource Updater Message", msg);
+
+ }
+
+ public static String inputDialog(String msg)
+ {
+ InputDialog inputDlg = new InputDialog(getShell(), "Resource Updater", msg, null, null);
+ inputDlg.open();
+ return inputDlg.getValue().trim();
+ }
+
+ private static Shell getShell()
+ {
+ Shell shell = null;
+
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ if (window != null)
+ {
+ shell = window.getShell();
+ }
+
+ return shell;
}
-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community? Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.