Java 类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;
}