Bug 218648 - [Error Log] Export Log... always exports the first error
Summary: [Error Log] Export Log... always exports the first error
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M7   Edit
Assignee: Benjamin Cabé CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2008-02-12 11:38 EST by Tomasz Zarna CLA
Modified: 2008-04-15 00:13 EDT (History)
3 users (show)

See Also:


Attachments
Patch (13.99 KB, patch)
2008-02-27 17:10 EST, Benjamin Cabé CLA
no flags Details | Diff
mylyn/context/zip (1020 bytes, application/octet-stream)
2008-04-15 00:13 EDT, Chris Aniszczyk CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Zarna CLA 2008-02-12 11:38:51 EST
Build: I20080207-1530

It doesn't matter which entry I select in the Error Log, the exported one is always the first one.
Comment 1 Chris Aniszczyk CLA 2008-02-12 11:48:45 EST
oh interesting
Comment 2 Benjamin Cabé CLA 2008-02-12 11:58:04 EST
I can't reproduce :/
What are the exact steps to reproduce ?
Comment 3 Tomasz Zarna CLA 2008-02-13 04:01:55 EST
I'm sorry, it's my fault. I misunderstood purpose of the action. I though it's meant to export only a selected entry, instead it always exports whole Error Log's content (ie all errors, warnings etc).

Why don't we convert the bug into an enhancement request then? :)
Comment 4 Benjamin Cabé CLA 2008-02-13 04:52:39 EST
Sounds like a good idea!
Comment 5 Jacek Pospychala CLA 2008-02-13 05:04:18 EST
(In reply to comment #3)
> I'm sorry, it's my fault. I misunderstood purpose of the action. I though it's
> meant to export only a selected entry, instead it always exports whole Error
> Log's content (ie all errors, warnings etc).
> 
> Why don't we convert the bug into an enhancement request then? :)
> 


you can use "Copy" action to copy just a selected entry.
Would that be fine?
Comment 6 Tomasz Zarna CLA 2008-02-13 05:21:26 EST
(In reply to comment #5)
> you can use "Copy" action to copy just a selected entry.
> Would that be fine?

Sure, but that's not my point. My intention was to export a single error to a file.
Comment 7 Jacek Pospychala CLA 2008-02-13 06:09:00 EST
(In reply to comment #6)
> Sure, but that's not my point. My intention was to export a single error to a
> file.

hm ok, then both options (Copy and Export) would be more consistent as Copy follows selection whereas Export not.
Export could then export only single entry or only a session depending on selection.
And we'd need a separate option to export whole log. Maybe in toolbar?
So context menu would refer to selected elements and toolbar to whole log file.

sounds fine?
Ben how about a patch? :)


Comment 8 Benjamin Cabé CLA 2008-02-13 06:28:34 EST
(In reply to comment #7)
> (In reply to comment #6)
> > Sure, but that's not my point. My intention was to export a single error to a
> > file.
> 
> hm ok, then both options (Copy and Export) would be more consistent as Copy
> follows selection whereas Export not.
> Export could then export only single entry or only a session depending on
> selection.
> And we'd need a separate option to export whole log. Maybe in toolbar?
> So context menu would refer to selected elements and toolbar to whole log file.
> 
> sounds fine?

So, no more "Export log..." entry in the contextual menu and we replace this entry with an "Export log entry..." (or only "Export..."; just under "Copy"?) ?
The "Export log" in the toolbar just remains unchanged since it currently has the expected behaviour.

> Ben how about a patch? :)
> 

Yap :)
Comment 9 Benjamin Cabé CLA 2008-02-13 06:39:02 EST
Perhaps multiselection could be enabled in the log? When multiple items are selected, the "show event detail" action is disabled (or it's still enabled but it shows the first element of the selection) ; and the "export" entry exports all events (top level elements and their children? or exactly what was selected?) in the file.
Comment 10 Jacek Pospychala CLA 2008-02-13 08:08:39 EST
(In reply to comment #8)
> So, no more "Export log..." entry in the contextual menu and we replace this
> entry with an "Export log entry..." (or only "Export..."; just under "Copy"?) ?
> The "Export log" in the toolbar just remains unchanged since it currently has
> the expected behaviour.

yes I think the same :)
Comment 11 Jacek Pospychala CLA 2008-02-13 08:16:55 EST
(In reply to comment #9)
> Perhaps multiselection could be enabled in the log? When multiple items are
> selected, the "show event detail" action is disabled (or it's still enabled but
> it shows the first element of the selection) ; and the "export" entry exports
> all events (top level elements and their children? or exactly what was
> selected?) in the file.

that idea popped somewhere earlier (bug 216657), to repeat Chris words: I don't think people have died from only being able to select one thing. :)

Also drag and drop would have to be supported. But if that's fine, please create a separate bug and go for it :)

Comment 12 Benjamin Cabé CLA 2008-02-13 18:18:12 EST
(In reply to comment #3)
> I'm sorry, it's my fault. I misunderstood purpose of the action. I though it's
> meant to export only a selected entry, instead it always exports whole Error
> Log's content (ie all errors, warnings etc).
> 
> Why don't we convert the bug into an enhancement request then? :)
> 


Thomas, do you expect the "export log entry" feature to store in a file the string you obtain when performing a "copy", or an "!ENTRY ..... !SUBENTRY ....." etc. string ?

Same question when exporting a session : should we save in a file a chunk of the whole log file representing the session, or a sequence of "copy-like" strings.

Personnaly I vote for having an "export entry/session" feature that would export chunks of the whole log file ... And, perhaps, even when exporting one single entry, the "!SESSION........" header should/could be stored in the exported file as well.
Comment 13 Tomasz Zarna CLA 2008-02-19 10:19:44 EST
(In reply to comment #12)
> Personnaly I vote for having an "export entry/session" feature that would
> export chunks of the whole log file ... And, perhaps, even when exporting one
> single entry, the "!SESSION........" header should/could be stored in the
> exported file as well.

I totally agree. That's what I would like to get too.

Comment 14 Benjamin Cabé CLA 2008-02-19 10:34:26 EST
OK, so let's go!
I have already done the most part of the patch.
Comment 15 Jacek Pospychala CLA 2008-02-27 13:21:42 EST
Ben, how is the patch? Anything I can help you?
Comment 16 Benjamin Cabé CLA 2008-02-27 17:10:28 EST
Created attachment 90937 [details]
Patch

What this patch provides and not provides:

- the "export log entry" action is launchable on *any* entry in the error log (read: for both Groups and LogEntries)
- it allows to store  in a file the same string that is obtained doing a CTRL+C (and not an excerpt of the .log file contrary to what I annouced before... in fact it would have been really tricky to do so)
- for groups ("session", "plugin", ...), we export every child of the group   (/!\ the copy action on a group will now copy every child into clipboard since it's the same code which is used both to copy to clipboard and export to a file)
Comment 17 Chris Aniszczyk CLA 2008-04-15 00:11:54 EDT
evaluating...
Comment 18 Chris Aniszczyk CLA 2008-04-15 00:13:47 EDT
done...

I made some minor changes to wording and placement of menus.
Comment 19 Chris Aniszczyk CLA 2008-04-15 00:13:52 EDT
Created attachment 96033 [details]
mylyn/context/zip