Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 84192 Details for
Bug 56313
[About] No context menu on selectable text in "About" dialog
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch adding a popup menu allowing to copy the selectable text of the dialog.
56313.patch (text/plain), 4.49 KB, created by
Benjamin Cabé
on 2007-11-30 11:29:07 EST
(
hide
)
Description:
Patch adding a popup menu allowing to copy the selectable text of the dialog.
Filename:
MIME Type:
Creator:
Benjamin Cabé
Created:
2007-11-30 11:29:07 EST
Size:
4.49 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.workbench >Index: Eclipse UI/org/eclipse/ui/internal/dialogs/ProductInfoDialog.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ProductInfoDialog.java,v >retrieving revision 1.28 >diff -u -r1.28 ProductInfoDialog.java >--- Eclipse UI/org/eclipse/ui/internal/dialogs/ProductInfoDialog.java 2 Jul 2007 22:56:24 -0000 1.28 >+++ Eclipse UI/org/eclipse/ui/internal/dialogs/ProductInfoDialog.java 30 Nov 2007 16:27:43 -0000 >@@ -24,16 +24,26 @@ > import org.eclipse.swt.SWT; > import org.eclipse.swt.custom.StyleRange; > import org.eclipse.swt.custom.StyledText; >+import org.eclipse.swt.dnd.Clipboard; >+import org.eclipse.swt.dnd.TextTransfer; >+import org.eclipse.swt.dnd.Transfer; > import org.eclipse.swt.events.KeyAdapter; > import org.eclipse.swt.events.KeyEvent; >+import org.eclipse.swt.events.MenuEvent; >+import org.eclipse.swt.events.MenuListener; > import org.eclipse.swt.events.MouseAdapter; > import org.eclipse.swt.events.MouseEvent; > import org.eclipse.swt.events.MouseMoveListener; >+import org.eclipse.swt.events.SelectionAdapter; >+import org.eclipse.swt.events.SelectionEvent; >+import org.eclipse.swt.events.SelectionListener; > import org.eclipse.swt.events.TraverseEvent; > import org.eclipse.swt.events.TraverseListener; > import org.eclipse.swt.graphics.Color; > import org.eclipse.swt.graphics.Cursor; > import org.eclipse.swt.graphics.Point; >+import org.eclipse.swt.widgets.Menu; >+import org.eclipse.swt.widgets.MenuItem; > import org.eclipse.swt.widgets.Shell; > import org.eclipse.ui.PartInitException; > import org.eclipse.ui.PlatformUI; >@@ -207,8 +217,41 @@ > } > } > }); >+ >+ createMenu(styledText); > } > >+ private void createMenu(final StyledText text) { >+ Menu menu = new Menu(text); >+ final MenuItem copyItem = new MenuItem(menu, SWT.PUSH); >+ copyItem.setText(WorkbenchMessages.AboutDialog_copy); >+ >+ SelectionListener listener = new SelectionAdapter() { >+ public void widgetSelected(SelectionEvent e) { >+ if (e.widget == copyItem) { >+ Clipboard clipboard = new Clipboard(text.getDisplay()); >+ String textToCopy = (text.getSelectionCount() > 0) ? text >+ .getSelectionText() : text.getText(); >+ Object[] o = new Object[] { textToCopy }; >+ Transfer[] t = new Transfer[] { TextTransfer.getInstance() }; >+ clipboard.setContents(o, t); >+ clipboard.dispose(); >+ } >+ } >+ }; >+ copyItem.addSelectionListener(listener); >+ menu.addMenuListener(new MenuListener() { >+ public void menuShown(MenuEvent e) { >+ // always enabled... >+ copyItem.setEnabled(true); >+ } >+ >+ public void menuHidden(MenuEvent e) { >+ } >+ }); >+ text.setMenu(menu); >+ } >+ > /** > * Gets the busy cursor. > * @return the busy cursor >Index: Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java,v >retrieving revision 1.93 >diff -u -r1.93 WorkbenchMessages.java >--- Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java 2 Oct 2007 18:49:52 -0000 1.93 >+++ Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java 30 Nov 2007 16:27:38 -0000 >@@ -261,6 +261,7 @@ > public static String AboutDialog_pluginInfo; > public static String AboutDialog_systemInfo; > public static String AboutDialog_defaultProductName; >+ public static String AboutDialog_copy; > public static String ProductInfoDialog_errorTitle; > public static String ProductInfoDialog_unableToOpenWebBrowser; > public static String PreferencesExportDialog_ErrorDialogTitle; >Index: Eclipse UI/org/eclipse/ui/internal/messages.properties >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/messages.properties,v >retrieving revision 1.364 >diff -u -r1.364 messages.properties >--- Eclipse UI/org/eclipse/ui/internal/messages.properties 14 Nov 2007 07:59:50 -0000 1.364 >+++ Eclipse UI/org/eclipse/ui/internal/messages.properties 30 Nov 2007 16:27:42 -0000 >@@ -220,6 +220,7 @@ > AboutDialog_pluginInfo = &Plug-in Details > AboutDialog_systemInfo = &Configuration Details > AboutDialog_defaultProductName = >+AboutDialog_copy = Copy > ProductInfoDialog_errorTitle = Problems Opening Link > ProductInfoDialog_unableToOpenWebBrowser = Unable to open web browser on {0} > PreferencesExportDialog_ErrorDialogTitle=Error
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 56313
: 84192