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


Java IAnnotationModelListener类代码示例

本文整理汇总了Java中org.eclipse.jface.text.source.IAnnotationModelListener的典型用法代码示例。如果您正苦于以下问题:Java IAnnotationModelListener类的具体用法?Java IAnnotationModelListener怎么用?Java IAnnotationModelListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IAnnotationModelListener类属于org.eclipse.jface.text.source包,在下文中一共展示了IAnnotationModelListener类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: fireModelChanged

import org.eclipse.jface.text.source.IAnnotationModelListener; //导入依赖的package包/类
private void fireModelChanged(AnnotationModelEvent event) {
  event.markSealed();
  if (!event.isEmpty()) {
    for (final IAnnotationModelListener l : annotationModelListeners) {
      if (l instanceof IAnnotationModelListenerExtension) {
        ((IAnnotationModelListenerExtension) l).modelChanged(event);
      } else {
        l.modelChanged(this);
      }
    }
  }
}
 
开发者ID:eclipse,项目名称:eclemma,代码行数:13,代码来源:CoverageAnnotationModel.java

示例2: createAnnotationModel

import org.eclipse.jface.text.source.IAnnotationModelListener; //导入依赖的package包/类
@Override
public IAnnotationModel createAnnotationModel(Object element) {
    IAnnotationModel annotationModel = super.createAnnotationModel(element);
    IAnnotationModelListener listener = annotationModelListeners.get(element);
    if (listener != null) {
        annotationModel.addAnnotationModelListener(listener);
    }
    return annotationModel;
}
 
开发者ID:Cooperate-Project,项目名称:CooperateModelingEnvironment,代码行数:10,代码来源:CooperateCDOXtextDocumentProvider.java

示例3: modelChanged

import org.eclipse.jface.text.source.IAnnotationModelListener; //导入依赖的package包/类
/**
 * @see IAnnotationModelListener#modelChanged(IAnnotationModel)
 */
public void modelChanged(IAnnotationModel model) {
	Object[] listeners= fListenerList.getListeners();
	for (int i= 0; i < listeners.length; i++) {
		((IAnnotationModelListener) listeners[i]).modelChanged(model);
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:10,代码来源:CompilationUnitDocumentProvider.java

示例4: EmbeddedXtextSourceEditor

import org.eclipse.jface.text.source.IAnnotationModelListener; //导入依赖的package包/类
/**
 * Creates an editor representation instance.
 * 
 * @param embeddedEditor the embedded editor
 * @param viewer the underlying source viewer
 * @param partialEditorModelAccess the model access
 * @param requireWorkspaceResource whether the editor requires a workspace resource and shall complain at least in 
 *   the logs or whether it shall be silent
 */
public EmbeddedXtextSourceEditor(EmbeddedEditor embeddedEditor, XtextSourceViewer viewer, 
    EmbeddedEditorModelAccess partialEditorModelAccess, boolean requireWorkspaceResource) {
    this.embeddedEditor = embeddedEditor;
    this.viewer = viewer;
    this.partialEditorModelAccess = partialEditorModelAccess;

    try {
        URI uri = embeddedEditor.getDocument().getResourceURI();
        java.net.URI netURI = new java.net.URI(uri.toString());
        IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocationURI(netURI);
        if (null != files && files.length > 0) {
            resource = files[0];
        } else {
            if (requireWorkspaceResource) {
                getLogger().error("No resource for " + uri);
            }
        }
    } catch (URISyntaxException e) {
        getLogger().exception(e);
    }

    viewer.getAnnotationModel().addAnnotationModelListener(new IAnnotationModelListener() {
        
        @Override
        public void modelChanged(IAnnotationModel model) {
            if (!skipNextUpdateEvent) { // loading / updating the model
                dirty = true;
            }
            skipNextUpdateEvent = false;
        }
    });
}
 
开发者ID:SSEHUB,项目名称:EASyProducer,代码行数:42,代码来源:EmbeddedXtextSourceEditor.java

示例5: addValidationStateListener

import org.eclipse.jface.text.source.IAnnotationModelListener; //导入依赖的package包/类
@Override
public void addValidationStateListener(IValidationStateListener listener) {
    if (null != listener) {
        IAnnotationModelListener delegatingListener = new ValidationStateListener(listener);
        validationStateListeners.put(listener, delegatingListener);
        viewer.getAnnotationModel().addAnnotationModelListener(delegatingListener);
    }
}
 
开发者ID:SSEHUB,项目名称:EASyProducer,代码行数:9,代码来源:EmbeddedXtextSourceEditor.java

示例6: removeValidationStateListener

import org.eclipse.jface.text.source.IAnnotationModelListener; //导入依赖的package包/类
@Override
public void removeValidationStateListener(IValidationStateListener listener) {
    if (null != listener) {
        IAnnotationModelListener delegatingListener =  validationStateListeners.remove(listener);
        if (null != delegatingListener && null != viewer) {
            IAnnotationModel model = viewer.getAnnotationModel();
            if (null != model) {
                model.removeAnnotationModelListener(delegatingListener);
            }
        }
    }
}
 
开发者ID:SSEHUB,项目名称:EASyProducer,代码行数:13,代码来源:EmbeddedXtextSourceEditor.java

示例7: addAnnotationModelListener

import org.eclipse.jface.text.source.IAnnotationModelListener; //导入依赖的package包/类
public void addAnnotationModelListener(IAnnotationModelListener listener) {
  if (!annotationModelListeners.contains(listener)) {
    annotationModelListeners.add(listener);
    fireModelChanged(new AnnotationModelEvent(this, true));
  }
}
 
开发者ID:eclipse,项目名称:eclemma,代码行数:7,代码来源:CoverageAnnotationModel.java

示例8: removeAnnotationModelListener

import org.eclipse.jface.text.source.IAnnotationModelListener; //导入依赖的package包/类
public void removeAnnotationModelListener(IAnnotationModelListener listener) {
  annotationModelListeners.remove(listener);
}
 
开发者ID:eclipse,项目名称:eclemma,代码行数:4,代码来源:CoverageAnnotationModel.java

示例9: addListener

import org.eclipse.jface.text.source.IAnnotationModelListener; //导入依赖的package包/类
public void addListener(IAnnotationModelListener listener) {
	fListenerList.add(listener);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:4,代码来源:CompilationUnitDocumentProvider.java

示例10: removeListener

import org.eclipse.jface.text.source.IAnnotationModelListener; //导入依赖的package包/类
public void removeListener(IAnnotationModelListener listener) {
	fListenerList.remove(listener);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:4,代码来源:CompilationUnitDocumentProvider.java

示例11: addGlobalAnnotationModelListener

import org.eclipse.jface.text.source.IAnnotationModelListener; //导入依赖的package包/类
public void addGlobalAnnotationModelListener(IAnnotationModelListener listener) {
	fGlobalAnnotationModelListener.addListener(listener);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:4,代码来源:CompilationUnitDocumentProvider.java

示例12: removeGlobalAnnotationModelListener

import org.eclipse.jface.text.source.IAnnotationModelListener; //导入依赖的package包/类
public void removeGlobalAnnotationModelListener(IAnnotationModelListener listener) {
	fGlobalAnnotationModelListener.removeListener(listener);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:4,代码来源:CompilationUnitDocumentProvider.java

示例13: addGlobalAnnotationModelListener

import org.eclipse.jface.text.source.IAnnotationModelListener; //导入依赖的package包/类
/**
 * Adds a listener that reports changes from all compilation unit annotation models.
 *
 * @param listener the listener
 */
void addGlobalAnnotationModelListener(IAnnotationModelListener listener);
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:7,代码来源:ICompilationUnitDocumentProvider.java

示例14: removeGlobalAnnotationModelListener

import org.eclipse.jface.text.source.IAnnotationModelListener; //导入依赖的package包/类
/**
 * Removes the listener.
 *
 * @param listener the listener
 */
void removeGlobalAnnotationModelListener(IAnnotationModelListener listener);
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:7,代码来源:ICompilationUnitDocumentProvider.java


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