I need code base for a very simple plugin for eclipse ([url removed, login to view]) for personal usage.
I am using "helios" version of eclipse, so that's the target version for the plugin.
1) A drop-down button needs to be installed visually similar to those debug/run drop-down buttons. The code should put a few dummy menu-items into the drop-down and have dummy actions bound to them, [url removed, login to view]("bla") is fine.
2) Insert a submenu into context menu for the java file editor (for instance next to "source" submenu)
put a few dummu dummy menu items with dummy actions into the submenu similar as above.
3) (most important) Need a peace of code, (a method of a class) that determines
file name of the currently edited file (if several files are open next to each other in tabs it must operate on the one currently having focus) and caret position as integer (number of characters from start of the file), alternatively line/column number. Optionally the same for current selection (as opposed to caret position)
a) method must be robust in the sense - if for whatever reason the above info cannot be retrieved (no editor open, editor operating on an unnamed file, etc, whatever) - method should return null or something
b) I also need a wrapper method around the above method, which is "thread-safe". The point is, the method can be called from an arbitrary thread (for instance by a timer in regular intervals) and I believe it needs to be run in the event thread, so I need an eclipse-way of
[url removed, login to view]()
4) The whole thing needs to be delivered as an eclipse project, so that I can continue coding the plugin myself.
Please give brief explanation for the eclipse project requirements - as far as I know there are special versions of / plugins for eclipse dedicated to eclipse plugin development, if I need any of those, tell me which of them do I need
5) Installation instructions. once I have a plugin packaged (probably a jar file?) where do I have to place the jar/ where to tell eclipse it should "activate" the plugin, if necessary.
I am a programmer myself, but don't want to dig into eclipse internals and docs. I tried a few times just to realize it would take far too long even for simplest things.
Instead I need boilerplate code prepared for me by an experienced eclipser.
(should take about an hour or less for a profi, I believe)