Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Retrieve text selected from file(Retrieve text selected from file)
Retrieve text selected from file [message #851001] Fri, 20 April 2012 14:46 Go to next message
pasquy73 Mising name is currently offline pasquy73 Mising nameFriend
Messages: 7
Registered: April 2012
Junior Member
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
Re: Retrieve text selected from file [message #869300 is a reply to message #851001] Thu, 03 May 2012 07:47 Go to previous message
Fabien LastName is currently offline Fabien LastNameFriend
Messages: 5
Registered: April 2012
Location: Tours
Junior Member
Hello,

Search on eclipse.org this article : Eclipse Workbench: Using the Selection Service
Read this article, it's help me to resolve the question




Previous Topic:Capturing Pre-build Event
Next Topic:Folding in non-java
Goto Forum:
  


Current Time: Tue Apr 23 09:41:37 GMT 2024

Powered by FUDForum. Page generated in 0.02840 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top