Package org.eclipse.jface.text.source

Examples of org.eclipse.jface.text.source.SourceViewer.configure()


        result = new SourceViewer(parent, null, null, true, styles);
      } catch (NoClassDefFoundError e) {
        Activator.getDefault().getLog().log(new Status(IStatus.WARNING, Activator.PLUGIN_ID, IStatus.WARNING, Messages.ChatRoomManagerView_WARNING_HYPERLINKING_NOT_AVAILABLE, e));
        return new StyledText(parent, styles);
      }
      result.configure(new ChatRoomViewerConfiguration(EditorsUI.getPreferenceStore(), container, ChatRoomManagerView.this));
      result.setDocument(new Document());
      return result.getTextWidget();
    }

    protected void outputClear() {
View Full Code Here


    }

    private StyledText createStyledTextWidget(Composite parent) {
      try {
        SourceViewer result = new SourceViewer(parent, null, null, true, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI | SWT.READ_ONLY);
        result.configure(new TextSourceViewerConfiguration(EditorsUI.getPreferenceStore()));
        result.setDocument(new Document());
        return result.getTextWidget();
      } catch (Exception e) {
        Activator.getDefault().getLog().log(new Status(IStatus.WARNING, Activator.PLUGIN_ID, IStatus.WARNING, Messages.MessagesView_WARNING_HYPERLINKING_NOT_AVAILABLE, e));
        return new StyledText(parent, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI | SWT.READ_ONLY);
View Full Code Here

  }

  private StyledText createStyledTextWidget(Composite parent) {
    try {
      final SourceViewer result = new SourceViewer(parent, null, null, true, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI | SWT.READ_ONLY);
      result.configure(new TextSourceViewerConfiguration(EditorsUI.getPreferenceStore()));
      result.setDocument(new Document());
      return result.getTextWidget();
    } catch (final Exception e) {
      ClientPlugin.getDefault().getLog().log(new Status(IStatus.WARNING, ClientPlugin.PLUGIN_ID, IStatus.WARNING, MessageLoader.getString("ChatComposite.NO_HYPERLINKING"), e)); //$NON-NLS-1$
      return new StyledText(parent, SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.MULTI | SWT.READ_ONLY);
View Full Code Here

          final AnnotationModel model = new AnnotationModel();
          VerticalRuler verticalRuler = new VerticalRuler(VERTICAL_RULER_WIDTH, new AnnotationAccess());
          int styles = SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION;
          SourceViewer sourceViewer = new SourceViewer(folder, verticalRuler, styles);
          sourceViewer.configure(new XMLConfiguration(new ColorManager()));
          sourceViewer.setEditable(false);
          sourceViewer.getTextWidget().setFont(JFaceResources.getTextFont());

          IDocumentPartitioner partitioner = new FastPartitioner(new XMLPartitionScanner(), new String[] { XMLPartitionScanner.XML_TAG, XMLPartitionScanner.XML_COMMENT });
          partitioner.connect(document);
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.