本文整理汇总了Java中org.eclipse.debug.core.sourcelookup.ISourcePathComputer类的典型用法代码示例。如果您正苦于以下问题:Java ISourcePathComputer类的具体用法?Java ISourcePathComputer怎么用?Java ISourcePathComputer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ISourcePathComputer类属于org.eclipse.debug.core.sourcelookup包,在下文中一共展示了ISourcePathComputer类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSourcePathComputer
import org.eclipse.debug.core.sourcelookup.ISourcePathComputer; //导入依赖的package包/类
@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;
}
};
}
示例2: setSourceLocator
import org.eclipse.debug.core.sourcelookup.ISourcePathComputer; //导入依赖的package包/类
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);
}
}
}