Bug 378691 - [terminal][api] Terminal Preferences should be maintained in the Widget (for font, invert, and buffer)
Summary: [terminal][api] Terminal Preferences should be maintained in the Widget (for ...
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: Terminal (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.4 M7   Edit
Assignee: Martin Oberhuber CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: api
Depends on: 265352
Blocks: 359816 375636
  Show dependency tree
 
Reported: 2012-05-07 11:18 EDT by Martin Oberhuber CLA
Modified: 2012-05-08 02:59 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2012-05-07 11:18:14 EDT
+++ This bug was initially created as a clone of Bug #359816 +++

Build Identifier: 20110916-0149

The TM Terminal Widget has been picked up in a number of independent views (such as the standalone Terminal View, and the RSE Terminals view). Since any UI for Preferences is maintained in each view individually, this either creates duplicate code or some Preferences can not be controlled (see bug 359816).

It would be cleaner to have the Terminal Widget maintain its Preferences UI itself, such that they can be leveraged everywhere easily; but adopters must also be able to create a view with the Terminal Widget, and maintain Preferences (such as the "invert" one) themselves.
Comment 1 Martin Oberhuber CLA 2012-05-07 12:32:56 EDT
This has been done for TM 3.4 M7:

- The Preference page has been moved from o.e.tm.terminal.view into the 
  o.e.tm.terminal widget, along with its listeners. Preference slots have 
  been moved into o.e.tm.terminal, and Preference migration code has been 
  added to pick up respective Preferences from an older workspace, if they 
  exist.

- A new "useCommonPrefs" boolean has been added to 
     TerminalViewControlFactory#makeControl():
  When this is set "true" the Terminal widget will pick up its own 
  Preferences and maintain them. When this is set "false" the client is
  responsible for setting Preferences and listening as before. The default
  behavior is to not pick up Preferences ("standalone mode") for backward
  compatibility.

- The tm.terminal.view and rse terminals have been updated to create their
  terminal widget in a way that it maintains its own Preferences. As a result.
  the RSE Terminal can now react to font changes, color inversion and buffer
  size even in a JEE package (bug 359816).

- Adopters who just want to pick up the terminal widget and don't want to see
  the respective Preference page, can hide the Preference page with a 
  Capability definition:

  <!-- Terminal -->
  <activity id="org.eclipse.tm.terminal.activity"
		description="%activity.tm.terminal.desc"
		name="%activity.tm.terminal" />
  <activityPatternBinding
       activityId="org.eclipse.tm.terminal.activity"
       pattern="org\.eclipse\.tm\.terminal\..*/.*"/>
  <activityPatternBinding
       activityId="org.eclipse.tm.terminal.activity"
       pattern="org\.eclipse\.tm\.terminal/.*"/>