Java 类org.eclipse.core.runtime.content.IContentTypeMatcher 实例源码

项目:APICloud-Studio    文件:BuildContext.java   
protected IContentType[] getContentTypes() throws CoreException
{
    // TODO Cache this?
    IProject theProject = getProject();
    if (theProject != null)
    {
        IContentTypeMatcher matcher = theProject.getContentTypeMatcher();
        return matcher.findContentTypesFor(getName());
    }

    IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
    if (ArrayUtil.isEmpty(projects))
    {
        return Platform.getContentTypeManager().findContentTypesFor(getName());
    }

    for (IProject project : projects)
    {
        try
        {
            IContentType[] type = project.getContentTypeMatcher().findContentTypesFor(getName());
            if (type != null)
            {
                return type;
            }
        }
        catch (CoreException e)
        {
            IdeLog.logError(IndexPlugin.getDefault(), e);
        }
    }
    return NO_CONTENT_TYPES;
}
项目:che    文件:Project.java   
@Override
public IContentTypeMatcher getContentTypeMatcher() throws CoreException {
  throw new UnsupportedOperationException();
}
项目:PerformanceHat    文件:AbstractProjectDecorator.java   
/**
 * {@inheritDoc}
 */
@Override
public IContentTypeMatcher getContentTypeMatcher() throws CoreException {
  return resource().getContentTypeMatcher();
}
项目:Pydev    文件:AbstractIProjectStub.java   
@Override
public IContentTypeMatcher getContentTypeMatcher() throws CoreException {
    throw new RuntimeException("Not implemented");
}
项目:che    文件:IProject.java   
/**
 * Returns this project's content type matcher. This content type matcher takes project specific
 * preferences and nature-content type associations into account.
 *
 * @return the content type matcher for this project
 * @exception CoreException if this method fails. Reasons include:
 *     <ul>
 *       <li>This project does not exist.
 *       <li>This project is not open.
 *     </ul>
 *
 * @see IContentTypeMatcher
 * @since 3.1
 */
public IContentTypeMatcher getContentTypeMatcher() throws CoreException;