private ISourceLookupDirector read(ILaunchConfiguration config) throws CoreException { String memento = config.getAttribute( ILaunchConfiguration.ATTR_SOURCE_LOCATOR_MEMENTO, (String)null); if (memento == null) { return null; } String type = config.getAttribute(ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, (String)null); if (type == null) { type = config.getType().getSourceLocatorId(); } ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); ISourceLocator locator = launchManager.newSourceLocator(type); if (locator instanceof IPersistableSourceLocator2 == false) { return null; } ISourceLookupDirector director = (ISourceLookupDirector) locator; director.initializeFromMemento(memento, config); return director; }