use of org.jetbrains.annotations.TestOnly in project intellij-community by JetBrains.
the class UserDataHolderBase method getUserDataString.
@TestOnly
public String getUserDataString() {
final KeyFMap userMap = getUserMap();
final KeyFMap copyableMap = getUserData(COPYABLE_USER_MAP_KEY);
return userMap + (copyableMap == null ? "" : copyableMap.toString());
}
use of org.jetbrains.annotations.TestOnly in project android by JetBrains.
the class ForcedPluginPreviewVersionUpgradeDialog method setTestDialog.
@TestOnly
public static TestDialog setTestDialog(@NotNull TestDialog newValue) {
Application application = ApplicationManager.getApplication();
if (application != null) {
getLog().assertTrue(application.isUnitTestMode(), "This method is available for tests only");
}
TestDialog oldValue = ourTestImplementation;
ourTestImplementation = newValue;
return oldValue;
}
use of org.jetbrains.annotations.TestOnly in project intellij-plugins by JetBrains.
the class MovieSymbolTranscoder method transcode.
// symbolName - utf8 bytes
@TestOnly
public void transcode(File in, File out, byte[] symbolName) throws IOException {
this.symbolName = symbolName;
//noinspection IOResourceOpenedButNotSafelyClosed
transcode(new FileInputStream(in), in.length(), out, false);
}
use of org.jetbrains.annotations.TestOnly in project intellij-plugins by JetBrains.
the class HbTestUtils method setOpenHtmlAsHandlebars.
@TestOnly
public static void setOpenHtmlAsHandlebars(final boolean value, @NotNull final Project project, @NotNull Disposable parentDisposable) {
final boolean oldValue = HbConfig.shouldOpenHtmlAsHandlebars(project);
if (oldValue == value)
return;
HbConfig.setShouldOpenHtmlAsHandlebars(value, project);
Disposer.register(parentDisposable, new Disposable() {
@Override
public void dispose() {
HbConfig.setShouldOpenHtmlAsHandlebars(oldValue, project);
}
});
}
use of org.jetbrains.annotations.TestOnly in project idea-handlebars by dmarcotte.
the class HbTestUtils method setOpenHtmlAsHandlebars.
@TestOnly
public static void setOpenHtmlAsHandlebars(final boolean value, @NotNull final Project project, @NotNull Disposable parentDisposable) {
final boolean oldValue = HbConfig.shouldOpenHtmlAsHandlebars(project);
if (oldValue == value)
return;
HbConfig.setShouldOpenHtmlAsHandlebars(value, project);
Disposer.register(parentDisposable, new Disposable() {
@Override
public void dispose() {
HbConfig.setShouldOpenHtmlAsHandlebars(oldValue, project);
}
});
}
Aggregations