Examples of NbEditorDocument


Examples of org.netbeans.modules.editor.NbEditorDocument

    public GotoDeclarationAction(EditorCookie context) {
        this.context = context;
    }

    public void actionPerformed(ActionEvent ev) {
        NbEditorDocument  doc=(NbEditorDocument) context.getDocument();
        ExtSyntaxSupport sup= new ExtSyntaxSupport(doc);
        int pos=context.getOpenedPanes()[0].getCaretPosition();
        try{
            int o=Utilities.getRowIndent(doc, pos,true);
             int[] idBlk = Utilities.getIdentifierBlock(doc, pos);
             Utilities.reformatLine(doc, pos);
             String text=doc.getText(idBlk);
             if(text.equals("include")){
                 String file=doc.getText(idBlk[0],doc.getLength()-idBlk[0]).split("\"")[1];
                 file=new File(UpdateNodeTask.getInstance().lastRoot.parser.getFileName()).getParent()+"/"+file;
                 Executor.openLine(file, 1);
                 return;
             }
             ASTDeclaration decl= UpdateNodeTask.getInstance().lastRoot.getDeclarations().get(text);
View Full Code Here

Examples of org.netbeans.modules.editor.NbEditorDocument

        if(!inited)
            return;
          LayoutCalculator.MAX_LINE_LEN = 25*((Integer) IDBarsPerLine.getValue());
        scorePanel.updateView();
        NbEditorDocument doc = UpdateNodeTask.getInstance().getLastDocument();
        try{
            doc.insertString(0, " ", null);
            doc.remove(0, 1);
        }catch(Exception ex){

        }
        //IDPane.getVerticalScrollBar().setValue(50); //

View Full Code Here

Examples of org.netbeans.modules.editor.NbEditorDocument

                    pos2 = url.indexOf(":", pos + 1);
                    int from = Integer.parseInt(url.substring(pos + 1, pos2));
                    pos = pos2;
                    int to = Integer.parseInt(url.substring(pos + 1, url.length() - 1));
                    //org.lilypondbeans.editor.UpdateNodeTask.getInstance().lastResult.getSnapshot().
                    NbEditorDocument doc = org.lilypondbeans.editor.UpdateNodeTask.getInstance().getLastDocument();//ElementProvider.getInstance().getEditorCookie().getDocument();
                    int off = NbDocument.findLineOffset(doc, line - 1) + from;//why - line?
                    plen = to - from;
                    if (plen == 0) {
                        plen = 1;
                    }
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.