Detect mechanism for intellij environment