Sets the window title.
()
| 273 | * Sets the window title. |
| 274 | */ |
| 275 | public void setTitle() { |
| 276 | final TokenBuilder tb = new TokenBuilder(); |
| 277 | final EditorArea ea = editor == null ? null : editor.getEditor(); |
| 278 | if(ea != null) { |
| 279 | tb.add(ea.opened() ? ea.file().path() : ea.file().name()); |
| 280 | if(ea.modified()) tb.add('*'); |
| 281 | } |
| 282 | final Data data = context.data(); |
| 283 | if(data != null) { |
| 284 | if(!tb.isEmpty()) tb.add(' '); |
| 285 | tb.add("[").add(data.meta.name).add("]"); |
| 286 | } |
| 287 | if(!tb.isEmpty()) tb.add(" - "); |
| 288 | tb.add(TITLE); |
| 289 | setTitle(tb.toString()); |
| 290 | } |
| 291 | |
| 292 | /** |
| 293 | * Sets a cursor. |
no test coverage detected