Package org.lilypondbeans.jccparser

Examples of org.lilypondbeans.jccparser.SimpleNode


        currentNode=node;
        this.initCause(exception);
    }
       
    public ReparseException expandIncludedFile(){
        SimpleNode include=getInclude(currentNode);
       
        if(include==null)
            return this;
        else{
            String name = include.jjtGetFirstToken().next.image;
            ReparseException ex=new ReparseException("error in file "+name+"\r\t"+getMessage(),null, include.jjtGetFirstToken(), null);
            name = name.replace("\"", "");
            String test = include.root.parser.getFileName();
            //exists file?
//            File fullPath = new File(new File(node.root.getFileName()).getParentFile().getAbsolutePath() + "/" + name);
  //          return fullPath.getAbsolutePath();
View Full Code Here


        ed.save();
        NetbeansTextEditor.getInstance().selectPosition(pitch);
    }

    public void oktaveDown() {
        SimpleNode el = UpdateNodeTask.getInstance().getLastCurrent();
        if (el == null || el.id != ParserTreeConstants.JJTPITCH) {
            return;
        }
        ASTPitch pitch = (ASTPitch) el;
        pitch.octave--;
View Full Code Here

            // MidiPlayer.defaultPlayer.play(pitch.absoluteHeight + 60);
        }
    }

    public void punktierung() {
        SimpleNode el = UpdateNodeTask.getInstance().getLastCurrent();
        if (el == null || el.id != ParserTreeConstants.JJTPITCH) {
            return;
        }
        ASTPitch pitch = (ASTPitch) el;
        NoteEditor ed = NoteEditor.create(pitch);
View Full Code Here

        ed.save();
        NetbeansTextEditor.getInstance().selectPosition(pitch);
    }

    public void setNotenWert(int durationInteger) {
        SimpleNode el = UpdateNodeTask.getInstance().getLastCurrent();
        if (el == null || el.id != ParserTreeConstants.JJTPITCH) {
            return;
        }
        ASTPitch pitch = (ASTPitch) el;
        pitch.durationInteger = durationInteger;
View Full Code Here

        ed.save();
        NetbeansTextEditor.getInstance().selectPosition(pitch);
    }

    public void setVZUp() {
        SimpleNode el = UpdateNodeTask.getInstance().getLastCurrent();
        if (el == null || el.id != ParserTreeConstants.JJTPITCH) {
            return;
        }
        ASTPitch pitch = (ASTPitch) el;
        NoteEditor ed = NoteEditor.create(pitch);
        ASTDocument sc = (ASTDocument) el.getParentContext().getContext(ASTContext.TYPE_DOCUMENT);
        try {
            int vz[] = sc.language.fromNoteName(ed.pitch.notename);
            ed.pitch.notename = sc.language.toNoteName(vz[0], vz[1] + 1);
            pitch.noteSignature++;
            ((PitchLayout) pitch.getlayoutObject()).signatureToPaint = ((PitchLayout) pitch.getlayoutObject()).signatureToPaint + 1;
View Full Code Here

            ex.printStackTrace();
        }
    }

    public void setVZDown() {
        SimpleNode el = UpdateNodeTask.getInstance().getLastCurrent();
        if (el == null || el.id != ParserTreeConstants.JJTPITCH) {
            return;
        }
        ASTPitch pitch = (ASTPitch) el;
        NoteEditor ed = NoteEditor.create(pitch);
        ASTDocument sc = (ASTDocument) el.getParentContext().getContext(ASTContext.TYPE_DOCUMENT);
        try {
            int vz[] = sc.language.fromNoteName(ed.pitch.notename);
            ed.pitch.notename = sc.language.toNoteName(vz[0], vz[1] - 1);
            pitch.noteSignature--;
            ((PitchLayout) pitch.getlayoutObject()).signatureToPaint = ((PitchLayout) pitch.getlayoutObject()).signatureToPaint - 1;
View Full Code Here

            ex.printStackTrace();
        }
    }

    public void noteEinfuegen(int note, boolean akkord) {
        SimpleNode el = UpdateNodeTask.getInstance().getLastCurrent();
        if (el == null) {
            return;
        }


        SimpleNode pitch = el;
        while (pitch != null && pitch.id != ParserTreeConstants.JJTPITCH) {
            pitch = getPrev(pitch);
        }
        if (pitch != null) {
            NoteEditor ed = NoteEditor.create((ASTPitch) pitch);
View Full Code Here

//        NoteEditor.create((Note) getMarkierung()).noteEinfuegen(name, true, akkord);
    }

    public void noteEntfernen() {
        SimpleNode el = UpdateNodeTask.getInstance().getLastCurrent();
        if (el == null || el.id != ParserTreeConstants.JJTPITCH) {
            return;
        }
        ASTPitch pitch = (ASTPitch) el;
View Full Code Here

    public void keyPressed(java.awt.event.KeyEvent evt) {
        //VK_ müssen in NotenPanel registriert werden
        if (buffer != null) {
            if (evt.getKeyChar() == '\n') {
                SimpleNode el = UpdateNodeTask.getInstance().getLastCurrent();
                if (el == null) {
                    return;
                }
                NetbeansTextEditor.getInstance().insertAfterASTItem(el, buffer, null);
View Full Code Here

            NetbeansTextEditor.getInstance().selectPosition(nd);
        }
    }

    public void insertNewLine(boolean withBreak) {
        SimpleNode el = UpdateNodeTask.getInstance().getLastCurrent();
        if (el == null) {
            return;
        }
        int pos = NetbeansTextEditor.getInstance().getCurrentPosition();

        NetbeansTextEditor.getInstance().insertAfterASTItem(el, (withBreak ? "\\break" : "") + "\r\n   ", false, false, null);
        //NetbeansTextEditor.getInstance().selectPosition(pos + 1, 0);
        ASTTempNode gen = ASTTempNode.create("", el.jjtGetLastToken().endLine + 1, 3, el);
        gen.jjtGetFirstToken().beginColumn++;
        gen.jjtSetParent(el.jjtGetParent());
        gen.setBeattime(el.getBeattime());
        NetbeansTextEditor.getInstance().selectPosition(gen);
    }
View Full Code Here

TOP

Related Classes of org.lilypondbeans.jccparser.SimpleNode

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.