Retrieve text selected from file [message #851001] |
Fri, 20 April 2012 10:46  |
Eclipse User |
|
|
|
Hi all,
I want to add a new functionality. My functionality is the following:
I open a file in the eclipse IDE, and I select a "text" from file,
if I click the right button on mouse, I want to add an action that it display the "text" selected.
Here is my plugin.xml
<extension point="org.eclipse.ui.popupMenus">
<objectContribution
objectClass="org.eclipse.core.resources.IFile"
adaptable="true"
id="org.eclipse.core.resources.IFile">
<action
label="My Test"
tooltip="TEST"
class="my.action.MyAction"
enablesFor="+"
icon="icons/etool16/icon.gif"
id="my.action">
</action>
</objectContribution>
</extension>
and my class:
public class MyAction implements IEditorActionDelegate {
....
}
Now I want to retrieve my text with "TextSelection"
How can I do it?
Thank you,
pasquy73
|
|
|
|
Powered by
FUDForum. Page generated in 0.27602 seconds