| ... |
... |
@@ -137,7 +137,7 @@ |
| 137 |
137 |
1. ((( |
| 138 |
138 |
Your TableViewPart contains a still empty method createPartControl. This method will be responsible for creating the user interface components of your view. Add the following code to create the table we want to display: |
| 139 |
139 |
|
| 140 |
|
-{{code title="createPartControl(...)" language="java"}} |
|
140 |
+{{code title="createPartControl(...)" linenumbers="true" language="java" collapse="true"}} |
| 141 |
141 |
Table table = new Table(parent, SWT.BORDER); |
| 142 |
142 |
TableColumn column = new TableColumn(table, SWT.NONE); |
| 143 |
143 |
column.setWidth(80); |
| ... |
... |
@@ -147,7 +147,7 @@ |
| 147 |
147 |
1. ((( |
| 148 |
148 |
The setFocus method controls what happens when your part gets the focus. Make sure the focus will then automatically be set to the table by adding the following code: |
| 149 |
149 |
|
| 150 |
|
-{{code title="setFocus(...)"}} |
|
150 |
+{{code title="setFocus(...)" linenumbers="true" collapse="true"}} |
| 151 |
151 |
tableViewer.getControl().setFocus(); |
| 152 |
152 |
{{/code}} |
| 153 |
153 |
))) |