This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 431460 - Improve ModelAssembler error messages
Summary: Improve ModelAssembler error messages
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.4   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.4 M7   Edit
Assignee: Lars Vogel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-28 07:06 EDT by Lars Vogel CLA
Modified: 2014-04-28 13:34 EDT (History)
3 users (show)

See Also:


Attachments
ModelAssembler bundle name in log message (1.76 KB, patch)
2014-04-17 12:53 EDT, Jan Haensli CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2014-03-28 07:06:56 EDT
Currently some logging information of ModelAssembler does not provide in which class/ method the warning occurred.

That makes it hard for people to place a breakpoint in the the code to find issues.
Comment 1 Lars Vogel CLA 2014-03-28 07:08:48 EDT
https://git.eclipse.org/r/24053
Comment 2 Markus Stier CLA 2014-04-14 06:20:44 EDT
In line 282 of ModelAssembler there is 

System.err.println("Replacing"); //$NON-NLS-1$

causing direct writes to the console. This message should be replaced by a log message and better content too.
Comment 3 Jan Haensli CLA 2014-04-17 12:53:48 EDT
Created attachment 242101 [details]
ModelAssembler bundle name in log message

I also miss the bundle's name the error is related to.

Please see my patch which improves the log messages.
Comment 4 Lars Vogel CLA 2014-04-23 18:28:28 EDT
WONTFIX, I'm not sure if that changes really helps.
Comment 5 Jan Haensli CLA 2014-04-24 03:40:27 EDT
The patch above logs the bundle's name that causes problems when processing the model extensions. This *really* helps in production to find out what bundle exactly causes the issues.

I know the patch does not fix all issues mentioned here, but can't we apply the patch to get at least a little bit better logging messages?
Comment 6 Lars Vogel CLA 2014-04-24 12:19:51 EDT
Jan, can you converted your patch to a Gerrit review? Why to you replace contributor.getName() with bundle in your patch? Should we not show both?
Comment 7 Jan Haensli CLA 2014-04-24 15:40:30 EDT
(In reply to Lars Vogel from comment #6)
> Jan, can you converted your patch to a Gerrit review? 
Yes, will try to do that. I have to setup eclipse gerrit & CLA.
(will integrate Markus' suggestion as well)

>Why to you replace contributor.getName() with bundle in your patch? 
- contributor.getName() is the bundle's name.
- contributor.getName() is called multiple times (line 101 & 106).
- Wherever the bundle's name was used, I replaced it with the variable "bundleName" and added it where it makes sense imo.

>Should we not show both?
IContributor does only have a name. I guess you thought it's the bundles contributor. But here, I believe, it's the extension contributor (the bundle)

Cheers Jan
Comment 8 Lars Vogel CLA 2014-04-25 08:47:35 EDT
(In reply to Jan Haensli from comment #7)
> (In reply to Lars Vogel from comment #6)
> > Jan, can you converted your patch to a Gerrit review? 
> Yes, will try to do that. I have to setup eclipse gerrit & CLA.
> (will integrate Markus' suggestion as well)
> 
> >Why to you replace contributor.getName() with bundle in your patch? 
> - contributor.getName() is the bundle's name.
> - contributor.getName() is called multiple times (line 101 & 106).
> - Wherever the bundle's name was used, I replaced it with the variable
> "bundleName" and added it where it makes sense imo.
> 
> >Should we not show both?
> IContributor does only have a name. I guess you thought it's the bundles
> contributor. But here, I believe, it's the extension contributor (the bundle)
> 
> Cheers Jan

Feature freeze is today.
Comment 9 Lars Vogel CLA 2014-04-25 12:41:25 EDT
(In reply to Jan Haensli from comment #7)
> (In reply to Lars Vogel from comment #6)
> > Jan, can you converted your patch to a Gerrit review? 

Due to the time pressure I tried to apply your patch. Unfortunately your patch does not apply and if I copy the modified lines it created syntax errors (bundleName not defined). Please update it onto origin/master.
Comment 11 Jan Haensli CLA 2014-04-25 12:52:43 EDT
Patch was for a wrong branch. Sorry.

I applied the same changes to current branch: https://git.eclipse.org/r/25576
Please review.
Thanks and regards
Jan
Comment 12 Lars Vogel CLA 2014-04-25 14:18:18 EDT
(In reply to Jan Haensli from comment #11)
> Patch was for a wrong branch. Sorry.
> 
> I applied the same changes to current branch: https://git.eclipse.org/r/25576
> Please review.
> Thanks and regards
> Jan

Already did and applied. Thanks a bunch again.
Comment 13 Lars Vogel CLA 2014-04-28 13:34:44 EDT
> (In reply to Jan Haensli from comment #11)

Jan, can you download the nightly and validate the improved error message? Please leave a comment here.