Package org.netbeans.modules.scala.core.ast

Examples of org.netbeans.modules.scala.core.ast.ScalaRootScope


            try {
                ParserManager.parse(Collections.singleton(source), new UserTask() {

                    @Override
                    public void run(ResultIterator resultIterator) throws Exception {
                        ScalaRootScope rootScope = ((ScalaParserResult) resultIterator.getParserResult()).rootScope();
                        if (rootScope == null) {
                            return;
                        }

                        rootScope.visibleDfns(ElementKind.CLASS);
                        scala.collection.Seq<AstDfn> tmpls = rootScope.visibleDfns(ElementKind.CLASS);
                        if (!tmpls.isEmpty()) {
                            scala.collection.Iterator itr = tmpls.iterator();
                            while (itr.hasNext()) {
                                AstDfn tmpl = (AstDfn) itr.next();
                                if (classes[0].length() > 0) {
View Full Code Here


                        public void run(ResultIterator resultIterator) throws Exception {
                            ScalaParserResult pResult = (ScalaParserResult) resultIterator.getParserResult();
                            if (pResult == null) {
                                return;
                            }
                            ScalaRootScope rootScope = pResult.rootScope();
                            if (rootScope == null) {
                                return;
                            }

                            scala.collection.Seq<AstDfn> objs = null;
                            scala.collection.Iterator<AstDfn> itr = rootScope.visibleDfns(ElementKind.PACKAGE).iterator();
                            while (itr.hasNext()) {
                                AstDfn packaging = itr.next();
                                objs = packaging.bindingScope().visibleDfns(ElementKind.CLASS);
                                break;
                            }
                            if (objs == null) {
                                objs = rootScope.visibleDfns(ElementKind.CLASS);
                            }
                            AstDfn mainClass = null;
                            itr = objs.iterator();
                            while (itr.hasNext()) {
                                AstDfn obj = itr.next();
View Full Code Here

TOP

Related Classes of org.netbeans.modules.scala.core.ast.ScalaRootScope

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.