private static @NotNull SettingsEditorFragmentType getType(JComponent component, int commandLinePosition) {
    return component instanceof TagButton ? SettingsEditorFragmentType.TAG :
           commandLinePosition == -2 ? SettingsEditorFragmentType.BEFORE_RUN :
           commandLinePosition == -1 ? SettingsEditorFragmentType.HEADER :
           commandLinePosition == 0 ? SettingsEditorFragmentType.EDITOR :
           SettingsEditorFragmentType.COMMAND_LINE;
  }
private static @NotNull SettingsEditorFragmentType getType(JComponent component, int commandLinePosition)