-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#6335: Add "Show in Def Tree" button to ClassnamePropertyEditor and I…
…nheritPropertyEditor. Move common code to shared Algorithm source file
- Loading branch information
1 parent
1fd16d7
commit dea567e
Showing
12 changed files
with
115 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#include "Algorithm.h" | ||
|
||
#include "ieclass.h" | ||
#include "icommandsystem.h" | ||
|
||
#include "wxutil/sourceview/DeclarationSourceView.h" | ||
|
||
namespace ui | ||
{ | ||
|
||
namespace algorithm | ||
{ | ||
|
||
void showEntityClassDefinition(wxWindow* parent, const std::string& entityClassName) | ||
{ | ||
if (auto eclass = GlobalEntityClassManager().findClass(entityClassName); eclass) | ||
{ | ||
auto view = new wxutil::DeclarationSourceView(parent); | ||
view->setDeclaration(eclass); | ||
|
||
view->ShowModal(); | ||
view->Destroy(); | ||
} | ||
} | ||
|
||
void showEntityClassInTree(const std::string& entityClassName) | ||
{ | ||
if (auto eclass = GlobalEntityClassManager().findClass(entityClassName); eclass) | ||
{ | ||
GlobalCommandSystem().executeCommand("EntityClassTree", cmd::ArgumentList{ eclass->getDeclName() }); | ||
} | ||
} | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#pragma once | ||
|
||
#include <string> | ||
|
||
namespace ui | ||
{ | ||
|
||
namespace algorithm | ||
{ | ||
|
||
// If the given entity class exists, this shows a DeclarationSourceView dialog with its definition | ||
void showEntityClassDefinition(wxWindow* parent, const std::string& eclass); | ||
|
||
// If the given entity class exists, the entity class tree dialog is shown with the given class pre-selected | ||
void showEntityClassInTree(const std::string& eclass); | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters