Package org.sodbeans.compiler.api.descriptors

Examples of org.sodbeans.compiler.api.descriptors.CompilerFileDescriptor


     * Tells the class to gather information about the current file from
     * the compiler and display it to the user.
     */
    public void resetModelToCurrentFile() {
        if (fileObjectToOpen != null) {
            CompilerFileDescriptor cfd = compiler.getFileDescriptor(fileObjectToOpen);
            if (cfd != null) {
                AbstractNode root = cfd.getRootNode();
                if (root != null) {
                    mgr.setRootContext(root);
                    ((TreeTableView) jScrollPane1).setRootVisible(false);
                }
            }
View Full Code Here


     * Tells the class to gather information about the current file from
     * the compiler and display it to the user.
     */
    public Node resetModelToCurrentFile() {
        if (currentFileInEditor != null) {
            CompilerFileDescriptor cfd = compiler.getFileDescriptor(currentFileInEditor);
            if (cfd != null) {
                AbstractNode root = cfd.getRootNode();
                if (root != null) {
                    mgr.setRootContext(root);
                    ((BeanTreeView) jScrollPane1).setRootVisible(false);
                }
            }
View Full Code Here

                        JEditorPane[] panes = ec.getOpenedPanes();
                        if (panes.length > 0) {
                            int cursor = panes[0].getCaret().getDot();
                            Line line = NbEditorUtilities.getLine(panes[0].getDocument(), cursor, true);
                            FileObject fo = NbEditorUtilities.getFileObject(panes[0].getDocument());
                            CompilerFileDescriptor cfd = compiler.getFileDescriptor(fo);
                            if (!TODUtils.isTODEnabled()) {
                                compiler.runToCursor(fo, line.getLineNumber());
                            } else {
                                String jvmName = TODCompilerUtils.findJVMClassName(cfd, line.getLineNumber() + 1);
                                TODSessionFactory.getDefault().getActionHandler().runForwardToLine(jvmName, line.getLineNumber() + 1, false);
View Full Code Here

            if (bp instanceof QuorumBreakpoint) {
                QuorumBreakpoint qb = (QuorumBreakpoint)bp;
                Line line = qb.getLine();
                FileObject fo = qb.getFileObject();
                if (compiler != null) {
                    CompilerFileDescriptor fileDescriptor = compiler.getFileDescriptor(fo);
                    int targetLine = line.getLineNumber() + 1;
                    String name = TODCompilerUtils.findJVMClassName(fileDescriptor, targetLine);
                    if (name != null) {
                        QuorumDebuggerUtils.addLineBreakpoint(name, targetLine);
                    }
View Full Code Here

        if (fullyQualifiedClassName.startsWith("quorum/")) {
            // Search project files.
            for (int i = 0; i < projectFiles.length; i++) {
                FileObject file = projectFiles[i];
                if (file.getExt().equals("quorum")) {
                    CompilerFileDescriptor fd = compiler.getFileDescriptor(file);
                    CompilerClassDescriptor cd = fd.getClass(className);
                    if (cd != null && cd.getName().equals(className)) {
                         return file;
                    }
                }
            }
           
            // If we make it here, we found nothing, so check the global scope.
            Iterator<CompilerFileDescriptor> allFiles = compiler.getFileDescriptors();
            while (allFiles.hasNext()) {
                CompilerFileDescriptor fd = allFiles.next();
                CompilerClassDescriptor cd = fd.getClass(className);
               
                if (cd != null && cd.getName().equals(className)) {
                    return FileUtil.toFileObject(fd.getFile());
                }
            } 
        }
       
        // No results
View Full Code Here

                        JEditorPane[] panes = ec.getOpenedPanes();
                        if (panes.length > 0) {
                            int cursor = panes[0].getCaret().getDot();
                            Line line = NbEditorUtilities.getLine(panes[0].getDocument(), cursor, true);
                            FileObject fo = NbEditorUtilities.getFileObject(panes[0].getDocument());
                            CompilerFileDescriptor cfd = compiler.getFileDescriptor(fo);
                            if (!TODUtils.isTODEnabled()) {
                                compiler.runBackToCursor(fo, line.getLineNumber());
                            } else {
                                String jvmName = TODCompilerUtils.findJVMClassName(cfd, line.getLineNumber() + 1);
                                TODSessionFactory.getDefault().getActionHandler().runBackToLine(jvmName, line.getLineNumber() + 1, false);
View Full Code Here

        if (fullyQualifiedClassName.startsWith("quorum/")) {
            // Search project files.
            for (int i = 0; i < projectFiles.length; i++) {
                FileObject file = projectFiles[i];
                if (file.getExt().equals("quorum")) {
                    CompilerFileDescriptor fd = compiler.getFileDescriptor(file);
                    CompilerClassDescriptor cd = fd.getClass(className);
                    if (cd != null && cd.getName().equals(className)) {
                         return file;
                    }
                }
            }
           
            // If we make it here, we found nothing, so check the global scope.
            Iterator<CompilerFileDescriptor> allFiles = compiler.getFileDescriptors();
            while (allFiles.hasNext()) {
                CompilerFileDescriptor fd = allFiles.next();
                CompilerClassDescriptor cd = fd.getClass(className);
               
                if (cd != null && cd.getName().equals(className)) {
                    return FileUtil.toFileObject(fd.getFile());
                }
            } 
        }
       
        // No results
View Full Code Here

        Line line = hb.getLine();


        // Add the new breakpoint in TOD.
        if (TODUtils.isTODEnabled() && compiler != null) {
            CompilerFileDescriptor fileDescriptor = compiler.getFileDescriptor(fo);
            int targetLine = line.getLineNumber() + 1;
            String name = TODCompilerUtils.findJVMClassName(fileDescriptor, targetLine);
            if (name != null) {
                QuorumDebuggerUtils.addLineBreakpoint(name, targetLine);
            }
View Full Code Here

        Line line = hb.getLine();
        FileObject fo = hb.getFileObject();
       
        // Remove the breakpoint in TOD.
        if (TODUtils.isTODEnabled() && compiler != null) {
            CompilerFileDescriptor fileDescriptor = compiler.getFileDescriptor(fo);
            int targetLine = line.getLineNumber() + 1;
            String name = TODCompilerUtils.findJVMClassName(fileDescriptor, targetLine);
            if (name != null) {
                QuorumDebuggerUtils.removeLineBreakpoint(name, targetLine);
            }
View Full Code Here

TOP

Related Classes of org.sodbeans.compiler.api.descriptors.CompilerFileDescriptor

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.