Search in sources :

Example 1 with IDirtyStateManager

use of org.eclipse.xtext.ui.editor.IDirtyStateManager in project n4js by eclipse.

the class AbstractBuilderParticipantTest method setDocumentContent.

/**
 */
protected void setDocumentContent(String context, IFile file, XtextEditor fileEditor, String newContent) {
    IDirtyStateManager dirtyStateManager = getInjector().getInstance(IDirtyStateManager.class);
    TestEventListener eventListener = new TestEventListener(context, file);
    dirtyStateManager.addListener(eventListener);
    setDocumentContent(fileEditor, newContent);
    eventListener.waitForFiredEvent();
    dirtyStateManager.removeListener(eventListener);
    waitForUpdateEditorJob();
}
Also used : IDirtyStateManager(org.eclipse.xtext.ui.editor.IDirtyStateManager)

Aggregations

IDirtyStateManager (org.eclipse.xtext.ui.editor.IDirtyStateManager)1