Java 类org.eclipse.debug.core.sourcelookup.ISourcePathComputer 实例源码

项目:goclipse    文件:LangSourceLookupDirector.java   
@Override
public ISourcePathComputer getSourcePathComputer() {
    ISourcePathComputer sourcePathComputer = super.getSourcePathComputer();
    if(sourcePathComputer != null) {
        return sourcePathComputer;
    }

    return new ISourcePathComputer() {

        LangSourcePathComputer langSourcePathComputer = new LangSourcePathComputer();

        @Override
        public ISourceContainer[] computeSourceContainers(ILaunchConfiguration configuration, IProgressMonitor monitor)
                throws CoreException {
            return langSourcePathComputer.computeSourceContainers(configuration, monitor);
        }

        @Override
        public String getId() {
            return LangDebug.LANG_SOURCE_LOOKUP_DIRECTOR;
        }
    };
}
项目:cft    文件:CloudFoundryDebugDelegate.java   
protected void setSourceLocator(ILaunch launch) throws CoreException {
    ILaunchConfiguration configuration = launch.getLaunchConfiguration();
    if (configuration != null && launch.getSourceLocator() == null) {
        ISourceLookupDirector sourceLocator = new JavaSourceLookupDirector();
        ISourcePathComputer locator = getLaunchManager().getSourcePathComputer(SOURCE_LOCATOR);
        if (locator != null) {
            sourceLocator.setSourcePathComputer(locator); 
            sourceLocator.initializeDefaults(configuration);
            launch.setSourceLocator(sourceLocator);
        }
    }
}