Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364019 - AbstractTable:Add possibility to prevent Ctrl+C
Summary: AbstractTable:Add possibility to prevent Ctrl+C
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Scout (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Daniel Wiehl CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-17 07:25 EST by Beat Schwarzentrub CLA
Modified: 2021-08-19 10:58 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Beat Schwarzentrub CLA 2011-11-17 07:25:28 EST
Build Identifier: 

There has to be a possibility to disable the behaviour of Ctrl+C on tables. A use case for this would be an application with sensitive information (e.g. address data) that should not be allowed to be exported, only to be displayed to the user.

PROPOSED SOLUTION:
- Add a method "String execCopyToClipboard()" (or something similar) to AbstractTable.
- The default implementation calls an utility function that implements the current copy behaviour.
- "return null" does nothing. This can be used to disable the Ctrl+C behaviour only for certain tables.
- The call of "execCopyToClipboard()" is protected by a new Permission. You can then revoke this permission to disable the use of Ctrl+C globally for alle tables.

Reproducible: Always
Comment 1 Daniel Wiehl CLA 2011-11-25 03:46:07 EST
Ticket resolution in progress
Comment 2 Daniel Wiehl CLA 2011-11-28 05:57:03 EST
28.11.2011 dwi
Bugzilla: 364019
Problem:
There has to be a possibility to disable the behaviour of Ctrl+C on tables. A use case for this would be an application
with sensitive information (e.g. address data) that should not be allowed to be exported, only to be displayed to the user.
Solution:
> Added the method 'AbstractTable#execCopy(ITableRow[])' to return a transfer object to be put into the clipboard
> By default, a TextTransferObject is returned with a text/plain and text/html representation of the selected rows.
  That means that if the target understands HTML, the HTML representation is used over the plain-text representation.
> In SWT, added copy support on tables (not implemented yet)
> Added permission 'CopyToClipboardPermission' to enable / disable the copy functionality
Migration Swing:
> So far, the copy functionality was enabled by default. Because protected by a permission, it is disabled by default as of now.
  To enable the CTRL-C behavior on tables, add the permission 'CopyToClipboardPermission' to the permission-set in AbstractAccessControlService#execLoadPermissions
  or directly grant it to specific user roles in your database script.
Migration SWT:
> None because not supported yet. To enable the copy functionality, see migration notes for Swing.
Comment 3 Matthias Zimmermann CLA 2012-07-09 06:49:39 EDT
ticket closed.
deliverd as part of eclipse scout 3.8.0 (juno release train)