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

项目:typescript.java    文件:IDEResourcesManager.java   
private IDEResourcesManager() {
    this.registryListenerIntialized = false;
    this.resourceParticipants = new ArrayList<>();
    this.listeners = new ArrayList<ITypeScriptElementChangedListener>();
    updateUseJsAsJsx(Platform.getContentTypeManager().getContentType(JSX_CONTENT_TYPE_ID));

    Platform.getContentTypeManager().addContentTypeChangeListener(new IContentTypeChangeListener() {

        @Override
        public void contentTypeChanged(ContentTypeChangeEvent event) {
            IContentType contentType = event.getContentType();
            if (contentType != null && JSX_CONTENT_TYPE_ID.equals(contentType.getId())) {
                updateUseJsAsJsx(contentType);
            }
        }
    });
}
项目:Eclipse-Postfix-Code-Completion    文件:JavaModelManager.java   
public void contentTypeChanged(ContentTypeChangeEvent event) {
    Util.resetJavaLikeExtensions();

    // Walk through projects to reset their secondary types cache
    IJavaProject[] projects;
    try {
        projects = JavaModelManager.getJavaModelManager().getJavaModel().getJavaProjects();
    } catch (JavaModelException e) {
        return;
    }
    for (int i = 0, length = projects.length; i < length; i++) {
        IJavaProject project = projects[i];
        final PerProjectInfo projectInfo = getPerProjectInfo(project.getProject(), false /* don't create info */);
        if (projectInfo != null) {
            projectInfo.secondaryTypes = null;
        }
    }
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavaModelManager.java   
public void contentTypeChanged(ContentTypeChangeEvent event) {
    Util.resetJavaLikeExtensions();

    // Walk through projects to reset their secondary types cache
    IJavaProject[] projects;
    try {
        projects = JavaModelManager.getJavaModelManager().getJavaModel().getJavaProjects();
    } catch (JavaModelException e) {
        return;
    }
    for (int i = 0, length = projects.length; i < length; i++) {
        IJavaProject project = projects[i];
        final PerProjectInfo projectInfo = getPerProjectInfo(project.getProject(), false /* don't create info */);
        if (projectInfo != null) {
            projectInfo.secondaryTypes = null;
        }
    }
}