Package org.apache.cxf.tools.corba.idlpreprocessor

Examples of org.apache.cxf.tools.corba.idlpreprocessor.DefaultIncludeResolver


        if (!file.exists()) {
            throw new ToolException("IDL file " + file.getName() + " doesn't exist");
        }
        try {
            URL orig = file.toURI().toURL();
            DefaultIncludeResolver includeResolver = getDefaultIncludeResolver(file.getParentFile());
            DefineState defineState = new DefineState(new HashMap<String, String>());
            preprocessor = new IdlPreprocessorReader(orig,
                                                                           location,
                                                                           includeResolver,
                                                                           defineState);
View Full Code Here


            return null;
        }
    }

    private DefaultIncludeResolver getDefaultIncludeResolver(File currentDir) {
        DefaultIncludeResolver includeResolver;
        if (env.optionSet(ToolCorbaConstants.CFG_INCLUDEDIR)) {     
            String[] includedDirs = (String[]) env.get(ToolCorbaConstants.CFG_INCLUDEDIR);
            File[] includeDirs = new File[includedDirs.length];
            for (int i = 0; i < includedDirs.length; i++) {
                includeDirs[i] = new File(includedDirs[i]);
            }
           
            includeResolver = new DefaultIncludeResolver(includeDirs);
        } else {
            includeResolver = new DefaultIncludeResolver(currentDir);
        }
        return includeResolver;
    }
View Full Code Here

        if (!file.exists()) {
            throw new ToolException("IDL file " + file.getName() + " doesn't exist");
        }
        try {
            URL orig = file.toURI().toURL();
            DefaultIncludeResolver includeResolver = getDefaultIncludeResolver(file.getParentFile());
            DefineState defineState = new DefineState(new HashMap<String, String>());
            IdlPreprocessorReader preprocessor = new IdlPreprocessorReader(orig,
                                                                           location,
                                                                           includeResolver,
                                                                           defineState);
View Full Code Here

            return null;
        }
    }

    private DefaultIncludeResolver getDefaultIncludeResolver(File currentDir) {
        DefaultIncludeResolver includeResolver;
        if (env.optionSet(ToolCorbaConstants.CFG_INCLUDEDIR)) {                       
            String includedDirs = env.get(ToolCorbaConstants.CFG_INCLUDEDIR).toString();
            StringTokenizer tok = new StringTokenizer(includedDirs, "");
            File[] includeDirs = new File[tok.countTokens()];
            int i = 0;
            while (tok.hasMoreTokens()) {
                String includeDir = tok.nextToken();
                File infile = new File(includeDir);
                includeDirs[i] = infile;
                i++;
            }
            includeResolver = new DefaultIncludeResolver(includeDirs);
        } else {
            includeResolver = new DefaultIncludeResolver(currentDir);
        }
        return includeResolver;
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.tools.corba.idlpreprocessor.DefaultIncludeResolver

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.