Package de.innovationgate.eclipse.editors.all

Examples of de.innovationgate.eclipse.editors.all.AbstractWGATextEditor


 
  public Object execute(ExecutionEvent event) throws ExecutionException {
    IEditorPart editorPart = Plugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();   
    if (editorPart != null && editorPart instanceof AbstractWGATextEditor) {
     
      AbstractWGATextEditor editor = (AbstractWGATextEditor) editorPart;

      InformationPresenter presenter=
        new InformationPresenter(new HTMLInformationControlCreator(500,250));
      presenter.setDocumentPartitioning(editor.getViewerConfiguration().getConfiguredDocumentPartitioning(editor.getViewer()));

      IInformationProvider provider= new TMLInformationProvider();
     
      String[] contentTypes = editor.getViewerConfiguration().getConfiguredContentTypes(editor.getViewer());
      for (int i= 0; i < contentTypes.length; i++) {
        presenter.setInformationProvider(provider, contentTypes[i]);
      }
      presenter.install(editor.getViewer());
      presenter.showInformation();
    }
    return null;
 
View Full Code Here


  public static final String ID = "de.innovationgate.eclipse.ids.editors.commands.ToggleComment";
 
  public Object execute(ExecutionEvent event) throws ExecutionException {
    IEditorPart editorPart = Plugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();   
    if (editorPart != null && editorPart instanceof AbstractWGATextEditor) {
      AbstractWGATextEditor editor = (AbstractWGATextEditor) editorPart;     
      ISelection selection = editor.getEditorSite().getSelectionProvider().getSelection();
      if (selection != null && selection instanceof ITextSelection) {
        ITextSelection textSelection = (ITextSelection)selection;
        IDocument doc = editor.getDocumentProvider().getDocument(editor.getEditorInput());
        if (doc != null) {
          try {
            ITypedRegion region = doc.getPartition(textSelection.getOffset());           
           
            // comment handling for TMLScriptEditor
View Full Code Here

TOP

Related Classes of de.innovationgate.eclipse.editors.all.AbstractWGATextEditor

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.