@SuppressWarnings("unchecked")
private void updateSelectedConfig() {
IConfig<?> config = null;
ITreeNode[] selectedNodes = view.getConfigTree().getSelectedNodes();
if ((selectedNodes != null) && (selectedNodes.length > 0)) {
ITreeNode toCheck = selectedNodes[0];
if (toCheck != lastListenedNode) {
if (lastListenedNode != null) {
lastListenedNode.removeTreeNodeListener(this);
}
lastListenedNode = toCheck;
if (lastListenedNode != null) {
lastListenedNode.addTreeNodeListener(this);
}
}
if (toCheck.getData() instanceof IConfig<?>) {
config = (IConfig<?>) toCheck.getData();
}
}
// if (config != null) {
if (config != lastSelectedConfig) {
if (lastSelectedConfig instanceof IEventSource<?>) {