package org.argeo.eclipse.ui.fs;
-import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
private boolean reverseOrder = false;
private String orderProperty = FsUiConstants.PROPERTY_NAME;
+ private Path initialPath = null;
+
public FsTableViewer(Composite parent, int style) {
super(parent, style | SWT.VIRTUAL);
}
final Object[] res;
if (isRoot)
res = rows;
+ else if (initialPath != null && initialPath.equals(dir))
+ res = rows;
else {
res = new Object[rows.length + 1];
res[0] = new ParentDir(dir.getParent());
this.refresh();
}
+ /**
+ * A path which is to be considered as root (and thus provide no link to a
+ * parent directory)
+ */
+ public void setInitialPath(Path initialPath) {
+ this.initialPath = initialPath;
+ }
+
private class MyLazyCP implements ILazyContentProvider {
private static final long serialVersionUID = 9096550041395433128L;
private Object[] elements;