if (getWorkspaceLocation() != null && getWorkspaceLocation().isPrefixOf(fJarPackage.getJarLocation())) { int segments= getWorkspaceLocation().matchingFirstSegments(fJarPackage.getJarLocation()); IPath path= fJarPackage.getJarLocation().removeFirstSegments(segments);
if (getWorkspaceLocation() != null && getWorkspaceLocation().isPrefixOf(fJarPackage.getAbsoluteJarLocation())) { int segments= getWorkspaceLocation().matchingFirstSegments(fJarPackage.getAbsoluteJarLocation()); IPath path= fJarPackage.getAbsoluteJarLocation().removeFirstSegments(segments);
	protected boolean validateDestinationGroup() {		if (fDestinationNamesCombo.getText().length() == 0) {			// Clear error 			if (getErrorMessage() != null)				setErrorMessage(null);			if (getMessage() != null)				setMessage(null);			return false;		}		if (fJarPackage.getJarLocation().toString().endsWith("/")) { //$NON-NLS-1$			setErrorMessage(JarPackagerMessages.getString("JarPackageWizardPage.error.exportDestinationMustNotBeDirectory")); //$NON-NLS-1$			fDestinationNamesCombo.setFocus();			return false;		}		if (getWorkspaceLocation() != null && getWorkspaceLocation().isPrefixOf(fJarPackage.getJarLocation())) {			int segments= getWorkspaceLocation().matchingFirstSegments(fJarPackage.getJarLocation());			IPath path= fJarPackage.getJarLocation().removeFirstSegments(segments);			IResource resource= ResourcesPlugin.getWorkspace().getRoot().findMember(path);			if (resource != null && resource.getType() == IResource.FILE) {				// test if included				if (JarPackagerUtil.contains(JarPackagerUtil.asResources(fJarPackage.getElements()), (IFile)resource)) {					setErrorMessage(JarPackagerMessages.getString("JarPackageWizardPage.error.cantExportJARIntoItself")); //$NON-NLS-1$					return false;				}			}		}		// Inform user about relative directory		String currentMessage= getMessage();		if (!(new File(fDestinationNamesCombo.getText()).isAbsolute())) {			if (currentMessage == null)				setMessage(JarPackagerMessages.getString("JarPackageWizardPage.info.relativeExportDestination"), WizardPage.INFORMATION); //$NON-NLS-1$		} else {			if (currentMessage != null)				setMessage(null);		}		return ensureTargetFileIsValid(fJarPackage.getJarLocation().toFile());	}