Search in sources :

Example 1 with LaunchHistory

use of org.eclipse.debug.internal.ui.launchConfigurations.LaunchHistory in project tdi-studio-se by Talend.

the class TalendLaunchToolbarAction method getLastLaunch.

/*
     * (non-Javadoc)
     * 
     * @see org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction#getLastLaunch()
     */
@Override
protected ILaunchConfiguration getLastLaunch() {
    getLaunchConfigurationManager().removeLaunchHistoryListener(this);
    LaunchHistory history = getLaunchConfigurationManager().getLaunchHistory(getLaunchGroupIdentifier());
    getLaunchConfigurationManager().addLaunchHistoryListener(this);
    if (history != null) {
        try {
            ILaunchConfiguration[] filterConfigs = history.getCompleteLaunchHistory();
            for (ILaunchConfiguration launchConfiguration : filterConfigs) {
                if (isCurrentProject(launchConfiguration) && checkItemExisted(launchConfiguration)) {
                    return launchConfiguration;
                }
            }
        } catch (Exception e) {
            ExceptionHandler.process(e);
        }
    }
    return null;
}
Also used : LaunchHistory(org.eclipse.debug.internal.ui.launchConfigurations.LaunchHistory) ILaunchConfiguration(org.eclipse.debug.core.ILaunchConfiguration) CoreException(org.eclipse.core.runtime.CoreException) PersistenceException(org.talend.commons.exception.PersistenceException)

Aggregations

CoreException (org.eclipse.core.runtime.CoreException)1 ILaunchConfiguration (org.eclipse.debug.core.ILaunchConfiguration)1 LaunchHistory (org.eclipse.debug.internal.ui.launchConfigurations.LaunchHistory)1 PersistenceException (org.talend.commons.exception.PersistenceException)1