use of com.android.tools.idea.editors.strings.StringResourceEditor in project android by JetBrains.
the class EditorFixture method getTranslationsEditor.
/**
* Returns a fixture around the {@link com.android.tools.idea.editors.strings.StringResourceEditor} <b>if</b> the currently
* displayed editor is a translations editor.
*/
@NotNull
public TranslationsEditorFixture getTranslationsEditor() {
return GuiQuery.getNonNull(() -> {
FileEditor[] editors = FileEditorManager.getInstance(myFrame.getProject()).getSelectedEditors();
checkState(editors.length > 0, "no selected editors");
FileEditor selected = editors[0];
checkState(selected instanceof StringResourceEditor, "not a %s: %s", StringResourceEditor.class.getSimpleName(), selected);
return new TranslationsEditorFixture(robot, (StringResourceEditor) selected);
});
}
Aggregations