public static String getPathInArchive(String title, String message, String path, String pathInArchive) {
ZipFile zipFile= null;
try {
zipFile= new ZipFile(path);
ZipFileStructureProvider provider= new ZipFileStructureProvider(zipFile);
ILabelProvider lp= new ZipDialogLabelProvider(provider);
ZipDialogContentProvider cp= new ZipDialogContentProvider(provider);
ViewerSorter sorter= new ViewerSorter();
ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(Display.getDefault().getActiveShell(), lp, cp);
dialog.setAllowMultiple(false);
dialog.setValidator(new ZipDialogValidator());
dialog.setTitle(title);
dialog.setMessage(message);
dialog.setSorter(sorter);
dialog.setInitialSelection(cp.findElement(new Path(pathInArchive)));
dialog.setInput(path);
if (dialog.open() == Window.OK) {
String name= provider.getFullPath(dialog.getFirstResult());
return new Path(name).removeTrailingSeparator().toString();
}
} catch (IOException e) {
WojPlugin.log("Error while reading archive :"+path,e); //$NON-NLS-1$
} finally {