• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ISourceLookupDirector类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.debug.core.sourcelookup.ISourceLookupDirector的典型用法代码示例。如果您正苦于以下问题:Java ISourceLookupDirector类的具体用法?Java ISourceLookupDirector怎么用?Java ISourceLookupDirector使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ISourceLookupDirector类属于org.eclipse.debug.core.sourcelookup包,在下文中一共展示了ISourceLookupDirector类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getRunningLaunchConfiguration

import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector; //导入依赖的package包/类
private ILaunchConfiguration getRunningLaunchConfiguration() {
	Set<IProject> projects = new HashSet<IProject>(
			Arrays.asList(ProjectUtil.getProjects(repository)));

	ILaunchManager launchManager = DebugPlugin.getDefault()
			.getLaunchManager();
	ILaunch[] launches = launchManager.getLaunches();
	for (ILaunch launch : launches) {
		if (launch.isTerminated())
			continue;
		ISourceLocator locator = launch.getSourceLocator();
		if (locator instanceof ISourceLookupDirector) {
			ISourceLookupDirector director = (ISourceLookupDirector) locator;
			ISourceContainer[] containers = director.getSourceContainers();
			if (isAnyProjectInSourceContainers(containers, projects))
				return launch.getLaunchConfiguration();
		}
	}
	return null;
}
 
开发者ID:Genuitec,项目名称:gerrit-tools,代码行数:21,代码来源:BranchOperationUI.java


示例2: read

import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector; //导入依赖的package包/类
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;
}
 
开发者ID:jbosstools,项目名称:chromedevtools,代码行数:20,代码来源:ChromiumRemoteTab.java


示例3: getSourceLookupDirector

import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector; //导入依赖的package包/类
protected ISourceLookupDirector getSourceLookupDirector() {
	ISourceLookupDirector commonSourceLookupDirector = new AbstractSourceLookupDirector() {
		@Override
		public void initializeParticipants() {
		}
	};
	
	ArrayList2<ISourceContainer> containers = new ArrayList2<>();
	containers.add(new LangAbsolutePathSourceContainer());
	containers.add(new ProgramRelativePathSourceContainer());
	
	customizeDefaultSourceContainers(containers);
	commonSourceLookupDirector.setSourceContainers(containers.toArray(ISourceContainer.class));
	
	return commonSourceLookupDirector;
}
 
开发者ID:GoClipse,项目名称:goclipse,代码行数:17,代码来源:LangSourceLookupDirector.java


示例4: setSourceLocator

import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector; //导入依赖的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);
		}
	}
}
 
开发者ID:eclipse,项目名称:cft,代码行数:13,代码来源:CloudFoundryDebugDelegate.java


示例5: getPossibleAdditions0

import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector; //导入依赖的package包/类
private static List<IJavaProject> getPossibleAdditions0(final ISourceLookupDirector director) {
  final List<IProject> mavenProjects = new ArrayList<IProject>();
  for (final IMavenProjectFacade mavenProject : MavenPlugin.getMavenProjectRegistry().getProjects()) {
    mavenProjects.add(mavenProject.getProject());
  }

  final List<IJavaProject> javaProjects = new ArrayList<IJavaProject>();
  final IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
  try {
    for (final IJavaProject javaProject : JavaCore.create(root).getJavaProjects()) {
      if (mavenProjects.contains(javaProject.getProject())) {
        javaProjects.add(javaProject);
      }
    }
  } catch (final JavaModelException e) {
    final IStatus status = new Status(IStatus.ERROR, SourceLookupPlugin.getInstance().getBundle().getSymbolicName(),
        "Can't retrieve Java projects.", e);
    SourceLookupPlugin.getInstance().getLog().log(status);
  }

  for (final ISourceContainer container : director.getSourceContainers()) {
    if (container.getType().getId().equals(MyMvnSourceContainerTypeDelegate.TYPE_ID)) {
      javaProjects.remove(((MyMvnSourceContainer) container).getJavaProject());
    }
  }

  return javaProjects;
}
 
开发者ID:bjmi,项目名称:m2e.sourcelookup,代码行数:29,代码来源:MyMvnSourceContainerBrowser.java


示例6: editSourceContainers

import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector; //导入依赖的package包/类
public ISourceContainer[] editSourceContainers(Shell shell, ISourceLookupDirector director,
    ISourceContainer[] containers) {
  final SourceNameMapperContainer originalContainer = (SourceNameMapperContainer) containers[0];
  SourceNameMapperContainerDialog.PresetFieldValues params =
      new SourceNameMapperContainerDialog.PresetFieldValues() {
    public ISourceContainer getContainer() {
      return originalContainer.getTargetContainer();
    }
    public String getPrefix() {
      return originalContainer.getPrefix();
    }
  };

  return openDialog(shell, director, params);
}
 
开发者ID:jbosstools,项目名称:chromedevtools,代码行数:16,代码来源:SourceNameMapperContainerPresentation.java


示例7: openDialog

import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector; //导入依赖的package包/类
private ISourceContainer[] openDialog(Shell shell, ISourceLookupDirector director,
    SourceNameMapperContainerDialog.PresetFieldValues params) {
  SourceNameMapperContainerDialog dialog =
      new SourceNameMapperContainerDialog(shell, director, params);
  dialog.open();
  SourceNameMapperContainerDialog.Result dialogResult = dialog.getResult();
  if (dialogResult == null) {
    return new ISourceContainer[0];
  }
  ISourceContainer result = new SourceNameMapperContainer(dialogResult.getResultPrefix(),
      dialogResult.getResultContainer());
  return new ISourceContainer[] { result };
}
 
开发者ID:jbosstools,项目名称:chromedevtools,代码行数:14,代码来源:SourceNameMapperContainerPresentation.java


示例8: SourceNameMapperContainerDialog

import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector; //导入依赖的package包/类
public SourceNameMapperContainerDialog(Shell shell, ISourceLookupDirector director,
  PresetFieldValues initialParams) {
  super(shell);
  setShellStyle(getShellStyle() | SWT.RESIZE);
  this.director = director;
  this.initialParams = initialParams;
}
 
开发者ID:jbosstools,项目名称:chromedevtools,代码行数:8,代码来源:SourceNameMapperContainerDialog.java


示例9: sourceContainersChanged

import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector; //导入依赖的package包/类
@Override
public void sourceContainersChanged(ISourceLookupDirector director) {
    delegateContainers.clear();
    ISourceContainer[] containers = director.getSourceContainers();
    for (int i = 0; i < containers.length; i++) {
        ISourceContainer container = containers[i];
        if (container.getType().getId().equals(ArchiveSourceContainer.TYPE_ID)) {
            IFile file = ((ArchiveSourceContainer)container).getFile();
            IProject project = file.getProject();
            IJavaProject javaProject = JavaCore.create(project);
            if (javaProject.exists()) {
                try {
                    IPackageFragmentRoot[] roots = javaProject.getPackageFragmentRoots();
                    for (int j = 0; j < roots.length; j++) {
                        IPackageFragmentRoot root = roots[j];
                        if (file.equals(root.getUnderlyingResource())) {
                            delegateContainers.put(container, new PackageFragmentRootSourceContainer(root));
                        } else {
                            IPath path = root.getSourceAttachmentPath();
                            if (path != null) {
                                if (file.getFullPath().equals(path)) {
                                    delegateContainers.put(container, new PackageFragmentRootSourceContainer(root));
                                }
                            }
                        }
                    }
                } catch (JavaModelException e) {
                }
            }
        }
    }
}
 
开发者ID:konsoletyper,项目名称:teavm,代码行数:33,代码来源:TeaVMSourceLookupParticipant.java


示例10: canAddSourceContainers

import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector; //导入依赖的package包/类
@Override
public boolean canAddSourceContainers(final ISourceLookupDirector director) {
  return !getPossibleAdditions0(director).isEmpty();
}
 
开发者ID:bjmi,项目名称:m2e.sourcelookup,代码行数:5,代码来源:MyMvnSourceContainerBrowser.java


示例11: init

import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector; //导入依赖的package包/类
public void init(ISourceLookupDirector director) {
  if (director instanceof ChromiumSourceDirector) {
    chromiumSourceDirector = (ChromiumSourceDirector) director;
  }
}
 
开发者ID:jbosstools,项目名称:chromedevtools,代码行数:6,代码来源:VProjectSourceContainer.java


示例12: ReverseSourceLookup

import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector; //导入依赖的package包/类
public ReverseSourceLookup(ISourceLookupDirector sourceDirector) {
  this.sourceDirector = sourceDirector;
}
 
开发者ID:jbosstools,项目名称:chromedevtools,代码行数:4,代码来源:ReverseSourceLookup.java


示例13: init

import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector; //导入依赖的package包/类
public void init(ISourceLookupDirector director) {
}
 
开发者ID:jbosstools,项目名称:chromedevtools,代码行数:3,代码来源:SourceNameMapperContainer.java


示例14: addSourceContainers

import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector; //导入依赖的package包/类
public ISourceContainer[] addSourceContainers(Shell shell, ISourceLookupDirector director) {
  return openDialog(shell, director, null);
}
 
开发者ID:jbosstools,项目名称:chromedevtools,代码行数:4,代码来源:SourceNameMapperContainerPresentation.java


示例15: canAddSourceContainers

import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector; //导入依赖的package包/类
public boolean canAddSourceContainers(ISourceLookupDirector director) {
  return true;
}
 
开发者ID:jbosstools,项目名称:chromedevtools,代码行数:4,代码来源:SourceNameMapperContainerPresentation.java


示例16: canEditSourceContainers

import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector; //导入依赖的package包/类
public boolean canEditSourceContainers(ISourceLookupDirector director,
    ISourceContainer[] containers) {
  return containers.length == 1;
}
 
开发者ID:jbosstools,项目名称:chromedevtools,代码行数:5,代码来源:SourceNameMapperContainerPresentation.java



注:本文中的org.eclipse.debug.core.sourcelookup.ISourceLookupDirector类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java One类代码示例发布时间:2022-05-23
下一篇:
Java BindingConfigParseException类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap