[DEV] the Ctags is now availlable inmultiple files
This commit is contained in:
parent
33a36fa0f7
commit
e383600df6
@ -26,15 +26,11 @@
|
|||||||
#include <etk/tool.h>
|
#include <etk/tool.h>
|
||||||
#include <appl/Gui/TagFileList.h>
|
#include <appl/Gui/TagFileList.h>
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
// file browsing ...
|
|
||||||
#include <dirent.h>
|
|
||||||
}
|
|
||||||
|
|
||||||
#undef __class__
|
#undef __class__
|
||||||
#define __class__ "TagFileList"
|
#define __class__ "TagFileList"
|
||||||
|
|
||||||
extern const char * const applEventCtagsListSelect = "appl-event-ctags-list-select";
|
extern const char * const applEventCtagsListSelect = "appl-event-ctags-list-select";
|
||||||
|
extern const char * const applEventCtagsListUnSelect = "appl-event-ctags-list-un-select";
|
||||||
extern const char * const applEventCtagsListValidate = "appl-event-ctags-list-validate";
|
extern const char * const applEventCtagsListValidate = "appl-event-ctags-list-validate";
|
||||||
|
|
||||||
|
|
||||||
@ -77,7 +73,13 @@ uint32_t appl::TagFileList::GetNuberOfRaw(void) {
|
|||||||
|
|
||||||
bool appl::TagFileList::GetElement(int32_t colomn, int32_t raw, etk::UString &myTextToWrite, draw::Color &fg, draw::Color &bg) {
|
bool appl::TagFileList::GetElement(int32_t colomn, int32_t raw, etk::UString &myTextToWrite, draw::Color &fg, draw::Color &bg) {
|
||||||
if (raw >= 0 && raw < m_list.Size() && NULL != m_list[raw]) {
|
if (raw >= 0 && raw < m_list.Size() && NULL != m_list[raw]) {
|
||||||
myTextToWrite = *m_list[raw];
|
if (0==colomn) {
|
||||||
|
// note : tmp while the list support multiple colomn
|
||||||
|
myTextToWrite = m_list[raw]->filename;
|
||||||
|
myTextToWrite = m_list[raw]->filename + ":" + etk::UString(m_list[raw]->fileLine);
|
||||||
|
} else {
|
||||||
|
myTextToWrite = etk::UString(m_list[raw]->fileLine);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
myTextToWrite = "ERROR";
|
myTextToWrite = "ERROR";
|
||||||
}
|
}
|
||||||
@ -105,18 +107,16 @@ bool appl::TagFileList::OnItemEvent(int32_t IdInput, ewol::eventInputType_te typ
|
|||||||
} else {
|
} else {
|
||||||
m_selectedLine = raw;
|
m_selectedLine = raw;
|
||||||
}
|
}
|
||||||
|
const char * event = applEventCtagsListValidate;
|
||||||
if (previousRaw != m_selectedLine) {
|
if (previousRaw != m_selectedLine) {
|
||||||
if( m_selectedLine >=0
|
event = applEventCtagsListSelect;
|
||||||
&& m_selectedLine < m_list.Size()
|
}
|
||||||
&& NULL != m_list[m_selectedLine] ) {
|
if( m_selectedLine >=0
|
||||||
GenerateEventId(applEventCtagsListSelect, *m_list[m_selectedLine]);
|
&& m_selectedLine < m_list.Size()
|
||||||
}
|
&& NULL != m_list[m_selectedLine] ) {
|
||||||
|
GenerateEventId(event, etk::UString(m_list[raw]->fileLine)+":"+m_list[m_selectedLine]->filename);
|
||||||
} else {
|
} else {
|
||||||
if( m_selectedLine >=0
|
GenerateEventId(applEventCtagsListUnSelect);
|
||||||
&& m_selectedLine < m_list.Size()
|
|
||||||
&& NULL != m_list[m_selectedLine] ) {
|
|
||||||
GenerateEventId(applEventCtagsListValidate, *m_list[m_selectedLine]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// need to regenerate the display of the list :
|
// need to regenerate the display of the list :
|
||||||
MarkToRedraw();
|
MarkToRedraw();
|
||||||
@ -133,9 +133,9 @@ bool appl::TagFileList::OnItemEvent(int32_t IdInput, ewol::eventInputType_te typ
|
|||||||
* @param[in] jump line id
|
* @param[in] jump line id
|
||||||
* @return ---
|
* @return ---
|
||||||
*/
|
*/
|
||||||
void appl::TagFileList::Add(etk::UString file, int32_t line)
|
void appl::TagFileList::Add(etk::UString& file, int32_t line)
|
||||||
{
|
{
|
||||||
etk::UString *tmpFile = new etk::UString(file);
|
appl::TagListElement *tmpFile = new appl::TagListElement(file, line);
|
||||||
if (NULL != tmpFile) {
|
if (NULL != tmpFile) {
|
||||||
m_list.PushBack(tmpFile);
|
m_list.PushBack(tmpFile);
|
||||||
}
|
}
|
||||||
|
@ -34,13 +34,21 @@
|
|||||||
|
|
||||||
extern const char * const applEventCtagsListSelect;
|
extern const char * const applEventCtagsListSelect;
|
||||||
extern const char * const applEventCtagsListValidate;
|
extern const char * const applEventCtagsListValidate;
|
||||||
|
extern const char * const applEventCtagsListUnSelect;
|
||||||
|
|
||||||
namespace appl {
|
namespace appl {
|
||||||
|
class TagListElement {
|
||||||
|
public:
|
||||||
|
etk::UString filename;
|
||||||
|
int32_t fileLine;
|
||||||
|
TagListElement(etk::UString& file, int32_t line) : filename(file), fileLine(line) {};
|
||||||
|
~TagListElement(void) {};
|
||||||
|
};
|
||||||
class TagFileList : public ewol::List
|
class TagFileList : public ewol::List
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
int32_t m_selectedLine;
|
int32_t m_selectedLine;
|
||||||
etk::Vector<etk::UString *> m_list;
|
etk::Vector<appl::TagListElement*> m_list;
|
||||||
public:
|
public:
|
||||||
TagFileList(void);
|
TagFileList(void);
|
||||||
~TagFileList(void);
|
~TagFileList(void);
|
||||||
@ -65,7 +73,7 @@ namespace appl {
|
|||||||
* @param[in] jump line id
|
* @param[in] jump line id
|
||||||
* @return ---
|
* @return ---
|
||||||
*/
|
*/
|
||||||
void Add(etk::UString file, int32_t line);
|
void Add(etk::UString& file, int32_t line);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -133,7 +133,9 @@ appl::TagFileSelection::TagFileSelection(void)
|
|||||||
if (NULL == m_listTag) {
|
if (NULL == m_listTag) {
|
||||||
EWOL_ERROR("Can not allocate widget ==> display might be in error");
|
EWOL_ERROR("Can not allocate widget ==> display might be in error");
|
||||||
} else {
|
} else {
|
||||||
//m_widgetListFolder->RegisterOnEvent(this, ewolEventFSFolderValidate, ewolEventFileChooserListFolder);
|
m_listTag->RegisterOnEvent(this, applEventCtagsListValidate);
|
||||||
|
m_listTag->RegisterOnEvent(this, applEventCtagsListSelect);
|
||||||
|
m_listTag->RegisterOnEvent(this, applEventCtagsListUnSelect);
|
||||||
m_listTag->SetExpendX(true);
|
m_listTag->SetExpendX(true);
|
||||||
m_listTag->SetExpendY(true);
|
m_listTag->SetExpendY(true);
|
||||||
m_listTag->SetFillX(true);
|
m_listTag->SetFillX(true);
|
||||||
@ -168,11 +170,22 @@ void appl::TagFileSelection::OnReceiveMessage(ewol::EObject * CallerObject, cons
|
|||||||
{
|
{
|
||||||
EWOL_INFO("ctags LIST ... : \"" << eventId << "\" ==> data=\"" << data << "\"" );
|
EWOL_INFO("ctags LIST ... : \"" << eventId << "\" ==> data=\"" << data << "\"" );
|
||||||
if (eventId == applEventctagsSelection) {
|
if (eventId == applEventctagsSelection) {
|
||||||
GenerateEventId(eventId, "???");
|
if (m_eventNamed!="") {
|
||||||
|
GenerateEventId(applEventctagsSelection, m_eventNamed);
|
||||||
|
//==> Auto remove ...
|
||||||
|
AutoDestroy();
|
||||||
|
}
|
||||||
|
} else if (eventId == applEventCtagsListSelect) {
|
||||||
|
m_eventNamed = data;
|
||||||
|
|
||||||
|
} else if (eventId == applEventCtagsListUnSelect) {
|
||||||
|
m_eventNamed = "";
|
||||||
|
} else if (eventId == applEventCtagsListValidate) {
|
||||||
|
GenerateEventId(applEventctagsSelection, data);
|
||||||
//==> Auto remove ...
|
//==> Auto remove ...
|
||||||
AutoDestroy();
|
AutoDestroy();
|
||||||
} else if (eventId == applEventctagsCancel) {
|
} else if (eventId == applEventctagsCancel) {
|
||||||
//Nothing selected ...
|
GenerateEventId(applEventctagsCancel, "");
|
||||||
//==> Auto remove ...
|
//==> Auto remove ...
|
||||||
AutoDestroy();
|
AutoDestroy();
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,7 @@ namespace appl {
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
appl::TagFileList* m_listTag;
|
appl::TagFileList* m_listTag;
|
||||||
|
etk::UString m_eventNamed;
|
||||||
public:
|
public:
|
||||||
TagFileSelection(void);
|
TagFileSelection(void);
|
||||||
virtual ~TagFileSelection(void);
|
virtual ~TagFileSelection(void);
|
||||||
|
@ -36,13 +36,6 @@
|
|||||||
#undef __class__
|
#undef __class__
|
||||||
#define __class__ "CTagsManager"
|
#define __class__ "CTagsManager"
|
||||||
|
|
||||||
|
|
||||||
typedef struct{
|
|
||||||
char filename[MAX_FILE_NAME];
|
|
||||||
char RegExp[MAX_REG_EXP_SEARCH];
|
|
||||||
int32_t lineID;
|
|
||||||
} TagListFind_ts;
|
|
||||||
|
|
||||||
class CTagsManager: public ewol::EObject
|
class CTagsManager: public ewol::EObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -79,11 +72,9 @@ class CTagsManager: public ewol::EObject
|
|||||||
etk::UString m_tagFilename;
|
etk::UString m_tagFilename;
|
||||||
tagFile * m_ctagFile;
|
tagFile * m_ctagFile;
|
||||||
// history system
|
// history system
|
||||||
void AddToHistory(int32_t bufferID);
|
|
||||||
int32_t m_historyPos;
|
int32_t m_historyPos;
|
||||||
etk::Vector<etk::File*> m_historyList;
|
etk::Vector<etk::File*> m_historyList;
|
||||||
etk::Vector<TagListFind_ts> m_currentList;
|
void RegisterHistory(void);
|
||||||
void JumpAtID(int32_t selectID);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static CTagsManager* s_elementPointer = NULL;
|
static CTagsManager* s_elementPointer = NULL;
|
||||||
@ -127,6 +118,7 @@ CTagsManager::CTagsManager(void)
|
|||||||
m_historyPos = 0;
|
m_historyPos = 0;
|
||||||
RegisterMultiCast(ednMsgGuiCtags);
|
RegisterMultiCast(ednMsgGuiCtags);
|
||||||
RegisterMultiCast(ednMsgBufferId);
|
RegisterMultiCast(ednMsgBufferId);
|
||||||
|
RegisterMultiCast(ednMsgCtagsLoadFile);
|
||||||
EWOL_INFO("Ctags manager (INIT)");
|
EWOL_INFO("Ctags manager (INIT)");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,35 +141,15 @@ CTagsManager::~CTagsManager(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
etk::UString CTagsManager::GetFolder(etk::UString &inputString)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
char tmpVal[4096];
|
|
||||||
strncpy(tmpVal, inputString.c_str(), 4096);
|
|
||||||
tmpVal[4096-1] = '\0';
|
|
||||||
char *ptr = strrchr(tmpVal, '/');
|
|
||||||
if (NULL == ptr) {
|
|
||||||
ptr = strrchr(tmpVal, '\\');
|
|
||||||
}
|
|
||||||
etk::UString out = "./";
|
|
||||||
if (NULL != ptr) {
|
|
||||||
*ptr = '\0';
|
|
||||||
out = tmpVal;
|
|
||||||
out+= '/';
|
|
||||||
}
|
|
||||||
return out;
|
|
||||||
*/
|
|
||||||
etk::UString out = "./";
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char * ednEventPopUpCtagsLoadFile = "edn-event-load-ctags";
|
const char * ednEventPopUpCtagsLoadFile = "edn-event-load-ctags";
|
||||||
|
|
||||||
void CTagsManager::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
|
void CTagsManager::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
|
||||||
{
|
{
|
||||||
|
//EWOL_INFO("ctags manager event ... : \"" << eventId << "\" ==> data=\"" << data << "\"" );
|
||||||
if (eventId == ednMsgBufferId) {
|
if (eventId == ednMsgBufferId) {
|
||||||
//m_currentSelectedID = dataID;
|
//m_currentSelectedID = dataID;
|
||||||
} else if (eventId == ednEventPopUpCtagsLoadFile) {
|
} else if( eventId == ednEventPopUpCtagsLoadFile
|
||||||
|
|| eventId == ednMsgCtagsLoadFile) {
|
||||||
// open the new one :
|
// open the new one :
|
||||||
etk::File tmpFilename = data;
|
etk::File tmpFilename = data;
|
||||||
m_tagFilename = tmpFilename.GetShortFilename();
|
m_tagFilename = tmpFilename.GetShortFilename();
|
||||||
@ -214,6 +186,16 @@ void CTagsManager::OnReceiveMessage(ewol::EObject * CallerObject, const char * e
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
} else if (eventId == applEventctagsSelection) {
|
||||||
|
// save the current file in the history
|
||||||
|
RegisterHistory();
|
||||||
|
// parse the input data
|
||||||
|
char tmp[4096];
|
||||||
|
int32_t lineID;
|
||||||
|
sscanf(data.c_str(), "%d:%s", &lineID, tmp);
|
||||||
|
// generate envents
|
||||||
|
SendMultiCast(ednMsgOpenFile, tmp);
|
||||||
|
SendMultiCast(ednMsgGuiGotoLine, lineID - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -240,40 +222,9 @@ void CTagsManager::LoadTagFile(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTagsManager::AddToHistory(int32_t bufferID)
|
|
||||||
|
void CTagsManager::RegisterHistory(void)
|
||||||
{
|
{
|
||||||
// check tho history position : remove if needed
|
|
||||||
if (m_historyPos < etk_max(m_historyList.Size()-1, 0) ) {
|
|
||||||
for(int32_t iii= m_historyPos; iii < m_historyList.Size(); iii++) {
|
|
||||||
delete(m_historyList[iii]);
|
|
||||||
}
|
|
||||||
m_historyList.EraseLen(m_historyPos, m_historyList.Size() - m_historyPos);
|
|
||||||
}
|
|
||||||
// add the current element
|
|
||||||
etk::File currentFilename = BufferManager::Get(bufferID)->GetFileName();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int32_t CTagsManager::MultipleJump(void)
|
|
||||||
{
|
|
||||||
APPL_INFO("Multiple file destination ...");
|
|
||||||
appl::TagFileSelection* tmpWidget = new appl::TagFileSelection();
|
|
||||||
if (NULL == tmpWidget) {
|
|
||||||
APPL_ERROR("Can not allocate widget ==> display might be in error");
|
|
||||||
} else {
|
|
||||||
for (int32_t iii=0; iii<m_currentList.Size() ; iii++) {
|
|
||||||
tmpWidget->AddCtagsNewItem(m_currentList[iii].filename, m_currentList[iii].lineID);
|
|
||||||
}
|
|
||||||
PopUpWidgetPush(tmpWidget);
|
|
||||||
tmpWidget->RegisterOnEvent(this, applEventctagsSelection);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void CTagsManager::JumpAtID(int32_t selectID)
|
|
||||||
{
|
|
||||||
etk::File myFile = m_currentList[selectID].filename;
|
|
||||||
APPL_INFO("save curent filename and position : ");
|
APPL_INFO("save curent filename and position : ");
|
||||||
int32_t currentSelected = BufferManager::GetSelected();
|
int32_t currentSelected = BufferManager::GetSelected();
|
||||||
Buffer* tmpBuf = BufferManager::Get(currentSelected);
|
Buffer* tmpBuf = BufferManager::Get(currentSelected);
|
||||||
@ -283,15 +234,11 @@ void CTagsManager::JumpAtID(int32_t selectID)
|
|||||||
bufferFilename->SetLineNumber(tmpBuf->GetCurrentLine());
|
bufferFilename->SetLineNumber(tmpBuf->GetCurrentLine());
|
||||||
m_historyList.PushBack(bufferFilename);
|
m_historyList.PushBack(bufferFilename);
|
||||||
}
|
}
|
||||||
APPL_INFO(" OPEN the TAG file Destination : " << myFile );
|
|
||||||
SendMultiCast(ednMsgOpenFile, myFile.GetCompleateName());
|
|
||||||
SendMultiCast(ednMsgGuiGotoLine, m_currentList[selectID].lineID - 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CTagsManager::JumpTo(void)
|
void CTagsManager::JumpTo(void)
|
||||||
{
|
{
|
||||||
m_currentList.Clear();
|
|
||||||
if (NULL != m_ctagFile) {
|
if (NULL != m_ctagFile) {
|
||||||
// get the middle button of the clipboard ==> represent the current selection ...
|
// get the middle button of the clipboard ==> represent the current selection ...
|
||||||
etk::UString data = ewol::clipBoard::Get(ewol::clipBoard::CLIPBOARD_SELECTION);
|
etk::UString data = ewol::clipBoard::Get(ewol::clipBoard::CLIPBOARD_SELECTION);
|
||||||
@ -306,29 +253,33 @@ void CTagsManager::JumpTo(void)
|
|||||||
int32_t numberOfTags = 0;
|
int32_t numberOfTags = 0;
|
||||||
|
|
||||||
// For all tags : Save in an internal Structure :
|
// For all tags : Save in an internal Structure :
|
||||||
do {
|
etk::UString tmpFile(m_tagFolderBase + "/" + entry.file);
|
||||||
etk::UString destinationFilename = m_tagFolderBase;
|
etk::File myfile(tmpFile);
|
||||||
destinationFilename += "/";
|
int32_t lineID = entry.address.lineNumber;
|
||||||
destinationFilename += entry.file;
|
PrintTag(&entry, true);
|
||||||
APPL_WARNING("plop : \"" << destinationFilename << "\" from : " << m_tagFolderBase << " " << entry.file);
|
|
||||||
etk::File myfile = destinationFilename;
|
|
||||||
TagListFind_ts myStruct;
|
|
||||||
strncpy(myStruct.filename, myfile.GetCompleateName().c_str(), MAX_FILE_NAME);
|
|
||||||
myStruct.filename[MAX_FILE_NAME-1] = '\0';
|
|
||||||
strncpy(myStruct.RegExp, entry.address.pattern, MAX_REG_EXP_SEARCH);
|
|
||||||
myStruct.RegExp[MAX_REG_EXP_SEARCH-1] = '\0';
|
|
||||||
myStruct.lineID = entry.address.lineNumber;
|
|
||||||
// at at the corect position
|
|
||||||
m_currentList.PushBack(myStruct);
|
|
||||||
PrintTag(&entry, true);
|
|
||||||
} while (tagsFindNext (m_ctagFile, &entry) == TagSuccess);
|
|
||||||
|
|
||||||
|
if (tagsFindNext (m_ctagFile, &entry) == TagSuccess) {
|
||||||
if (1==m_currentList.Size() ) {
|
APPL_INFO("Multiple file destination ...");
|
||||||
JumpAtID(0);
|
appl::TagFileSelection* tmpWidget = new appl::TagFileSelection();
|
||||||
|
if (NULL == tmpWidget) {
|
||||||
|
APPL_ERROR("Can not allocate widget ==> display might be in error");
|
||||||
|
} else {
|
||||||
|
tmpWidget->AddCtagsNewItem(myfile.GetCompleateName(), lineID);
|
||||||
|
do {
|
||||||
|
tmpFile = m_tagFolderBase + "/" + entry.file;
|
||||||
|
myfile = tmpFile;
|
||||||
|
lineID = entry.address.lineNumber;
|
||||||
|
PrintTag(&entry, true);
|
||||||
|
tmpWidget->AddCtagsNewItem(myfile.GetCompleateName(), lineID);
|
||||||
|
} while (tagsFindNext (m_ctagFile, &entry) == TagSuccess);
|
||||||
|
PopUpWidgetPush(tmpWidget);
|
||||||
|
tmpWidget->RegisterOnEvent(this, applEventctagsSelection);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Open a choice windows...
|
RegisterHistory();
|
||||||
int32_t SelectID = MultipleJump();
|
APPL_INFO(" OPEN the TAG file Destination : " << tmpFile );
|
||||||
|
SendMultiCast(ednMsgOpenFile, myfile.GetCompleateName());
|
||||||
|
SendMultiCast(ednMsgGuiGotoLine, lineID - 1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
APPL_INFO("no tag find ...");
|
APPL_INFO("no tag find ...");
|
||||||
|
@ -55,6 +55,7 @@ extern const char* const ednMsgGuiShowSpaces = "edn-Msg-Gui-ShowSpaces";
|
|||||||
extern const char* const ednMsgGuiShowEndOfLine = "edn-Msg-Gui-ShowEndOfLine";
|
extern const char* const ednMsgGuiShowEndOfLine = "edn-Msg-Gui-ShowEndOfLine";
|
||||||
|
|
||||||
extern const char* const ednMsgGuiCtags = "edn-Msg-Gui-CTags";
|
extern const char* const ednMsgGuiCtags = "edn-Msg-Gui-CTags";
|
||||||
|
extern const char* const ednMsgCtagsLoadFile = "edn-Msg-CTags-direct-load";
|
||||||
|
|
||||||
extern const char* const ednMsgGuiReloadShader = "edn-Msg-Gui-ReloadOpenGlShader";
|
extern const char* const ednMsgGuiReloadShader = "edn-Msg-Gui-ReloadOpenGlShader";
|
||||||
|
|
||||||
|
@ -55,6 +55,7 @@
|
|||||||
extern const char* const ednMsgGuiShowEndOfLine; // data : "enable" "disable"
|
extern const char* const ednMsgGuiShowEndOfLine; // data : "enable" "disable"
|
||||||
|
|
||||||
extern const char* const ednMsgGuiCtags; // data : "Load" "ReLoad" "Jump" "Back"
|
extern const char* const ednMsgGuiCtags; // data : "Load" "ReLoad" "Jump" "Back"
|
||||||
|
extern const char* const ednMsgCtagsLoadFile; // data : "filename of the ctags file"
|
||||||
|
|
||||||
extern const char* const ednMsgGuiReloadShader; // data : ""
|
extern const char* const ednMsgGuiReloadShader; // data : ""
|
||||||
|
|
||||||
|
@ -141,11 +141,19 @@ void APP_Init(void)
|
|||||||
|
|
||||||
// add files
|
// add files
|
||||||
APPL_INFO("show list of files : ");
|
APPL_INFO("show list of files : ");
|
||||||
|
bool ctagDetected = false;
|
||||||
for( int32_t iii=0 ; iii<ewol::CmdLine::Nb(); iii++) {
|
for( int32_t iii=0 ; iii<ewol::CmdLine::Nb(); iii++) {
|
||||||
APPL_INFO("need load file : \"" << ewol::CmdLine::Get(iii) << "\"" );
|
|
||||||
etk::UString tmpppp = ewol::CmdLine::Get(iii);
|
etk::UString tmpppp = ewol::CmdLine::Get(iii);
|
||||||
ewol::EObjectMessageMultiCast::AnonymousSend(ednMsgOpenFile, tmpppp);
|
if (tmpppp == "-t") {
|
||||||
|
ctagDetected = true;
|
||||||
|
} else if (true == ctagDetected) {
|
||||||
|
APPL_INFO("Load ctag file : \"" << tmpppp << "\"" );
|
||||||
|
ctagDetected = false;
|
||||||
|
ewol::EObjectMessageMultiCast::AnonymousSend(ednMsgCtagsLoadFile, tmpppp);
|
||||||
|
} else {
|
||||||
|
APPL_INFO("need load file : \"" << tmpppp << "\"" );
|
||||||
|
ewol::EObjectMessageMultiCast::AnonymousSend(ednMsgOpenFile, tmpppp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
APPL_INFO("==> Init Edn (END)");
|
APPL_INFO("==> Init Edn (END)");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user