Package es.upv.dsic.issi.moment.maudesimpleGUI.ui.editors

Examples of es.upv.dsic.issi.moment.maudesimpleGUI.ui.editors.MaudeEditor


 
  private int getNumberOfLines(){
    int numberLines=1;
    IEditorPart editor=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
    if(editor instanceof MaudeEditor){
      MaudeEditor maudeEditor= (MaudeEditor)editor;
      IDocument documento=maudeEditor.getDocumentProvider().getDocument(maudeEditor.getEditorInput());
      numberLines=documento.getNumberOfLines();
    }
   
    return numberLines;
 
View Full Code Here


   
    try{
         
      IEditorPart editor=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
      if(editor instanceof MaudeEditor){
        MaudeEditor maudeEditor= (MaudeEditor)editor;
        IDocument documento=maudeEditor.getDocumentProvider().getDocument(maudeEditor.getEditorInput());
     
        int offSet=documento.getLineOffset(numLinea-1);
               
        TextSelection seleccion = new TextSelection(offSet,0);
             
        maudeEditor.getSelectionProvider().setSelection(seleccion);
       
      }
   
    }catch(NumberFormatException e){}
    catch (BadLocationException e) {}
View Full Code Here

          numLinea=Integer.parseInt(selec.getText());
          numLinea--;
       
          IEditorPart editor=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
          if(editor instanceof MaudeEditor){
            MaudeEditor maudeEditor= (MaudeEditor)editor;
            IDocument documento=maudeEditor.getDocumentProvider().getDocument(maudeEditor.getEditorInput());
         
            int offSet=documento.getLineOffset(numLinea);
                   
            TextSelection seleccion = new TextSelection(offSet,documento.getLineLength(numLinea));
                 
            maudeEditor.getSelectionProvider().setSelection(seleccion);
           
          }
       
        }catch(NumberFormatException e){}
        catch (BadLocationException e) {}
View Full Code Here

TOP

Related Classes of es.upv.dsic.issi.moment.maudesimpleGUI.ui.editors.MaudeEditor

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.