Bug 20106 - Code Completion Generates Error - Perhaps like #5613
Summary: Code Completion Generates Error - Perhaps like #5613
Status: CONFIRMED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: ASP.Net ()
Version: 5.0
Hardware: Macintosh Mac OS
: Lowest normal
Target Milestone: master
Assignee: Matt Ward
URL:
: 7168 27521 ()
Depends on:
Blocks:
 
Reported: 2014-05-28 17:33 UTC by Simon
Modified: 2015-09-18 11:29 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Screenshot of error (297.63 KB, image/png)
2014-05-28 17:33 UTC, Simon
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 20106 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Simon 2014-05-28 17:33:07 UTC
Created attachment 6899 [details]
Screenshot of error

Selecting the suggested method name from the pop-up when creating a new event (onclick="....) generates an error message and the method is not added to the code-behind.

Tested today in 5.0, but has been happening in previous version.

Error message is:

An error has occurred

Error is text editor extension chain.

System.NotImplementedException: The requested feature is not implemented.
  at Microsoft.CSharp.CSharpCodeProvider.GenerateCodeFromMember (System.CodeDom.CodeTypeMember member, System.IO.TextWriter writer, System.CodeDom.Compiler.CodeGeneratorOptions options) [0x00000] in /Volumes/build-root-ramdisk/mono-3.4.0/mcs/class/System/Microsoft.CSharp/CSharpCodeProvider.cs:94 
  at MonoDevelop.Ide.TypeSystem.CodeGenerationService.AddCodeDomMember (MonoDevelop.Projects.Project project, IUnresolvedTypeDefinition type, System.CodeDom.CodeTypeMember newMember) [0x000db] in /Users/builder/data/lanes/886/bcd66920/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/CodeGenerationService.cs:69 
  at MonoDevelop.DesignerSupport.BindingService.AddMemberToClass (MonoDevelop.Projects.Project project, ITypeDefinition cls, IUnresolvedTypeDefinition specificPartToAffect, System.CodeDom.CodeTypeMember member, Boolean throwIfExists) [0x0006e] in /Users/builder/data/lanes/886/bcd66920/source/monodevelop/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/BindingService.cs:174 
  at MonoDevelop.AspNet.Parser.SuggestedHandlerCompletionData.InsertCompletionText (MonoDevelop.Ide.CodeCompletion.CompletionListWindow window, MonoDevelop.Ide.CodeCompletion.KeyActions& ka, Key closeChar, Char keyChar, ModifierType modifier) [0x0009f] in /Users/builder/data/lanes/886/bcd66920/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Parser/SuggestedHandlerCompletionData.cs:90 
  at MonoDevelop.Ide.CodeCompletion.CompletionListWindow.CompleteWord (MonoDevelop.Ide.CodeCompletion.KeyActions& ka, Key closeChar, Char keyChar, ModifierType modifier) [0x00050] in /Users/builder/data/lanes/886/bcd66920/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionListWindow.cs:449 
  at MonoDevelop.Ide.CodeCompletion.CompletionListWindow.PreProcessKeyEvent (Key key, Char keyChar, ModifierType modifier) [0x00096] in /Users/builder/data/lanes/886/bcd66920/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionListWindow.cs:234 
  at MonoDevelop.Ide.CodeCompletion.CompletionWindowManager.PreProcessKeyEvent (Key key, Char keyChar, ModifierType modifier) [0x00048] in /Users/builder/data/lanes/886/bcd66920/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/CompletionWindowManager.cs:144 
  at MonoDevelop.Ide.Gui.Content.CompletionTextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00010] in /Users/builder/data/lanes/886/bcd66920/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/CompletionTextEditorExtension.cs:94 
  at MonoDevelop.XmlEditor.Gui.BaseXmlEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x0011d] in /Users/builder/data/lanes/886/bcd66920/source/monodevelop/main/src/addins/MonoDevelop.XmlEditor/MonoDevelop.XmlEditor.Gui/BaseXmlEditorExtension.cs:203 
  at MonoDevelop.AspNet.Gui.AspNetEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x0003a] in /Users/builder/data/lanes/886/bcd66920/source/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/AspNetEditorExtension.cs:295 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00022] in /Users/builder/data/lanes/886/bcd66920/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:109 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00022] in /Users/builder/data/lanes/886/bcd66920/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:109 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00022] in /Users/builder/data/lanes/886/bcd66920/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:109 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00022] in /Users/builder/data/lanes/886/bcd66920/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:109 
  at MonoDevelop.Debugger.ExceptionCaughtTextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x0006a] in /Users/builder/data/lanes/886/bcd66920/source/monodevelop/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger/ExceptionCaughtDialog.cs:775 
  at MonoDevelop.Ide.Gui.Content.TextEditorExtension.KeyPress (Key key, Char keyChar, ModifierType modifier) [0x00022] in /Users/builder/data/lanes/886/bcd66920/source/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs:109 
  at MonoDevelop.SourceEditor.ExtensibleTextEditor.ExtensionKeyPress (Key key, UInt32 ch, ModifierType state) [0x00013] in /Users/builder/data/lanes/886/bcd66920/source/monodevelop/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor/ExtensibleTextEditor.cs:259
Comment 1 Mike Krüger 2014-05-30 05:17:05 UTC
@MHutch: Seems that mono regressed in the CodeDom APIs or that this was only implemented & tested on Windows.

My quick fix would just be to take out line 682:

list.Add (
new SuggestedHandlerCompletionData (project, domMethod, codeBehindClass,
MonoDevelop.DesignerSupport.CodeBehind.GetNonDesignerClass (codeBehindClass))
);

in

monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/AspNetEditorExtension.cs

But that would break something I suppose. It's the question what to do with our ASP.NET support.
Comment 2 Matt Ward 2015-09-17 09:16:51 UTC
*** Bug 27521 has been marked as a duplicate of this bug. ***
Comment 3 Matt Ward 2015-09-17 09:22:32 UTC
Maybe this can be looked at on the roslyn branch.
Comment 4 Matt Ward 2015-09-18 11:29:14 UTC
*** Bug 7168 has been marked as a duplicate of this bug. ***