当前位置: 首页>>代码示例>>Java>>正文


Java IJavaProject.findType方法代码示例

本文整理汇总了Java中org.eclipse.jdt.core.IJavaProject.findType方法的典型用法代码示例。如果您正苦于以下问题:Java IJavaProject.findType方法的具体用法?Java IJavaProject.findType怎么用?Java IJavaProject.findType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jdt.core.IJavaProject的用法示例。


在下文中一共展示了IJavaProject.findType方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testGetFullyQualifiedName

import org.eclipse.jdt.core.IJavaProject; //导入方法依赖的package包/类
@Test
public void testGetFullyQualifiedName() throws Exception {
	IJavaProject project = ProjectHelper.getOrCreateSimpleGW4EProject(PROJECT_NAME, true,true);
	IType type = project.findType("SimpleImpl");
	String s = JDTManager.getFullyQualifiedName(type);
	assertEquals("SimpleImpl.java", s);
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:8,代码来源:JDTManagerTest.java

示例2: testGetGraphModelPath

import org.eclipse.jdt.core.IJavaProject; //导入方法依赖的package包/类
@Test
public void testGetGraphModelPath() throws Exception {
	IJavaProject project = ProjectHelper.getOrCreateSimpleGW4EProject(PROJECT_NAME, true,true);
	IType type = project.findType("SimpleImpl");
	IPath path = JDTManager.getGraphModelPath(project.getProject(),type);
	assertEquals("/" + PROJECT_NAME +"/src/test/resources/Simple.json", path.toString());
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:8,代码来源:JDTManagerTest.java

示例3: testFindGeneratorFactoryParseInvocation

import org.eclipse.jdt.core.IJavaProject; //导入方法依赖的package包/类
@Test
public void testFindGeneratorFactoryParseInvocation() throws Exception {
	IJavaProject project = ProjectHelper.getOrCreateSimpleGW4EProject(PROJECT_NAME, true,true);
	IFile impl = (IFile) ResourceManager
			.getResource(project.getProject().getFullPath().append("src/test/java/SimpleImpl.java").toString());
	
	IOHelper.appendParseGeneratorCall (impl);
	IType type = project.findType("SimpleImpl");
	Set<String> invocations = JDTManager.findGeneratorFactoryParseInvocation(project.getProject(), type);
	assertEquals (1,invocations.size());
	String value = invocations.iterator().next();
	assertEquals("random(edge_coverage(100))", value);
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:14,代码来源:JDTManagerTest.java

示例4: testGetStartableGraphWalkerClasses

import org.eclipse.jdt.core.IJavaProject; //导入方法依赖的package包/类
@Test
public void testGetStartableGraphWalkerClasses() throws Exception {
	IJavaProject project = ProjectHelper.getOrCreateSimpleGW4EProject(PROJECT_NAME, true,true);
	List<IType> types = JDTManager.getStartableGraphWalkerClasses(project.getProject().getName());
	assertTrue (types.size()==1);
	IType type = project.findType("SimpleImpl");
	assertEquals(type,types.get(0));
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:9,代码来源:JDTManagerTest.java

示例5: testGetOrphanGraphWalkerClasses

import org.eclipse.jdt.core.IJavaProject; //导入方法依赖的package包/类
@Test
public void testGetOrphanGraphWalkerClasses() throws Exception {
	IJavaProject project = ProjectHelper.getOrCreateSharedGW4Project(PROJECT_NAME, true);
	IType type = project.findType("Model_AImpl");
	List<IType> types = JDTManager.getOrphanGraphWalkerClasses(type, true);
	assertTrue (types.size()==1);
	IType typeB = project.findType("Model_BImpl");
	assertEquals(typeB,types.get(0));
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:10,代码来源:JDTManagerTest.java

示例6: testGetSharedContexts

import org.eclipse.jdt.core.IJavaProject; //导入方法依赖的package包/类
@Test
public void testGetSharedContexts() throws Exception {
	IJavaProject pj = ProjectHelper.getOrCreateSharedGW4Project(PROJECT_NAME,true);
	IType type = pj.findType("Model_AImpl");
	IType typeB = pj.findType("Model_BImpl");
	List<IType> others = new ArrayList<IType> ();
	others.add(typeB);
	List<IType> shared = GraphWalkerFacade.getSharedContexts(pj.getProject(), type, others);
	assertEquals(shared.size(),1);
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:11,代码来源:GraphWalkerFacadeTest.java

示例7: getJavaType

import org.eclipse.jdt.core.IJavaProject; //导入方法依赖的package包/类
/**
 * Obtient le type JDT pour un nom complet qualifié dans un projet donné.
 * 
 * @param fullyQualifiedName Nom complet qualifié.
 * @param project Projet.
 * @return Le type JDT, <code>null</code> sinon.
 */
public static IType getJavaType(String fullyQualifiedName, IProject project) {
	IJavaProject javaProject = JavaCore.create(project);
	try {
		return javaProject.findType(fullyQualifiedName);
	} catch (Exception e) {
		ErrorUtils.handle(e);
	}
	return null;
}
 
开发者ID:sebez,项目名称:vertigo-chroma-kspplugin,代码行数:17,代码来源:JdtUtils.java


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