mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 08:06:56 +07:00
It would be better not to place any classes in such a generic package. And it also causes red code due to IDEA-352819, so this needs to be fixed to allow enabling "Good code is red" inspection in "Zero Tolerance" checks. GitOrigin-RevId: d0edae5ceda7e95fe3b2b9726e5c3996ded149ca
24 lines
603 B
Java
24 lines
603 B
Java
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
|
package com.jetbrains.env;
|
|
|
|
import com.intellij.openapi.util.SystemInfo;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
import java.util.function.Supplier;
|
|
|
|
public enum TestEnv {
|
|
|
|
WINDOWS(() -> SystemInfo.isWindows), LINUX(() -> SystemInfo.isLinux), MAC(() -> SystemInfo.isMac);
|
|
|
|
@NotNull
|
|
private final Supplier<Boolean> myThisOs;
|
|
|
|
TestEnv(@NotNull final Supplier<Boolean> isThisOs) {
|
|
myThisOs = isThisOs;
|
|
}
|
|
|
|
public boolean isThisOs() {
|
|
return myThisOs.get();
|
|
}
|
|
}
|