/** * Installs this closer on it's viewer's text widget. */ protected void install() { Control w= fViewer.getTextWidget(); if (Helper2.okToUse(w)) { Shell shell= w.getShell(); fShell= shell; shell.addControlListener(this); w.addMouseListener(this); w.addFocusListener(this); /* * 1GGYYWK: ITPJUI:ALL - Dismissing editor with code assist up causes lots of Internal Errors */ w.addDisposeListener(this); } fViewer.addViewportListener(this); fViewportListenerStartTime= System.currentTimeMillis() + 500; }
@Override public void start(Rectangle informationArea) { if (fIsActive) return; fIsActive= true; if (fSubjectControl != null && !fSubjectControl.isDisposed()) { fSubjectControl.addControlListener(this); fSubjectControl.addMouseListener(this); fSubjectControl.addFocusListener(this); fSubjectControl.addKeyListener(this); } if (fInformationControlToClose != null) fInformationControlToClose.addFocusListener(this); fTextViewer.addViewportListener(this); }
/** * Installs this closer on it's viewer's text widget. */ protected void install() { Control w= fViewer.getTextWidget(); if (Helper2.okToUse(w)) { Shell shell= w.getShell(); fShell= shell; shell.addControlListener(this); w.addMouseListener(this); w.addFocusListener(this); /* * 1GGYYWK: ITPJUI:ALL - Dismissing editor with code assist up causes lots of Internal Errors */ w.addDisposeListener(this); } fViewer.addViewportListener(this); fViewportListenerStartTime= System.currentTimeMillis() + 500; }
@Override public void start(Rectangle informationArea) { if (fIsActive) return; fIsActive= true; if (fSubjectControl != null && !fSubjectControl.isDisposed()) { fSubjectControl.addControlListener(this); fSubjectControl.addMouseListener(this); fSubjectControl.addFocusListener(this); fSubjectControl.addKeyListener(this); } if (fInformationControlToClose != null) fInformationControlToClose.addFocusListener(this); fTextViewer.addViewportListener(this); }
fTextViewer.addViewportListener(fInternalListener); fTextViewer.addTextListener(fInternalListener);
/** * Installs this closer on it's viewer's text widget. */ protected void install() { Control control= fContentAssistSubjectControlAdapter.getControl(); fControl= control; if (Helper.okToUse(control)) { Shell shell= control.getShell(); fShell= shell; shell.addControlListener(this); control.addMouseListener(this); control.addFocusListener(this); /* * 1GGYYWK: ITPJUI:ALL - Dismissing editor with code assist up causes lots of * Internal Errors */ control.addDisposeListener(this); } if (fViewer != null) fViewer.addViewportListener(this); }
/** * Installs this closer on it's viewer's text widget. */ protected void install() { Control control= fContentAssistSubjectControlAdapter.getControl(); fControl= control; if (Helper.okToUse(control)) { Shell shell= control.getShell(); fShell= shell; shell.addControlListener(this); control.addMouseListener(this); control.addFocusListener(this); /* * 1GGYYWK: ITPJUI:ALL - Dismissing editor with code assist up causes lots of * Internal Errors */ control.addDisposeListener(this); } if (fViewer != null) fViewer.addViewportListener(this); }
fTextViewer.addViewportListener(fInternalListener); fTextViewer.addTextListener(fInternalListener);
void install() { StyledText editorTextWidget = fEditorViewer.getTextWidget(); fScaledFonts = new HashMap<>(); // Compute scaled font Font scaledFont = getScaledFont(editorTextWidget.getFont()); fMinimapTextWidget.setFont(scaledFont); // track changed content of styled text of the editor editorTextWidget.getContent().addTextChangeListener(this); // track changed styles of styled text of the editor fMinimapTextWidget.setBackground(editorTextWidget.getBackground()); fMinimapTextWidget.setForeground(editorTextWidget.getForeground()); if (fEditorViewer instanceof ITextViewerExtension4) { ((ITextViewerExtension4) fEditorViewer).addTextPresentationListener(this); } fEditorViewer.addTextInputListener(this); // track changed of vertical bar scroll to update highlight // Viewport. fEditorViewer.addViewportListener(this); editorTextWidget.addControlListener(this); synchTextAndStyles(); }
fCachedTextViewer.addViewportListener(fInternalListener); fCachedTextViewer.addTextListener(fInternalListener);
@Override public Control createControl(CompositeRuler parentRuler, Composite parentControl) { fParentRuler= parentRuler; fCachedTextViewer= parentRuler.getTextViewer(); fCachedTextWidget= fCachedTextViewer.getTextWidget(); fCanvas= new Canvas(parentControl, SWT.NONE); fCanvas.setBackground(getBackground()); fCanvas.addPaintListener(event -> { if (fCachedTextViewer != null) doubleBufferPaint(event.gc); }); fCanvas.addDisposeListener(e -> { handleDispose(); fCachedTextViewer= null; fCachedTextWidget= null; }); fCanvas.addMouseListener(fMouseHandler); fCanvas.addMouseMoveListener(fMouseHandler); if (fCachedTextViewer != null) { fCachedTextViewer.addViewportListener(fInternalListener); fCachedTextViewer.addTextListener(fInternalListener); } fRevisionPainter.setParentRuler(parentRuler); fDiffPainter.setParentRuler(parentRuler); return fCanvas; }
@Override public Control createControl(CompositeRuler parentRuler, Composite parentControl) { Assert.isLegal(parentControl != null); Assert.isLegal(parentRuler != null); Assert.isLegal(fParentRuler == null); // only call when not yet initialized! fParentRuler= parentRuler; fTextViewer= getParentRuler().getTextViewer(); fTextViewer.addViewportListener(fInternalListener); fTextViewer.addTextListener(fInternalListener); fStyledText= fTextViewer.getTextWidget(); fCanvas= new Canvas(parentControl, getCanvasStyle()); fCanvas.setBackground(getDefaultBackground()); fCanvas.setFont(getFont()); fCanvas.addPaintListener(new PaintListener() { @Override public void paintControl(PaintEvent event) { AbstractRulerColumn.this.paintControl(event); } }); fCanvas.addMouseListener(fMouseHandler); fCanvas.addMouseMoveListener(fMouseHandler); return fCanvas; }
@Override public Control createControl(CompositeRuler parentRuler, Composite parentControl) { Assert.isLegal(parentControl != null); Assert.isLegal(parentRuler != null); Assert.isLegal(fParentRuler == null); // only call when not yet initialized! fParentRuler= parentRuler; fTextViewer= getParentRuler().getTextViewer(); fTextViewer.addViewportListener(fInternalListener); fTextViewer.addTextListener(fInternalListener); fStyledText= fTextViewer.getTextWidget(); fCanvas= new Canvas(parentControl, getCanvasStyle()); fCanvas.setBackground(getDefaultBackground()); fCanvas.setFont(getFont()); fCanvas.addPaintListener(new PaintListener() { @Override public void paintControl(PaintEvent event) { AbstractRulerColumn.this.paintControl(event); } }); fCanvas.addMouseListener(fMouseHandler); fCanvas.addMouseMoveListener(fMouseHandler); return fCanvas; }
fCachedTextViewer.addViewportListener(fInternalListener); fCachedTextViewer.addTextListener(fInternalListener);
fCachedTextViewer.addViewportListener(fInternalListener); fCachedTextViewer.addTextListener(fInternalListener);