text.getDisplay().asyncExec( new Runnable() { public void run() { HasLogChannelInterface provider = logProvider.getLogChannelProvider();
/** * Returns the System background color for list widgets or the set background. * * @return the System background color for list widgets */ private Color getBackground() { if (fBackground == null) return fWidget.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND); return fBackground; }
/** * Returns the System background color for list widgets. * * @return the System background color for list widgets */ private Color getBackground() { if (fBackground == null) return fWidget.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND); return fBackground; }
/** * Returns the System background color for list widgets or the set background. * * @return the System background color for list widgets */ private Color getBackground() { if (fBackground == null) return fWidget.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND); return fBackground; }
/** * Returns the System background color for list widgets. * * @return the System background color for list widgets */ private Color getBackground() { if (fBackground == null) return fCachedTextWidget.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND); return fBackground; }
@Override public void getOffsetAtPoint(AccessibleTextEvent e) { StyledText st = StyledText.this; Point point = new Point (e.x, e.y); Display display = st.getDisplay(); point = display.map(null, st, point); e.offset = st.getOffsetAtPoint(point.x, point.y, null, true); } @Override
@Override public void getOffsetAtPoint(AccessibleTextEvent e) { StyledText st = StyledText.this; Point point = new Point (e.x, e.y); Display display = st.getDisplay(); point = display.map(null, st, point); e.offset = st.getOffsetAtPoint(point.x, point.y, null, true); } @Override
@Override public void viewportChanged(int verticalOffset) { fMinimapTextWidget.getDisplay().asyncExec(() -> { if (!fMinimapTextWidget.isDisposed()) { updateMinimapAfterResize(); } }); }
@Override public Color getBackground() { checkWidget(); if (background == null) { return getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND); } return background; } /**
@Override public Color getBackground() { checkWidget(); if (background == null) { return getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND); } return background; } /**
public Color getBackground() { checkWidget(); if (background == null) { return getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND); } return background; } /**
@Override public Color getBackground() { checkWidget(); if (background == null) { return getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND); } return background; } /**
/** * Called when mouse over the inlined annotation. * * @param e the mouse event */ public void onMouseHover(MouseEvent e) { StyledText styledText= (StyledText) e.widget; styledText.setCursor(styledText.getDisplay().getSystemCursor(SWT.CURSOR_HAND)); }
public VisibleLines() { install(); fViewer.getTextWidget().getDisplay().asyncExec(() -> { compute(); }); }
void doMouseLinkCursor() { Display display = getDisplay(); Point point = display.getCursorLocation(); point = display.map(null, this, point); doMouseLinkCursor(point.x, point.y); } void doMouseLinkCursor(int x, int y) {
@Override protected Point computeInformationControlLocation(Rectangle subjectArea, Point controlSize) { Point result= super.computeInformationControlLocation(subjectArea, controlSize); Point cursorLocation= fTextViewer.getTextWidget().getDisplay().getCursorLocation(); if (isTakingFocusWhenVisible() || cursorLocation.x <= result.x + controlSize.x) return result; result.x= cursorLocation.x + 20 - controlSize.x; return result; }
private Control createControl(Composite parent) { fStyledText= new StyledText(parent, SWT.FLAT | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL); fStyledText.setEditable(false); Cursor arrowCursor= fStyledText.getDisplay().getSystemCursor(SWT.CURSOR_ARROW); fStyledText.setCursor(arrowCursor); // Don't set caret to 'null' as this causes https://bugs.eclipse.org/293263 // fStyledText.setCaret(null); final GridData data= new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL); fStyledText.setLayoutData(data); configureStyledText(fText, fEnabled); return fStyledText; }
private Control createControl(Composite parent) { fStyledText= new StyledText(parent, SWT.FLAT | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL); fStyledText.setEditable(false); Cursor arrowCursor= fStyledText.getDisplay().getSystemCursor(SWT.CURSOR_ARROW); fStyledText.setCursor(arrowCursor); // Don't set caret to 'null' as this causes https://bugs.eclipse.org/293263 // fStyledText.setCaret(null); final GridData data= new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL); fStyledText.setLayoutData(data); configureStyledText(fText, fEnabled); return fStyledText; }
private void copyToClipboard() { Clipboard clipboard = null; try { clipboard = new Clipboard(text.getDisplay()); clipboard.setContents(new Object[] { text.getSelectionText() }, new Transfer[] { TextTransfer.getInstance() }); } finally { if (clipboard != null) { clipboard.dispose(); } } }
public MinimapWidget(Composite parent, ITextViewer viewer) { fEditorViewer = viewer; // Create minimap styled text fMinimapTextWidget = new StyledText(parent, SWT.MULTI | SWT.READ_ONLY); fMinimapTextWidget.setEditable(false); fMinimapTextWidget.setCursor(fMinimapTextWidget.getDisplay().getSystemCursor(SWT.CURSOR_ARROW)); // Initialize trackers fEditorTracker = new EditorTracker(); fMinimapTracker = new MinimapTracker(); }