Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Get string Editor plugin A ,into action handler pluginB
Get string Editor plugin A ,into action handler pluginB [message #203636] Fri, 06 April 2007 06:30 Go to next message
Eclipse UserFriend
Originally posted by: mukerji.nita.gmail.com

Have Eclipse 3.2 installed.How can I get a string value from pluginA to
pluginB?
Re: Get string Editor plugin A ,into action handler pluginB [message #203686 is a reply to message #203636] Fri, 06 April 2007 11:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Nita,

I think you need to ask a more specific question...


Nita wrote:
> Have Eclipse 3.2 installed.How can I get a string value from pluginA
> to pluginB?
Re: Get string fromEditor plugin A ,into action handler pluginB [message #203755 is a reply to message #203686] Fri, 06 April 2007 16:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mukerji.nita.gmail.com

Using an editor plugin I open a file. Get the full path of the
file.Convert the path into charecter string.Now an action set plugin needs
to get this file path charecter string because a menuitem, in its run()
method needs to give the file path (of type string)to a java class method
that reads that file.
Re: Get string fromEditor plugin A ,into action handler pluginB [message #203767 is a reply to message #203755] Fri, 06 April 2007 16:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: irbull.cs.uvic.ca

Nita,

It seems there could be a few problems with this approach. For example,
what if a file was never opened, do you expect your run action to do
anything? What if a file was just selected (not actually opened), should
you be able to select run in this case? How about if an editor was
opened, and then the user switched to another editor, what should happen
when run is called?

If you have thought through these issues, and this is how you want your
system to behave, you could make your Action Plug-in depend on your
Editor plugin. Then, in your editor plugin Activator, you could add a
method (getFullPath() or something). When your editor is opened, you
could set the string in your activator. Then, when your action is
called, you could say:

EditorPluginActivator.getDefault().getFullPath() and this would either
return null (no string was set) or the string that your editor set.

of course, you may need to observe other editors, so this string could
be set back to null if the user switches editors.

This seems a little hacky, but it should get your up and running. Maybe
Ed has some other suggestions.

cheers,
ian


Nita wrote:
> Using an editor plugin I open a file. Get the full path of the
> file.Convert the path into charecter string.Now an action set plugin
> needs to get this file path charecter string because a menuitem, in its
> run() method needs to give the file path (of type string)to a java class
> method that reads that file.
Re: Get string fromEditor plugin A ,into action handler pluginB [message #203859 is a reply to message #203767] Sat, 07 April 2007 09:12 Go to previous message
Eclipse UserFriend
Originally posted by: mukerji.nita.gmail.com

Thank you
Previous Topic:CVS: cannot see all branches
Next Topic:Automatica update with 1 click, it is posible?
Goto Forum:
  


Current Time: Sat Apr 20 02:41:18 GMT 2024

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

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

Back to the top