當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。