import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeColumn;
import org.eclipse.ui.forms.IManagedForm;
// This page widgets
private TreeViewer complexTree;
- private Text mavenSnippet;
public BundleRawPage(FormEditor editor, String title, Node currentNode) {
super(editor, "id", title);
GridLayout layout = new GridLayout(1, false);
layout.marginWidth = 5;
form.getBody().setLayout(layout);
-
createViewer(form.getBody());
}
private void createViewer(Composite parent) {
-
+
// Create the viewer
int style = SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION;
Tree tree = new Tree(parent, style);
createColumn(tree, "Value", SWT.LEFT, 200);
tree.setLinesVisible(true);
tree.setHeaderVisible(true);
+ complexTree = new TreeViewer(tree);
// Configure
complexTree.addDoubleClickListener(new GenericDoubleClickListener());
}
-
private static TreeColumn createColumn(Tree parent, String name, int style,
int width) {
TreeColumn result = new TreeColumn(parent, style);
public void dispose() {
}
}
-}
+}
\ No newline at end of file