本文整理汇总了Java中org.eclipse.jface.text.source.IVerticalRuler类的典型用法代码示例。如果您正苦于以下问题:Java IVerticalRuler类的具体用法?Java IVerticalRuler怎么用?Java IVerticalRuler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IVerticalRuler类属于org.eclipse.jface.text.source包,在下文中一共展示了IVerticalRuler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createTypeScriptSourceViewer
import org.eclipse.jface.text.source.IVerticalRuler; //导入依赖的package包/类
@Override
protected ISourceViewer createTypeScriptSourceViewer(Composite parent, IVerticalRuler verticalRuler,
IOverviewRuler overviewRuler, boolean isOverviewRulerVisible, int styles, IPreferenceStore store) {
return new AdaptedSourceViewer(parent, verticalRuler, overviewRuler, isOverviewRulerVisible, styles,
store) {
@Override
protected void handleDispose() {
super.handleDispose();
// dispose the compilation unit adapter
dispose();
fEditor.remove(this);
if (fEditor.isEmpty()) {
fEditor = null;
fSite = null;
}
fSourceViewer.remove(this);
if (fSourceViewer.isEmpty())
fSourceViewer = null;
}
};
}
示例2: createSourceViewer
import org.eclipse.jface.text.source.IVerticalRuler; //导入依赖的package包/类
@Override
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
Composite composite = new Composite(parent, SWT.NONE);
GridLayout compositeLayout = new GridLayout(1, false);
compositeLayout.marginHeight = 0;
compositeLayout.marginWidth = 0;
compositeLayout.horizontalSpacing = 0;
compositeLayout.verticalSpacing = 0;
composite.setLayout(compositeLayout);
topPanel = new Composite(composite, SWT.NONE);
topPanel.setLayout(new StackLayout());
topPanel.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
Composite editorComposite = new Composite(composite, SWT.NONE);
editorComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
FillLayout fillLayout = new FillLayout(SWT.VERTICAL);
fillLayout.marginHeight = 0;
fillLayout.marginWidth = 0;
fillLayout.spacing = 0;
editorComposite.setLayout(fillLayout);
ISourceViewer result = doCreateSourceViewer(editorComposite, ruler, styles);
return result;
}
示例3: createSourceViewer
import org.eclipse.jface.text.source.IVerticalRuler; //导入依赖的package包/类
@Override
protected ISourceViewer createSourceViewer(Composite parent,
IVerticalRuler ruler, int styles) {
ISourceViewer sourceViewer = super.createSourceViewer(parent, ruler, styles);
// Apply preference settings from the default editor
IPreferenceStore store = EditorsUI.getPreferenceStore();
Color backgroundColor = PreferenceUtils.colorFromString(
store.getString(PREFERENCE_COLOR_BACKGROUND));
Color foregroundColor = PreferenceUtils.colorFromString(
store.getString(PREFERENCE_COLOR_FOREGROUND));
Color selectionBackgroundColor = PreferenceUtils.colorFromString(
store.getString(PREFERENCE_COLOR_SELECTION_BACKGROUND), new RGB(99, 99, 99));
Color selectionForegroundColor = PreferenceUtils.colorFromString(
store.getString(PREFERENCE_COLOR_SELECTION_FOREGROUND), new RGB(0, 0, 0));
final StyledText textWidget = sourceViewer.getTextWidget();
textWidget.setBackground(backgroundColor);
textWidget.setForeground(foregroundColor);
textWidget.setSelectionBackground(selectionBackgroundColor);
textWidget.setSelectionForeground(selectionForegroundColor);
return sourceViewer;
}
示例4: createSourceViewer
import org.eclipse.jface.text.source.IVerticalRuler; //导入依赖的package包/类
@Override
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
fAnnotationAccess = createAnnotationAccess();
fOverviewRuler = createOverviewRuler(getSharedColors());
ProjectionViewer viewer =
new ProjectionViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(), styles);
fProjectionSupport = new ProjectionSupport(viewer, getAnnotationAccess(), getSharedColors());
fProjectionSupport.addSummarizableAnnotationType(ANNOTATION_TYPE_APEX_ERROR); //$NON-NLS-1$
fProjectionSupport.addSummarizableAnnotationType(ANNOTATION_TYPE_APEX_WARNING); //$NON-NLS-1$
fProjectionSupport.install();
setTitleToolTip(EDITOR_NAME);
// ensure source viewer decoration support has been created and configured
getSourceViewerDecorationSupport(viewer);
fBracketInserter = new BracketInserter(this, viewer);
return viewer;
}
示例5: createSourceViewer
import org.eclipse.jface.text.source.IVerticalRuler; //导入依赖的package包/类
protected ISourceViewer createSourceViewer( Composite parent,
IVerticalRuler ruler, int styles )
{
fAnnotationAccess = getAnnotationAccess( );
fOverviewRuler = createOverviewRuler( getSharedColors( ) );
ProjectionViewer viewer = new ProjectionViewer( parent,
ruler,
getOverviewRuler( ),
isOverviewRulerVisible( ),
styles );
ProjectionSupport fProjectionSupport = new ProjectionSupport( viewer,
getAnnotationAccess( ),
getSharedColors( ) );
fProjectionSupport.addSummarizableAnnotationType( "org.eclipse.ui.workbench.texteditor.error" ); //$NON-NLS-1$
fProjectionSupport.addSummarizableAnnotationType( "org.eclipse.ui.workbench.texteditor.warning" ); //$NON-NLS-1$
fProjectionSupport.install( );
// Ensures source viewer decoration support has been created and
// configured.
getSourceViewerDecorationSupport( viewer );
return viewer;
}
示例6: createSourceViewer
import org.eclipse.jface.text.source.IVerticalRuler; //导入依赖的package包/类
/**
* Creates the source viewer to be used by this editor.
*
* @param parent
* the parent control
* @return the source viewer
*/
protected SourceViewer createSourceViewer( Composite parent )
{
IVerticalRuler ruler = createVerticalRuler( );
Composite composite = new Composite( parent, SWT.BORDER
| SWT.LEFT_TO_RIGHT );
composite.setLayoutData( new GridData( GridData.FILL_BOTH ) );
composite.setLayout( UIUtil.createGridLayoutWithoutMargin( ) );
int styles = SWT.V_SCROLL
| SWT.H_SCROLL
| SWT.MULTI
| SWT.BORDER
| SWT.FULL_SELECTION;
SourceViewer viewer = new SourceViewer( composite, ruler, styles );
viewer.configure( sourceViewerConfiguration );
updateStyledTextColors( viewer.getTextWidget( ) );
JSEditorInput editorInput = new JSEditorInput( expression,
getEncoding( ) );
JSDocumentProvider documentProvider = new JSDocumentProvider( );
try
{
documentProvider.connect( editorInput );
}
catch ( CoreException e )
{
ExceptionHandler.handle( e );
}
viewer.setDocument( documentProvider.getDocument( editorInput ),
ruler == null ? null : ruler.getModel( ) );
return viewer;
}
示例7: PythonSourceViewer
import org.eclipse.jface.text.source.IVerticalRuler; //导入依赖的package包/类
public PythonSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
super(parent, ruler, null, false, styles, new PyAbstractIndentGuidePreferencesProvider() {
@Override
public int getTabWidth() {
return DefaultIndentPrefs.get(null).getTabWidth();
}
});
StyledText text = this.getTextWidget();
text.addBidiSegmentListener(new BidiSegmentListener() {
@Override
public void lineGetSegments(BidiSegmentEvent event) {
try {
event.segments = getBidiLineSegments(event.lineOffset);
} catch (BadLocationException x) {
// ignore
}
}
});
updateViewerFont();
updateViewerColors();
getPreferenceStore().addPropertyChangeListener(propertyChangeListener);
}
示例8: createSourceViewer
import org.eclipse.jface.text.source.IVerticalRuler; //导入依赖的package包/类
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
ISourceViewer viewer = new ProjectionViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(), styles) {
public void setSelection(ISelection selection, boolean reveal) {
if (!DwprofileEditor.this.setSelection(selection, reveal)) {
super.setSelection(selection, reveal);
}
}
};
// ensure decoration support has been created and configured.
getSourceViewerDecorationSupport(viewer);
return viewer;
}
示例9: createSourceViewer
import org.eclipse.jface.text.source.IVerticalRuler; //导入依赖的package包/类
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
ISourceViewer viewer = new ProjectionViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(), styles) {
public void setSelection(ISelection selection, boolean reveal) {
if (!HyexpressionEditor.this.setSelection(selection, reveal)) {
super.setSelection(selection, reveal);
}
}
};
// ensure decoration support has been created and configured.
getSourceViewerDecorationSupport(viewer);
return viewer;
}
示例10: createSourceViewer
import org.eclipse.jface.text.source.IVerticalRuler; //导入依赖的package包/类
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
ISourceViewer viewer = new ProjectionViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(), styles) {
public void setSelection(ISelection selection, boolean reveal) {
if (!HyvalidityformulaEditor.this.setSelection(selection, reveal)) {
super.setSelection(selection, reveal);
}
}
};
// ensure decoration support has been created and configured.
getSourceViewerDecorationSupport(viewer);
return viewer;
}
示例11: createSourceViewer
import org.eclipse.jface.text.source.IVerticalRuler; //导入依赖的package包/类
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
ISourceViewer viewer = new ProjectionViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(), styles) {
public void setSelection(ISelection selection, boolean reveal) {
if (!HydatavalueEditor.this.setSelection(selection, reveal)) {
super.setSelection(selection, reveal);
}
}
};
// ensure decoration support has been created and configured.
getSourceViewerDecorationSupport(viewer);
return viewer;
}
示例12: createSourceViewer
import org.eclipse.jface.text.source.IVerticalRuler; //导入依赖的package包/类
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
ISourceViewer viewer = new ProjectionViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(), styles) {
public void setSelection(ISelection selection, boolean reveal) {
if (!HymappingEditor.this.setSelection(selection, reveal)) {
super.setSelection(selection, reveal);
}
}
};
// ensure decoration support has been created and configured.
getSourceViewerDecorationSupport(viewer);
return viewer;
}
示例13: createSourceViewer
import org.eclipse.jface.text.source.IVerticalRuler; //导入依赖的package包/类
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
ISourceViewer viewer = new ProjectionViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(), styles) {
public void setSelection(ISelection selection, boolean reveal) {
if (!HyconstraintsEditor.this.setSelection(selection, reveal)) {
super.setSelection(selection, reveal);
}
}
};
// ensure decoration support has been created and configured.
getSourceViewerDecorationSupport(viewer);
return viewer;
}
示例14: createSourceViewer
import org.eclipse.jface.text.source.IVerticalRuler; //导入依赖的package包/类
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
ISourceViewer viewer = new ProjectionViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(), styles) {
public void setSelection(ISelection selection, boolean reveal) {
if (!HymanifestEditor.this.setSelection(selection, reveal)) {
super.setSelection(selection, reveal);
}
}
};
// ensure decoration support has been created and configured.
getSourceViewerDecorationSupport(viewer);
return viewer;
}
示例15: FtcSourceViewer
import org.eclipse.jface.text.source.IVerticalRuler; //导入依赖的package包/类
public FtcSourceViewer(IResource resource, Composite parent, IVerticalRuler ruler, IOverviewRuler overviewRuler,
boolean overviewRulerVisible, int styles) {
super(parent, ruler, overviewRuler, overviewRulerVisible, styles);
this.resource = resource;
this.syntaxColoring = new SyntaxColoring(this);
}