/** * Installs or uninstalls the text listener depending on the boolean parameter. * * @param install <code>true</code> to install the text listener, <code>false</code> to uninstall * * @since 3.8 */ private void installUninstallTextListener(boolean install) { if (!(fMatcher instanceof ICharacterPairMatcherExtension)) return; if (install) { fTextListener= new TextListener(); fSourceViewer.addTextListener(fTextListener); } else { if (fTextListener != null) { fSourceViewer.removeTextListener(fTextListener); fTextListener= null; } } }
/** * Installs or uninstalls the text listener depending on the boolean parameter. * * @param install <code>true</code> to install the text listener, <code>false</code> to uninstall * * @since 3.8 */ private void installUninstallTextListener(boolean install) { if (!(fMatcher instanceof ICharacterPairMatcherExtension)) return; if (install) { fTextListener= new TextListener(); fSourceViewer.addTextListener(fTextListener); } else { if (fTextListener != null) { fSourceViewer.removeTextListener(fTextListener); fTextListener= null; } } }
fSourceViewer.removeTextListener(fTextListener); fSourceViewer.removeTextInputListener(fTextListener); fTextListener= null;
@Override public void widgetDisposed(DisposeEvent e) { fEditor.getSite().getWorkbenchWindow().getPartService().removePartListener(PopupVisibilityManager.this); if (! textWidget.isDisposed()) { textWidget.removeControlListener(PopupVisibilityManager.this); textWidget.removeMouseListener(PopupVisibilityManager.this); textWidget.removeKeyListener(PopupVisibilityManager.this); } fEditor.getSite().getShell().removeControlListener(PopupVisibilityManager.this); viewer.removeTextListener(PopupVisibilityManager.this); viewer.removeViewportListener(PopupVisibilityManager.this); if (fMenuImage != null) { fMenuImage.dispose(); fMenuImage= null; } if (fMenuManager != null) { fMenuManager.dispose(); fMenuManager= null; } fRenameLinkedMode.cancel(); } });
@Override public void widgetDisposed(DisposeEvent e) { fEditor.getSite().getWorkbenchWindow().getPartService().removePartListener(PopupVisibilityManager.this); if (! textWidget.isDisposed()) { textWidget.removeControlListener(PopupVisibilityManager.this); textWidget.removeMouseListener(PopupVisibilityManager.this); textWidget.removeKeyListener(PopupVisibilityManager.this); } fEditor.getSite().getShell().removeControlListener(PopupVisibilityManager.this); viewer.removeTextListener(PopupVisibilityManager.this); viewer.removeViewportListener(PopupVisibilityManager.this); if (fMenuImage != null) { fMenuImage.dispose(); fMenuImage= null; } if (fMenuManager != null) { fMenuManager.dispose(); fMenuManager= null; } fRenameLinkedMode.cancel(); } });
fSourceViewer.removeTextListener(fTextListener); fSourceViewer.removeTextInputListener(fTextListener); fTextListener= null;
fSourceViewer.removeTextListener(fTextListener); fSourceViewer.removeTextInputListener(fTextListener); fTextListener= null;