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);
 }
Esempio n. 2
0
 public CodeSearchResult(uint rank, ICodeLocation location, int extent)
 {
     Rank = rank;
     Summary = Summary;
     Location = location;
     Extent = extent;
 }
Esempio n. 3
0
 public void AddDiagnostic(ICodeLocation location, Diagnostic d)
 {
     Console.Out.WriteLine("{0}: {1}: {2}",
         location.Text,
         d.ImageKey,
         d.Message);
 }
Esempio n. 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);
 }
Esempio n. 5
0
 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
 }
Esempio n. 6
0
 public LibClang.Cursor GetCursorAt(ICodeLocation location)
 {
     LibClang.Cursor c = _tu.GetCursorAt(location.Path, location.Offset);
     if (c.Kind == CursorKind.NoDeclFound)
         return null;
     return c;
 }
Esempio n. 7
0
        public FindAllReferencesSearch(IProjectIndex index, ICodeLocation location)
        {
            JadeUtils.ArgChecking.ThrowIfNull(index, "index");
            JadeUtils.ArgChecking.ThrowIfNull(location, "location");

            _projectIndex = index;
            _location = location;
        }
Esempio n. 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);
        }
Esempio n. 9
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;
     }
 }
Esempio n. 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;
     }
 }
Esempio n. 11
0
        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;
            }
        }
Esempio n. 12
0
        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);
            }));
        }
Esempio n. 13
0
        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);
            }));
        }
Esempio n. 14
0
 public void Warn(ICodeLocation location, string message)
 {
     Console.Out.WriteLine("{0}: warning: {1}", location.Text, message);
 }
Esempio n. 15
0
 public void Error(ICodeLocation location, Exception ex, string message)
 {
     Debug.Print("Error: {0}: {1} {2}", location, message, ex.Message);
 }
 public void Error(ICodeLocation location, Exception ex, string message, params object[] args)
 {
     diagnosticSvc.Error(location, ex, message, args);
 }
 public void Warn(ICodeLocation location, string message)
 {
     diagnosticSvc.Warn(location, message);
 }
 public void Error(ICodeLocation location, Exception ex, string message, params object[] args)
 {
     Error(location, ex, string.Format(message, args));
 }
Esempio n. 19
0
 public void Warn(ICodeLocation location, string message)
 {
     AddDiagnostic(location, new WarningDiagnostic(message));
 }
 public void Warn(ICodeLocation location, string message, params object[] args)
 {
     diagnosticSvc.Warn(location, message, args);
 }
Esempio n. 21
0
 public void Warn(ICodeLocation location, string message)
 {
     Debug.Print("Warning: {0}: {1}", location, message);
 }
Esempio n. 22
0
 public void Warn(ICodeLocation location, string message, params object[] args)
 {
     Debug.Print("{0}: warning: {1}", location, string.Format(message, args));
 }
Esempio n. 23
0
 public void Error(ICodeLocation location, Exception ex, string message, params object[] args)
 {
     Error(location, ex, string.Format(message, args));
 }
Esempio n. 24
0
 public void Warn(ICodeLocation location, string message)
 {
     Debug.Print("{0}: warning: {1}", location, message);
 }
Esempio n. 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);
 }
Esempio n. 26
0
 public void Error(ICodeLocation location, string message)
 {
     Debug.Print("{0}: error: {1}", location, message);
 }
Esempio n. 27
0
 public void Error(ICodeLocation location, string message)
 {
     Console.Out.WriteLine("{0}: error: {1}", location.Text, message);
 }
Esempio n. 28
0
 public void Error(ICodeLocation location, Exception ex, string message, params object[] args)
 {
     AddDiagnostic(location, new ErrorDiagnostic(string.Format(message, args), ex));
 }
Esempio n. 29
0
 public void Info(ICodeLocation location, string message)
 {
     Debug.Print("Info: {0}: {1}", location, message);
 }
Esempio n. 30
0
 public void Warn(ICodeLocation location, string message, params object[] args)
 {
     Warn(location, string.Format(message, args));
 }
Esempio n. 31
0
 public void Error(ICodeLocation location, string message, params object [] args)
 {
     Debug.Print("Error: {0}: {1}", location,
                 string.Format(message, args));
 }
Esempio n. 32
0
 public void Error(ICodeLocation location, string message, params object[] args)
 {
     throw new NotImplementedException();
 }
Esempio n. 33
0
 public void Error(ICodeLocation location, Exception ex, string message)
 {
     AddDiagnostic(location, new ErrorDiagnostic(message, ex));
 }
 public void Warn(ICodeLocation location, string message)
 {
     diagnosticSvc.Warn(location, message);
 }
Esempio n. 35
0
 public void Error(ICodeLocation location, string message, params object[] args)
 {
     throw new NotImplementedException();
 }
Esempio n. 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);
 }
Esempio n. 37
0
 public void Error(ICodeLocation location, string message)
 {
     AddDiagnostic(location, new ErrorDiagnostic(message));
 }
Esempio n. 38
0
 public void Warn(ICodeLocation location, string message)
 {
     throw new NotImplementedException();
 }
 public void Error(ICodeLocation location, Exception ex, string message)
 {
     diagnosticSvc.Error(location, ex, message);
 }
Esempio n. 40
0
 public void Warn(ICodeLocation location, string message, params object[] args)
 {
     writer.WriteLine("{0}: warning: {1}", location, string.Format(message, args));
 }
Esempio n. 41
0
 public void Error(ICodeLocation location, string message)
 {
     Console.Out.WriteLine("{0}: error: {1}", location.Text, message);
 }
Esempio n. 42
0
 public void Info(ICodeLocation location, string message)
 {
     diagnosticSvc.Inform(location, message);
 }
Esempio n. 43
0
 public void Warn(ICodeLocation location, string message)
 {
     Console.Out.WriteLine("{0}: warning: {1}", location.Text, message);
 }
Esempio n. 44
0
 public void Info(ICodeLocation location, string message, params object[] args)
 {
     diagnosticSvc.Inform(location, message, args);
 }
Esempio n. 45
0
 public void Warn(ICodeLocation location, string message)
 {
     throw new NotImplementedException();
 }
Esempio n. 46
0
 public void Warn(ICodeLocation location, string message, params object[] args)
 {
     AddDiagnostic(location, new WarningDiagnostic(string.Format(message, args)));
 }
Esempio n. 47
0
 public void AddDiagnostic(ICodeLocation location, Diagnostic d)
 {
     throw new NotImplementedException();
 }
 public void Error(ICodeLocation location, Exception ex, string message, params object[] args)
 {
     diagnosticSvc.Error(location, ex, message, args);
 }
Esempio n. 49
0
 public void Error(ICodeLocation location, string message)
 {
     Debug.Print("Error: {0}: {1}", location, message);
 }
Esempio n. 50
0
 public void Inform(ICodeLocation location, string message, params object[] args)
 {
     Inform(location, string.Format(message, args));
 }
Esempio n. 51
0
 public void Error(ICodeLocation location, Exception ex, string message)
 {
     Debug.Print("Error: {0}: {1} {2}", location, message, ex.Message);
 }
Esempio n. 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);
 }
Esempio n. 53
0
 public void Error(ICodeLocation location, Exception ex, string message)
 {
 }
Esempio n. 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);
 }
Esempio n. 55
0
 public void Error(ICodeLocation location, Exception ex, string message, params object[] args)
 {
     AddDiagnostic(location, new ErrorDiagnostic(string.Format(message, args), ex));
 }
Esempio n. 56
0
 public void Warn(ICodeLocation location, string message)
 {
     AddDiagnostic(location, new WarningDiagnostic(message));
 }
Esempio n. 57
0
 public void Warn(ICodeLocation location, string message, params object[] args)
 {
     Warn(location, string.Format(message, args));
 }
Esempio n. 58
0
 public void AddDiagnostic(ICodeLocation location, Diagnostic d)
 {
     throw new NotImplementedException();
 }
 public void Warn(ICodeLocation location, string message, params object[] args)
 {
     diagnosticSvc.Warn(location, message, args);
 }
 public void Error(ICodeLocation location, Exception ex, string message)
 {
     diagnosticSvc.Error(location, ex, message);
 }