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


Java IType.getFullyQualifiedName方法代码示例

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


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

示例1: isGraphWalkerExecutionContextClass

import org.eclipse.jdt.core.IType; //导入方法依赖的package包/类
/**
 * @param testInterface
 * @return
 * @throws JavaModelException
 */
public static boolean isGraphWalkerExecutionContextClass(ICompilationUnit unit) throws JavaModelException {
	IType[] types = unit.getAllTypes();

	if (types == null || types.length == 0) {
		ResourceManager.logInfo(unit.getJavaProject().getProject().getName(),
				"getAllTypes return null" + unit.getPath());
		return false;
	}
	IType execContextType = unit.getJavaProject().findType(ExecutionContext.class.getName());

	for (int i = 0; i < types.length; i++) {
		IType type = types[i];
		String typeNname = type.getFullyQualifiedName();
		String compilationUnitName = JDTManager.getJavaFullyQualifiedName(unit);
		if (typeNname.equals(compilationUnitName)) {
			try {
				ITypeHierarchy th = types[0].newTypeHierarchy(new NullProgressMonitor());
				return th.contains(execContextType);
			} catch (Exception e) {
				ResourceManager.logException(e);
			}
		}
	}
	return false;
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:31,代码来源:JDTManager.java

示例2: setMethod

import org.eclipse.jdt.core.IType; //导入方法依赖的package包/类
public void setMethod(IMethod method, InvocationAction a) {
	String key = null;
	try {
		IType type = (IType) method.getParent();
		key = type.getFullyQualifiedName() + "|" + method.getElementName() + method.getSignature();
	} catch (JavaModelException e) {
		e.printStackTrace();
	}
	if(key != null) {
		StaticInvocationWidget2 inv = invWidgetsMap.get(key);
		if(inv == null) {
			inv = new StaticInvocationWidget2(this, null, method, a);
			invWidgetsMap.put(key, inv);
		}
		inv.refreshItems();
		layout.topControl = inv;
		layout();
	}
}
 
开发者ID:andre-santos-pt,项目名称:pandionj,代码行数:20,代码来源:InvokeWidget.java

示例3: setMethod

import org.eclipse.jdt.core.IType; //导入方法依赖的package包/类
public void setMethod(IFile file, IMethod method, InvocationAction a) {
	String key = null;
	try {
		IType type = (IType) method.getParent();
		key = type.getFullyQualifiedName() + "|" + method.getElementName() + method.getSignature();
	} catch (JavaModelException e) {
		e.printStackTrace();
	}
	if(key != null) {
		StaticInvocationWidget inv = invWidgetsMap.get(key);
		if(inv == null) {
			inv = new StaticInvocationWidget(this, file, method, a);
			invWidgetsMap.put(key, inv);
		}
		inv.refreshItems(file);
		layout.topControl = inv;
		layout();
	}
}
 
开发者ID:andre-santos-pt,项目名称:pandionj,代码行数:20,代码来源:InvocationArea.java

示例4: typeToClass

import org.eclipse.jdt.core.IType; //导入方法依赖的package包/类
/**
 * transform the <code>IType</code> to <code>Class</code>
 *
 * @param type <code>IType</code>
 * @return <code>Class</code>
 * @throws ClassNotFoundException
 * @throws MalformedURLException
 */
public static Class<?> typeToClass(IType type) throws CoreException,
        ClassNotFoundException,MalformedURLException {
    try {
        if (null != type && (type.isClass() || type.isInterface())) {
            String className = type.getFullyQualifiedName('$');
            return loadClass(type.getJavaProject(), className);
        }
    } catch (JavaModelException e) {
        e.printStackTrace();
        throw new RuntimeException(e);
    }
    return null;
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:22,代码来源:ClassHelper.java

示例5: getMethodKey

import org.eclipse.jdt.core.IType; //导入方法依赖的package包/类
private String getMethodKey(IMethod method) {
	try {
		IType type = (IType) method.getParent();
		return type.getFullyQualifiedName() + "|" + method.getElementName() + method.getSignature();
	} catch (JavaModelException e) {
		e.printStackTrace();
		return null;
	}
}
 
开发者ID:andre-santos-pt,项目名称:pandionj,代码行数:10,代码来源:StaticInvocationWidget.java

示例6: initializeFrom

import org.eclipse.jdt.core.IType; //导入方法依赖的package包/类
@Override
public void initializeFrom(ILaunchConfiguration configuration) {
	try {
		String projectName = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, "");
		if (projectName==null || projectName.trim().length() == 0) {
			additionalExecutionContexts=new IType[0];
			mainExecutionContexts=new IType[0];
			fMainTestExecutionComboViewer.setInput(null);
			fAdditionalTestViewer.setInput(null);
		};
		fProjectText.setText(projectName);
		removeBockedElementButton.setSelection(configuration.getAttribute(EXECUTION_TEST_REMOVE_BLOCKED_ELEMENT_CONFIGURATION, true));
		displayDetailsButton.setSelection(new Boolean(configuration.getAttribute(EXECUTION_TEST_DISPLAY_CONFIGURATION, "true")).booleanValue());
		String classes = configuration.getAttribute(CONFIG_TEST_CLASSES, "");  
		StringTokenizer st = new StringTokenizer (classes,";");
		if (st.hasMoreTokens()) {
			String mainContext = st.nextToken();
			for (int i = 0; i < mainExecutionContexts.length; i++) {
				IType executionContext = mainExecutionContexts[i];
				if (executionContext.getFullyQualifiedName().equalsIgnoreCase(mainContext)) {
					fMainTestExecutionComboViewer.setSelection(new StructuredSelection(executionContext));
					break;
				}
			}
		}

		while (st.hasMoreTokens()) {
			String clazz = st.nextToken();
			TableItem[] items = this.fAdditionalTestViewer.getTable().getItems();
			for (int i = 0; i < items.length; ++i) {
				IType type = (IType) items[i].getData();
				String name = type.getFullyQualifiedName();
				if (name.equalsIgnoreCase(clazz)) {
					items[i].setChecked(true);
				}
			}
		}
	} catch (CoreException e) {
		ResourceManager.logException(e);
	}
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:42,代码来源:GW4ELaunchConfigurationTab.java


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