mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:27:45 +00:00
HackStudio: Don't take LexicalPath as argument
Also make use of LexicalPath::has_extension() in one place.
This commit is contained in:
parent
4befc2c282
commit
d410449d87
4 changed files with 19 additions and 17 deletions
|
@ -35,7 +35,7 @@ namespace HackStudio {
|
|||
class CodeDocument final : public GUI::TextDocument {
|
||||
public:
|
||||
virtual ~CodeDocument() override;
|
||||
static NonnullRefPtr<CodeDocument> create(const LexicalPath& file_path, Client* client = nullptr);
|
||||
static NonnullRefPtr<CodeDocument> create(const String& file_path, Client* client = nullptr);
|
||||
static NonnullRefPtr<CodeDocument> create(Client* client = nullptr);
|
||||
|
||||
const Vector<size_t>& breakpoint_lines() const { return m_breakpoint_lines; }
|
||||
|
@ -43,16 +43,16 @@ public:
|
|||
Optional<size_t> execution_position() const { return m_execution_position; }
|
||||
void set_execution_position(size_t line) { m_execution_position = line; }
|
||||
void clear_execution_position() { m_execution_position.clear(); }
|
||||
const LexicalPath& file_path() const { return m_file_path; }
|
||||
const String& file_path() const { return m_file_path; }
|
||||
Language language() const { return m_language; }
|
||||
|
||||
virtual bool is_code_document() const override final { return true; }
|
||||
|
||||
private:
|
||||
explicit CodeDocument(const LexicalPath& file_path, Client* client = nullptr);
|
||||
explicit CodeDocument(const String& file_path, Client* client = nullptr);
|
||||
explicit CodeDocument(Client* client = nullptr);
|
||||
|
||||
LexicalPath m_file_path;
|
||||
String m_file_path;
|
||||
Language m_language { Language::Unknown };
|
||||
Vector<size_t> m_breakpoint_lines;
|
||||
Optional<size_t> m_execution_position;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue