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

项目: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);
            }
        }
    });
}