本文整理汇总了Java中org.eclipse.jface.text.source.IOverviewRuler类的典型用法代码示例。如果您正苦于以下问题:Java IOverviewRuler类的具体用法?Java IOverviewRuler怎么用?Java IOverviewRuler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IOverviewRuler类属于org.eclipse.jface.text.source包,在下文中一共展示了IOverviewRuler类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createTypeScriptSourceViewer
import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的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: createOverviewRuler
import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
@Override
protected IOverviewRuler createOverviewRuler(ISharedTextColors sharedColors) {
// Note: create the minimap overview ruler regardless of whether it should be shown or not
// (the setting to show it will control what's drawn).
if (MinimapOverviewRulerPreferencesPage.useMinimap()) {
IOutlineModel outlineModel = (IOutlineModel) this.getAdapter(IOutlineModel.class);
IOverviewRuler ruler = new MinimapOverviewRuler(getAnnotationAccess(), sharedColors, outlineModel);
Iterator e = getAnnotationPreferences().getAnnotationPreferences().iterator();
while (e.hasNext()) {
AnnotationPreference preference = (AnnotationPreference) e.next();
if (preference.contributesToHeader()) {
ruler.addHeaderAnnotationType(preference.getAnnotationType());
}
}
return ruler;
} else {
return super.createOverviewRuler(sharedColors);
}
}
示例3: FtcSourceViewer
import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的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);
}
示例4: createPreviewViewer
import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
@Override
protected ProjectionViewer createPreviewViewer(Composite parent, IVerticalRuler verticalRuler,
IOverviewRuler overviewRuler, boolean showAnnotationsOverview, int styles,
IPreferenceStore store) {
return new ScriptSourceViewer(
parent, verticalRuler, overviewRuler, showAnnotationsOverview, styles, store);
}
示例5: BaseSourceViewer
import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
public BaseSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler,
boolean showAnnotationsOverview, int styles, IVerticalIndentGuidePreferencesProvider verticalIndentPrefs) {
super(parent, verticalRuler, overviewRuler, showAnnotationsOverview, styles);
verticalLinesPainter = new VerticalIndentGuidesPainter(
getIndentGuide(verticalIndentPrefs));
StyledText styledText = this.getTextWidget();
verticalLinesPainter.setStyledText(styledText);
styledText.addPaintListener(verticalLinesPainter);
styledText.setLeftMargin(Math.max(styledText.getLeftMargin(), 2));
}
示例6: createSourceViewer
import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
@Override
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
IOverviewRuler overviewRuler = getOverviewRuler();
PySourceViewer viewer = new PySourceViewer(parent, ruler, overviewRuler, isOverviewRulerVisible(), styles, this);
//ensure decoration support has been created and configured.
getSourceViewerDecorationSupport(viewer);
return viewer;
}
示例7: PySourceViewer
import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
public PySourceViewer(Composite parent, IVerticalRuler ruler, IOverviewRuler overviewRuler,
boolean showsAnnotationOverview, int styles, final PyEditProjection projection) {
super(parent, ruler, overviewRuler, showsAnnotationOverview, styles,
new PyAbstractIndentGuidePreferencesProvider() {
@Override
public int getTabWidth() {
return ((PyEdit) projection).getIndentPrefs().getTabWidth();
}
});
this.projection = new WeakReference<PyEdit>((PyEdit) projection);
}
示例8: SourceViewer
import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
public SourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler,
boolean showAnnotationsOverview, int styles, IAnnotationAccess annotationAccess, ISharedTextColors sharedColors,
IDocument document)
{
super(parent, verticalRuler, overviewRuler, showAnnotationsOverview, SWT.BOLD);
int id = currentId++;
filename = VIEWER_CLASS_NAME + id++ + ".java";
this.sharedColors=sharedColors;
this.annotationAccess=annotationAccess;
this.fOverviewRuler=overviewRuler;
oldAnnotations= new HashMap<ProjectionAnnotation, Position>();
IJavaProject javaProject = JavaCore.create(BuildExpressionEditorDataSturcture.INSTANCE.getCurrentProject());
try
{
IPackageFragmentRoot[] ipackageFragmentRootList=javaProject.getPackageFragmentRoots();
IPackageFragmentRoot ipackageFragmentRoot=null;
for(IPackageFragmentRoot tempIpackageFragmentRoot:ipackageFragmentRootList)
{
if(tempIpackageFragmentRoot.getKind()==IPackageFragmentRoot.K_SOURCE
&& StringUtils.equals(PathConstant.TEMP_BUILD_PATH_SETTINGS_FOLDER,tempIpackageFragmentRoot.getPath().removeFirstSegments(1).toString()))
{
ipackageFragmentRoot=tempIpackageFragmentRoot;
break;
}
}
IPackageFragment compilationUnitPackage= ipackageFragmentRoot.createPackageFragment(HYDROGRAPH_COMPILATIONUNIT_PACKAGE, true, new NullProgressMonitor());
compilatioUnit= compilationUnitPackage.createCompilationUnit(filename,document.get(),true, new NullProgressMonitor());
}
catch (Exception exception) {
LOGGER.warn("Exception occurred while initializing source viewer", exception);
} finally {
if (javaProject != null) {
try {
javaProject.close();
} catch (JavaModelException javaModelException) {
LOGGER.warn("Exception occurred while closing java-project", javaModelException);
}
}
}
initializeViewer(document);
updateContents();
}
示例9: TMViewer
import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
public TMViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler,
boolean showAnnotationsOverview, int styles) {
super(parent, verticalRuler, overviewRuler, showAnnotationsOverview, styles);
init();
}
示例10: EiffelSourceViewer
import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
public EiffelSourceViewer(Composite parent, IVerticalRuler ruler, IOverviewRuler overviewRuler,
boolean showAnnotationOverview, int styles, EiffelEditor editor) {
super(parent, ruler, overviewRuler, showAnnotationOverview, styles);
}
示例11: EiffelSourceViewer
import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
public EiffelSourceViewer(Composite parent, IVerticalRuler ruler, IOverviewRuler overviewRuler,
boolean showAnnotationOverview, int styles, EiffelEditor editor) {
super(parent, ruler, overviewRuler, showAnnotationOverview, styles);
eiffelEditor = editor;
}
示例12: createSourceViewer
import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public XtextSourceViewer createSourceViewer(final Composite parent, final IVerticalRuler ruler, final IOverviewRuler overviewRuler, final boolean showsAnnotationOverview, final int styles) {
return new FixedXtextSourceViewer(parent, ruler, overviewRuler, showsAnnotationOverview, styles);
}
示例13: FluentMkSourceViewer
import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
/** Creates new source viewer. */
public FluentMkSourceViewer(Composite parent, IVerticalRuler ruler, IOverviewRuler overviewRuler,
boolean isOverviewRulerShowing, int styles, IPreferenceStore store) {
super(parent, ruler, overviewRuler, isOverviewRulerShowing, styles);
setPreferenceStore(store);
}
示例14: AdaptedSourceViewer
import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
public AdaptedSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler,
boolean showAnnotationsOverview, int styles, IPreferenceStore store) {
super(parent, verticalRuler, overviewRuler, showAnnotationsOverview, styles, store);
}
示例15: TypeScriptSourceViewer
import org.eclipse.jface.text.source.IOverviewRuler; //导入依赖的package包/类
public TypeScriptSourceViewer(Composite parent, IVerticalRuler verticalRuler, IOverviewRuler overviewRuler,
boolean showAnnotationsOverview, int styles, IPreferenceStore store) {
super(parent, verticalRuler, overviewRuler, showAnnotationsOverview, styles, store);
}