if( type == null ) return null;
ILaunchConfiguration config = null;
ILaunchConfigurationWorkingCopy wc = null;
try {
ILaunchConfigurationType configType = getConfigurationType();
if(RunJettyRunTab.isWebappProject(type.getProject())){
String launchConfigName = getLaunchManager().
generateLaunchConfigurationName(type.getProject().getName());
wc = configType.newInstance(null, launchConfigName);
RunJettyRunTab.initDefaultConfiguration(wc, type.getProject(), launchConfigName);
//set mapped resource , let next time we could execute this directly from menuitem.
wc.setMappedResources(new IResource[] {type});
config = wc.doSave();
}else{