/**
* Activates profiler manager.
*/
public static void activate()
{
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
final ILaunchConfigurationType configType =
manager.getLaunchConfigurationType(IProfilerConstants.ID_LAUNCH_CONFIGURATION_TYPE);
if (configType == null)
{
return;
}
launchConfigurationListener = new ILaunchConfigurationListener()
{
public void launchConfigurationAdded(
ILaunchConfiguration configuration)
{
notifyLaunchConfigurationsChanged();
}
public void launchConfigurationChanged(
ILaunchConfiguration configuration)
{
notifyLaunchConfigurationsChanged();
}
public void launchConfigurationRemoved(
ILaunchConfiguration configuration)
{
notifyLaunchConfigurationsChanged();
}
};
manager.addLaunchConfigurationListener(launchConfigurationListener);
launchesListener = new ILaunchesListener2(){
public void launchesRemoved(ILaunch[] launches)
{
}
public void launchesChanged(ILaunch[] launches)
{
}
public void launchesAdded(ILaunch[] launches)
{
}
public void launchesTerminated(ILaunch[] launches)
{
if (launches == null || launches.length == 0)
{
return;
}
ProfilerLaunchManager.launchesTerminated(launches);
}
};
manager.addLaunchListener(launchesListener);
}