当前位置: 首页>>代码示例>>Java>>正文


Java IVerticalRuler类代码示例

本文整理汇总了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;

		}
	};
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:26,代码来源:TypeScriptMergeViewer.java

示例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;
}
 
开发者ID:RepreZen,项目名称:KaiZen-OpenAPI-Editor,代码行数:27,代码来源:JsonEditor.java

示例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;
}
 
开发者ID:Johnnei,项目名称:GLSL-Eclipse,代码行数:27,代码来源:GlslEditor.java

示例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;
}
 
开发者ID:forcedotcom,项目名称:idecore,代码行数:20,代码来源:ApexCodeEditor.java

示例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;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:26,代码来源:DecoratedScriptEditor.java

示例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;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:47,代码来源:ExpressionBuilder.java

示例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);
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:24,代码来源:PythonSourceViewer.java

示例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;
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:15,代码来源:DwprofileEditor.java

示例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;
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:15,代码来源:HyexpressionEditor.java

示例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;
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:15,代码来源:HyvalidityformulaEditor.java

示例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;
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:15,代码来源:HydatavalueEditor.java

示例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;
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:15,代码来源:HymappingEditor.java

示例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;
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:15,代码来源:HyconstraintsEditor.java

示例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;
}
 
开发者ID:DarwinSPL,项目名称:DarwinSPL,代码行数:15,代码来源:HymanifestEditor.java

示例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);
}
 
开发者ID:curiosag,项目名称:ftc,代码行数:8,代码来源:FtcSourceViewer.java


注:本文中的org.eclipse.jface.text.source.IVerticalRuler类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。