heal-research / HeuristicLab

HeuristicLab - An environment for heuristic and evolutionary optimization
https://dev.heuristiclab.com
GNU General Public License v3.0
39 stars 16 forks source link

Code editor throws exceptions in some cases related to intellisense #1826

Closed HeuristicLab-Trac-Bot closed 12 years ago

HeuristicLab-Trac-Bot commented 12 years ago

Issue migrated from trac ticket # 1826

milestone: HeuristicLab 3.3.7 | component: CodeEditor | priority: medium | resolution: done

2012-04-14 13:13:38: @abeham created the issue


When adding a new programmable operator and viewing the code, howevering over the as keyword throws following exception:

System.NullReferenceException: Object reference not set to an instance of an object.
   at ICSharpCode.SharpDevelop.Dom.CtrlSpaceResolveHelper.GetResultFromDeclarationLine(IClass callingClass, IMethodOrProperty callingMember, Int32 caretLine, Int32 caretColumn, ExpressionResult expressionResult)
   at ICSharpCode.SharpDevelop.Dom.NRefactoryResolver.NRefactoryResolver.Resolve(ExpressionResult expressionResult, ParseInformation parseInfo, String fileContent)
   at HeuristicLab.CodeEditor.ToolTipProvider.OnToolTipRequest(Object sender, ToolTipRequestEventArgs e)
   at ICSharpCode.TextEditor.ToolTipRequestEventHandler.Invoke(Object sender, ToolTipRequestEventArgs e)
   at ICSharpCode.TextEditor.TextArea.RequestToolTip(Point mousePos)
   at ICSharpCode.TextEditor.TextArea.OnMouseHover(EventArgs e)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
HeuristicLab-Trac-Bot commented 12 years ago

2012-04-22 18:37:43: @epitzer changed status from new to accepted

HeuristicLab-Trac-Bot commented 12 years ago

2012-04-22 18:39:54: @epitzer commented


r7746 check for null expression before resolving symbol for tool tip information

HeuristicLab-Trac-Bot commented 12 years ago

2012-04-22 18:40:11: @epitzer changed owner from @epitzer to @abeham

HeuristicLab-Trac-Bot commented 12 years ago

2012-04-22 18:40:11: @epitzer changed status from accepted to reviewing

HeuristicLab-Trac-Bot commented 12 years ago

2012-05-15 09:56:57: @abeham commented


Thanks for fixing this. I received another exception when intellisense wants to pop up after typing a "." on an enumerable of an anonymous type. To reproduce paste the following code into a programmable operator.

#!csharp
var myEnum # Enumerable.Range(0, 100).Select(x> new { Linear # x, Squaredx*x }).ToArray();

Then try to write e.g. "myEnum.Count();". A NullReferenceException will be thrown once you type the "." at which point the view will become out of sync. You can type further text, but it will show up only when you close and reopen the view. Maybe you can generally prevent the view from going out of sync with the text in case exceptions occur.

HeuristicLab-Trac-Bot commented 12 years ago

2012-05-15 09:56:57: @abeham changed owner from @abeham to @epitzer

HeuristicLab-Trac-Bot commented 12 years ago

2012-05-15 09:56:57: @abeham changed status from reviewing to assigned

HeuristicLab-Trac-Bot commented 12 years ago

2012-05-15 09:57:31: @abeham changed title from Code editor throws exception when howevering over the "as" keyword to Code editor throws exceptions in some cases related to intellisense

HeuristicLab-Trac-Bot commented 12 years ago

2012-05-15 10:00:22: @abeham commented


Btw, I noticed intellisense doesn't work well with anonymous types in general. It doesn't list the properties in the intellisense popup window. Don't know if that would be a lot of effort to fix or is that a sharpdevelop limitation?

HeuristicLab-Trac-Bot commented 12 years ago

2012-06-11 16:10:01: @epitzer commented


r7983 catch exceptions from sharp develop code completion

HeuristicLab-Trac-Bot commented 12 years ago

2012-06-11 16:10:01: @epitzer changed owner from @epitzer to @abeham

HeuristicLab-Trac-Bot commented 12 years ago

2012-06-11 16:10:01: @epitzer changed status from assigned to reviewing

HeuristicLab-Trac-Bot commented 12 years ago

2012-06-24 19:55:14: @abeham commented


I tested it. Thanks for fixing this!

HeuristicLab-Trac-Bot commented 12 years ago

2012-06-24 19:55:14: @abeham changed status from reviewing to readytorelease

HeuristicLab-Trac-Bot commented 12 years ago

2012-07-08 04:29:19: @mkommend removed resolution

HeuristicLab-Trac-Bot commented 12 years ago

2012-07-08 04:29:19: @mkommend changed status from readytorelease to closed