String initPath= fPathField.getText(); if (initPath.length() == 0) { initPath= fDialogSettings.get(IUIConstants.DIALOGSTORE_LASTEXTJAR); if (initPath == null) { initPath= ""; } } else { IPath entryPath= new Path(initPath); String fileExt= entryPath.getFileExtension(); if ("zip".equals(fileExt) || "jar".equals(fileExt)) { entryPath.removeLastSegments(1); } initPath= entryPath.toOSString(); }
String initPath= getInitPath();
	private IPath chooseExtJarFile() {		String initPath= fPathField.getText();		if (initPath.length() == 0) {					initPath= fDialogSettings.get(IUIConstants.DIALOGSTORE_LASTEXTJAR);			if (initPath == null) {				initPath= "";			}		} else {			IPath entryPath= new Path(initPath);			String fileExt= entryPath.getFileExtension();			if ("zip".equals(fileExt) || "jar".equals(fileExt)) {				entryPath.removeLastSegments(1);			}			initPath= entryPath.toOSString();		}				FileDialog dialog= new FileDialog(getShell());		dialog.setText(JavaPlugin.getResourceString(DIALOG_EXTJARDIALOG + ".text"));		dialog.setFilterExtensions(new String[] {"*.jar;*.zip"});		dialog.setFilterPath(initPath);		String res= dialog.open();		if (res != null) {			fDialogSettings.put(IUIConstants.DIALOGSTORE_LASTEXTJAR, dialog.getFilterPath());			return new Path(res);		}		return null;	}	