Browse Source

When adding an assembly reference, check if the code-completion information needs to be refreshed.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3472 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 18 years ago
parent
commit
7d4c78a8a9
  1. 4
      src/AddIns/BackendBindings/CSharpBinding/Project/Resources/MyNamespaceSupportForCSharp.cs
  2. 5
      src/Main/Base/Project/Src/Services/ParserService/ParseProjectContent.cs

4
src/AddIns/BackendBindings/CSharpBinding/Project/Resources/MyNamespaceSupportForCSharp.cs

@ -75,7 +75,7 @@ namespace MyNamespace
isCreating = true; isCreating = true;
try { try {
instance = new T(); instance = new T();
} catch (Exception ex) { } catch (System.Reflection.TargetInvocationException ex) {
throw new InvalidOperationException(Utils.GetResourceString("WinForms_SeeInnerException", new string[] { ex.InnerException.Message }), ex.InnerException); throw new InvalidOperationException(Utils.GetResourceString("WinForms_SeeInnerException", new string[] { ex.InnerException.Message }), ex.InnerException);
} finally { } finally {
isCreating = false; isCreating = false;
@ -106,7 +106,7 @@ namespace MyNamespace
[STAThread] [STAThread]
public static void Main(string[] args) public static void Main(string[] args)
{ {
Application.SetCompatibleTextRenderingDefault(WindowsFormsApplicationBase.UseCompatibleTextRendering); Application.SetCompatibleTextRenderingDefault(UseCompatibleTextRendering);
MyProject.Application.Run(args); MyProject.Application.Run(args);
} }
} }

5
src/Main/Base/Project/Src/Services/ParserService/ParseProjectContent.cs

@ -106,6 +106,11 @@ namespace ICSharpCode.SharpDevelop
UpdateReferenceInterDependencies(); UpdateReferenceInterDependencies();
} }
OnReferencedContentsChanged(EventArgs.Empty); OnReferencedContentsChanged(EventArgs.Empty);
// Refresh the reference if required.
// If the user removes the reference and then re-adds it, there might be other references
// in the project depending on it, so we do the refresh after the old reference was added.
ParserService.RefreshProjectContentForReference(reference);
} catch (Exception e) { } catch (Exception e) {
MessageService.ShowError(e); MessageService.ShowError(e);
} }

Loading…
Cancel
Save