Package org.eclipse.jface.text.source

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


    }

    public void modelReinitialized(IStructuredModel structuredModel) {
      try {
        if (getSourceViewer() != null) {
          SourceViewerConfiguration cfg = getSourceViewerConfiguration();
          getSourceViewer().configure(cfg);
        }
      }
      catch (Exception e) {
        // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=1166
View Full Code Here


   * @param parent
   *            the parent control
   * @return a configured source viewer
   */
  private SourceViewer createViewer(Composite parent) {
    SourceViewerConfiguration sourceViewerConfiguration = new StructuredTextViewerConfiguration() {
      StructuredTextViewerConfiguration baseConfiguration = new StructuredTextViewerConfigurationJSP();

      public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
        return baseConfiguration.getConfiguredContentTypes(sourceViewer);
      }
View Full Code Here

   * (non-Javadoc)
   *
   * @see org.eclipse.ui.texteditor.templates.TemplatePreferencePage#createViewer(org.eclipse.swt.widgets.Composite)
   */
  protected SourceViewer createViewer(Composite parent) {
    SourceViewerConfiguration sourceViewerConfiguration = new StructuredTextViewerConfiguration() {
      StructuredTextViewerConfiguration baseConfiguration = new StructuredTextViewerConfigurationJSP();

      public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
        return baseConfiguration.getConfiguredContentTypes(sourceViewer);
      }
View Full Code Here

  /**
   * Make sure indentation is correct before using.
   */
  private void updateIndentationPrefixes() {
    SourceViewerConfiguration configuration = fConfiguration;
    if (fConfiguration != null) {
      String[] types = configuration.getConfiguredContentTypes(this);
      for (int i = 0; i < types.length; i++) {
        String[] prefixes = configuration.getIndentPrefixes(this, types[i]);
        if (prefixes != null && prefixes.length > 0)
          setIndentPrefixes(prefixes, types[i]);
      }
    }
  }
View Full Code Here

   * (non-Javadoc)
   *
   * @see org.eclipse.ui.texteditor.templates.TemplatePreferencePage#createViewer(org.eclipse.swt.widgets.Composite)
   */
  protected SourceViewer createViewer(Composite parent) {
    SourceViewerConfiguration sourceViewerConfiguration = new StructuredTextViewerConfiguration() {
      StructuredTextViewerConfiguration baseConfiguration = new StructuredTextViewerConfigurationXML();

      public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
        return baseConfiguration.getConfiguredContentTypes(sourceViewer);
      }
View Full Code Here

   * @param parent
   *            the parent control
   * @return a configured source viewer
   */
  private SourceViewer createViewer(Composite parent) {
    SourceViewerConfiguration sourceViewerConfiguration = new StructuredTextViewerConfiguration() {
      StructuredTextViewerConfiguration baseConfiguration = new StructuredTextViewerConfigurationXML();

      public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
        return baseConfiguration.getConfiguredContentTypes(sourceViewer);
      }
View Full Code Here

    public XMLEditTemplateDialog(Shell parent, Template template, boolean edit, boolean isNameModifiable, ContextTypeRegistry registry) {
      super(parent, template, edit, isNameModifiable, registry);
    }

    protected SourceViewer createViewer(Composite parent) {
      SourceViewerConfiguration sourceViewerConfiguration = new StructuredTextViewerConfiguration() {
        StructuredTextViewerConfiguration baseConfiguration = new StructuredTextViewerConfigurationXML();

        public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
          return baseConfiguration.getConfiguredContentTypes(sourceViewer);
        }
View Full Code Here

      IContentAssistant assistant = isv.getContentAssistant();
      if (assistant instanceof ContentAssistant) {
        JDIContentAssistPreference.changeConfiguration(
            (ContentAssistant) assistant, event);
      }
      SourceViewerConfiguration configuration = getSourceViewerConfiguration();
      if (configuration instanceof JavaSourceViewerConfiguration) {
        JavaSourceViewerConfiguration jsv = (JavaSourceViewerConfiguration) configuration;
        if (jsv.affectsTextPresentation(event)) {
          jsv.handlePropertyChangeEvent(event);
          isv.invalidateTextPresentation();
View Full Code Here

      composite.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
    }

    // Source viewer
    fViewer= new SourceViewer(composite, null, textStyle);
    fViewer.configure(new SourceViewerConfiguration());
    fViewer.setEditable(false);

    fText= fViewer.getTextWidget();
    gd= new GridData(GridData.BEGINNING | GridData.FILL_BOTH);
    fText.setLayoutData(gd);
View Full Code Here

    return viewer;
  }
 
  protected SourceViewer createViewer(Composite parent) {
    SourceViewer viewer= new SourceViewer(parent, null, null, false, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
    SourceViewerConfiguration configuration;
   
    switch(languageMode){
    case verilog:
      configuration = HdlSourceViewerConfiguration.createForVerilog( new VerilogEditor() );
      break;
View Full Code Here

TOP

Related Classes of org.eclipse.jface.text.source.SourceViewerConfiguration

Copyright © 2018 www.massapicom. 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.