You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by rg...@apache.org on 2004/11/16 21:59:11 UTC
svn commit: rev 76034 - in forrest/trunk/tools/eclipse/src/org/apache/forrest: . eclipse/popup/actions eclipse/wizards
Author: rgardler
Date: Tue Nov 16 12:59:10 2004
New Revision: 76034
Added:
forrest/trunk/tools/eclipse/src/org/apache/forrest/ForrestRunner.java (contents, props changed)
Modified:
forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/popup/actions/BuildSite.java
forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/popup/actions/StartForrest.java
forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/popup/actions/StopForrest.java
forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewProjectWizard.java
forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewXdocPage.java
Log:
improve the way forrest is started (more feedback) and open the index page when it is fully started
Added: forrest/trunk/tools/eclipse/src/org/apache/forrest/ForrestRunner.java
==============================================================================
--- (empty file)
+++ forrest/trunk/tools/eclipse/src/org/apache/forrest/ForrestRunner.java Tue Nov 16 12:59:10 2004
@@ -0,0 +1,171 @@
+/*
+ * Copyright 1999-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.forrest;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.net.InetAddress;
+import java.net.Socket;
+
+
+/**
+ * Run and monitor a version of Forrest..
+ */
+public class ForrestRunner implements Runnable {
+ /** Indicates the ForrestRunner is initialised and ready to be started */
+ public static final int INITIALISED = 0;
+ /** Indicates the ForrestRunner is confiuguring the environment for the server */
+ public static final int CONFIGURING = 5;
+ /** Indicates the Forrest server is starting up */
+ public static final int STARTING = 10;
+ /** Indicates the Forrest server is running */
+ public static final int RUNNING = 20;
+ /** Indicates the Forrest server is stopping */
+ public static final int STOPPING = 30;
+ /** Indicates the Forrest server has stopped */
+ public static final int STOPPED = 40;
+ /** Indicates the Forrest server has hit an exception condition */
+ public static final int EXCEPTION = 101;
+
+ private int stop_port = Integer.getInteger("STOP.PORT",8079).intValue();
+ private String _key = System.getProperty("STOP.KEY","mortbay");
+
+ protected String exceptionMessage;
+
+ private static ForrestRunner INSTANCE;
+ protected File workingDirectory;
+ protected String cmdString;
+ Process forrestProcess;
+ protected Thread forrestThread;
+ protected BufferedReader forrestOutput;
+ protected int status;
+
+ /**
+ * Create a JettyRunner to execute Jetty on the
+ * supplied working directory.
+ */
+ public ForrestRunner(String workingDir) {
+ this.workingDirectory = new File(workingDir);
+ if (System.getProperty("os.name").toLowerCase().startsWith("linux")) {
+ cmdString = "forrest -Dbasedir=" + workingDir
+ + " run";
+ } else if (System.getProperty("os.name").toLowerCase().startsWith("windows")) {
+ cmdString = "cmd /c forrest -Dbasedir=" + workingDir
+ + " run";
+ } // FIXME: implement for Mac and other OS's
+
+ forrestThread = new Thread(this);
+ INSTANCE = this;
+ status = INITIALISED;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Runnable#run()
+ */
+ public void run() {
+ try {
+ String str;
+ while ((str = forrestOutput.readLine()) != null) {
+ // FIXME: Output should be sent to log not console
+ System.out.println(str);
+ if (str.indexOf("init-props:") != -1) {
+ status = CONFIGURING;
+ } else if (str.indexOf("run_default_jetty:") != -1 || str.indexOf("run_custom_jetty:") != -1) {
+ status = STARTING;
+ } else if (str.indexOf("EVENT Started org.mortbay.jetty.Server") != -1) {
+ status = RUNNING;
+ } else if (str.indexOf("FIXME: what is the message that indicates server has stoping") != -1) {
+ status = STOPPING;
+ } else if (str.indexOf("FIXME: what is the message that indicates server has stopped") != -1) {
+ status = STOPPED;
+ } else if (str.indexOf("org.mortbay.util.MultiException[java.net.BindException: Address already in use: JVM_Bind]") != -1) {
+ exceptionMessage = str;
+ status = EXCEPTION;
+ }
+ }
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Start this version of Forrest.
+ *
+ */
+ public void start(){
+ System.out.println("Starting Forrest with the command " + cmdString);
+ try {
+ forrestProcess = Runtime.getRuntime().exec(cmdString, null, workingDirectory);
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
+ forrestOutput = new BufferedReader(
+ new InputStreamReader(forrestProcess.getInputStream()));
+ forrestThread.start();
+ }
+
+ /**
+ * Stop this version of Forrest.
+ *
+ */
+ public void stop() {
+ try {
+ Socket s=new Socket(InetAddress.getByName("127.0.0.1"), stop_port);
+ OutputStream out = s.getOutputStream();
+ out.write((_key+"\r\nstop\r\n").getBytes());
+ out.flush();
+ s.shutdownOutput();
+ s.close();
+ } catch (Exception e) {
+ exceptionMessage = "Unable to Stop Server (" + e.getMessage() + ")";
+ status = EXCEPTION;
+ // TODO: log this error correctly
+ e.printStackTrace();
+ }
+ forrestProcess.destroy();
+ forrestThread.stop();
+ }
+
+
+ /**
+ * @return Returns the running Forrest instance.
+ */
+ public static ForrestRunner getInstance() {
+ return INSTANCE;
+ }
+
+ /**
+ * Get the current status of this ForrestRunner.
+ * @return Returns the status.
+ */
+ public int getStatus() {
+ return status;
+ }
+
+ /**
+ * Get the message associated with the last exception thrown by this version of Forrest.
+ * @return A message describing the last exception
+ */
+ public String getExceptionMessage() {
+ return exceptionMessage;
+ }
+}
\ No newline at end of file
Modified: forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/popup/actions/BuildSite.java
==============================================================================
--- forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/popup/actions/BuildSite.java (original)
+++ forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/popup/actions/BuildSite.java Tue Nov 16 12:59:10 2004
@@ -15,34 +15,15 @@
*/
package org.apache.forrest.eclipse.popup.actions;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
+import java.io.IOException;
import org.apache.forrest.eclipse.ForrestPlugin;
-import org.apache.forrest.eclipse.actions.Utilities;
import org.apache.forrest.eclipse.preference.ForrestPreferences;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
@@ -117,7 +98,12 @@
cmdString = "cmd /c forrest -Dbasedir=" + workingDirectory
+ " site";
}
- Utilities.RunExtCommand(cmdString);
+ try {
+ Runtime.getRuntime().exec(cmdString);
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
dialog.close();
}
@@ -135,4 +121,4 @@
}
}
-}
+}
\ No newline at end of file
Modified: forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/popup/actions/StartForrest.java
==============================================================================
--- forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/popup/actions/StartForrest.java (original)
+++ forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/popup/actions/StartForrest.java Tue Nov 16 12:59:10 2004
@@ -15,34 +15,21 @@
*/
package org.apache.forrest.eclipse.popup.actions;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
+import java.net.MalformedURLException;
+import java.net.URL;
+import org.apache.forrest.ForrestRunner;
import org.apache.forrest.eclipse.ForrestPlugin;
-import org.apache.forrest.eclipse.actions.Utilities;
import org.apache.forrest.eclipse.preference.ForrestPreferences;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunch;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
-import org.eclipse.jdt.launching.IVMInstall;
-import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
@@ -52,6 +39,8 @@
import org.eclipse.ui.IActionDelegate;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.webbrowser.WebBrowser;
+import org.eclipse.webbrowser.WebBrowserEditorInput;
public class StartForrest
implements IObjectActionDelegate, IJavaLaunchConfigurationConstants {
@@ -75,6 +64,8 @@
* @see IActionDelegate#run(IAction)
*/
public void run(IAction action) {
+ Shell messageDialog;
+ Label statusMsg;
if (activeProject == null) {
return;
}
@@ -82,8 +73,8 @@
Shell shell = new Shell();
String cmdString = null;
IPath path = JavaCore.getClasspathVariable("ECLIPSE_HOME");
- // TODO: This should be a monitor dialog
- Shell dialog = new Shell(shell);
+ // TODO: This should be a monitor messageDialog
+ messageDialog = new Shell(shell);
String fhome = ForrestPlugin.getDefault().getPluginPreferences()
.getString(ForrestPreferences.FORREST_HOME);
@@ -91,129 +82,21 @@
IPath workingDirectory = activeProject.getLocation();
if (fhome.equals("")) {
- dialog.setText("Configure Forrest");
- dialog.setSize(400, 100);
- Label statusMsg = new Label(dialog, SWT.NONE);
+ messageDialog.setText("Configure Forrest");
+ messageDialog.setSize(400, 100);
+ statusMsg = new Label(messageDialog, SWT.NONE);
statusMsg
.setText("Please configure Forrest by providing values for the required preferences");
statusMsg.setLocation(30, 25);
statusMsg.pack();
// TODO: Add an OK button
- dialog.open();
+ messageDialog.open();
// TODO: open the properties editor
return;
}
-
- dialog.setText("Forrest Server");
- dialog.setSize(500, 250);
- Label statusMsg = new Label(dialog, SWT.NONE);
- StringBuffer sb = new StringBuffer("Forrest server is starting.\n");
- sb.append("\n\nPlease wait...");
- statusMsg.setText(sb.toString());
- statusMsg.setLocation(30, 25);
- statusMsg.pack();
- dialog.open();
-
- if (System.getProperty("os.name").toLowerCase().startsWith("linux")) {
- cmdString = "forrest -Dbasedir=" + workingDirectory
- + " webapp-local";
- Utilities.RunExtCommand(cmdString);
- }
-
- if (System.getProperty("os.name").toLowerCase().startsWith("windows")) {
- cmdString = "cmd /c forrest -Dbasedir=" + workingDirectory
- + " webapp-local";
- Utilities.RunExtCommand(cmdString);
- }
-
- try {
- ILaunchManager manager = DebugPlugin.getDefault()
- .getLaunchManager();
- ILaunchConfigurationType type = manager
- .getLaunchConfigurationType(ID_JAVA_APPLICATION);
- ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(
- null, "Start Jetty");
-
- // find the JRE used to start
- IVMInstall jre = JavaRuntime.getDefaultVMInstall();
-
- IPath forrestHome = new Path(fhome);
-
- // specify a JRE
- workingCopy.setAttribute(ATTR_VM_INSTALL_NAME, jre.getName());
- workingCopy.setAttribute(ATTR_VM_INSTALL_TYPE, jre
- .getVMInstallType().getId());
-
- // specify main type and program arguments
- workingCopy.setAttribute(ATTR_MAIN_TYPE_NAME,
- "org.mortbay.jetty.Server");
- workingCopy.setAttribute(ATTR_PROGRAM_ARGUMENTS, workingDirectory
- + "/build/webapp/jettyconf.xml");
-
- // specify classpath
- List classpath = new ArrayList();
-
- String parent = ".." + File.separator;
-
- String sPath = fhome + File.separator + parent + parent + "lib";
- File searchDir = new File(sPath);
- File forrestBuildDir = new File(fhome + File.separator + parent + parent + "build");
- File jettyDir = new File(fhome + File.separator + parent + parent + "tools"
- + File.separator + "jetty");
-
- try {
- //FIXME: check that the search directory exists, if it doesn't eclipse throws an unhandled loop exception
- List allfiles = Utilities.getFileListing(searchDir);
- allfiles.addAll(Utilities.getFileListing(forrestBuildDir));
- allfiles.addAll(Utilities.getFileListing(jettyDir));
- Iterator filesListing = allfiles.iterator();
- String thisFile;
-
- while (filesListing.hasNext()) {
- thisFile = filesListing.next().toString();
-
- if (thisFile.toString().toLowerCase().endsWith("jar")) { //$NON-NLS-1$
- IPath forrestCorePath = new Path(thisFile.toString());
- IRuntimeClasspathEntry forrestCoreEntry = JavaRuntime
- .newArchiveRuntimeClasspathEntry(forrestCorePath);
- forrestCoreEntry
- .setClasspathProperty(IRuntimeClasspathEntry.USER_CLASSES);
- classpath.add(forrestCoreEntry.getMemento());
- }
- }
- } catch (FileNotFoundException e1) {
- e1.printStackTrace();
- }
-
- IPath systemLibsPath = new Path(JavaRuntime.JRE_CONTAINER);
- IRuntimeClasspathEntry systemLibsEntry = JavaRuntime
- .newRuntimeContainerClasspathEntry(systemLibsPath,
- IRuntimeClasspathEntry.STANDARD_CLASSES);
- classpath.add(systemLibsEntry.getMemento());
- workingCopy.setAttribute(ATTR_CLASSPATH, classpath);
- workingCopy.setAttribute(ATTR_DEFAULT_CLASSPATH, false);
-
- // specify working diretory
- File workingDir = workingDirectory.append("build").append("webapp")
- .toFile();
- workingCopy.setAttribute(ATTR_WORKING_DIRECTORY, workingDir
- .getAbsolutePath());
-
- workingCopy.setAttribute(ATTR_VM_ARGUMENTS, "-Dproject.home=\"" + workingDirectory.toOSString() + "\""
- + " -Dforrest.home=\"" + fhome + "\"");
-
- ILaunchConfiguration configuration = workingCopy.doSave();
- // TODO: move Jetty Launching code to Utilities
- IProgressMonitor monitor = new NullProgressMonitor();
- ILaunch launch = DebugUITools.buildAndLaunch(configuration,
- ILaunchManager.RUN_MODE, monitor);
- Utilities.jetty = launch;
- dialog.close();
- shell.setFocus();
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
+
+ Job forrest = new ForrestStarter(workingDirectory.toOSString());
+ forrest.schedule();
}
/**
@@ -228,5 +111,53 @@
}
}
}
-
-}
+
+ /**
+ * Manage the starting a Forrest server in a specific working directory.
+ * Once Forrest has started open a web browser for the server.
+ */
+ class ForrestStarter extends Job {
+ ForrestRunner forrestRunner;
+ IProgressMonitor monitor;
+
+ /**
+ * Create a new Forrest starter for the given working directory.
+ * @param string
+ * @refactor Need a factory to create instances for each Working Directory, run Forrest on a different port for each
+ */
+ public ForrestStarter(String wdir) {
+ super("Server Starter");
+ this.setUser(true);
+ forrestRunner = new ForrestRunner(wdir);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.operation.IRunnableWithProgress#run(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ public IStatus run(IProgressMonitor monitor) {
+ this.monitor = monitor;
+ monitor.beginTask("Starting Test Server", 2);
+ monitor.subTask("Start Server");
+ forrestRunner.start();
+ while (forrestRunner.getStatus() != ForrestRunner.RUNNING
+ && forrestRunner.getStatus() != ForrestRunner.EXCEPTION) {
+ }
+ monitor.worked(1);
+ if (forrestRunner.getStatus() != ForrestRunner.EXCEPTION) {
+ //FIXME: Handle startup exception
+ }
+ monitor.subTask("Open index page");
+ URL url;
+ try {
+ url = new URL("http://localhost:8888");
+ WebBrowserEditorInput browserInput = new WebBrowserEditorInput(url, WebBrowserEditorInput.SHOW_ALL | WebBrowserEditorInput.FORCE_NEW_PAGE);
+ WebBrowser.openURL(browserInput);
+ } catch (MalformedURLException e1) {
+ // Should never be thrown
+ e1.printStackTrace();
+ }
+ monitor.worked(2);
+ return Status.OK_STATUS;
+ }
+ }
+}
\ No newline at end of file
Modified: forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/popup/actions/StopForrest.java
==============================================================================
--- forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/popup/actions/StopForrest.java (original)
+++ forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/popup/actions/StopForrest.java Tue Nov 16 12:59:10 2004
@@ -15,9 +15,8 @@
*/
package org.apache.forrest.eclipse.popup.actions;
-import org.apache.forrest.eclipse.actions.Utilities;
+import org.apache.forrest.ForrestRunner;
import org.eclipse.core.resources.IProject;
-import org.eclipse.debug.core.DebugException;
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.MessageDialog;
@@ -28,7 +27,7 @@
import org.eclipse.ui.IWorkbenchPart;
public class StopForrest
-implements IObjectActionDelegate, IJavaLaunchConfigurationConstants {
+implements IObjectActionDelegate, IJavaLaunchConfigurationConstants {
private IProject activeProject;
@@ -49,16 +48,8 @@
* @see IActionDelegate#run(IAction)
*/
public void run(IAction action) {
- // TODO: Move Jetty termination code to Utilities
- try {
- Utilities.jetty.terminate();
- Utilities.jetty = null;
- } catch (DebugException e) {
- // FIXME: Handle this exception
- e.printStackTrace();
- }
-
-
+ ForrestRunner.getInstance().stop();
+ // FIXME: only provide this feedback when we *know* it has stopped
MessageDialog.openInformation(new Shell(), "Forrest",
"Forrest server stopped");
}
@@ -69,4 +60,4 @@
public void selectionChanged(IAction action, ISelection selection) {
}
-}
+}
\ No newline at end of file
Modified: forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewProjectWizard.java
==============================================================================
--- forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewProjectWizard.java (original)
+++ forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewProjectWizard.java Tue Nov 16 12:59:10 2004
@@ -15,10 +15,10 @@
*/
package org.apache.forrest.eclipse.wizards;
+import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import org.apache.forrest.eclipse.ForrestPlugin;
-import org.apache.forrest.eclipse.actions.Utilities;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.runtime.CoreException;
@@ -116,8 +116,13 @@
cmdString = "cmd /c forrest -Dbasedir=" + strPath + "\\" + strName
+ " seed";
}
-// TODO: if fhome is not set the wizard will fail
- Utilities.RunExtCommand(cmdString);
+ try {
+ // TODO: if fhome is not set the wizard will fail
+ Runtime.getRuntime().exec(cmdString);
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
project.refreshLocal(IProject.DEPTH_INFINITE, monitor);
Modified: forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewXdocPage.java
==============================================================================
--- forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewXdocPage.java (original)
+++ forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/wizards/NewXdocPage.java Tue Nov 16 12:59:10 2004
@@ -33,6 +33,9 @@
*/
public class NewXdocPage extends WizardPage {
+ // FIXME: get these config settings from forrest.properties
+ public String projectXDocsDir = "/src/documentation/content/xdocs";
+
private Text containerText;
private Text fileText;
private ISelection selection;
@@ -61,6 +64,7 @@
label.setText("&Container:");
containerText = new Text(container, SWT.BORDER | SWT.SINGLE);
+ containerText.setText(projectXDocsDir);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
containerText.setLayoutData(gd);
containerText.addModifyListener(new ModifyListener() {