/** * @return widget */ public StyledText getTextWidget() { return sourceViewer.getTextWidget(); }
public Control getControl() { return fSourceViewer.getTextWidget(); }
private StyledText getTextWidget() { SourceViewer viewer = getSourceViewer(); if (viewer != null) { return viewer.getTextWidget(); } return null; }
@Override public boolean setFocus(){ if (fSourceViewer != null){ fSourceViewer.getTextWidget().setFocus(); return true; } return false; }
@Override protected void setBackground(Color color) { fViewer.getTextWidget().setBackground(color); }
public void setFocus() { fViewer.getTextWidget().setFocus(); }
@Override public void widgetSelected(SelectionEvent e) { fPatternEditor.getTextWidget().setFocus(); fPatternEditor.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS); }
@Override public void widgetSelected(SelectionEvent e) { fPatternEditor.getTextWidget().setFocus(); fPatternEditor.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS); }
private static void hscroll(MergeSourceViewer v) { if (v != null) { StyledText st= v.getSourceViewer().getTextWidget(); if (st != null) st.setHorizontalIndex(0); } }
public void setForegroundColor(Color color) { StyledText te= getSourceViewer().getTextWidget(); if (te != null) te.setForeground(color); }
public void widgetSelected(SelectionEvent e) { fPatternEditor.getTextWidget().setFocus(); fPatternEditor.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS); }
public void widgetSelected(SelectionEvent e) { fPatternEditor.getTextWidget().setFocus(); fPatternEditor.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS); }
@Override public void propertyChange(PropertyChangeEvent event) { if (event.getProperty().equals(PreferenceConstants.EDITOR_TEXT_FONT)) { Font font= JFaceResources.getFont(PreferenceConstants.EDITOR_TEXT_FONT); viewer.getTextWidget().setFont(font); } } };
@Override public void setFocus() { fSourceViewer.getTextWidget().setFocus(); updateSelection(fSourceViewer.getSelection()); }
@Override public void setFocus() { fSourceViewer.getTextWidget().setFocus(); updateSelection(fSourceViewer.getSelection()); }
public JavaSourcePreviewerUpdater() { JFaceResources.getFontRegistry().addListener(fontListener); fPreferenceStore.addPropertyChangeListener(propertyListener); fSourceViewer.getTextWidget().addDisposeListener(new DisposeListener() { public void widgetDisposed(DisposeEvent e) { JFaceResources.getFontRegistry().removeListener(fontListener); fPreferenceStore.removePropertyChangeListener(propertyListener); } }); } }
public void setSize(int width, int height) { if (fStatusField != null) { GridData gd= (GridData)fViewer.getTextWidget().getLayoutData(); Point statusSize= fStatusField.computeSize(SWT.DEFAULT, SWT.DEFAULT, true); Point separatorSize= fSeparator.computeSize(SWT.DEFAULT, SWT.DEFAULT, true); gd.heightHint= height - statusSize.y - separatorSize.y; } fShell.setSize(width, height); if (fStatusField != null) fShell.pack(true); }
public void setSize(int width, int height) { if (fStatusField != null) { GridData gd= (GridData)fViewer.getTextWidget().getLayoutData(); Point statusSize= fStatusField.computeSize(SWT.DEFAULT, SWT.DEFAULT, true); Point separatorSize= fSeparator.computeSize(SWT.DEFAULT, SWT.DEFAULT, true); gd.heightHint= height - statusSize.y - separatorSize.y; } fShell.setSize(width, height); if (fStatusField != null) fShell.pack(true); }
private SourceViewer createViewer(Composite parent) { SourceViewer viewer = new SourceViewer(parent, null, SWT.NONE); SourceViewerConfiguration configuration = new AntSourceViewerConfiguration(); viewer.configure(configuration); viewer.setEditable(false); Font font = JFaceResources.getFont(JFaceResources.TEXT_FONT); viewer.getTextWidget().setFont(font); return viewer; }
JavaTextViewer(Composite parent) { fSourceViewer= new SourceViewer(parent, null, SWT.LEFT_TO_RIGHT | SWT.H_SCROLL | SWT.V_SCROLL); JavaTextTools tools= JavaCompareUtilities.getJavaTextTools(); if (tools != null) { IPreferenceStore store= JavaPlugin.getDefault().getCombinedPreferenceStore(); fSourceViewer.configure(new JavaSourceViewerConfiguration(tools.getColorManager(), store, null, IJavaPartitions.JAVA_PARTITIONING)); } fSourceViewer.setEditable(false); String symbolicFontName= JavaMergeViewer.class.getName(); Font font= JFaceResources.getFont(symbolicFontName); if (font != null) fSourceViewer.getTextWidget().setFont(font); }