public void incSearchReset() { JTextComponent c = Utilities.getLastActiveComponent(); EditorUI editorUI = ((BaseTextUI) c.getUI()).getEditorUI(); DrawLayerFactory.IncSearchLayer incLayer = (DrawLayerFactory.IncSearchLayer) editorUI.findLayer(DrawLayerFactory.INC_SEARCH_LAYER_NAME); if (incLayer != null) { if (incLayer.isEnabled()) { incLayer.setEnabled(false); try { editorUI.repaintOffset(incLayer.getOffset()); } catch (BadLocationException e) { if (Boolean.getBoolean("netbeans.debug.exceptions")) { // NOI18N e.printStackTrace(); } } } } }
public void incSearchReset() { JTextComponent c = Utilities.getLastActiveComponent(); if (c==null) return; // #19558 bugfix. Editor window has been closed => c==null EditorUI editorUI = ((BaseTextUI)c.getUI()).getEditorUI(); DrawLayerFactory.IncSearchLayer incLayer = (DrawLayerFactory.IncSearchLayer)editorUI.findLayer( DrawLayerFactory.INC_SEARCH_LAYER_NAME); if (incLayer != null) { if (incLayer.isEnabled()) { incLayer.setEnabled(false); try { editorUI.repaintOffset(incLayer.getOffset()); } catch (BadLocationException e) { Utilities.annotateLoggable(e); } } } }
DrawLayerFactory.IncSearchLayer incLayer = (DrawLayerFactory.IncSearchLayer) editorUI.findLayer(DrawLayerFactory.INC_SEARCH_LAYER_NAME); if (incLayer == null) { incLayer = new DrawLayerFactory.IncSearchLayer();
EditorUI editorUI = ui.getEditorUI(); DrawLayerFactory.IncSearchLayer incLayer = (DrawLayerFactory.IncSearchLayer)editorUI.findLayer( DrawLayerFactory.INC_SEARCH_LAYER_NAME); if (incLayer == null) {