Bug 1047 - Inline error messages make code hard to fix
Summary: Inline error messages make code hard to fix
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: Trunk
Hardware: PC Mac OS
: --- enhancement
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2011-09-25 18:56 UTC by Alan McGovern
Modified: 2011-09-26 05:54 UTC (History)
2 users (show)

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


Attachments
screenshot (307.86 KB, image/png)
2011-09-25 18:56 UTC, Alan McGovern
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 on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Alan McGovern 2011-09-25 18:56:02 UTC
Created attachment 489 [details]
screenshot

There's so much text surrounding the code I've written that it makes it hard to figure out what's wrong and also which lines I need to edit to fix the compilation error.

It'd be nicer if there was some way of displaying the error messages without interfering with the flow of code. I'm just not sure what that way would be. If the problematic line of code was highlighted with red (as it is currently) and then you had to hover to see the message, that might make it easier to follow the flow of code while still making it easy to see why that line doesn't compile.
Comment 1 Mike Krüger 2011-09-26 02:22:48 UTC
It may be that different colors improve that, but I believe that this is the problem with message bubbles. (Xcode shares that too)

However the error messages of mcs are way too long :(

In that case for example would be 'No definition for 'Offset' found.' All other info is just buzz. Error messages should be short, simple & easy to understand and correct - nothing more.

If the error messages would be shorter the room for displaying them in the same line would be there (your screenshot is a good example of the problem).

The hover thing is awful when moving through the code because it makes the code jumping around - sometimes you need more than 1 line to display the error.

Ideally we would've a short error message & a longer one in the tooltip + exact positions of the error ... but may take a while.

@Marek: Can we make the error messages shorter ? (Or having a short/long version?) 
That would help us on IDE level.

@Alaln: The only way to 'fix' that for you is turning off error bubbles :(
Comment 2 Marek Safar 2011-09-26 05:00:24 UTC
About the error messages. I had to change error messages several time because they were too short and didn't explain the problem for casual developers. Also most of the messages contain or must contain full identifier name which means it's impossible to make them short as they rely on code written by user.

I think as it's implemented now message bubbles are poor feature and I personally hate when it insert artificial new line after the error message line.

Cannot you show full error message using transparent overlay box?
Comment 3 Mike Krüger 2011-09-26 05:34:00 UTC
A transparent overlay box won't help then you've text on text. 

Error messages are a good feature when the error messages are short. That sometimes errors need to be longer may be true, but giving developers coding tips is too much. 

In the example from the screenshot it's too much - it's harder to understand what the error is with our messages than with a shorter version. 'No Member 'Name' found.' is very good to understand opposed to the string mcs gives now.

Then the conclusion is: if the messages suck - turn them off, nothing I could fix on monodevelop level. Improving the mcs errors was just a proposal to do something. (I still think it would be cool to have a short error message + description. The description could be shown in the tooltip or something like that)
Comment 4 Mikayla Hutchinson [MSFT] 2011-09-26 05:45:12 UTC
I think the best solution is to have "summary" and "full" error messages, so we can display the shorter one inline and the longer one in the error message. But I'm not sure how we'd do that in a way that's compatible with csc. Perhaps MD could have a map of common error codes to summary messages?
Comment 5 Mike Krüger 2011-09-26 05:54:26 UTC
no maps of error messages is a bad idea, a mcs option is the only way I can imagine - or just shorten the error messages.

The microsoft compiler has shorter ones.