Examples of SourceViewer


Examples of org.eclipse.jface.text.source.SourceViewer

        final IPreferenceStore store = topStore == null ? new ChainedPreferenceStore(
                new IPreferenceStore[] { generalTextStore })
                : new ChainedPreferenceStore(new IPreferenceStore[] { topStore,
                        generalTextStore });

        final SourceViewer viewer = new SourceViewer(parent, null, null, false,
                SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
        final IDocument document = new Document(content);
        viewer.setDocument(document);

        final ErlangDocumentSetupParticipant setupParticipant = new ErlangDocumentSetupParticipant();
        setupParticipant.setup(document);

        final ErlangSourceViewerConfiguration configuration = new SyntaxColorPreviewEditorConfiguration(
                store, colorManager, colors);
        viewer.configure(configuration);

        final Font font = JFaceResources.getFont(PreferenceConstants.EDITOR_TEXT_FONT);
        viewer.getTextWidget().setFont(font);
        new ErlangSourceViewerUpdater(viewer, configuration, store);
        viewer.setEditable(false);

        final Cursor arrowCursor = viewer.getTextWidget().getDisplay()
                .getSystemCursor(SWT.CURSOR_ARROW);
        viewer.getTextWidget().setCursor(arrowCursor);

        return viewer;
    }
View Full Code Here

Examples of org.eclipse.jface.text.source.SourceViewer

        try {
            condition = fBreakpoint.getCondition();
            fErrorMessage = "Enter a condition";
            fOldValue = ""; //$NON-NLS-1$

            fViewer = new SourceViewer(parent, null, SWT.BORDER | SWT.V_SCROLL
                    | SWT.H_SCROLL | SWT.LEFT_TO_RIGHT);
            fViewer.setInput(parent);
            final IDocument document = new Document();
            fViewer.setDocumentPartitioning(IErlangPartitions.ERLANG_PARTITIONING);
            // setDocumentPartitioning
View Full Code Here

Examples of org.eclipse.jface.text.source.SourceViewer

  }

  @Override
  protected ISourceViewer createSourceViewer(Composite parent,
          org.eclipse.jface.text.source.IVerticalRuler ruler, int styles) {
    SourceViewer sourceViewer = new SourceViewer(parent, ruler, styles);

    sourceViewer.setEditable(false);

    mPainter = new AnnotationPainter(sourceViewer, new AnnotationAccess());

    sourceViewer.addPainter(mPainter);

    return sourceViewer;
  }
View Full Code Here

Examples of org.eclipse.jface.text.source.SourceViewer

        textEditorTab.setControl(createTextualEditor(tabFolder));
        return composite;
    }
   
    private Control createTextualEditor(Composite parent) {
        actionViewer = new SourceViewer(parent, null, SWT.BORDER);
        actionViewer.configure(new DRLSourceViewerConfig(null) {
            public IReconciler getReconciler(ISourceViewer sourceViewer) {
                return null;
            }
            public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
View Full Code Here

Examples of org.eclipse.jface.text.source.SourceViewer

        textEditorTab.setControl(createTextualEditor(tabFolder));
        return composite;
    }
   
    private Control createTextualEditor(Composite parent) {
        actionViewer = new SourceViewer(parent, null, SWT.BORDER);
        actionViewer.configure(new DRLSourceViewerConfig(null) {
            public IReconciler getReconciler(ISourceViewer sourceViewer) {
                return null;
            }
            public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
View Full Code Here

Examples of org.eclipse.jface.text.source.SourceViewer

    protected Point getInitialSize() {
        return new Point(600, 450);
    }

    private Control createTextualEditor(Composite parent) {
        constraintViewer = new SourceViewer(parent, null, SWT.BORDER);
        constraintViewer.configure(new DRLSourceViewerConfig(null) {
            public IReconciler getReconciler(ISourceViewer sourceViewer) {
                return null;
            }
            public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
View Full Code Here

Examples of org.eclipse.jface.text.source.SourceViewer

    protected Point getInitialSize() {
        return new Point(600, 450);
    }

    private Control createTextualEditor(Composite parent) {
        actionViewer = new SourceViewer(parent, null, SWT.BORDER);
        actionViewer.configure(new DRLSourceViewerConfig(null) {
            public IReconciler getReconciler(ISourceViewer sourceViewer) {
                return null;
            }
            public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
View Full Code Here

Examples of org.eclipse.jface.text.source.SourceViewer

        gd.widthHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH );
        gd.heightHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH );
        composite.setLayoutData( gd );

        // create and configure source viewer
        sourceViewer = new SourceViewer( composite, new VerticalRuler( 0 ), SWT.H_SCROLL | SWT.V_SCROLL );
        sourceViewer.getControl().setLayoutData( new GridData( GridData.FILL_BOTH ) );
        configuration = new FilterSourceViewerConfiguration( parser, browserConnection );
        sourceViewer.configure( configuration );

        // set document
View Full Code Here

Examples of org.eclipse.jface.text.source.SourceViewer

  }

  @Override
  protected ISourceViewer createSourceViewer(Composite parent,
          org.eclipse.jface.text.source.IVerticalRuler ruler, int styles) {
    SourceViewer sourceViewer = new SourceViewer(parent, ruler, styles);

    sourceViewer.setEditable(false);

    mPainter = new AnnotationPainter(sourceViewer, new AnnotationAccess());

    sourceViewer.addPainter(mPainter);
   
    return sourceViewer;
  }
View Full Code Here

Examples of org.eclipse.jface.text.source.SourceViewer

    protected Point getInitialSize() {
        return new Point(600, 450);
    }

    private Control createTextualEditor(Composite parent) {
        importsViewer = new SourceViewer(parent, null, SWT.BORDER);
        importsViewer.configure(new DRLSourceViewerConfig(null) {
            public IReconciler getReconciler(ISourceViewer sourceViewer) {
                return null;
            }
            public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.