org.eclipse.xtext.ui.editor.DirtyStateEditorSupport的实例源码

项目:n4js    文件PrevstateAwareDirtyStateManager.java   
private DocumentBasedDirtyResource reflectiveGetInnerResource(final IDirtyResource dirtyResource) {
    Field[] declaredFields = dirtyResource.getClass().getDeclaredFields();
    DocumentBasedDirtyResource myDirtyResource = null;
    try {
        Field field = declaredFields[0];
        field.setAccessible(true);

        Object fieldValue = field.get(dirtyResource);

        if (fieldValue instanceof DirtyStateEditorSupport) {
            myDirtyResource = ((DirtyStateEditorSupport) fieldValue).getDirtyResource();
        }
    } catch (IllegalArgumentException | illegalaccessexception e) {
        // ignore
    }
    return myDirtyResource;
}
项目:bts    文件XtextDocument.java   
public void addModelListener(IXtextModelListener listener) {
    Assert.isNotNull(listener);
    synchronized (modelListeners) {
        if (modelListeners.contains(listener))
            return;
        if (listener instanceof DirtyStateEditorSupport) {
            modelListeners.add(0,listener);
        } else {
            modelListeners.add(listener);
        }
    }
}
项目:n4js    文件N4JSUiModule.java   
/**
 * A custom {@link DirtyStateEditorSupport} that uses a custom JobFamily.
 */
public Class<? extends DirtyStateEditorSupport> bindDirtyStateEditorSupport() {
    return N4JSDirtyStateEditorSupport.class;
}
项目:sadlos2    文件SadlUiModule.java   
public Class<? extends DirtyStateEditorSupport> bindDirtyStateEditorSupport() {
    return SadlDirtyStateEditorSupport.class;
}
项目:dsl-devkit    文件CheckUiModule.java   
/**
 * Fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=383919 (honor container visibility).
 * 
 * @return FixedDirtyStateEditorSupport
 */
@Override
public Class<? extends DirtyStateEditorSupport> bindDirtyStateEditorSupport() {
  return FixedDirtyStateEditorSupport.class;
}
项目:dsl-devkit    文件CheckcfgUiModule.java   
/**
 * Fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=383919 (honor container visibility).
 *
 * @return FixedDirtyStateEditorSupport
 */
@Override
public Class<? extends DirtyStateEditorSupport> bindDirtyStateEditorSupport() {
  return FixedDirtyStateEditorSupport.class;
}

相关文章

买水果
比较全面的redis工具类
gson 反序列化到多态子类
java 版本的 mb_strwidth
JAVA 反转字符串的最快方法,大概比StringBuffer.reverse()性...
com.google.gson.internal.bind.ArrayTypeAdapter的实例源码...