Package org.netbeans.modules.parsing.api

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


        // 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

     * @return theme name if find the theme, otherwise empty string.
     */
    public static String getThemeName(FileObject main) {
        final Set<String> themes = new HashSet<String>();
        try {
            ParserManager.parse(Collections.singleton(Source.create(main)), new UserTask() {
                @Override
                public void run(ResultIterator resultIterator) throws Exception {
                    if (resultIterator == null) {
                        return;
                    }
View Full Code Here

    }

    protected abstract void scan(PhpModule phpModule, FileObject currentFile, int offset);

    protected void scan(final DefaultVisitor visitor, FileObject targetFile) throws ParseException {
        ParserManager.parse(Collections.singleton(Source.create(targetFile)), new UserTask() {
            @Override
            public void run(ResultIterator resultIterator) throws Exception {
                ParserResult parseResult = (ParserResult) resultIterator.getParserResult();
                visitor.scan(Utils.getRoot(parseResult));
            }
View Full Code Here

TOP

Related Classes of org.netbeans.modules.parsing.api.UserTask

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.