/** Displays the appropriate UI for the current model state. */ void displayElementSymbol() { CoreArgCheck.isNotNull(viewer); StructuredSelection selection = StructuredSelection.EMPTY; if (model.getElementSymbol() != null) { strategy.setTreeViewer(viewer); // make sure this viewer is set before using strategy Object node = strategy.getNode(model.getElementSymbol()); if (node != null) { selection = new StructuredSelection(node); } if (!selection.equals(viewer.getSelection())) { viewer.setSelection(selection); } } }