Package org.netbeans.modules.parsing.api

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


    static int getFieldLineNumber(
            FileObject fo,
            final String className,
            final String fieldName) {
        Source source = Source.create(fo);
        if (source == null) {
            return -1;
        }
        final int[] result = new int[]{-1};
View Full Code Here


            FileObject fo,
            final String className,
            final String[] classExcludeNames,
            final String methodName,
            final String methodSignature) {
        Source source = Source.create(fo);
        if (source == null) {
            return new int[]{};
        }
        final List<Integer> result = new ArrayList<Integer>();
View Full Code Here

        FileObject fo = contextDispatcher.getCurrentFile();
        if (fo == null) {
            return null;
        }
        JEditorPane ep = contextDispatcher.getCurrentEditor();
        Source source = Source.create(fo);
        if (source == null) {
            return null;
        }
        final int currentOffset = (ep == null) ? 0 : ep.getCaretPosition();
        final String[] currentMethodPtr = new String[]{null, null, null};
View Full Code Here

        }
        FileObject fo = dataObject.getPrimaryFile();
        if (fo == null) {
            return null;
        }
        Source source = Source.create(fo);
        if (source == null) {
            return "";
        }
        if (!"text/x-scala".equals(fo.getMIMEType())) {
            /** Should return null instead of "" here,
View Full Code Here

            return null;
        }

        // at the following step, do not return null to avoid another EditorContextImpl to process
        final Operation ops[][] = new Operation[1][];
        Source source = Source.create(dataObject.getPrimaryFile());
        if (source == null) {
            return ops[0];
        }
        EditorCookie ec = (EditorCookie) dataObject.getLookup().lookup(EditorCookie.class);
        if (ec == null) {
View Full Code Here

        }
        FileObject fo = dataObject.getPrimaryFile();
        if (fo == null) {
            return null;
        }
        Source source = Source.create(fo);
        if (source == null) {
            return null;
        }
        final MethodArgument args[][] = new MethodArgument[1][];
        try {
View Full Code Here

        }
        FileObject fo = dataObject.getPrimaryFile();
        if (fo == null) {
            return null;
        }
        Source source = Source.create(fo);
        if (source == null) {
            return null;
        }
        EditorCookie ec = (EditorCookie) dataObject.getLookup().lookup(EditorCookie.class);
        if (ec == null) {
View Full Code Here

        }
        FileObject fo = dataObject.getPrimaryFile();
        if (fo == null) {
            return new String[0];
        }
        Source source = Source.create(fo);
        if (source == null) {
            return new String[0];
        }
        final List<String> imports = new ArrayList<String>();
        try {
View Full Code Here

        if (fo == null) {
            return null;
        }
        JEditorPane ep = contextDispatcher.getCurrentEditor();

        Source source = Source.create(fo);
        if (source == null) {
            return null;
        }
        final int currentOffset;
        final String selectedIdentifier;
View Full Code Here

        assert file != null;
        if (unitTestingSupport_fixClasses != null) {
            return unitTestingSupport_fixClasses;
        }
        final String[] classes = new String[]{""}; //NOI18N
        Source source = Source.create(file);
        if (source != null) {
            try {
                ParserManager.parse(Collections.singleton(source), new UserTask() {

                    @Override
View Full Code Here

TOP

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

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.