# HG changeset patch # User Andreas Woess # Date 1379183447 -7200 # Node ID 3f8bb25fb0a153625f85eb6b9aa447bfcbfe177b # Parent bff2b88444f5d57a7c040c78ba185c9513357bde IGV: workaround for disappearing search bar. diff -r bff2b88444f5 -r 3f8bb25fb0a1 src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/EditorTopComponent.java --- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/EditorTopComponent.java Sat Sep 14 17:31:25 2013 -0400 +++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/EditorTopComponent.java Sat Sep 14 20:30:47 2013 +0200 @@ -69,7 +69,7 @@ import org.openide.windows.WindowManager; /** - * + * * @author Thomas Wuerthinger */ public final class EditorTopComponent extends TopComponent implements PropertyChangeListener { @@ -140,7 +140,7 @@ }; private ChangedEvent diagramChangedEvent = new ChangedEvent<>(diagramProvider); - + private void updateDisplayName() { setDisplayName(getDiagram().getName()); @@ -254,6 +254,11 @@ toolBar.add(Box.createHorizontalGlue()); Action action = Utilities.actionsForPath("QuickSearchShadow").get(0); Component quicksearch = ((Presenter.Toolbar) action).getToolbarPresenter(); + try { + // (aw) workaround for disappearing search bar due to reparenting one shared component instance. + quicksearch = (Component) quicksearch.getClass().getConstructor(KeyStroke.class).newInstance(new Object[]{null}); + } catch (ReflectiveOperationException | IllegalArgumentException | SecurityException e) { + } quicksearch.setMinimumSize(quicksearch.getPreferredSize()); // necessary for GTK LAF toolBar.add(quicksearch); @@ -420,7 +425,7 @@ graphContent.set(list, null); diagramProvider.getChangedEvent().fire(); } - + }; public boolean showPredSucc() {