Package org.sodbeans.compiler.api.descriptors

Examples of org.sodbeans.compiler.api.descriptors.CompilerErrorDescriptorNode$LocationProperty


    public boolean hasNext() {
        return errors.hasNext();
    }

    public CompilerErrorDescriptor next() {
        CompilerErrorDescriptorNode var = new CompilerErrorDescriptorNode(Children.LEAF);
        CompilerError obj = errors.next();
        var.setCompilerError(obj);
        return var;
    }
View Full Code Here


     * Get the selected error in the output window.
     * @return Compiler error descriptor node
     */
    public CompilerErrorDescriptorNode getSelectedErrorNode() {
        Node[] nodes = mgr.getSelectedNodes();
        CompilerErrorDescriptorNode error = null;
        if (nodes != null) {
            if (nodes.length != 0) {
                if (nodes[0] instanceof CompilerErrorDescriptorNode) {
                    error = (CompilerErrorDescriptorNode) nodes[0];
                }
View Full Code Here

        }
    }

    public void returnHandler() {
        int lineNumber = 0;
        CompilerErrorDescriptorNode n = getSelectedErrorNode();

        if (n == null) {
            return;
        }


        File fileToOpen = new File(n.getAbsolutePath()); //pass absolute path to the file you want
        fileObjectToOpen = FileUtil.toFileObject(fileToOpen);

        try {



            DataObject dob = DataObject.find(fileObjectToOpen);

            //Bug fix: now actually make sure it's open in the editor
            openEditor(dob);

            EditorCookie ck = dob.getCookie(EditorCookie.class);
            if (ck != null) {
                ck.openDocument();
                JEditorPane[] p = ck.getOpenedPanes();
                if (p.length > 0) {
                    //Need to do this since we're disabling the window system's
                    //auto focus mechanism
                    p[0].requestFocus();
                    if (dob != null) {
                        LineCookie lc = dob.getCookie(LineCookie.class);
                        if (lc == null) {
                            return;
                        }
                        lineNumber = n.getLine() - 1;
                        Line l = lc.getLineSet().getOriginal(lineNumber);
                        l.show(Line.ShowOpenType.OPEN, Line.ShowVisibilityType.FOCUS);
                       
                        if (TextToSpeechOptions.isScreenReading()) {
                            speech.speak("Focussed to " + fileObjectToOpen.getName()
                                    + " dot " + fileObjectToOpen.getExt() + " "
                                    + n.getShortDescription() + " " + n.getDisplayName(),
                                    SpeechPriority.MEDIUM);
                        }
                    }
                }
            }
View Full Code Here

TOP

Related Classes of org.sodbeans.compiler.api.descriptors.CompilerErrorDescriptorNode$LocationProperty

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.