Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2012-12-08 15:00:05 +0000
committerUwe Stieber2012-12-08 15:00:05 +0000
commit4b93a090cb6c113c8a7303c98279415e8025e868 (patch)
tree2fbad2a9199a41fb39cd9bd87f445fcbdef1f5e9
parent7e5f1ef7c6faa6b570b277488ec5d29cab1cb4ca (diff)
downloadorg.eclipse.tcf-4b93a090cb6c113c8a7303c98279415e8025e868.tar.gz
org.eclipse.tcf-4b93a090cb6c113c8a7303c98279415e8025e868.tar.xz
org.eclipse.tcf-4b93a090cb6c113c8a7303c98279415e8025e868.zip
Target Explorer: Fix table and tree column initial size calculations
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/editor/tabs/MemoryMapTab.java8
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/editor/tabs/PathMapTab.java5
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/editor/tabs/TableUtils.java7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ModelListener.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/TreeViewerExplorerEditorPage.java7
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/schema/viewers.exsd1446
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/AbstractTreeControl.java9
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ColumnDescriptor.java72
8 files changed, 780 insertions, 776 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/editor/tabs/MemoryMapTab.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/editor/tabs/MemoryMapTab.java
index 4de976108..8f25546d0 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/editor/tabs/MemoryMapTab.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/editor/tabs/MemoryMapTab.java
@@ -55,17 +55,17 @@ public class MemoryMapTab extends TCFMemoryMapTab {
for (int i = 0; i < columns.length; i++) {
switch (i) {
case 0:
- columns[i].setWidth(37);
+ columns[i].setData("widthHint", Integer.valueOf(37)); //$NON-NLS-1$
break;
case 1:
case 2:
- columns[i].setWidth(10);
+ columns[i].setData("widthHint", Integer.valueOf(10)); //$NON-NLS-1$
break;
case 4:
- columns[i].setWidth(18);
+ columns[i].setData("widthHint", Integer.valueOf(18)); //$NON-NLS-1$
break;
default:
- columns[i].setWidth(7);
+ columns[i].setData("widthHint", Integer.valueOf(7)); //$NON-NLS-1$
break;
}
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/editor/tabs/PathMapTab.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/editor/tabs/PathMapTab.java
index 6664050db..22a423ac8 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/editor/tabs/PathMapTab.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/editor/tabs/PathMapTab.java
@@ -66,8 +66,9 @@ public class PathMapTab extends TCFPathMapTab {
if (viewer != null) {
TableColumn[] columns = viewer.getTable().getColumns();
for (TableColumn column : columns) {
- if (column.getWidth() == 300) column.setWidth(27);
- else if (column.getWidth() == 100) column.setWidth(15);
+ // Set the width hints for the table resize listener
+ if (column.getWidth() == 300) column.setData("widthHint", Integer.valueOf(27)); //$NON-NLS-1$
+ else if (column.getWidth() == 100) column.setData("widthHint", Integer.valueOf(15)); //$NON-NLS-1$
String label = column.getText();
String key = "PathMapEditorPage_column_" + label.toLowerCase(); //$NON-NLS-1$
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/editor/tabs/TableUtils.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/editor/tabs/TableUtils.java
index b6389eca9..e58dc4164 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/editor/tabs/TableUtils.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.ui/src/org/eclipse/tcf/te/tcf/launch/ui/editor/tabs/TableUtils.java
@@ -43,14 +43,17 @@ public final class TableUtils {
// Summarize the table column width
for (TableColumn column : columns) {
- sumColumnWidth += column.getWidth();
+ Object widthHint = column.getData("widthHint"); //$NON-NLS-1$
+ sumColumnWidth += widthHint instanceof Integer ? ((Integer)widthHint).intValue() : column.getWidth();
}
// Calculate the new width for each column
int sumColumnWidth2 = 0;
TableColumn maxColumn = null;
for (TableColumn column : columns) {
- int weight = (column.getWidth() * 100) / sumColumnWidth;
+ Object widthHint = column.getData("widthHint"); //$NON-NLS-1$
+ int width = widthHint instanceof Integer ? ((Integer)widthHint).intValue() : column.getWidth();
+ int weight = (width * 100) / sumColumnWidth;
int newWidth = (weight * tableWidth) / 100;
sumColumnWidth2 += newWidth;
column.setWidth(newWidth);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ModelListener.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ModelListener.java
index 845e3b6a5..a9b136290 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ModelListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.ui/src/org/eclipse/tcf/te/tcf/ui/navigator/ModelListener.java
@@ -80,7 +80,7 @@ public class ModelListener extends ModelAdapter {
// If no -> Default behavior is to close the editor (if any)
else if (!added) {
Display display = PlatformUI.getWorkbench().getDisplay();
- if (display != null) {
+ if (display != null && !display.isDisposed()) {
display.asyncExec(new Runnable() {
@Override
public void run() {
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/TreeViewerExplorerEditorPage.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/TreeViewerExplorerEditorPage.java
index 2518ef72b..acf192f6a 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/TreeViewerExplorerEditorPage.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/editor/pages/TreeViewerExplorerEditorPage.java
@@ -194,14 +194,17 @@ public abstract class TreeViewerExplorerEditorPage extends AbstractCustomFormToo
// Summarize the tree column width
for (TreeColumn column : columns) {
- sumColumnWidth += column.getWidth();
+ Object widthHint = column.getData("widthHint"); //$NON-NLS-1$
+ sumColumnWidth += widthHint instanceof Integer ? ((Integer)widthHint).intValue() : column.getWidth();
}
// Calculate the new width for each column
int sumColumnWidth2 = 0;
TreeColumn maxColumn = null;
for (TreeColumn column : columns) {
- int weight = (column.getWidth() * 100) / sumColumnWidth;
+ Object widthHint = column.getData("widthHint"); //$NON-NLS-1$
+ int width = widthHint instanceof Integer ? ((Integer)widthHint).intValue() : column.getWidth();
+ int weight = (width * 100) / sumColumnWidth;
int newWidth = (weight * treeWidth) / 100;
sumColumnWidth2 += newWidth;
column.setWidth(newWidth);
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/schema/viewers.exsd b/target_explorer/plugins/org.eclipse.tcf.te.ui/schema/viewers.exsd
index c71844745..dca03934e 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/schema/viewers.exsd
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/schema/viewers.exsd
@@ -1,722 +1,724 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.tcf.te.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.tcf.te.ui" id="viewers" name="Tree Viewer Extension"/>
- </appinfo>
- <documentation>
- This extension point is used to declare the columns and the filters for a specified tree viewer.
- </documentation>
- </annotation>
-
- <include schemaLocation="schema://org.eclipse.core.expressions/schema/expressionLanguage.exsd"/>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <choice minOccurs="1" maxOccurs="unbounded">
- <element ref="viewer"/>
- <element ref="columnContribution"/>
- <element ref="filterContribution"/>
- </choice>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="viewer">
- <annotation>
- <documentation>
- Declares a viewer with a viewerId to columns or filters. Definitions of this element with the same viewerId can occur multiple time to contribute columns and filters to a same viewer.
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="creation" minOccurs="0" maxOccurs="1"/>
- <element ref="dragSupport" minOccurs="0" maxOccurs="1"/>
- <element ref="dropSupport" minOccurs="0" maxOccurs="1"/>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- The viewer&apos;s id which uniquely defines a single tree viewer.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="contentProvider" type="string" use="required">
- <annotation>
- <documentation>
- The content provider of the tree viewer.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.jface.viewers.ITreeContentProvider"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="persistent" type="boolean">
- <annotation>
- <documentation>
- If the state of the tree viewer is persistent. The state includes its columns selected, filters selected, etc.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="autoExpandLevel" type="string">
- <annotation>
- <documentation>
- The auto expand level of the tree viewer when it is first displayed.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="columnContribution">
- <annotation>
- <documentation>
- The root of the column contributions.
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="column" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="viewerId" type="string" use="required">
- <annotation>
- <documentation>
- The id of the tree viewer which the columns declared contribute to.
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.tcf.te.ui.viewers/viewer/@id"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="filterContribution">
- <annotation>
- <documentation>
- The root of the filter contributions.
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="filter" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="viewerId" type="string" use="required">
- <annotation>
- <documentation>
- The id of the tree viewer which the filters declared contribute to.
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier" basedOn="org.eclipse.tcf.te.ui.viewers/viewer/@id"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="column">
- <annotation>
- <documentation>
- Declares a tree viewer column with the specified attributes.
- </documentation>
- </annotation>
- <complexType>
- <sequence minOccurs="0" maxOccurs="1">
- <element ref="activation"/>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- The id of the column which must be unique in the same viewer.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- The name of the tree viewer column. It is used as the column&apos;s label.
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="description" type="string">
- <annotation>
- <documentation>
- The description of the column used as the tooltip text of the column.
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="moveable" type="boolean">
- <annotation>
- <documentation>
- Declares if the column is moveable. The default value is false.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="resizable" type="boolean">
- <annotation>
- <documentation>
- Declares if the column is resizable. The default value is true.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="visible" type="boolean">
- <annotation>
- <documentation>
- Declares if the column is visible. The default value is true.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="style">
- <annotation>
- <documentation>
- The style of the column when it is created, SWT.LEFT by default.
- </documentation>
- </annotation>
- <simpleType>
- <restriction base="string">
- <enumeration value="SWT.LEFT">
- </enumeration>
- <enumeration value="SWT.RIGHT">
- </enumeration>
- <enumeration value="SWT.CENTER">
- </enumeration>
- </restriction>
- </simpleType>
- </attribute>
- <attribute name="alignment">
- <annotation>
- <documentation>
- The alignment of the column&apos;s header text, SWT.LEFT by default.
- </documentation>
- </annotation>
- <simpleType>
- <restriction base="string">
- <enumeration value="SWT.LEFT">
- </enumeration>
- <enumeration value="SWT.RIGHT">
- </enumeration>
- <enumeration value="SWT.CENTER">
- </enumeration>
- </restriction>
- </simpleType>
- </attribute>
- <attribute name="width" type="string">
- <annotation>
- <documentation>
- The column&apos;s initial width when it is created, 150 by default.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="image" type="string">
- <annotation>
- <documentation>
- The column&apos;s header image. No image by default.
- </documentation>
- <appinfo>
- <meta.attribute kind="resource"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="labelProvider" type="string" use="required">
- <annotation>
- <documentation>
- The label provider of the column.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.jface.viewers.ILabelProvider"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="comparator" type="string">
- <annotation>
- <documentation>
- The comparator of the column, used to sort the viewer. If it is not set, then this column is not sortable.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":java.util.Comparator"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="filter">
- <complexType>
- <sequence minOccurs="0" maxOccurs="1">
- <element ref="activation" minOccurs="0" maxOccurs="1"/>
- </sequence>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- The id of the filter which must be unique in this viewer.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
- The name of the filter used to display in the viewer&apos;s filter configuration dialog.
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="description" type="string">
- <annotation>
- <documentation>
- The description of the filter.
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="image" type="string">
- <annotation>
- <documentation>
- The filter&apos;s displaying image. No image by default.
- </documentation>
- <appinfo>
- <meta.attribute kind="resource"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="enabled" type="boolean">
- <annotation>
- <documentation>
- If this filter is enabled. Disabled by default.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- The viewer filter that extends &lt;samp&gt;org.eclipse.jface.viewers.ViewerFilter&lt;/samp&gt;.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.jface.viewers.ViewerFilter:"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="visibleInUI" type="boolean">
- <annotation>
- <documentation>
- If this filter appears in the filter configuration dialog. It is false, i.e., invisible by default.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="activation">
- <annotation>
- <documentation>
- The &lt;b&gt;activation&lt;/b&gt; expression defines a condition under which the column/filter should be activated.
- </documentation>
- </annotation>
- <complexType>
- <choice>
- <element ref="not"/>
- <element ref="and"/>
- <element ref="or"/>
- <element ref="instanceof"/>
- <element ref="test"/>
- <element ref="systemTest"/>
- <element ref="equals"/>
- <element ref="count"/>
- <element ref="with"/>
- <element ref="resolve"/>
- <element ref="adapt"/>
- <element ref="iterate"/>
- <element ref="reference"/>
- </choice>
- </complexType>
- </element>
-
- <element name="creation">
- <annotation>
- <documentation>
- The creation flag of the tree viewer.
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="style" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="dragSupport">
- <annotation>
- <documentation>
- The drag support added to the tree viewer.
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="operations"/>
- <element ref="transferTypes"/>
- </sequence>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- A drag source listener that implements &lt;samp&gt;org.eclipse.swt.dndDragSourceListener&lt;/samp&gt;. This listener should have a one-parameter constructor. The only parameter is the tree viewer that the drag source listener is added to.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.swt.dnd.DragSourceListener"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="dropSupport">
- <annotation>
- <documentation>
- The drop support added to the tree viewer.
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="operations"/>
- <element ref="transferTypes"/>
- </sequence>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- A drop target listener that implements &lt;samp&gt;org.eclipse.swt.dnd.DropTargetListener&lt;/samp&gt;. This listener should have a one-parameter constructor. The only parameter is the tree viewer that the drop target listener is added to.
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.swt.dnd.DropTargetListener"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="operations">
- <annotation>
- <documentation>
- The DND operations supported.
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="operation" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="transferTypes">
- <annotation>
- <documentation>
- The DND transfer types supported.
- </documentation>
- </annotation>
- <complexType>
- <sequence>
- <element ref="transferType" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- </complexType>
- </element>
-
- <element name="style">
- <annotation>
- <documentation>
- A creation style declaration.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="name" use="required">
- <annotation>
- <documentation>
- The name of the style including SWT.NONE, SWT.SINGLE, SWT&gt;MULTI, SWT.CHECK, SWT.FULL_SELECTION, SWT.VIRTUAL, SWT.NO_SCROLL.
- </documentation>
- </annotation>
- <simpleType>
- <restriction base="string">
- <enumeration value="SWT.NONE">
- </enumeration>
- <enumeration value="SWT.SINGLE">
- </enumeration>
- <enumeration value="SWT.MULTI">
- </enumeration>
- <enumeration value="SWT.CHECK">
- </enumeration>
- <enumeration value="SWT.FULL_SELECTION">
- </enumeration>
- <enumeration value="SWT.VIRTUAL">
- </enumeration>
- <enumeration value="SWT.NO_SCROLL">
- </enumeration>
- </restriction>
- </simpleType>
- </attribute>
- </complexType>
- </element>
-
- <element name="operation">
- <annotation>
- <documentation>
- A DND operation declaration.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="name" use="required">
- <annotation>
- <documentation>
- The name of the operation including DND.DROP_COPY, DND.DROP_MOVE,DND.DROP_LINK.
- </documentation>
- </annotation>
- <simpleType>
- <restriction base="string">
- <enumeration value="DND.DROP_COPY">
- </enumeration>
- <enumeration value="DND.DROP_MOVE">
- </enumeration>
- <enumeration value="DND.DROP_LINK">
- </enumeration>
- </restriction>
- </simpleType>
- </attribute>
- </complexType>
- </element>
-
- <element name="transferType">
- <annotation>
- <documentation>
- A transfer type declaration.
- </documentation>
- </annotation>
- <complexType>
- <attribute name="name">
- <annotation>
- <documentation>
- The name of the transfer type including TextInstance, ImageTransfer, FileTransfer and LocalSelectionTransfer.
- </documentation>
- </annotation>
- <simpleType>
- <restriction base="string">
- <enumeration value="TextTransfer">
- </enumeration>
- <enumeration value="ImageTransfer">
- </enumeration>
- <enumeration value="FileTransfer">
- </enumeration>
- <enumeration value="LocalSelectionTransfer">
- </enumeration>
- </restriction>
- </simpleType>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- Target Explorer 1.0.0
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- &lt;pre&gt;
- &lt;extension point=&quot;org.eclipse.tcf.te.ui.viewers&quot;&gt;
- &lt;viewer
- autoExpandLevel=&quot;0&quot;
- contentProvider=&quot;org.eclipse.tcf.te.tcf.filesystem.controls.FSTreeContentProvider&quot;
- doubleClickCommand=&quot;org.eclipse.ui.navigator.Open&quot;
- helpId=&quot;org.eclipse.tcf.te.tcf.filesystem.FSExplorerEditorPage&quot;
- id=&quot;org.eclipse.tcf.te.ui.controls.viewer.fs&quot;
- menuId=&quot;org.eclipse.tcf.te.ui.controls.menu.fs&quot;
- persistent=&quot;true&quot;&gt;
- &lt;creation&gt;
- &lt;style name=&quot;SWT.FULL_SELECTION&quot; /&gt;
- &lt;style name=&quot;SWT.MULTI&quot; /&gt;
- &lt;/creation&gt;
- &lt;dragSupport
- class=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.dnd.FSDragSourceListener&quot;&gt;
- &lt;operations&gt;
- &lt;operation name=&quot;DND.DROP_COPY&quot; /&gt;
- &lt;operation name=&quot;DND.DROP_MOVE&quot; /&gt;
- &lt;operation name=&quot;DND.DROP_LINK&quot; /&gt;
- &lt;/operations&gt;
- &lt;transferTypes&gt;
- &lt;transferType name =&quot;LocalSelectionTransfer&quot; /&gt;
- &lt;/transferTypes&gt;
- &lt;/dragSupport&gt;
- &lt;dropSupport
- class=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.dnd.FSDropTargetListener&quot;&gt;
- &lt;operations&gt;
- &lt;operation name=&quot;DND.DROP_COPY&quot; /&gt;
- &lt;operation name=&quot;DND.DROP_MOVE&quot; /&gt;
- &lt;operation name=&quot;DND.DROP_LINK&quot; /&gt;
- &lt;/operations&gt;
- &lt;transferTypes&gt;
- &lt;transferType name =&quot;LocalSelectionTransfer&quot; /&gt;
- &lt;/transferTypes&gt;
- &lt;/dropSupport&gt;
- &lt;/viewer&gt;
- &lt;columnContribution viewerId=&quot;org.eclipse.tcf.te.ui.controls.viewer.fs&quot;&gt;
- &lt;column
- alignment=&quot;SWT.LEFT&quot;
- comparator=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeElementComparator&quot;
- id=&quot;name&quot;
- labelProvider=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeElementLabelProvider&quot;
- moveable=&quot;true&quot;
- name=&quot;%column.name.name&quot;
- resizable=&quot;true&quot;
- style=&quot;SWT.LEFT&quot;
- visible=&quot;true&quot;
- width=&quot;300&quot;&gt;
- &lt;/column&gt;
- &lt;column
- alignment=&quot;SWT.RIGHT&quot;
- comparator=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.SizeComparator&quot;
- id=&quot;size&quot;
- labelProvider=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.SizeLabelProvider&quot;
- moveable=&quot;true&quot;
- name=&quot;%column.name.size&quot;
- resizable=&quot;true&quot;
- style=&quot;SWT.RIGHT&quot;
- visible=&quot;true&quot;
- width=&quot;100&quot;&gt;
- &lt;/column&gt;
- &lt;column
- alignment=&quot;SWT.LEFT&quot;
- comparator=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.FileTypeComparator&quot;
- id=&quot;type&quot;
- labelProvider=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.FileTypeLabelProvider&quot;
- moveable=&quot;true&quot;
- name=&quot;%column.name.type&quot;
- resizable=&quot;true&quot;
- style=&quot;SWT.LEFT&quot;
- visible=&quot;false&quot;
- width=&quot;100&quot;&gt;
- &lt;/column&gt;
- &lt;column
- alignment=&quot;SWT.RIGHT&quot;
- comparator=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.ModificationTimeComparator&quot;
- id=&quot;modified&quot;
- labelProvider=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.ModificationTimeLabelProvider&quot;
- moveable=&quot;true&quot;
- name=&quot;%column.name.modified&quot;
- resizable=&quot;true&quot;
- style=&quot;SWT.RIGHT&quot;
- visible=&quot;true&quot;
- width=&quot;120&quot;&gt;
- &lt;/column&gt;
- &lt;column
- alignment=&quot;SWT.RIGHT&quot;
- comparator=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.AccessTimeComparator&quot;
- id=&quot;accessed&quot;
- labelProvider=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.AccessTimeLabelProvider&quot;
- moveable=&quot;true&quot;
- name=&quot;%column.name.accessed&quot;
- resizable=&quot;true&quot;
- style=&quot;SWT.RIGHT&quot;
- visible=&quot;false&quot;
- width=&quot;120&quot;&gt;
- &lt;/column&gt;
- &lt;/columnContribution&gt;
-
- &lt;filterContribution viewerId=&quot;org.eclipse.tcf.te.ui.controls.viewer.fs&quot;&gt;
- &lt;filter
- class=&quot;org.eclipse.tcf.te.tcf.filesystem.filters.HiddenFilesViewerFilter&quot;
- description=&quot;%filter.description.hidden&quot;
- enabled=&quot;true&quot;
- id=&quot;org.eclipse.tcf.te.tcf.filesystem.filters.hiddenFiles&quot;
- image=&quot;icons/obj16/hidden_file_filter.png&quot;
- name=&quot;%filter.name.hidden&quot;&gt;
- &lt;/filter&gt;
- &lt;filter
- class=&quot;org.eclipse.tcf.te.tcf.filesystem.filters.SystemFilesViewerFilter&quot;
- description=&quot;%filter.description.system&quot;
- enabled=&quot;true&quot;
- id=&quot;org.eclipse.tcf.te.tcf.filesystem.filters.systemFiles&quot;
- image=&quot;icons/obj16/system_file_filter.png&quot;
- name=&quot;%filter.name.system&quot;&gt;
- &lt;activation&gt;
- &lt;with variable=&quot;input&quot;&gt;
- &lt;test property=&quot;org.eclipse.tcf.te.tcf.filesystem.propertytester.peer.isWindows&quot;/&gt;
- &lt;/with&gt;
- &lt;/activation&gt;
- &lt;/filter&gt;
- &lt;/filterContribution&gt;
- &lt;/extension&gt;
-&lt;/pre&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiinfo"/>
- </appinfo>
- <documentation>
- &lt;p&gt;
-In the &quot;column&quot; element, the class referenced by the attribute &quot;labelProvider&quot; must implement &lt;samp&gt;org.eclipse.jface.viewers.ILabelProvider&lt;/samp&gt;. The class referenced by the attribute &quot;comparator&quot; must implement &lt;samp&gt;java.util.Comparator&lt;/samp&gt; that compares the elements of the tree viewer.
-&lt;p&gt;
-In the &quot;filter&quot; element, the class referenced by the attribute &quot;class&quot; must extend &lt;samp&gt;org.eclipse.jface.viewers.ViewerFilter&lt;/samp&gt;.
-&lt;p&gt;
-In the &quot;activation&quot; element, the evaluation context has only one variable &quot;input&quot;, which stores the current input object of the viewer.
- </documentation>
- </annotation>
-
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2011 Wind River Systems, Inc. and others.
-
-All rights reserved.
-
-This program and the accompanying materials are made available under the terms
-of the Eclipse Public License v1.0 which accompanies this distribution, and is
-available at http://www.eclipse.org/legal/epl-v10.html.
- </documentation>
- </annotation>
-
-</schema>
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.tcf.te.ui" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.tcf.te.ui" id="viewers" name="Tree Viewer Extension"/>
+ </appinfo>
+ <documentation>
+ This extension point is used to declare the columns and the filters for a specified tree viewer.
+ </documentation>
+ </annotation>
+
+ <include schemaLocation="schema://org.eclipse.core.expressions/schema/expressionLanguage.exsd"/>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <choice minOccurs="1" maxOccurs="unbounded">
+ <element ref="viewer"/>
+ <element ref="columnContribution"/>
+ <element ref="filterContribution"/>
+ </choice>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="viewer">
+ <annotation>
+ <documentation>
+ Declares a viewer with a viewerId to columns or filters. Definitions of this element with the same viewerId can occur multiple time to contribute columns and filters to a same viewer.
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="creation" minOccurs="0" maxOccurs="1"/>
+ <element ref="dragSupport" minOccurs="0" maxOccurs="1"/>
+ <element ref="dropSupport" minOccurs="0" maxOccurs="1"/>
+ </sequence>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ The viewer&apos;s id which uniquely defines a single tree viewer.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="contentProvider" type="string" use="required">
+ <annotation>
+ <documentation>
+ The content provider of the tree viewer.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.jface.viewers.ITreeContentProvider"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="persistent" type="boolean">
+ <annotation>
+ <documentation>
+ If the state of the tree viewer is persistent. The state includes its columns selected, filters selected, etc.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="autoExpandLevel" type="string">
+ <annotation>
+ <documentation>
+ The auto expand level of the tree viewer when it is first displayed.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="columnContribution">
+ <annotation>
+ <documentation>
+ The root of the column contributions.
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="column" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="viewerId" type="string" use="required">
+ <annotation>
+ <documentation>
+ The id of the tree viewer which the columns declared contribute to.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.tcf.te.ui.viewers/viewer/@id"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="filterContribution">
+ <annotation>
+ <documentation>
+ The root of the filter contributions.
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="filter" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="viewerId" type="string" use="required">
+ <annotation>
+ <documentation>
+ The id of the tree viewer which the filters declared contribute to.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.tcf.te.ui.viewers/viewer/@id"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="column">
+ <annotation>
+ <documentation>
+ Declares a tree viewer column with the specified attributes.
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence minOccurs="0" maxOccurs="1">
+ <element ref="activation"/>
+ </sequence>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ The id of the column which must be unique in the same viewer.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string" use="required">
+ <annotation>
+ <documentation>
+ The name of the tree viewer column. It is used as the column&apos;s label.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="description" type="string">
+ <annotation>
+ <documentation>
+ The description of the column used as the tooltip text of the column.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="moveable" type="boolean">
+ <annotation>
+ <documentation>
+ Declares if the column is moveable. The default value is false.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="resizable" type="boolean">
+ <annotation>
+ <documentation>
+ Declares if the column is resizable. The default value is true.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="visible" type="boolean">
+ <annotation>
+ <documentation>
+ Declares if the column is visible. The default value is true.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="style">
+ <annotation>
+ <documentation>
+ The style of the column when it is created, SWT.LEFT by default.
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="SWT.LEFT">
+ </enumeration>
+ <enumeration value="SWT.RIGHT">
+ </enumeration>
+ <enumeration value="SWT.CENTER">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name="alignment">
+ <annotation>
+ <documentation>
+ The alignment of the column&apos;s header text, SWT.LEFT by default.
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="SWT.LEFT">
+ </enumeration>
+ <enumeration value="SWT.RIGHT">
+ </enumeration>
+ <enumeration value="SWT.CENTER">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ <attribute name="width" type="string">
+ <annotation>
+ <documentation>
+ The column&apos;s initial width when it is created, 150 by default.
+&lt;p&gt;
+&lt;b&gt;Note:&lt;/b&gt; The width specified here is a hint. All columns will be resized automatically to consume the full initial width of the tree control. The calculation is based on the hint specified here.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="image" type="string">
+ <annotation>
+ <documentation>
+ The column&apos;s header image. No image by default.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="resource"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="labelProvider" type="string" use="required">
+ <annotation>
+ <documentation>
+ The label provider of the column.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.jface.viewers.ILabelProvider"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="comparator" type="string">
+ <annotation>
+ <documentation>
+ The comparator of the column, used to sort the viewer. If it is not set, then this column is not sortable.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":java.util.Comparator"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="filter">
+ <complexType>
+ <sequence minOccurs="0" maxOccurs="1">
+ <element ref="activation" minOccurs="0" maxOccurs="1"/>
+ </sequence>
+ <attribute name="id" type="string" use="required">
+ <annotation>
+ <documentation>
+ The id of the filter which must be unique in this viewer.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string" use="required">
+ <annotation>
+ <documentation>
+ The name of the filter used to display in the viewer&apos;s filter configuration dialog.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="description" type="string">
+ <annotation>
+ <documentation>
+ The description of the filter.
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="image" type="string">
+ <annotation>
+ <documentation>
+ The filter&apos;s displaying image. No image by default.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="resource"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="enabled" type="boolean">
+ <annotation>
+ <documentation>
+ If this filter is enabled. Disabled by default.
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ The viewer filter that extends &lt;samp&gt;org.eclipse.jface.viewers.ViewerFilter&lt;/samp&gt;.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn="org.eclipse.jface.viewers.ViewerFilter:"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="visibleInUI" type="boolean">
+ <annotation>
+ <documentation>
+ If this filter appears in the filter configuration dialog. It is false, i.e., invisible by default.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="activation">
+ <annotation>
+ <documentation>
+ The &lt;b&gt;activation&lt;/b&gt; expression defines a condition under which the column/filter should be activated.
+ </documentation>
+ </annotation>
+ <complexType>
+ <choice>
+ <element ref="not"/>
+ <element ref="and"/>
+ <element ref="or"/>
+ <element ref="instanceof"/>
+ <element ref="test"/>
+ <element ref="systemTest"/>
+ <element ref="equals"/>
+ <element ref="count"/>
+ <element ref="with"/>
+ <element ref="resolve"/>
+ <element ref="adapt"/>
+ <element ref="iterate"/>
+ <element ref="reference"/>
+ </choice>
+ </complexType>
+ </element>
+
+ <element name="creation">
+ <annotation>
+ <documentation>
+ The creation flag of the tree viewer.
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="style" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="dragSupport">
+ <annotation>
+ <documentation>
+ The drag support added to the tree viewer.
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="operations"/>
+ <element ref="transferTypes"/>
+ </sequence>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ A drag source listener that implements &lt;samp&gt;org.eclipse.swt.dndDragSourceListener&lt;/samp&gt;. This listener should have a one-parameter constructor. The only parameter is the tree viewer that the drag source listener is added to.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.swt.dnd.DragSourceListener"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="dropSupport">
+ <annotation>
+ <documentation>
+ The drop support added to the tree viewer.
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="operations"/>
+ <element ref="transferTypes"/>
+ </sequence>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ A drop target listener that implements &lt;samp&gt;org.eclipse.swt.dnd.DropTargetListener&lt;/samp&gt;. This listener should have a one-parameter constructor. The only parameter is the tree viewer that the drop target listener is added to.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.swt.dnd.DropTargetListener"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="operations">
+ <annotation>
+ <documentation>
+ The DND operations supported.
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="operation" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="transferTypes">
+ <annotation>
+ <documentation>
+ The DND transfer types supported.
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="transferType" minOccurs="1" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="style">
+ <annotation>
+ <documentation>
+ A creation style declaration.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="name" use="required">
+ <annotation>
+ <documentation>
+ The name of the style including SWT.NONE, SWT.SINGLE, SWT&gt;MULTI, SWT.CHECK, SWT.FULL_SELECTION, SWT.VIRTUAL, SWT.NO_SCROLL.
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="SWT.NONE">
+ </enumeration>
+ <enumeration value="SWT.SINGLE">
+ </enumeration>
+ <enumeration value="SWT.MULTI">
+ </enumeration>
+ <enumeration value="SWT.CHECK">
+ </enumeration>
+ <enumeration value="SWT.FULL_SELECTION">
+ </enumeration>
+ <enumeration value="SWT.VIRTUAL">
+ </enumeration>
+ <enumeration value="SWT.NO_SCROLL">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="operation">
+ <annotation>
+ <documentation>
+ A DND operation declaration.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="name" use="required">
+ <annotation>
+ <documentation>
+ The name of the operation including DND.DROP_COPY, DND.DROP_MOVE,DND.DROP_LINK.
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="DND.DROP_COPY">
+ </enumeration>
+ <enumeration value="DND.DROP_MOVE">
+ </enumeration>
+ <enumeration value="DND.DROP_LINK">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="transferType">
+ <annotation>
+ <documentation>
+ A transfer type declaration.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="name">
+ <annotation>
+ <documentation>
+ The name of the transfer type including TextInstance, ImageTransfer, FileTransfer and LocalSelectionTransfer.
+ </documentation>
+ </annotation>
+ <simpleType>
+ <restriction base="string">
+ <enumeration value="TextTransfer">
+ </enumeration>
+ <enumeration value="ImageTransfer">
+ </enumeration>
+ <enumeration value="FileTransfer">
+ </enumeration>
+ <enumeration value="LocalSelectionTransfer">
+ </enumeration>
+ </restriction>
+ </simpleType>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ Target Explorer 1.0.0
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ &lt;pre&gt;
+ &lt;extension point=&quot;org.eclipse.tcf.te.ui.viewers&quot;&gt;
+ &lt;viewer
+ autoExpandLevel=&quot;0&quot;
+ contentProvider=&quot;org.eclipse.tcf.te.tcf.filesystem.controls.FSTreeContentProvider&quot;
+ doubleClickCommand=&quot;org.eclipse.ui.navigator.Open&quot;
+ helpId=&quot;org.eclipse.tcf.te.tcf.filesystem.FSExplorerEditorPage&quot;
+ id=&quot;org.eclipse.tcf.te.ui.controls.viewer.fs&quot;
+ menuId=&quot;org.eclipse.tcf.te.ui.controls.menu.fs&quot;
+ persistent=&quot;true&quot;&gt;
+ &lt;creation&gt;
+ &lt;style name=&quot;SWT.FULL_SELECTION&quot; /&gt;
+ &lt;style name=&quot;SWT.MULTI&quot; /&gt;
+ &lt;/creation&gt;
+ &lt;dragSupport
+ class=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.dnd.FSDragSourceListener&quot;&gt;
+ &lt;operations&gt;
+ &lt;operation name=&quot;DND.DROP_COPY&quot; /&gt;
+ &lt;operation name=&quot;DND.DROP_MOVE&quot; /&gt;
+ &lt;operation name=&quot;DND.DROP_LINK&quot; /&gt;
+ &lt;/operations&gt;
+ &lt;transferTypes&gt;
+ &lt;transferType name =&quot;LocalSelectionTransfer&quot; /&gt;
+ &lt;/transferTypes&gt;
+ &lt;/dragSupport&gt;
+ &lt;dropSupport
+ class=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.dnd.FSDropTargetListener&quot;&gt;
+ &lt;operations&gt;
+ &lt;operation name=&quot;DND.DROP_COPY&quot; /&gt;
+ &lt;operation name=&quot;DND.DROP_MOVE&quot; /&gt;
+ &lt;operation name=&quot;DND.DROP_LINK&quot; /&gt;
+ &lt;/operations&gt;
+ &lt;transferTypes&gt;
+ &lt;transferType name =&quot;LocalSelectionTransfer&quot; /&gt;
+ &lt;/transferTypes&gt;
+ &lt;/dropSupport&gt;
+ &lt;/viewer&gt;
+ &lt;columnContribution viewerId=&quot;org.eclipse.tcf.te.ui.controls.viewer.fs&quot;&gt;
+ &lt;column
+ alignment=&quot;SWT.LEFT&quot;
+ comparator=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeElementComparator&quot;
+ id=&quot;name&quot;
+ labelProvider=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.FSTreeElementLabelProvider&quot;
+ moveable=&quot;true&quot;
+ name=&quot;%column.name.name&quot;
+ resizable=&quot;true&quot;
+ style=&quot;SWT.LEFT&quot;
+ visible=&quot;true&quot;
+ width=&quot;300&quot;&gt;
+ &lt;/column&gt;
+ &lt;column
+ alignment=&quot;SWT.RIGHT&quot;
+ comparator=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.SizeComparator&quot;
+ id=&quot;size&quot;
+ labelProvider=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.SizeLabelProvider&quot;
+ moveable=&quot;true&quot;
+ name=&quot;%column.name.size&quot;
+ resizable=&quot;true&quot;
+ style=&quot;SWT.RIGHT&quot;
+ visible=&quot;true&quot;
+ width=&quot;100&quot;&gt;
+ &lt;/column&gt;
+ &lt;column
+ alignment=&quot;SWT.LEFT&quot;
+ comparator=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.FileTypeComparator&quot;
+ id=&quot;type&quot;
+ labelProvider=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.FileTypeLabelProvider&quot;
+ moveable=&quot;true&quot;
+ name=&quot;%column.name.type&quot;
+ resizable=&quot;true&quot;
+ style=&quot;SWT.LEFT&quot;
+ visible=&quot;false&quot;
+ width=&quot;100&quot;&gt;
+ &lt;/column&gt;
+ &lt;column
+ alignment=&quot;SWT.RIGHT&quot;
+ comparator=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.ModificationTimeComparator&quot;
+ id=&quot;modified&quot;
+ labelProvider=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.ModificationTimeLabelProvider&quot;
+ moveable=&quot;true&quot;
+ name=&quot;%column.name.modified&quot;
+ resizable=&quot;true&quot;
+ style=&quot;SWT.RIGHT&quot;
+ visible=&quot;true&quot;
+ width=&quot;120&quot;&gt;
+ &lt;/column&gt;
+ &lt;column
+ alignment=&quot;SWT.RIGHT&quot;
+ comparator=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.AccessTimeComparator&quot;
+ id=&quot;accessed&quot;
+ labelProvider=&quot;org.eclipse.tcf.te.tcf.filesystem.internal.columns.AccessTimeLabelProvider&quot;
+ moveable=&quot;true&quot;
+ name=&quot;%column.name.accessed&quot;
+ resizable=&quot;true&quot;
+ style=&quot;SWT.RIGHT&quot;
+ visible=&quot;false&quot;
+ width=&quot;120&quot;&gt;
+ &lt;/column&gt;
+ &lt;/columnContribution&gt;
+
+ &lt;filterContribution viewerId=&quot;org.eclipse.tcf.te.ui.controls.viewer.fs&quot;&gt;
+ &lt;filter
+ class=&quot;org.eclipse.tcf.te.tcf.filesystem.filters.HiddenFilesViewerFilter&quot;
+ description=&quot;%filter.description.hidden&quot;
+ enabled=&quot;true&quot;
+ id=&quot;org.eclipse.tcf.te.tcf.filesystem.filters.hiddenFiles&quot;
+ image=&quot;icons/obj16/hidden_file_filter.png&quot;
+ name=&quot;%filter.name.hidden&quot;&gt;
+ &lt;/filter&gt;
+ &lt;filter
+ class=&quot;org.eclipse.tcf.te.tcf.filesystem.filters.SystemFilesViewerFilter&quot;
+ description=&quot;%filter.description.system&quot;
+ enabled=&quot;true&quot;
+ id=&quot;org.eclipse.tcf.te.tcf.filesystem.filters.systemFiles&quot;
+ image=&quot;icons/obj16/system_file_filter.png&quot;
+ name=&quot;%filter.name.system&quot;&gt;
+ &lt;activation&gt;
+ &lt;with variable=&quot;input&quot;&gt;
+ &lt;test property=&quot;org.eclipse.tcf.te.tcf.filesystem.propertytester.peer.isWindows&quot;/&gt;
+ &lt;/with&gt;
+ &lt;/activation&gt;
+ &lt;/filter&gt;
+ &lt;/filterContribution&gt;
+ &lt;/extension&gt;
+&lt;/pre&gt;
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ &lt;p&gt;
+In the &quot;column&quot; element, the class referenced by the attribute &quot;labelProvider&quot; must implement &lt;samp&gt;org.eclipse.jface.viewers.ILabelProvider&lt;/samp&gt;. The class referenced by the attribute &quot;comparator&quot; must implement &lt;samp&gt;java.util.Comparator&lt;/samp&gt; that compares the elements of the tree viewer.
+&lt;p&gt;
+In the &quot;filter&quot; element, the class referenced by the attribute &quot;class&quot; must extend &lt;samp&gt;org.eclipse.jface.viewers.ViewerFilter&lt;/samp&gt;.
+&lt;p&gt;
+In the &quot;activation&quot; element, the evaluation context has only one variable &quot;input&quot;, which stores the current input object of the viewer.
+ </documentation>
+ </annotation>
+
+
+ <annotation>
+ <appinfo>
+ <meta.section type="copyright"/>
+ </appinfo>
+ <documentation>
+ Copyright (c) 2011 Wind River Systems, Inc. and others.
+
+All rights reserved.
+
+This program and the accompanying materials are made available under the terms
+of the Eclipse Public License v1.0 which accompanies this distribution, and is
+available at http://www.eclipse.org/legal/epl-v10.html.
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/AbstractTreeControl.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/AbstractTreeControl.java
index 218524124..c93fb9f76 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/AbstractTreeControl.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/AbstractTreeControl.java
@@ -46,7 +46,6 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeColumn;
import org.eclipse.tcf.te.core.interfaces.IViewerInput;
-import org.eclipse.tcf.te.runtime.utils.Host;
import org.eclipse.tcf.te.ui.WorkbenchPartControl;
import org.eclipse.tcf.te.ui.forms.CustomFormToolkit;
import org.eclipse.ui.IDecoratorManager;
@@ -363,11 +362,6 @@ public abstract class AbstractTreeControl extends WorkbenchPartControl implement
for(ColumnDescriptor visibleColumn : visibleColumns) {
doCreateTreeColumn(visibleColumn, true);
}
- if(!Host.isWindowsHost()) {
- Tree tree = viewer.getTree();
- TreeColumn column = new TreeColumn(tree, SWT.LEFT);
- column.setWidth(1);
- }
// Set the default sort column to the first column (the tree column).
Assert.isTrue(viewer.getTree().getColumnCount() > 0);
TreeColumn treeColumn = viewer.getTree().getColumn(0);
@@ -379,7 +373,7 @@ public abstract class AbstractTreeControl extends WorkbenchPartControl implement
}
/**
- * Create the tree column described by the specified colum descriptor.
+ * Create the tree column described by the specified column descriptor.
*
* @param column The column descriptor.
* @param append If the new column should be appended.
@@ -396,6 +390,7 @@ public abstract class AbstractTreeControl extends WorkbenchPartControl implement
treeColumn.setImage(column.getImage());
treeColumn.setMoveable(column.isMoveable());
treeColumn.setResizable(column.isResizable());
+ treeColumn.setData("widthHint", Integer.valueOf(column.getWidth())); //$NON-NLS-1$
treeColumn.setWidth(column.getWidth());
treeColumn.addSelectionListener(this);
treeColumn.addControlListener(new ControlAdapter(){
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ColumnDescriptor.java b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ColumnDescriptor.java
index 884dcd0fe..3edf7e5b9 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ColumnDescriptor.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui/src/org/eclipse/tcf/te/ui/trees/ColumnDescriptor.java
@@ -18,7 +18,7 @@ import org.eclipse.swt.widgets.TreeColumn;
/**
* <p>
- * The data descriptor to describe tree columns of a tree viewer.
+ * The data descriptor to describe tree columns of a tree viewer.
* </p>
* <p>
* A ColumnDescriptor encapsulates the following information about the tree
@@ -82,7 +82,7 @@ public class ColumnDescriptor {
/**
* Create a column descriptor with specified column id.
- *
+ *
* @param id
* The column id;
*/
@@ -92,7 +92,7 @@ public class ColumnDescriptor {
/**
* Get the column's id.
- *
+ *
* @return the column's id.
*/
public String getId() {
@@ -101,16 +101,16 @@ public class ColumnDescriptor {
/**
* Set the column's id.
- *
+ *
* @param id
*/
public void setId(String id) {
this.id = id;
}
-
+
/**
* Get the column's sorting orientation.
- *
+ *
* @return The sorting orientation.
*/
public boolean isAscending() {
@@ -119,7 +119,7 @@ public class ColumnDescriptor {
/**
* Set the column's sorting orientation.
- *
+ *
* @param a The new orientation.
*/
public void setAscending(boolean a) {
@@ -128,7 +128,7 @@ public class ColumnDescriptor {
/**
* Set the column's sorting comparator.
- *
+ *
* @param comparator The new comparator.
*/
@SuppressWarnings("rawtypes")
@@ -138,7 +138,7 @@ public class ColumnDescriptor {
/**
* Get the column's sorting comparator.
- *
+ *
* @return The new comparator.
*/
@SuppressWarnings("rawtypes")
@@ -148,7 +148,7 @@ public class ColumnDescriptor {
/**
* Set the tree column.
- *
+ *
* @param column The tree column.
*/
public void setTreeColumn(TreeColumn column) {
@@ -157,7 +157,7 @@ public class ColumnDescriptor {
/**
* Get the tree column.
- *
+ *
* @return The tree column.
*/
public TreeColumn getTreeColumn() {
@@ -166,7 +166,7 @@ public class ColumnDescriptor {
/**
* Set the visibility of this tree column.
- *
+ *
* @param v the new visibility
*/
public void setVisible(boolean v) {
@@ -175,7 +175,7 @@ public class ColumnDescriptor {
/**
* Get the visibility of the tree column.
- *
+ *
* @return This column's visibility.
*/
public boolean isVisible() {
@@ -184,25 +184,25 @@ public class ColumnDescriptor {
/**
* Set the name of the column.
- *
+ *
* @param name The new name.
*/
- public void setName(String name) {
+ public void setName(String name) {
this.name = name;
}
/**
* Get the name of the column.
- *
+ *
* @return The column's name.
*/
public String getName() {
return name;
}
-
+
/**
* Set the description of the column.
- *
+ *
* @param desc The column's description.
*/
public void setDescription(String desc) {
@@ -211,7 +211,7 @@ public class ColumnDescriptor {
/**
* Get the description of the column.
- *
+ *
* @return The column's description.
*/
public String getDescription() {
@@ -220,7 +220,7 @@ public class ColumnDescriptor {
/**
* Set if the column is moveable.
- *
+ *
* @param m The new value.
*/
public void setMoveable(boolean m) {
@@ -229,7 +229,7 @@ public class ColumnDescriptor {
/**
* Get if the column is moveable.
- *
+ *
* @return If the column is moveable.
*/
public boolean isMoveable() {
@@ -238,7 +238,7 @@ public class ColumnDescriptor {
/**
* Set the column's creation style.
- *
+ *
* @param style The column's creation style.
*/
public void setStyle(int style) {
@@ -247,7 +247,7 @@ public class ColumnDescriptor {
/**
* Get the column's creation style.
- *
+ *
* @return The column's creation style.
*/
public int getStyle() {
@@ -256,7 +256,7 @@ public class ColumnDescriptor {
/**
* Set the column's alignment.
- *
+ *
* @param alignment The column's alignment.
*/
public void setAlignment(int alignment) {
@@ -265,7 +265,7 @@ public class ColumnDescriptor {
/**
* Get the column's alignment.
- *
+ *
* @return The column's alignment.
*/
public int getAlignment() {
@@ -274,7 +274,7 @@ public class ColumnDescriptor {
/**
* Set the column's image.
- *
+ *
* @param img The new image.
*/
public void setImage(Image img) {
@@ -283,7 +283,7 @@ public class ColumnDescriptor {
/**
* Get the column's image.
- *
+ *
* @return The column's image.
*/
public Image getImage() {
@@ -292,7 +292,7 @@ public class ColumnDescriptor {
/**
* Set if the column is resizable.
- *
+ *
* @param r The new value.
*/
public void setResizable(boolean r) {
@@ -301,7 +301,7 @@ public class ColumnDescriptor {
/**
* Get if the column is resizable.
- *
+ *
* @return If the column is resizable.
*/
public boolean isResizable() {
@@ -310,7 +310,7 @@ public class ColumnDescriptor {
/**
* Set the column's initial width.
- *
+ *
* @param width The new column width.
*/
public void setWidth(int width) {
@@ -319,7 +319,7 @@ public class ColumnDescriptor {
/**
* Get the column's initial width.
- *
+ *
* @return the column's initial width.
*/
public int getWidth() {
@@ -328,7 +328,7 @@ public class ColumnDescriptor {
/**
* Set the column's label provider.
- *
+ *
* @param p The new column label provider.
*/
public void setLabelProvider(ILabelProvider p) {
@@ -337,7 +337,7 @@ public class ColumnDescriptor {
/**
* Get the column's label provider.
- *
+ *
* @return The column's label provider.
*/
public ILabelProvider getLabelProvider() {
@@ -345,8 +345,8 @@ public class ColumnDescriptor {
}
/**
- * Get the column's order number.
- *
+ * Get the column's order number.
+ *
* @return The column's order.
*/
public int getOrder() {
@@ -355,7 +355,7 @@ public class ColumnDescriptor {
/**
* Set the column's order.
- *
+ *
* @param order The new order.
*/
public void setOrder(int order) {

Back to the top