Bug 172483 - [terminal] Secondary terminals cannot be shown in other perspectives
Summary: [terminal] Secondary terminals cannot be shown in other perspectives
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: Terminal (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.0.1   Edit
Assignee: Michael Scharf CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: PII
Depends on:
Blocks: 240016 240023 240542
  Show dependency tree
 
Reported: 2007-02-01 08:53 EST by Michael Scharf CLA
Modified: 2008-07-15 20:04 EDT (History)
4 users (show)

See Also:
uwe.st: pmc_approved+


Attachments
patch (not finished) (33.81 KB, patch)
2008-06-10 00:35 EDT, Michael Scharf CLA
no flags Details | Diff
Pin and Remove works now (43.42 KB, patch)
2008-06-10 01:23 EDT, Michael Scharf CLA
no flags Details | Diff
some more improvements (44.52 KB, patch)
2008-06-10 02:10 EDT, Michael Scharf CLA
no flags Details | Diff
almost done... (54.51 KB, patch)
2008-06-10 13:00 EDT, Michael Scharf CLA
no flags Details | Diff
more improvements (64.01 KB, patch)
2008-06-11 01:05 EDT, Michael Scharf CLA
no flags Details | Diff
The context menu did only work for the first terminal added (70.49 KB, patch)
2008-06-11 17:22 EDT, Michael Scharf CLA
no flags Details | Diff
reading the state from old sessions caused problems (70.62 KB, patch)
2008-06-11 17:35 EDT, Michael Scharf CLA
no flags Details | Diff
A few cosmetic changes and cleanup (74.30 KB, patch)
2008-06-12 23:47 EDT, Michael Scharf CLA
no flags Details | Diff
mylyn/context/zip (42.50 KB, application/octet-stream)
2008-06-12 23:47 EDT, Michael Scharf CLA
no flags Details
A few cosmetic changes after review with Uwe (74.75 KB, patch)
2008-06-13 10:00 EDT, Michael Scharf CLA
no flags Details | Diff
make patch make compatible with head (76.49 KB, patch)
2008-06-24 22:29 EDT, Michael Scharf CLA
no flags Details | Diff
the final patch (77.79 KB, patch)
2008-06-26 13:31 EDT, Michael Scharf CLA
no flags Details | Diff
Patch with updated user docs for the new feature (3.55 KB, patch)
2008-07-15 20:04 EDT, Martin Oberhuber CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Scharf CLA 2007-02-01 08:53:18 EST
- open a terminal view (Window->Show View->Terminal)
- create a 2nd terminal by clicking the "New terminal button"
- go to another perspective (say perspective2)
- open a terminal view (Window->Show View->Terminal)
  The same view as in the first perspective is shown
==> There is no way to get the 2nd terminal view shown in perspective2

The eclipse Console view does not have this problem: from each view all console sessions are accessible.
(see http://www.scharf.gr/eclipse/terminal/MultipleViews/ )

==> The terminal view needs a switch to choose from different sessions....
Comment 1 Martin Oberhuber CLA 2007-10-01 07:57:14 EDT
Bulk update target milestone 2.0.1 -> 3.0
Comment 2 Martin Oberhuber CLA 2007-11-16 15:48:52 EST
CQ:WIND00067056
Comment 3 Michael Scharf CLA 2008-06-10 00:35:19 EDT
Created attachment 104263 [details]
patch (not finished)

This patch shows the direction. Few things do not work yet. Especially saving of the state doesn ot work correctly.

I also want to add a pin so that if the terminal is pinned an new instance gets created.

And a delete action, that removes the current terminal from the list.

And the code needs some more cleanup...

This is a first glimpse of how it could look like...
Comment 4 Michael Scharf CLA 2008-06-10 01:23:31 EDT
Created attachment 104271 [details]
Pin and Remove works now

But the saving of the state and the opening of the settings dialog still has some problems.

The New Terminal button should become a drop down (like in console) with a selection of the connection types.....
Comment 5 Michael Scharf CLA 2008-06-10 02:10:27 EDT
Created attachment 104276 [details]
some more improvements
Comment 6 Martin Oberhuber CLA 2008-06-10 02:50:13 EDT
From initial review:
* Copyright year is wrong (2007, should be 2008) in copyright headers
* Icon clear_co.gif is obsolete, nowhere used, should be removed
* After playing around a little, the "pin" button didnt work any more
* Did you write all new code yourself, or copy some from Platform Console
  (or similar)? If yes, you MUST give credit to original authors in Copyright
  headers. I notice that you did so for the ShowConsoleAction (should that
  one be renamed?), did you copy any other code?

* I find the placement of the "Remove Terminal" button confusing. I know that
  it's consistent with what the Console does, but I'd find it more easy to
  understand if the "Remove Terminal" button were next to the "New Terminal"
  button.
  Note that in the Console, the "Remove Console" button is really specific to
  each console. SOme have one, some don't. Sometimes it has the meaning of
  "Remove Launch". That's why they cannot put it next to the New console button.

  With Terminals, however, all terminals behave the same, they are all of one
  type, so we can put the remove terminal button next to the new terminal
  button.

* The Terminal View's Tab-Title now always seems to remain the same. Shouldn't
  it switch to the Tab-title set for a connection in the Properties? Also, the
  displayed text in the dropdown for terminals should likely be the user
  configured tab-title (if it is nondefault)?
Comment 7 Michael Scharf CLA 2008-06-10 13:00:58 EDT
Created attachment 104344 [details]
almost done...

* fixed the copyright
* clear_co.gif is removed
* moved remove button right to the new button
* pin button fixed
* input field history is now maintained per connection
* when only one connection is in the view then disable "remove" and  "Display Selected Connections"

TODO:
* title is not set correctly sometimes
Comment 8 Michael Scharf CLA 2008-06-10 13:16:05 EDT
Some more TODOs (for connections not showed at the moment):
- react to the preference change (invert colors) (hmm maybe this could be a per connection option)
- react to font changes
Comment 9 Michael Scharf CLA 2008-06-11 01:05:37 EDT
Created attachment 104426 [details]
more improvements

This patch fixes:
- perfernce change "invert colors" is propagated
- font changes are propagated to all terminals
- context menu is shown for each terminal
- title is maintained for each connection
- summary is updated correctly
Comment 10 Michael Scharf CLA 2008-06-11 17:22:31 EDT
Created attachment 104558 [details]
The context menu did only work for the first terminal added

The ugly solution is to create a decorator for ITerminalViewControl and switch to the current ITerminalViewControl...
Comment 11 Michael Scharf CLA 2008-06-11 17:35:50 EDT
Created attachment 104560 [details]
reading the state from old sessions caused problems
Comment 12 Michael Scharf CLA 2008-06-11 22:39:35 EDT
Here is a demo of the new feature:
  http://scharf.gr/eclipse/terminal/MultipleSessions/
Comment 13 Michael Scharf CLA 2008-06-12 23:47:09 EDT
Created attachment 104803 [details]
A few cosmetic changes and cleanup
Comment 14 Michael Scharf CLA 2008-06-12 23:47:17 EDT
Created attachment 104804 [details]
mylyn/context/zip
Comment 15 Radoslav Gerganov CLA 2008-06-13 05:09:21 EDT
Very good work! I don't have time now to review the source but I played for a
while and it's working realy fine. Just few minor things:
 * When you toggle between the consoles you don't get the friendly names of
each terminal in the list but something like "SSH: user@host". This way if I
have several terminals opened to the same host with the same username, I can't
diffenentiate between them.
 * If you have installed the Terminals Subsystem you will have both "Terminals"
and "Terminal" view when you press Ctrl+3. It is a little bit confusing but
this has nothing to do with this particular bug anyway.

Btw, what software do you use for creating these demos? It's very cool to
describe new features this way.
Comment 16 Michael Scharf CLA 2008-06-13 08:31:18 EDT
Radoslav, my last patch contains already a fix that shows a "user friendly" name. I updated the plugins at
   http://scharf.gr/eclipse/terminal/MultipleSessions/terminal_bug_172483.zip
If you give the terminals different "View Title", then they are shown in the list.

The software I used to create the flash demo 
   http://scharf.gr/eclipse/terminal/MultipleSessions/
is Wink (http://www.debugmode.com/wink/)
Comment 17 Michael Scharf CLA 2008-06-13 10:00:27 EDT
Created attachment 104859 [details]
A few cosmetic changes after review with Uwe

We renamed a few mathods and fielsd and added some comments

Note: the state saved with previous patches attached to this bug is not compatible with this version

A new version of the plugins can be found at:
   http://scharf.gr/eclipse/terminal/MultipleSessions/terminal_bug_172483.zip
Comment 18 Martin Oberhuber CLA 2008-06-24 13:32:30 EDT
Looks like this contribution didn't make it for TM 3.0 but I'd love to see it in 3.0.1. All the terminal stuff is "internal" so it's nominally not an API change; it does, however, add an icon (so screenshots of the Terminal View would look slightly different between TM 3.0.1 and TM 3.0), and it does add some PII:

org.eclipse.tm.terminal.view/ActionMessages.properties

+REMOVE					  = Remove Terminal
+PIN					      = Pin Terminal
+
+ConsoleDropDownAction_0=Select Connection
+ConsoleDropDownAction_1=Display Selected Connections


What do other committers think about adding such a feature to TM 3.0.1 ??
Comment 19 Michael Scharf CLA 2008-06-24 22:06:17 EDT
+1
Comment 20 Michael Scharf CLA 2008-06-24 22:29:41 EDT
Created attachment 105775 [details]
make patch make compatible with head
Comment 21 Michael Scharf CLA 2008-06-26 13:31:42 EDT
Created attachment 105940 [details]
the final patch

also increasing the plugin and featrue version
Comment 22 David Dykstal CLA 2008-07-07 12:10:48 EDT
(In reply to comment #18)

Approval was covered in the last committer meeting, but voting +1 here for the record.
Comment 23 Michael Scharf CLA 2008-07-07 16:38:38 EDT
I committed the changes....
Comment 24 Martin Oberhuber CLA 2008-07-15 20:04:45 EDT
Created attachment 107547 [details]
Patch with updated user docs for the new feature

Attched patch updates the terminal user docs for the new feature.
Patch committed:
[172483][terminal] Update user docs for multi-connection feature