return false; } if (!(resource instanceof IContainer)) { setErrorMessage(LaunchingMessages.getString("TomcatTab.31"));
	public boolean isValid(ILaunchConfiguration config) {		setErrorMessage(null);		setMessage(null);				String workingDirPath = fTomcatDir.getText().trim();		// resolve variables (if any)		String expansion;		try {			expansion = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(workingDirPath);		} catch (CoreException e) {			setErrorMessage(e.getMessage());			return false;		}		if (workingDirPath.length() > 0) {			File dir = new File(expansion);			if (!dir.exists()) {				setErrorMessage(LaunchingMessages.getString("TomcatTab.5")); //$NON-NLS-1$				return false;			}			if (!dir.isDirectory()) {				setErrorMessage(LaunchingMessages.getString("TomcatTab.6")); //$NON-NLS-1$				return false;			}		}					String webappDirPath = fWebAppDir.getText().trim();		if (webappDirPath.length() > 0) {			IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(webappDirPath));			if (resource == null) {				setErrorMessage(LaunchingMessages.getString("TomcatTab.30")); //$NON-NLS-1$				return false;			}			if (!(resource instanceof IContainer)) {				setErrorMessage(LaunchingMessages.getString("TomcatTab.31")); //$NON-NLS-1$				return false;			}		}								return true;	}