Pregunta

I have a custom launch configuration. It currently has a JavaArgumentsTab() where I can enter things for VM arguments and Program arguments. But how do I actually get any values entered there?

Ideally I would get them inside my LaunchConfigurationDelegate's launch() method. I expected to find any text entered as arguments inside the LaunchConfiguration or other parameters to that method, and I'm sure this is a newbie question, but I really haven't found anything promising.

TabGroup:

public class LaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup {

@Override
public void createTabs(ILaunchConfigurationDialog dialog, String mode) {
    ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
            new JavaArgumentsTab(),
            new CommonTab()
    };
    setTabs(tabs);
} }

LaunchConfigurationDelegate:

public class LaunchConfigurationDelegate implements ILaunchConfigurationDelegate {

@Override
public void launch(ILaunchConfiguration configuration, String mode,
        ILaunch launch, IProgressMonitor monitor) throws CoreException {
    // How to get anything entered on my Java tab here...?

} }
¿Fue útil?

Solución

Everything from the tabs should already have been set as attribute values in the ILaunchConfiguration when launch is called.

The settings from JavaArgumentsTab are stored in the attributes using constants from IJavaLaunchConfigurationConstants.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top