如何使eclipse编辑器的标题文本可选?

时间:2022-06-03 22:22:46

In an Eclipse Editor Part, you can add a text to the top bar of an editor form (see screenshot). How can I make this text selectable? And preferably copy-able via Ctrl+C or context menu?

在Eclipse编辑器部件中,您可以将文本添加到编辑器表单的顶部栏中(请参见屏幕截图)。如何使此文本可选?最好通过Ctrl + C或上下文菜单复制?

The text is added via the setText() method of a ScrolledForm which in turn is generated by the editor's FormToolkit. I browsed the API but there seems nothing obvious to enable text selections.

该文本是通过ScrolledForm的setText()方法添加的,而ScrolledForm又由编辑器的FormToolkit生成。我浏览了API,但似乎没有明显的启用文本选择。

如何使eclipse编辑器的标题文本可选?

1 个解决方案

#1


0  

It is org.eclipse.swt.widgets.Label so it is not selectable text. I think you could add copy text Menu action on FormHeading.

它是org.eclipse.swt.widgets.Label所以它不是可选择的文本。我想你可以在FormHeading上添加复制文本菜单操作。

#1


0  

It is org.eclipse.swt.widgets.Label so it is not selectable text. I think you could add copy text Menu action on FormHeading.

它是org.eclipse.swt.widgets.Label所以它不是可选择的文本。我想你可以在FormHeading上添加复制文本菜单操作。