Package tk.eclipse.plugin.htmleditor.assist

Examples of tk.eclipse.plugin.htmleditor.assist.HTMLAssistProcessor


        assistant.setAutoActivationDelay(Integer.parseInt((String)event.getNewValue()));
     
      // auto activation trigger
      } else if(key.equals(HTMLPlugin.PREF_ASSIST_CHARS)){
        ContentAssistant assistant = (ContentAssistant)getSourceViewerConfiguration().getContentAssistant(null);
        HTMLAssistProcessor processor = (HTMLAssistProcessor)assistant.getContentAssistProcessor(IDocument.DEFAULT_CONTENT_TYPE);
        processor.setAutoAssistChars(((String)event.getNewValue()).toCharArray());
       
      // completion close tag
      } else if(key.equals(HTMLPlugin.PREF_ASSIST_CLOSE)){
        ContentAssistant assistant = (ContentAssistant)getSourceViewerConfiguration().getContentAssistant(null);
        HTMLAssistProcessor processor = (HTMLAssistProcessor)assistant.getContentAssistProcessor(IDocument.DEFAULT_CONTENT_TYPE);
        processor.setAssistCloseTag(((Boolean)event.getNewValue()).booleanValue());
     
      // enable auto activation or not
      } else if(key.equals(HTMLPlugin.PREF_ASSIST_AUTO)){
        ContentAssistant assistant = (ContentAssistant)getSourceViewerConfiguration().getContentAssistant(null);
        assistant.enableAutoActivation(((Boolean)event.getNewValue()).booleanValue());
View Full Code Here


      return;
    }
    String html  = getDocumentProvider().getDocument(getEditorInput()).get();
   
    // Update AssistProcessors
    HTMLAssistProcessor processor =
      ((HTMLConfiguration)getSourceViewerConfiguration()).getAssistProcessor();
    processor.update((IFileEditorInput)getEditorInput(),html);
   
    InnerJavaScriptAssistProcessor jsProcessor =
      ((HTMLConfiguration)getSourceViewerConfiguration()).getJavaScriptAssistProcessor();
    jsProcessor.update(((IFileEditorInput)getEditorInput()).getFile());
  }
View Full Code Here

 
  /**
   * Creates the assist processor for HTML.
   */
  protected HTMLAssistProcessor createAssistProcessor(){
    HTMLAssistProcessor processor = new HTMLAssistProcessor();
    return processor;
  }
View Full Code Here

          return new DefaultInformationControl(parent);
        }});
      assistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE);
      assistant.enableAutoInsert(true);
     
      HTMLAssistProcessor processor = getAssistProcessor();
      assistant.setContentAssistProcessor(processor,IDocument.DEFAULT_CONTENT_TYPE);
      assistant.setContentAssistProcessor(processor,HTMLPartitionScanner.HTML_TAG);
     
      InnerJavaScriptAssistProcessor jsProcessor = getJavaScriptAssistProcessor();
      assistant.setContentAssistProcessor(jsProcessor,HTMLPartitionScanner.JAVASCRIPT);
     
      InnerCSSAssistProcessor cssProcessor = getCSSAssistProcessor();
      assistant.setContentAssistProcessor(cssProcessor,HTMLPartitionScanner.HTML_CSS);
     
      assistant.install(sourceViewer);
     
      // �⊮�̐ݒ�𔽉f
      IPreferenceStore store = HTMLPlugin.getDefault().getPreferenceStore();
      assistant.enableAutoActivation(store.getBoolean(HTMLPlugin.PREF_ASSIST_AUTO));
      assistant.setAutoActivationDelay(store.getInt(HTMLPlugin.PREF_ASSIST_TIMES));
      processor.setAutoAssistChars(store.getString(HTMLPlugin.PREF_ASSIST_CHARS).toCharArray());
      processor.setAssistCloseTag(store.getBoolean(HTMLPlugin.PREF_ASSIST_CLOSE));
    }
    return assistant;
  }
View Full Code Here

 
  /**
   * Creates the assist processor for HTML.
   */
  protected HTMLAssistProcessor createAssistProcessor(){
    HTMLAssistProcessor processor = new HTMLAssistProcessor();
    return processor;
  }
View Full Code Here

          return new DefaultInformationControl(parent);
        }});
      _assistant.setContextInformationPopupOrientation(IContentAssistant.CONTEXT_INFO_ABOVE);
      _assistant.enableAutoInsert(true);
     
      HTMLAssistProcessor processor = getAssistProcessor();
      _assistant.setContentAssistProcessor(processor,IDocument.DEFAULT_CONTENT_TYPE);
      _assistant.setContentAssistProcessor(processor,HTMLPartitionScanner.HTML_TAG);
     
      InnerJavaScriptAssistProcessor jsProcessor = getJavaScriptAssistProcessor();
      _assistant.setContentAssistProcessor(jsProcessor,HTMLPartitionScanner.JAVASCRIPT);
     
      InnerCSSAssistProcessor cssProcessor = getCSSAssistProcessor();
      _assistant.setContentAssistProcessor(cssProcessor,HTMLPartitionScanner.HTML_CSS);
     
      _assistant.enableColoredLabels(true);
     
      _assistant.install(sourceViewer);
     
      // �⊮�̐ݒ�𔽉f
      IPreferenceStore store = HTMLPlugin.getDefault().getPreferenceStore();
      _assistant.enableAutoActivation(store.getBoolean(HTMLPlugin.PREF_ASSIST_AUTO));
      _assistant.setAutoActivationDelay(store.getInt(HTMLPlugin.PREF_ASSIST_TIMES));
      processor.setAutoAssistChars(store.getString(HTMLPlugin.PREF_ASSIST_CHARS).toCharArray());
      processor.setAssistCloseTag(store.getBoolean(HTMLPlugin.PREF_ASSIST_CLOSE));
    }
    return _assistant;
  }
View Full Code Here

        // auto activation trigger
      }
      else if (key.equals(HTMLPlugin.PREF_ASSIST_CHARS)) {
        ContentAssistant assistant = (ContentAssistant) getSourceViewerConfiguration().getContentAssistant(null);
        HTMLAssistProcessor processor = (HTMLAssistProcessor) assistant.getContentAssistProcessor(IDocument.DEFAULT_CONTENT_TYPE);
        processor.setAutoAssistChars(((String) event.getNewValue()).toCharArray());

        // completion close tag
      }
      else if (key.equals(HTMLPlugin.PREF_ASSIST_CLOSE)) {
        ContentAssistant assistant = (ContentAssistant) getSourceViewerConfiguration().getContentAssistant(null);
        HTMLAssistProcessor processor = (HTMLAssistProcessor) assistant.getContentAssistProcessor(IDocument.DEFAULT_CONTENT_TYPE);
        processor.setAssistCloseTag(((Boolean) event.getNewValue()).booleanValue());

        // enable auto activation or not
      }
      else if (key.equals(HTMLPlugin.PREF_ASSIST_AUTO)) {
        ContentAssistant assistant = (ContentAssistant) getSourceViewerConfiguration().getContentAssistant(null);
View Full Code Here

   */
  protected void updateAssist() {
    String html = getDocumentProvider().getDocument(getEditorInput()).get();

    // Update AssistProcessors
    HTMLAssistProcessor processor = ((HTMLConfiguration) getSourceViewerConfiguration()).getAssistProcessor();
    processor.update(this, html);

    if (!isFileEditorInput()) {
      return;
    }

View Full Code Here

TOP

Related Classes of tk.eclipse.plugin.htmleditor.assist.HTMLAssistProcessor

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.