To call a plugin method the caller must also be a plugin.
The question is what do you mean by " my programm, while executing it
from inside eclipse."?
If you start a standard Java Application launch from eclipse you are not
running it from inside eclipse. You are running as a standalone java
instance separate from the eclipse instance. It doesn't have any access
to the calling Eclipse instance at all, none!
If your program is actually a plugin, then you can start a separate
Eclipse instance from Eclipse that includes your plugin. In that case
your plugin has access to that Eclipse's plugin methods.
But there is no way to have some code you are writing access the actual
instance of Eclipse that you are writing your code within.
Since I wrote a simple RMI Server that is being started when the plugin is loaded in an eclipse instance. Via RMI I can now remote control the plugin from any javaapp and any client as long as there is one machine that executes the eclipse to start with.