Search in sources :

Example 26 with TestOnly

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());
}
Also used : KeyFMap(com.intellij.util.keyFMap.KeyFMap) TestOnly(org.jetbrains.annotations.TestOnly)

Example 27 with TestOnly

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;
}
Also used : TestDialog(com.intellij.openapi.ui.TestDialog) Application(com.intellij.openapi.application.Application) TestOnly(org.jetbrains.annotations.TestOnly)

Example 28 with TestOnly

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);
}
Also used : FileInputStream(java.io.FileInputStream) TestOnly(org.jetbrains.annotations.TestOnly)

Example 29 with TestOnly

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);
        }
    });
}
Also used : Disposable(com.intellij.openapi.Disposable) TestOnly(org.jetbrains.annotations.TestOnly)

Example 30 with TestOnly

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);
        }
    });
}
Also used : Disposable(com.intellij.openapi.Disposable) TestOnly(org.jetbrains.annotations.TestOnly)

Aggregations

TestOnly (org.jetbrains.annotations.TestOnly)56 Disposable (com.intellij.openapi.Disposable)18 VirtualFile (com.intellij.openapi.vfs.VirtualFile)8 NotNull (org.jetbrains.annotations.NotNull)7 Project (com.intellij.openapi.project.Project)5 Application (com.intellij.openapi.application.Application)4 Document (com.intellij.openapi.editor.Document)3 Editor (com.intellij.openapi.editor.Editor)3 THashSet (gnu.trove.THashSet)3 Nullable (org.jetbrains.annotations.Nullable)3 HighlightingPass (com.intellij.codeHighlighting.HighlightingPass)2 TextEditorHighlightingPass (com.intellij.codeHighlighting.TextEditorHighlightingPass)2 ApplicationEx (com.intellij.openapi.application.ex.ApplicationEx)2 ProcessCanceledException (com.intellij.openapi.progress.ProcessCanceledException)2 CollectionListModel (com.intellij.ui.CollectionListModel)2 THashMap (gnu.trove.THashMap)2 BackgroundEditorHighlighter (com.intellij.codeHighlighting.BackgroundEditorHighlighter)1 Pass (com.intellij.codeHighlighting.Pass)1 AutoPopupController (com.intellij.codeInsight.AutoPopupController)1 com.intellij.codeInsight.daemon (com.intellij.codeInsight.daemon)1