コード例 #1
0
 public void AddDiagnostic(ICodeLocation location, Diagnostic d)
 {
     StringBuilder sb = new StringBuilder();
     sb.AppendFormat("{0} - {1} - {2}", d.GetType().Name, location.Text, d.Message);
     lastDiagnostic = sb.ToString();
     Debug.WriteLine(lastDiagnostic);
 }
コード例 #2
0
ファイル: CodeSearchResult.cs プロジェクト: JadeHub/Jade
 public CodeSearchResult(uint rank, ICodeLocation location, int extent)
 {
     Rank = rank;
     Summary = Summary;
     Location = location;
     Extent = extent;
 }
コード例 #3
0
ファイル: CmdLineListener.cs プロジェクト: melbcat/reko
 public void AddDiagnostic(ICodeLocation location, Diagnostic d)
 {
     Console.Out.WriteLine("{0}: {1}: {2}",
         location.Text,
         d.ImageKey,
         d.Message);
 }
コード例 #4
0
 public void Error(ICodeLocation location, Exception ex, string message, params object[] args)
 { 
     Debug.Print("Error: {0}: {1} {2}", 
         location, 
         string.Format(message, args),
         ex.Message);
 }
コード例 #5
0
ファイル: Reference.cs プロジェクト: JadeHub/Jade
 public Reference(Cursor c, IDeclaration decl, ISymbolTable table)
 {
     _cursor = c;
     _decl = decl;
     _table = table;
     _location = new CodeLocation(c.Extent.Start); //todo - replace for doc tracking
 }
コード例 #6
0
ファイル: FileIndex.cs プロジェクト: JadeHub/LibClangCS
 public LibClang.Cursor GetCursorAt(ICodeLocation location)
 {
     LibClang.Cursor c = _tu.GetCursorAt(location.Path, location.Offset);
     if (c.Kind == CursorKind.NoDeclFound)
         return null;
     return c;
 }
コード例 #7
0
        public FindAllReferencesSearch(IProjectIndex index, ICodeLocation location)
        {
            JadeUtils.ArgChecking.ThrowIfNull(index, "index");
            JadeUtils.ArgChecking.ThrowIfNull(location, "location");

            _projectIndex = index;
            _location = location;
        }
コード例 #8
0
        private void AddDiagnosticImpl(ICodeLocation location, Diagnostic d)
        {
            var li = new ListViewItem();

            li.Text     = location.Text;
            li.Tag      = location;
            li.ImageKey = d.ImageKey;
            li.SubItems.Add(d.Message);
            listView.Items.Add(li);
        }
コード例 #9
0
ファイル: CmdLineListener.cs プロジェクト: melbcat/reko
 public void Error(ICodeLocation location, Exception ex, string message)
 {
     Console.Out.WriteLine("{0}: error: {1}", location.Text, message);
     Console.Out.WriteLine("    {0}", ex.Message);
     while (ex != null)
     {
         Console.Out.WriteLine("    {0}", ex.StackTrace);
         ex = ex.InnerException;
     }
 }
コード例 #10
0
 public void Error(ICodeLocation location, Exception ex, string message)
 {
     Console.Out.WriteLine("{0}: error: {1}", location.Text, message);
     Console.Out.WriteLine("    {0}", ex.Message);
     while (ex != null)
     {
         Console.Out.WriteLine("    {0}", ex.StackTrace);
         ex = ex.InnerException;
     }
 }
コード例 #11
0
ファイル: JumpToBrowser.cs プロジェクト: JadeHub/LibClangCS
        public IEnumerable<ICodeLocation> BrowseFrom(ICodeLocation loc)
        {
            ArgChecking.NotNull(loc, "loc");

            IProjectItem item = _index.FindProjectItem(loc.Path);
            if (item == null)
                yield break;

            foreach (TranslationUnit tu in item.TranslationUnits)
            {
                ICodeLocation result = JumpTo(tu, loc);
                if (result != null)
                    yield return result;
            }
        }
コード例 #12
0
ファイル: DiagnosticsInteractor.cs プロジェクト: relaxar/reko
        public void AddDiagnostic(ICodeLocation location, Diagnostic d)
        {
            if (!listView.IsHandleCreated)
            {
                if (pending == null)
                    pending = new List<KeyValuePair<ICodeLocation, Diagnostic>>();
                pending.Add(new KeyValuePair<ICodeLocation, Diagnostic>(location, d));
                return;
            }

            // This may be called from a worker thread, so we have to be careful to 
            // call the listView on the UI thread.
            listView.Invoke(new Action(() =>
            {
                var li = new ListViewItem();
                li.Text = location.Text;
                li.Tag = location;
                li.ImageKey = d.ImageKey;
                li.SubItems.Add(d.Message);
                listView.Items.Add(li);
            }));
        }
コード例 #13
0
ファイル: DiagnosticsInteractor.cs プロジェクト: xor2003/reko
        public void AddDiagnostic(ICodeLocation location, Diagnostic d)
        {
            if (!listView.IsHandleCreated)
            {
                if (pending == null)
                {
                    pending = new List <KeyValuePair <ICodeLocation, Diagnostic> >();
                }
                pending.Add(new KeyValuePair <ICodeLocation, Diagnostic>(location, d));
                return;
            }

            // This may be called from a worker thread, so we have to be careful to
            // call the listView on the UI thread.
            listView.Invoke(new Action(() =>
            {
                var li      = new ListViewItem();
                li.Text     = location.Text;
                li.Tag      = location;
                li.ImageKey = d.ImageKey;
                li.SubItems.Add(d.Message);
                listView.Items.Add(li);
            }));
        }
コード例 #14
0
 public void Warn(ICodeLocation location, string message)
 {
     Console.Out.WriteLine("{0}: warning: {1}", location.Text, message);
 }
コード例 #15
0
 public void Error(ICodeLocation location, Exception ex, string message)
 {
     Debug.Print("Error: {0}: {1} {2}", location, message, ex.Message);
 }
コード例 #16
0
 public void Error(ICodeLocation location, Exception ex, string message, params object[] args)
 {
     diagnosticSvc.Error(location, ex, message, args);
 }
コード例 #17
0
 public void Warn(ICodeLocation location, string message)
 {
     diagnosticSvc.Warn(location, message);
 }
コード例 #18
0
 public void Error(ICodeLocation location, Exception ex, string message, params object[] args)
 {
     Error(location, ex, string.Format(message, args));
 }
コード例 #19
0
ファイル: DiagnosticsInteractor.cs プロジェクト: xor2003/reko
 public void Warn(ICodeLocation location, string message)
 {
     AddDiagnostic(location, new WarningDiagnostic(message));
 }
コード例 #20
0
 public void Warn(ICodeLocation location, string message, params object[] args)
 {
     diagnosticSvc.Warn(location, message, args);
 }
コード例 #21
0
 public void Warn(ICodeLocation location, string message)
 {
     Debug.Print("Warning: {0}: {1}", location, message);
 }
コード例 #22
0
 public void Warn(ICodeLocation location, string message, params object[] args)
 {
     Debug.Print("{0}: warning: {1}", location, string.Format(message, args));
 }
コード例 #23
0
ファイル: CmdLineListener.cs プロジェクト: relaxar/reko
 public void Error(ICodeLocation location, Exception ex, string message, params object[] args)
 {
     Error(location, ex, string.Format(message, args));
 }
コード例 #24
0
 public void Warn(ICodeLocation location, string message)
 {
     Debug.Print("{0}: warning: {1}", location, message);
 }
コード例 #25
0
 public void Error(ICodeLocation location, Exception ex, string message)
 {
     Debug.Print("{0}: error: {1} {2}", location, message, ex.Message);
     Debug.Print(ex.StackTrace);
 }
コード例 #26
0
 public void Error(ICodeLocation location, string message)
 {
     Debug.Print("{0}: error: {1}", location, message);
 }
コード例 #27
0
ファイル: CmdLineListener.cs プロジェクト: melbcat/reko
 public void Error(ICodeLocation location, string message)
 {
     Console.Out.WriteLine("{0}: error: {1}", location.Text, message);
 }
コード例 #28
0
ファイル: DiagnosticsInteractor.cs プロジェクト: relaxar/reko
 public void Error(ICodeLocation location, Exception ex, string message, params object[] args)
 {
     AddDiagnostic(location, new ErrorDiagnostic(string.Format(message, args), ex));
 }
コード例 #29
0
 public void Info(ICodeLocation location, string message)
 {
     Debug.Print("Info: {0}: {1}", location, message);
 }
コード例 #30
0
ファイル: DiagnosticsInteractor.cs プロジェクト: relaxar/reko
 public void Warn(ICodeLocation location, string message, params object[] args)
 {
     Warn(location, string.Format(message, args));
 }
コード例 #31
0
 public void Error(ICodeLocation location, string message, params object [] args)
 {
     Debug.Print("Error: {0}: {1}", location,
                 string.Format(message, args));
 }
コード例 #32
0
ファイル: DiagnosticsInteractor.cs プロジェクト: relaxar/reko
 public void Error(ICodeLocation location, string message, params object[] args)
 {
     throw new NotImplementedException();
 }
コード例 #33
0
ファイル: DiagnosticsInteractor.cs プロジェクト: xor2003/reko
 public void Error(ICodeLocation location, Exception ex, string message)
 {
     AddDiagnostic(location, new ErrorDiagnostic(message, ex));
 }
コード例 #34
0
 public void Warn(ICodeLocation location, string message)
 {
     diagnosticSvc.Warn(location, message);
 }
コード例 #35
0
ファイル: DiagnosticsInteractor.cs プロジェクト: xor2003/reko
 public void Error(ICodeLocation location, string message, params object[] args)
 {
     throw new NotImplementedException();
 }
コード例 #36
0
 public void Error(ICodeLocation location, Exception ex, string message, params object[] args)
 {
     writer.WriteLine("{0}: error: {1} {2}", location, string.Format(message, args), GetExceptionMessage(ex));
     writer.WriteLine(ex.StackTrace);
 }
コード例 #37
0
 public void Error(ICodeLocation location, string message)
 {
     AddDiagnostic(location, new ErrorDiagnostic(message));
 }
コード例 #38
0
 public void Warn(ICodeLocation location, string message)
 {
     throw new NotImplementedException();
 }
コード例 #39
0
 public void Error(ICodeLocation location, Exception ex, string message)
 {
     diagnosticSvc.Error(location, ex, message);
 }
コード例 #40
0
 public void Warn(ICodeLocation location, string message, params object[] args)
 {
     writer.WriteLine("{0}: warning: {1}", location, string.Format(message, args));
 }
コード例 #41
0
 public void Error(ICodeLocation location, string message)
 {
     Console.Out.WriteLine("{0}: error: {1}", location.Text, message);
 }
コード例 #42
0
 public void Info(ICodeLocation location, string message)
 {
     diagnosticSvc.Inform(location, message);
 }
コード例 #43
0
ファイル: CmdLineListener.cs プロジェクト: melbcat/reko
 public void Warn(ICodeLocation location, string message)
 {
     Console.Out.WriteLine("{0}: warning: {1}", location.Text, message);
 }
コード例 #44
0
 public void Info(ICodeLocation location, string message, params object[] args)
 {
     diagnosticSvc.Inform(location, message, args);
 }
コード例 #45
0
 public void Warn(ICodeLocation location, string message)
 {
     throw new NotImplementedException();
 }
コード例 #46
0
ファイル: DiagnosticsInteractor.cs プロジェクト: melbcat/reko
 public void Warn(ICodeLocation location, string message, params object[] args)
 {
     AddDiagnostic(location, new WarningDiagnostic(string.Format(message, args)));
 }
コード例 #47
0
 public void AddDiagnostic(ICodeLocation location, Diagnostic d)
 {
     throw new NotImplementedException();
 }
コード例 #48
0
 public void Error(ICodeLocation location, Exception ex, string message, params object[] args)
 {
     diagnosticSvc.Error(location, ex, message, args);
 }
コード例 #49
0
 public void Error(ICodeLocation location, string message)
 {
     Debug.Print("Error: {0}: {1}", location, message);
 }
コード例 #50
0
 public void Inform(ICodeLocation location, string message, params object[] args)
 {
     Inform(location, string.Format(message, args));
 }
コード例 #51
0
 public void Error(ICodeLocation location, Exception ex, string message)
 {
     Debug.Print("Error: {0}: {1} {2}", location, message, ex.Message);
 }
コード例 #52
0
 public void Error(ICodeLocation location, Exception ex, string message)
 {
     Debug.Print("{0}: error: {1} {2}", location, message, ex.Message);
     Debug.Print(ex.StackTrace);
 }
コード例 #53
0
 public void Error(ICodeLocation location, Exception ex, string message)
 {
 }
コード例 #54
0
 public void Error(ICodeLocation location, Exception ex, string message, params object[] args)
 {
     Debug.Print("{0}: error: {1} {2}", location, string.Format(message, args), ex.Message);
     Debug.Print(ex.StackTrace);
 }
コード例 #55
0
ファイル: DiagnosticsInteractor.cs プロジェクト: xor2003/reko
 public void Error(ICodeLocation location, Exception ex, string message, params object[] args)
 {
     AddDiagnostic(location, new ErrorDiagnostic(string.Format(message, args), ex));
 }
コード例 #56
0
 public void Warn(ICodeLocation location, string message)
 {
     AddDiagnostic(location, new WarningDiagnostic(message));
 }
コード例 #57
0
ファイル: DiagnosticsInteractor.cs プロジェクト: xor2003/reko
 public void Warn(ICodeLocation location, string message, params object[] args)
 {
     Warn(location, string.Format(message, args));
 }
コード例 #58
0
 public void AddDiagnostic(ICodeLocation location, Diagnostic d)
 {
     throw new NotImplementedException();
 }
コード例 #59
0
 public void Warn(ICodeLocation location, string message, params object[] args)
 {
     diagnosticSvc.Warn(location, message, args);
 }
コード例 #60
0
 public void Error(ICodeLocation location, Exception ex, string message)
 {
     diagnosticSvc.Error(location, ex, message);
 }