if (currentEditor instanceof MapEditorWithPalette) {
MapEditorWithPalette editor2 = (MapEditorWithPalette) currentEditor;
MapEditDomain editDomain = editor2.getEditDomain();
PaletteViewer paletteViewer = editDomain.getPaletteViewer();
if( paletteViewer != null ){
for( MapToolEntry entry : this.mapToolEntries ) {
if (paletteViewer.getEditPartRegistry().get(entry) != null) {
paletteViewer.setActiveTool(entry);
EditPart part = (EditPart) paletteViewer.getEditPartRegistry().get(entry);
paletteViewer.reveal(part);
break;
}
}
}
}