Examples of UserTask


Examples of org.netbeans.modules.parsing.api.UserTask

        }
        try {
            final int offset = NbDocument.findLineOffset(doc, lineNumber - 1);
            final String[] result = new String[]{""};

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

                @Override
                public void run(ResultIterator ri) throws Exception {
                    ScalaParserResult pResult = (ScalaParserResult) ri.getParserResult(offset);
                    String clzFqn = ScalaSourceUtil.getBinaryClassName(pResult, lineNumber);
View Full Code Here

Examples of org.netbeans.modules.parsing.api.UserTask

            ErrorManager.getDefault().notify(ex);
            return ops[0];
        }
        final int offset = findLineOffset(doc, (int) lineNumber);
        try {
            ParserManager.parse(Collections.singleton(source), new UserTask() {

                @Override
                public void run(ResultIterator resultIterator) throws Exception {
//                    AstScope scope = ci.getTreeUtilities().scopeFor(offset);
//                    Element method = scope.getEnclosingMethod();
View Full Code Here

Examples of org.netbeans.modules.parsing.api.UserTask

        if (source == null) {
            return null;
        }
        final MethodArgument args[][] = new MethodArgument[1][];
        try {
            ParserManager.parse(Collections.singleton(source), new UserTask() {

                @Override
                public void run(ResultIterator resultIterator) throws Exception {
                    int offset = operation.getMethodEndPosition().getOffset();
//                    AstScope scope = ci.getTreeUtilities().scopeFor(offset);
View Full Code Here

Examples of org.netbeans.modules.parsing.api.UserTask

            return null;
        }
        final int offset = findLineOffset(doc, methodLineNumber);
        final MethodArgument args[][] = new MethodArgument[1][];
        try {
            ParserManager.parse(Collections.singleton(source), new UserTask() {

                @Override
                public void run(ResultIterator resultIterator) throws Exception {
//                    AstScope scope = ci.getTreeUtilities().scopeFor(offset);
//                    Element clazz = scope.getEnclosingClass();
View Full Code Here

Examples of org.netbeans.modules.parsing.api.UserTask

        if (source == null) {
            return new String[0];
        }
        final List<String> imports = new ArrayList<String>();
        try {
            ParserManager.parse(Collections.singleton(source), new UserTask() {

                @Override
                public void run(ResultIterator resultIterator) throws Exception {
//                    List importDecl = ci.getCompilationUnit().getImports();
//                    int i = 0;
View Full Code Here

Examples of org.netbeans.modules.parsing.api.UserTask

        }
        final String[] classes = new String[]{""}; //NOI18N
        Source source = Source.create(file);
        if (source != null) {
            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) {
View Full Code Here

Examples of org.netbeans.modules.parsing.api.UserTask

                    if (mainClassFo == null) {
                        return;
                    }
                    Source source = Source.create(mainClassFo);
                    final FileObject sourceFo = mainClassFo;
                    ParserManager.parse(Collections.singleton(source), new UserTask() {

                        @Override
                        public void run(ResultIterator resultIterator) throws Exception {
                            ScalaParserResult pResult = (ScalaParserResult) resultIterator.getParserResult();
                            if (pResult == null) {
View Full Code Here

Examples of org.netbeans.modules.parsing.api.UserTask

            return Collections.emptySet();
        }
        final HashSet<PhpVariable> phpVariables = new HashSet<PhpVariable>();

        try {
            ParserManager.parse(Collections.singleton(Source.create(controller)), new UserTask() {
                @Override
                public void run(ResultIterator resultIterator) throws Exception {
                    ParserResult parserResult = (ParserResult) resultIterator.getParserResult();
                    final YiiControllerVisitor controllerVisitor = new YiiControllerVisitor(view);
                    controllerVisitor.scan(Utils.getRoot(parserResult));
View Full Code Here

Examples of org.netbeans.modules.parsing.api.UserTask

            if (messageFile != null) {
                // click second parameter
                if (!StringUtils.isEmpty(messageKey)) {
                    // get offset for massage
                    try {
                        ParserManager.parse(Collections.singleton(Source.create(messageFile)), new UserTask() {
                            @Override
                            public void run(ResultIterator resultIterator) throws Exception {
                                ParserResult parseResult = (ParserResult) resultIterator.getParserResult();
                                if (parseResult == null) {
                                    return;
View Full Code Here

Examples of org.netbeans.modules.parsing.api.UserTask

        // when more parameters exist
        final String methodName = getMethodName(element);
        final List<FormalParameter> params = new ArrayList<FormalParameter>();
        try {
            ParserManager.parse(Collections.singleton(Source.create(document)), new UserTask() {
                @Override
                public void run(ResultIterator resultIterator) throws Exception {
                    if (resultIterator == null) {
                        return;
                    }
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.