Hey,
Take a look at the IHandlerService and ICommandService:
IHandlerService hService = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
ICommandService cService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
Get the actual command programmatically:
Command command = cService.getCommand("openEditorCommand");
Get the command prarameters:
IParameter p = command.getParameter("inputParam");
Get the current application state:
IEvaluationContext eContext = hService.getCurrentState();
InputSourceProvider sProvider = (InputSourceProvider) eContext.getVariable("inputSourceProvider");
Browse through the API of those services, and I'm sure you'll find the appropriate solution.
Hope this helps.
j