Bug 207101 - [logview] Highlight current session
Summary: [logview] Highlight current session
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.4 M4   Edit
Assignee: Jacek Pospychala CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, contributed
Depends on:
Blocks:
 
Reported: 2007-10-22 20:10 EDT by Benjamin Muskalla CLA
Modified: 2007-12-11 16:01 EST (History)
4 users (show)

See Also:
baumanbr: review? (caniszczyk)


Attachments
patch (7.07 KB, patch)
2007-10-23 19:50 EDT, Jacek Pospychala CLA
no flags Details | Diff
bolding current session (3.51 KB, patch)
2007-12-03 18:37 EST, Jacek Pospychala CLA
no flags Details | Diff
mylyn/context/zip (2.47 KB, application/octet-stream)
2007-12-03 18:37 EST, Jacek Pospychala CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Muskalla CLA 2007-10-22 20:10:37 EDT
Thanks Jacek - really nice addition ( bug 202583 ).

But another little nice to have would be something to show which is the current session. Maybe bold it or something like this.
Comment 1 Chris Aniszczyk CLA 2007-10-22 20:12:42 EDT
Can you try to squeeze this one in for M3 Jacek to top off the log view additions?
Comment 2 Chris Aniszczyk CLA 2007-10-23 10:09:14 EDT
tagging bugday
Comment 3 Jacek Pospychala CLA 2007-10-23 19:50:23 EDT
Created attachment 81013 [details]
patch

sorry, I had no time to see how to bold out some text in a table using viewer.
So for start I made that it shows a text like "Current Session" for current session.

Notes to patch:

- until now LogViewLabelProvider was kind of state-less - could have multiple consumers. Now it's stateful, since it has to query the consumer which log session is most recent. (Different consumers could have different items sorted in different ways, so it would be hard to guess which one is first actually)

- i refactored out this neat call: !fInputFile.equals(Platform.getLogFileLocation().toFile()) to LogView.isImportMode() as a couple of places use it.
As a result, EventDetailsDialog has to create his own instance of laber provider, instead of using the one from LogView.

How I tested:
- with imported external file
- with current workbench file
- changing order of table sorting
Comment 4 Chris Aniszczyk CLA 2007-10-24 10:41:31 EDT
This doesn't work properly I think. If you launch Eclipse with existing log entries... you should see "Session" for all of them. Once there's a new log entry, I'm assuming there will be a "Current Session" to reflect the new entries.

There shouldn't be a "Current Session" on sessions that aren't part of say the current running instance :)
Comment 5 Jacek Pospychala CLA 2007-10-24 15:58:09 EDT
ah I see, I'll try to update this later this week.
Comment 6 Chris Aniszczyk CLA 2007-10-25 15:48:01 EDT
Thanks Jacek!
Comment 7 Jacek Pospychala CLA 2007-10-29 05:11:38 EDT
(In reply to comment #4)

Chris, after reading this once again, I think the current patch is ok. With it, new session starts when Eclipse is launched. Any errors/warnings during launch are added to current session, which later shows up in ErrorLog once it's established.

If log is imported, no session is marked as current session.

I am not sure how you tested this patch, but maybe the main issue is bug 207410 - the entries were added to wrong session.

So please review this patch after bug 207410 is finished.
Comment 8 Brian Bauman CLA 2007-11-13 17:44:20 EST
Chris, if you don't have time to review the patch again let me know and I will take a look at it.  Thanks Jacek for your hard work!
Comment 9 Jacek Pospychala CLA 2007-11-15 11:50:51 EST
(In reply to comment #8)
> Chris, if you don't have time to review the patch again let me know and I will
> take a look at it.  Thanks Jacek for your hard work!

Brian, thanks for your attention :) Could we wait with this until bug 207344 is finished? I think it's bigger and will impact implementation of this one...

Comment 10 Brian Bauman CLA 2007-11-15 12:21:35 EST
> Brian, thanks for your attention :) Could we wait with this until bug 207344 is
> finished? I think it's bigger and will impact implementation of this one...

Sure, I am in no rush.  Just let us know when you are ready for us to review the patches :) 

Comment 11 Chris Aniszczyk CLA 2007-12-03 17:21:50 EST
Hey Jacek, how about this one?

How about instead of "Current Session" maybe bolding the font of "Session"?
Comment 12 Jacek Pospychala CLA 2007-12-03 18:37:49 EST
Created attachment 84373 [details]
bolding current session

as you wish :)
Comment 13 Jacek Pospychala CLA 2007-12-03 18:37:54 EST
Created attachment 84374 [details]
mylyn/context/zip
Comment 14 Chris Aniszczyk CLA 2007-12-03 20:57:14 EST
Awesome Jacek, you're my hero of the 3.4M4 release! Thanks!

I like how this looks :)
Comment 15 Brian Bauman CLA 2007-12-11 16:01:53 EST
verified on I20071211-0010