GetPredefinedSymbols() public static method

public static GetPredefinedSymbols ( string fileName, DTE dte ) : IEnumerable
fileName string
dte DTE
return IEnumerable
Example #1
0
        private static ClangAdapter CreateClangAdapter(ITextBuffer buffer)
        {
            ITextDocument document;

            buffer.Properties.TryGetProperty(typeof(ITextDocument), out document);

            var filePath     = document.FilePath;
            var includePaths = AVRStudio.GetIncludePaths(filePath, dte);
            var symbols      = AVRStudio.GetPredefinedSymbols(filePath, dte);

            return(new ClangAdapter(filePath, new List <string>(includePaths), new List <string>(symbols)));
        }
Example #2
0
        private static ClangAdapter CreateClangAdapter(ITextBuffer buffer)
        {
            ITextDocument document;

            if (!buffer.Properties.TryGetProperty(typeof(ITextDocument), out document) || document == null)
            {
                return(null);
            }

            var filePath     = document.FilePath;
            var includePaths = AVRStudio.GetIncludePaths(filePath, dte);
            var symbols      = AVRStudio.GetPredefinedSymbols(filePath, dte);
            var isc99        = AVRStudio.IsC99Enabled(filePath, dte);

            return(new ClangAdapter(filePath, new List <string>(includePaths), new List <string>(symbols), isc99));
        }