Files
FlaxEngine/Source/Editor/Scripting/CodeEditors/CLionCodeEditor.h
T
Andrei Gagua eaf06e9523 Add CLion CMake facade project generation
Add CLion as a supported editor workflow for native C++ development.
The new -clion generation option writes a CMake facade project under
Cache/Projects/CMake/<ProjectName>, exposing a CLion-friendly code model,
build presets, and launcher targets while keeping Flax.Build as the source
of truth for native builds.
2026-06-09 15:16:35 +03:00

47 lines
1.3 KiB
C++

// Copyright (c) Wojciech Figat. All rights reserved.
#pragma once
#include "Editor/Scripting/CodeEditor.h"
/// <summary>
/// Implementation of code editor utility that is using CLion from JetBrains.
/// </summary>
class CLionCodeEditor : public CodeEditor
{
private:
String _execPath;
String _execArgsPrefix;
String _projectPath;
String GetProcessArguments(const String& arguments) const;
public:
/// <summary>
/// Initializes a new instance of the <see cref="CLionCodeEditor"/> class.
/// </summary>
/// <param name="execPath">Executable file path</param>
/// <param name="execArgsPrefix">Additional arguments to pass before CLion arguments.</param>
CLionCodeEditor(const String& execPath, const String& execArgsPrefix = String::Empty);
public:
/// <summary>
/// Tries to find installed CLion instances. Adds them to the result list.
/// </summary>
/// <param name="output">The output editors.</param>
static void FindEditors(Array<CodeEditor*>* output);
public:
// [CodeEditor]
CodeEditorTypes GetType() const override;
String GetName() const override;
String GetGenerateProjectCustomArgs() const override;
void OpenFile(const String& path, int32 line) override;
void OpenSolution() override;
void OnFileAdded(const String& path) override;
};