[DEV] remove compilation warning
This commit is contained in:
parent
3ec3fa00d9
commit
c421bd5f90
@ -299,7 +299,7 @@ bool appl::Buffer::search(const appl::Buffer::Iterator& _pos,
|
||||
for (Iterator it = _pos;
|
||||
(bool)it == true;
|
||||
++it) {
|
||||
if (tolower(*it) == firstElement) {
|
||||
if ((char32_t)tolower(*it) == firstElement) {
|
||||
// find the first char ==> check next...
|
||||
bool find = true;
|
||||
Iterator tmp = it;
|
||||
@ -371,7 +371,7 @@ bool appl::Buffer::searchBack(const appl::Buffer::Iterator& _pos,
|
||||
(bool)it == true;
|
||||
--it) {
|
||||
//APPL_DEBUG("compare : " << *it << " ?= " << _search);
|
||||
if (tolower(*it) == lastElement) {
|
||||
if ((char32_t)tolower(*it) == lastElement) {
|
||||
// find the last char ==> check previous...
|
||||
bool find = true;
|
||||
_result = it;
|
||||
@ -759,12 +759,12 @@ void appl::Buffer::regenerateHighLightAt(int64_t _pos, int64_t _nbDeleted, int64
|
||||
} else {
|
||||
elemStart = startId+1;
|
||||
}
|
||||
for (int64_t iii = elemStart; iii < m_HLDataPass1.size(); ++iii) {
|
||||
for (auto &it : m_HLDataPass1) {
|
||||
//APPL_DEBUG("move element=" << i);
|
||||
m_HLDataPass1[iii].beginStart += _nbAdded - _nbDeleted;
|
||||
m_HLDataPass1[iii].beginStop += _nbAdded - _nbDeleted;
|
||||
m_HLDataPass1[iii].endStart += _nbAdded - _nbDeleted;
|
||||
m_HLDataPass1[iii].endStop += _nbAdded - _nbDeleted;
|
||||
it.beginStart += _nbAdded - _nbDeleted;
|
||||
it.beginStop += _nbAdded - _nbDeleted;
|
||||
it.endStart += _nbAdded - _nbDeleted;
|
||||
it.endStop += _nbAdded - _nbDeleted;
|
||||
}
|
||||
//Regenerate Element inside range
|
||||
if ( startId == -1
|
||||
@ -827,7 +827,7 @@ void appl::Buffer::findMainHighLightPosition(int64_t _startPos,
|
||||
------------ ------------- ----------
|
||||
S=-1 *************** E
|
||||
*/
|
||||
for (int32_t iii = 0; iii < m_HLDataPass1.size(); ++iii) {
|
||||
for (size_t iii = 0; iii < m_HLDataPass1.size(); ++iii) {
|
||||
if (m_HLDataPass1[iii].endStop > _startPos) {
|
||||
break;
|
||||
}
|
||||
@ -848,7 +848,7 @@ void appl::Buffer::findMainHighLightPosition(int64_t _startPos,
|
||||
} else {
|
||||
elemStart = _startId+1;
|
||||
}
|
||||
for (int32_t iii = elemStart; iii < m_HLDataPass1.size(); ++iii) {
|
||||
for (size_t iii = elemStart; iii < m_HLDataPass1.size(); ++iii) {
|
||||
if (m_HLDataPass1[iii].beginStart > _endPos) {
|
||||
_stopId = iii;
|
||||
break;
|
||||
@ -872,7 +872,7 @@ void appl::Buffer::cleanHighLight() {
|
||||
|
||||
appl::HighlightInfo* appl::Buffer::getElementColorAtPosition(int64_t _pos, int64_t &_starPos) {
|
||||
int32_t start = etk_max(0, _starPos-1);
|
||||
for (int32_t iii = start; iii < m_HLDataPass1.size(); ++iii) {
|
||||
for (size_t iii = start; iii < m_HLDataPass1.size(); ++iii) {
|
||||
_starPos = iii;
|
||||
if ( m_HLDataPass1[iii].beginStart <= _pos
|
||||
&& m_HLDataPass1[iii].endStop > _pos) {
|
||||
|
@ -248,7 +248,7 @@ namespace appl {
|
||||
};
|
||||
Iterator operator+ (const size_t _val) const {
|
||||
Iterator tmpp(*this);
|
||||
for (int64_t iii=0; iii<_val; ++iii) {
|
||||
for (int64_t iii=0; iii<(int64_t)_val; ++iii) {
|
||||
++tmpp;
|
||||
}
|
||||
return tmpp;
|
||||
@ -273,7 +273,7 @@ namespace appl {
|
||||
};
|
||||
Iterator operator- (const size_t _val) const {
|
||||
Iterator tmpp(*this);
|
||||
for (int64_t iii=0; iii<_val; ++iii) {
|
||||
for (int64_t iii=0; iii<(int64_t)_val; ++iii) {
|
||||
--tmpp;
|
||||
}
|
||||
return tmpp;
|
||||
|
@ -88,7 +88,7 @@ void appl::BufferManager::onObjectRemove(const ewol::object::Shared<ewol::Object
|
||||
|
||||
ewol::object::Shared<appl::Buffer> appl::BufferManager::get(int32_t _id) {
|
||||
int32_t id = 0;
|
||||
for (auto it : m_list) {
|
||||
for (auto &it : m_list) {
|
||||
if (id == _id) {
|
||||
return it;
|
||||
}
|
||||
@ -98,7 +98,7 @@ ewol::object::Shared<appl::Buffer> appl::BufferManager::get(int32_t _id) {
|
||||
}
|
||||
|
||||
bool appl::BufferManager::exist(const std::string& _fileName) {
|
||||
for (auto it : m_list) {
|
||||
for (auto &it : m_list) {
|
||||
if (it == nullptr) {
|
||||
continue;
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ void appl::GlyphPainting::reload() {
|
||||
APPL_ERROR("Can not get basic array : 'ednColor'");
|
||||
return;
|
||||
}
|
||||
for (int32_t iii = 0; iii < baseArray->size(); ++iii) {
|
||||
for (size_t iii = 0; iii < baseArray->size(); ++iii) {
|
||||
ejson::Object* tmpObj = baseArray->getObject(iii);
|
||||
if (tmpObj == NULL) {
|
||||
APPL_DEBUG(" can not get object in 'ednColor' id=" << iii);
|
||||
@ -60,7 +60,7 @@ void appl::GlyphPainting::reload() {
|
||||
bool bold = tmpObj->getBooleanValue("bold", false);
|
||||
APPL_VERBOSE("find new color : '" << name << "' fg='" << foreground << "' bg='" << background << "' italic='" << italic << "' bold='" << bold << "'");
|
||||
bool findElement = false;
|
||||
for (int32_t jjj=0; jjj<m_list.size(); ++jjj) {
|
||||
for (size_t jjj=0; jjj<m_list.size(); ++jjj) {
|
||||
if (m_list[jjj].getName() != name) {
|
||||
continue;
|
||||
}
|
||||
@ -84,7 +84,7 @@ void appl::GlyphPainting::reload() {
|
||||
|
||||
|
||||
int32_t appl::GlyphPainting::request(const std::string& _name) {
|
||||
for (int32_t iii=0; iii<m_list.size(); ++iii) {
|
||||
for (size_t iii=0; iii<m_list.size(); ++iii) {
|
||||
if (m_list[iii].getName() == _name) {
|
||||
return iii;
|
||||
}
|
||||
|
@ -20,12 +20,12 @@
|
||||
static void SortElementList(std::vector<appl::dataBufferStruct*>& _list) {
|
||||
std::vector<appl::dataBufferStruct *> tmpList = _list;
|
||||
_list.clear();
|
||||
for(int32_t iii=0; iii<tmpList.size(); iii++) {
|
||||
for(size_t iii=0; iii<tmpList.size(); iii++) {
|
||||
if (NULL == tmpList[iii]) {
|
||||
continue;
|
||||
}
|
||||
int32_t findPos = 0;
|
||||
for(int32_t jjj=0; jjj<_list.size(); jjj++) {
|
||||
size_t findPos = 0;
|
||||
for(size_t jjj=0; jjj<_list.size(); jjj++) {
|
||||
//EWOL_DEBUG("compare : \""<<*tmpList[iii] << "\" and \"" << *m_listDirectory[jjj] << "\"");
|
||||
if (_list[jjj] == NULL) {
|
||||
continue;
|
||||
@ -68,11 +68,9 @@ BufferView::~BufferView() {
|
||||
}
|
||||
|
||||
void BufferView::removeAllElement() {
|
||||
for(int32_t iii=0; iii<m_list.size(); iii++) {
|
||||
if (NULL!=m_list[iii]) {
|
||||
delete(m_list[iii]);
|
||||
m_list[iii] = NULL;
|
||||
}
|
||||
for(auto &it : m_list) {
|
||||
delete(it);
|
||||
it = NULL;
|
||||
}
|
||||
m_list.clear();
|
||||
}
|
||||
@ -140,7 +138,7 @@ void BufferView::onReceiveMessage(const ewol::object::Message& _msg) {
|
||||
appl::dataBufferStruct* tmp = m_list[iii];
|
||||
m_list[iii] = NULL;
|
||||
m_list.erase(m_list.begin() + iii);
|
||||
insertAlphabetic(tmp, (iii == m_selectedID));
|
||||
insertAlphabetic(tmp, ((int64_t)iii == m_selectedID));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -164,7 +162,7 @@ void BufferView::onReceiveMessage(const ewol::object::Message& _msg) {
|
||||
tmpBuffer = m_bufferManager->getBufferSelected();
|
||||
}
|
||||
if (tmpBuffer != NULL) {
|
||||
for (int32_t iii=0; iii<m_list.size(); iii++) {
|
||||
for (size_t iii=0; iii<m_list.size(); iii++) {
|
||||
if (m_list[iii] == NULL) {
|
||||
continue;
|
||||
}
|
||||
@ -182,8 +180,8 @@ void BufferView::onReceiveMessage(const ewol::object::Message& _msg) {
|
||||
// clean The list
|
||||
removeAllElement();
|
||||
// get all the buffer name and properties:
|
||||
int32_t nbBufferOpen = 0; // BufferManager::size();
|
||||
for (int32_t iii=0; iii<nbBufferOpen; iii++) {
|
||||
size_t nbBufferOpen = 0; // BufferManager::size();
|
||||
for (size_t iii=0; iii<nbBufferOpen; iii++) {
|
||||
/*
|
||||
if (BufferManager::exist(iii)) {
|
||||
BufferText* tmpBuffer = BufferManager::get(iii);
|
||||
@ -209,9 +207,9 @@ void BufferView::onReceiveMessage(const ewol::object::Message& _msg) {
|
||||
markToRedraw();
|
||||
}else if (_msg.getMessage() == ednMsgBufferState) {
|
||||
// update list of modify section ...
|
||||
for (int32_t iii=0; iii<m_list.size(); iii++) {
|
||||
if (NULL!=m_list[iii]) {
|
||||
//m_list[iii]->m_isModify = BufferManager::get(m_list[iii]->m_bufferID)->isModify();
|
||||
for (auto &it : m_list) {
|
||||
if (it != nullptr) {
|
||||
//it->m_isModify = BufferManager::get(it->m_bufferID)->isModify();
|
||||
}
|
||||
}
|
||||
markToRedraw();
|
||||
@ -256,8 +254,8 @@ uint32_t BufferView::getNuberOfRaw() {
|
||||
|
||||
bool BufferView::getElement(int32_t _colomn, int32_t _raw, std::string& _myTextToWrite, etk::Color<>& _fg, etk::Color<>& _bg) {
|
||||
if( _raw >= 0
|
||||
&& _raw<m_list.size()
|
||||
&& NULL != m_list[_raw]) {
|
||||
&& _raw<(int64_t)m_list.size()
|
||||
&& m_list[_raw] != nullptr) {
|
||||
_myTextToWrite = m_list[_raw]->m_bufferName.getNameFile();
|
||||
|
||||
if ( m_list[_raw]->m_buffer != NULL
|
||||
@ -286,7 +284,7 @@ bool BufferView::onItemEvent(int32_t _IdInput, enum ewol::key::status _typeEvent
|
||||
if (1 == _IdInput && _typeEvent == ewol::key::statusSingle) {
|
||||
APPL_INFO("Event on List : IdInput=" << _IdInput << " colomn=" << _colomn << " raw=" << _raw );
|
||||
if( _raw >= 0
|
||||
&& _raw<m_list.size()
|
||||
&& _raw<(int64_t)m_list.size()
|
||||
&& NULL != m_list[_raw]) {
|
||||
if (m_list[_raw]->m_buffer != NULL) {
|
||||
sendMultiCast(appl::MsgSelectNewFile, m_list[_raw]->m_buffer->getFileName());
|
||||
|
@ -34,11 +34,10 @@ appl::TagFileList::TagFileList() {
|
||||
|
||||
|
||||
appl::TagFileList::~TagFileList() {
|
||||
for (int32_t iii=0; iii<m_list.size(); iii++) {
|
||||
delete(m_list[iii]);
|
||||
m_list[iii] = NULL;
|
||||
for (auto &it : m_list) {
|
||||
delete(it);
|
||||
it = NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
etk::Color<> appl::TagFileList::getBasicBG() {
|
||||
@ -59,7 +58,7 @@ uint32_t appl::TagFileList::getNuberOfRaw() {
|
||||
}
|
||||
|
||||
bool appl::TagFileList::getElement(int32_t _colomn, int32_t _raw, std::string& _myTextToWrite, etk::Color<>& _fg, etk::Color<>& _bg) {
|
||||
if (_raw >= 0 && _raw < m_list.size() && NULL != m_list[_raw]) {
|
||||
if (_raw >= 0 && (size_t)_raw < m_list.size() && NULL != m_list[_raw]) {
|
||||
if (0 == _colomn) {
|
||||
_myTextToWrite = std::to_string(m_list[_raw]->fileLine);
|
||||
} else {
|
||||
@ -86,7 +85,7 @@ bool appl::TagFileList::onItemEvent(int32_t _IdInput, enum ewol::key::status _ty
|
||||
EWOL_INFO("Event on List : IdInput=" << _IdInput << " colomn=" << _colomn << " raw=" << _raw );
|
||||
if (_IdInput == 1) {
|
||||
int32_t previousRaw = m_selectedLine;
|
||||
if (_raw > m_list.size() ) {
|
||||
if (_raw > (int64_t)m_list.size() ) {
|
||||
m_selectedLine = -1;
|
||||
} else {
|
||||
m_selectedLine = _raw;
|
||||
@ -96,7 +95,7 @@ bool appl::TagFileList::onItemEvent(int32_t _IdInput, enum ewol::key::status _ty
|
||||
event = applEventCtagsListSelect;
|
||||
}
|
||||
if( m_selectedLine >= 0
|
||||
&& m_selectedLine < m_list.size()
|
||||
&& m_selectedLine < (int64_t)m_list.size()
|
||||
&& NULL != m_list[m_selectedLine] ) {
|
||||
generateEventId(event, std::to_string(m_list[_raw]->fileLine)+":"+m_list[m_selectedLine]->filename);
|
||||
} else {
|
||||
|
@ -28,7 +28,7 @@ appl::WorkerSaveAllFile::WorkerSaveAllFile() :
|
||||
return;
|
||||
}
|
||||
// List all current open file :
|
||||
for (size_t iii=0; iii<m_bufferManager->size(); ++iii) {
|
||||
for (int32_t iii=0; iii<m_bufferManager->size(); ++iii) {
|
||||
ewol::object::Shared<appl::Buffer> tmpBuffer = m_bufferManager->get(iii);
|
||||
if (tmpBuffer == NULL) {
|
||||
continue;
|
||||
|
@ -56,7 +56,7 @@ appl::Highlight::Highlight(const std::string& _xmlFilename, const std::string& _
|
||||
int32_t level1 = 0;
|
||||
int32_t level2 = 0;
|
||||
// parse all the elements :
|
||||
for(int32_t iii = 0; iii < root->size(); ++iii) {
|
||||
for(size_t iii = 0; iii < root->size(); ++iii) {
|
||||
exml::Element* child = root->getElement(iii);
|
||||
if (child == NULL) {
|
||||
// trash here all that is not element ...
|
||||
@ -70,7 +70,7 @@ appl::Highlight::Highlight(const std::string& _xmlFilename, const std::string& _
|
||||
}
|
||||
} else if (child->getValue() == "pass1") {
|
||||
// get sub Nodes ...
|
||||
for(int32_t jjj=0; jjj< child->size(); jjj++) {
|
||||
for(size_t jjj=0; jjj< child->size(); jjj++) {
|
||||
exml::Element* passChild = child->getElement(jjj);
|
||||
if (passChild == NULL) {
|
||||
continue;
|
||||
@ -83,7 +83,7 @@ appl::Highlight::Highlight(const std::string& _xmlFilename, const std::string& _
|
||||
}
|
||||
} else if (child->getValue() == "pass2") {
|
||||
// get sub Nodes ...
|
||||
for(int32_t jjj=0; jjj< child->size(); jjj++) {
|
||||
for(size_t jjj=0; jjj< child->size(); jjj++) {
|
||||
exml::Element* passChild = child->getElement(jjj);
|
||||
if (passChild == NULL) {
|
||||
continue;
|
||||
@ -110,10 +110,10 @@ appl::Highlight::~Highlight() {
|
||||
}
|
||||
|
||||
bool appl::Highlight::hasExtention(const std::string& _ext) {
|
||||
for (int32_t iii=0; iii<m_listExtentions.size(); iii++) {
|
||||
APPL_VERBOSE(" check : " << m_listExtentions[iii] << "=?=" << _ext);
|
||||
if ( m_listExtentions[iii] == "*." + _ext
|
||||
|| m_listExtentions[iii] == _ext) {
|
||||
for (auto &it : m_listExtentions) {
|
||||
APPL_VERBOSE(" check : " << it << "=?=" << _ext);
|
||||
if ( it == "*." + _ext
|
||||
|| it == _ext) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -131,8 +131,8 @@ bool appl::Highlight::fileNameCompatible(const std::string& _fileName) {
|
||||
}
|
||||
APPL_DEBUG(" try to find : in \"" << file << "\" extention:\"" << extention << "\" ");
|
||||
|
||||
for (int32_t iii=0; iii<m_listExtentions.size(); iii++) {
|
||||
if (extention == m_listExtentions[iii] ) {
|
||||
for (auto &it : m_listExtentions) {
|
||||
if (extention == it ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -142,17 +142,17 @@ bool appl::Highlight::fileNameCompatible(const std::string& _fileName) {
|
||||
|
||||
void appl::Highlight::display() {
|
||||
APPL_INFO("List of ALL Highlight : ");
|
||||
for (int32_t iii=0; iii< m_listExtentions.size(); iii++) {
|
||||
APPL_INFO(" Extention : " << iii << " : " << m_listExtentions[iii] );
|
||||
for (auto &it : m_listExtentions) {
|
||||
APPL_INFO(" Extention : " << it );
|
||||
}
|
||||
// display all elements
|
||||
for (int32_t iii=0; iii< m_listHighlightPass1.size(); iii++) {
|
||||
APPL_INFO(" " << iii << " Pass 1 : " << m_listHighlightPass1[iii]->getName() );
|
||||
for (auto &it : m_listHighlightPass1) {
|
||||
APPL_INFO(" Pass 1 : " << it->getName() );
|
||||
//m_listHighlightPass1[iii]->display();
|
||||
}
|
||||
// display all elements
|
||||
for (int32_t iii=0; iii< m_listHighlightPass2.size(); iii++) {
|
||||
APPL_INFO(" " << iii << " Pass 2 : " << m_listHighlightPass2[iii]->getName() );
|
||||
for (auto &it : m_listHighlightPass2) {
|
||||
APPL_INFO(" pass 2 : " << it->getName() );
|
||||
//m_listHighlightPass2[iii]->display();
|
||||
}
|
||||
}
|
||||
@ -175,7 +175,7 @@ void appl::Highlight::parse(int64_t _start,
|
||||
while (elementStart <= elementStop) {
|
||||
HL_DEBUG("Parse element in the buffer pos=" << elementStart);
|
||||
//try to fond the HL in ALL of we have
|
||||
for (int64_t jjj=0; jjj<m_listHighlightPass1.size(); jjj++){
|
||||
for (int64_t jjj=0; jjj<(int64_t)m_listHighlightPass1.size(); jjj++){
|
||||
enum resultFind ret = HLP_FIND_OK;
|
||||
HL_DEBUG("Parse HL id=" << jjj << " position search: (" << elementStart << "," << _stop << ")" );
|
||||
// Stop the search to the end (to get the end of the pattern)
|
||||
@ -184,13 +184,13 @@ void appl::Highlight::parse(int64_t _start,
|
||||
HL_DEBUG("Find Pattern in the Buffer : (" << resultat.beginStart << "," << resultat.endStop << ")" );
|
||||
// remove element in the current List where the current Element have a end inside the next...
|
||||
int64_t kkk=_addingPos;
|
||||
while(kkk < _metaData.size() ) {
|
||||
while(kkk < (int64_t)_metaData.size() ) {
|
||||
if (_metaData[kkk].beginStart <= resultat.endStop) {
|
||||
// remove element
|
||||
HL_DEBUG("Erase element=" << kkk);
|
||||
_metaData.erase(_metaData.begin()+kkk, _metaData.begin()+kkk+1);
|
||||
// Increase the end of search
|
||||
if (kkk < _metaData.size()) {
|
||||
if (kkk < (int64_t)_metaData.size()) {
|
||||
// just befor the end of the next element
|
||||
elementStop = _metaData[kkk].beginStart-1;
|
||||
} else {
|
||||
@ -236,7 +236,7 @@ void appl::Highlight::parse2(int64_t _start,
|
||||
while (elementStart < elementStop) {
|
||||
//HL2_DEBUG("Parse element in the buffer pos=" << elementStart << "," << _buffer.size() << ")" );
|
||||
//try to fond the HL in ALL of we have
|
||||
for (int64_t jjj=0; jjj<m_listHighlightPass2.size(); jjj++){
|
||||
for (int64_t jjj=0; jjj<(int64_t)m_listHighlightPass2.size(); jjj++){
|
||||
enum resultFind ret = HLP_FIND_OK;
|
||||
HL2_DEBUG("Parse HL id=" << jjj << " position search: (" <<
|
||||
_start << "," << _buffer.size() << ")" );
|
||||
|
@ -15,6 +15,8 @@
|
||||
#undef __class__
|
||||
#define __class__ "highlightManager"
|
||||
|
||||
// TODO : Review this in a generic unique resource ...
|
||||
|
||||
static std::vector<ewol::object::Shared<appl::Highlight>>& s_list() {
|
||||
static std::vector<ewol::object::Shared<appl::Highlight>> list;
|
||||
return list;
|
||||
@ -31,14 +33,14 @@ void appl::highlightManager::init() {
|
||||
etk::FSNode myFile("DATA:languages/");
|
||||
// get the subfolder list :
|
||||
std::vector<etk::FSNode *> list = myFile.folderGetSubList(false, true, false,false);
|
||||
for (int32_t iii = 0; iii < list.size(); ++iii) {
|
||||
if (list[iii] == NULL) {
|
||||
for (auto &it : list) {
|
||||
if (it == NULL) {
|
||||
continue;
|
||||
}
|
||||
if (list[iii]->getNodeType() != etk::FSN_FOLDER) {
|
||||
if (it->getNodeType() != etk::FSN_FOLDER) {
|
||||
continue;
|
||||
}
|
||||
std::string filename = list[iii]->getName() + "/highlight.xml";
|
||||
std::string filename = it->getName() + "/highlight.xml";
|
||||
APPL_DEBUG("Load xml name : " << filename);
|
||||
ewol::object::Shared<appl::Highlight> myHightLine = appl::Highlight::keep(filename);
|
||||
if (myHightLine != NULL) {
|
||||
@ -49,11 +51,11 @@ void appl::highlightManager::init() {
|
||||
}
|
||||
// display :
|
||||
/*
|
||||
for (int32_t iii = 0; iii < hlList.size(); ++iii) {
|
||||
if (hlList[iii] == NULL) {
|
||||
for (auto &it : hlList) {
|
||||
if (it == NULL) {
|
||||
continue;
|
||||
}
|
||||
hlList[iii]->display();
|
||||
it->display();
|
||||
}
|
||||
*/
|
||||
}
|
||||
@ -74,15 +76,15 @@ std::string appl::highlightManager::getTypeExtention(const std::string& _extenti
|
||||
}
|
||||
APPL_DEBUG("Try to find type for extention : '" << _extention << "' in " << s_list().size() << " types");
|
||||
std::vector<ewol::object::Shared<Highlight>>& hlList = s_list();
|
||||
for (int32_t iii = 0; iii < hlList.size(); ++iii) {
|
||||
if (hlList[iii] == NULL) {
|
||||
for (auto &it : hlList) {
|
||||
if (it == NULL) {
|
||||
continue;
|
||||
}
|
||||
APPL_DEBUG(" check : " << hlList[iii]->getTypeName());
|
||||
if (hlList[iii]->hasExtention(_extention) == true) {
|
||||
APPL_DEBUG(" check : " << it->getTypeName());
|
||||
if (it->hasExtention(_extention) == true) {
|
||||
APPL_DEBUG("Find type for extention : " << _extention
|
||||
<< " type : " << hlList[iii]->getTypeName());
|
||||
return hlList[iii]->getTypeName();
|
||||
<< " type : " << it->getTypeName());
|
||||
return it->getTypeName();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
@ -92,13 +94,12 @@ std::string appl::highlightManager::getFileWithTypeType(const std::string& _type
|
||||
if (_type.size() == 0) {
|
||||
return "";
|
||||
}
|
||||
std::vector<ewol::object::Shared<Highlight>>& hlList = s_list();
|
||||
for (int32_t iii = 0; iii < hlList.size(); ++iii) {
|
||||
if (hlList[iii] == NULL) {
|
||||
for (auto &it : s_list()) {
|
||||
if (it == NULL) {
|
||||
continue;
|
||||
}
|
||||
if (hlList[iii]->getTypeName() == _type) {
|
||||
return hlList[iii]->getName();
|
||||
if (it->getTypeName() == _type) {
|
||||
return it->getName();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
|
@ -19,8 +19,8 @@
|
||||
|
||||
|
||||
appl::TextPluginCtags::TextPluginCtags() :
|
||||
m_tagFilename(""),
|
||||
m_tagFolderBase(""),
|
||||
m_tagFilename(""),
|
||||
m_ctagFile(NULL) {
|
||||
m_activateOnReceiveMessage = true;
|
||||
// load buffer manager:
|
||||
|
@ -48,22 +48,22 @@ bool appl::TextPluginMultiLineTab::onEventEntry(appl::TextViewer& _textDrawer,
|
||||
_textDrawer.copy(data, itStart, itStop);
|
||||
// TODO : Change this ...
|
||||
bool m_useTabs = true;
|
||||
int32_t m_tabDist = 4;
|
||||
size_t m_tabDist = 4;
|
||||
|
||||
if (true == _event.getSpecialKey().getShift() ) {
|
||||
// un-indent
|
||||
data.insert(0, 1, u32char::Return);
|
||||
for (int32_t iii=1; iii<data.size(); ++iii) {
|
||||
if (data[iii-1] != u32char::Return) {
|
||||
for (size_t iii=1; iii<data.size(); ++iii) {
|
||||
if ((char32_t)data[iii-1] != u32char::Return) {
|
||||
continue;
|
||||
}
|
||||
if(data[iii] == u32char::Tabulation) {
|
||||
if((char32_t)data[iii] == u32char::Tabulation) {
|
||||
data.erase(iii, 1);
|
||||
} else if(data[iii] == u32char::Space) {
|
||||
for (int32_t jjj=0; jjj<m_tabDist && jjj+iii<data.size() ; jjj++) {
|
||||
if(data[iii] == u32char::Space) {
|
||||
} else if((char32_t)data[iii] == u32char::Space) {
|
||||
for (size_t jjj=0; jjj<m_tabDist && jjj+iii<data.size() ; jjj++) {
|
||||
if((char32_t)data[iii] == u32char::Space) {
|
||||
data.erase(iii, 1);
|
||||
} else if(data[iii] == u32char::Tabulation) {
|
||||
} else if((char32_t)data[iii] == u32char::Tabulation) {
|
||||
data.erase(iii, 1);
|
||||
break;
|
||||
} else {
|
||||
@ -76,8 +76,8 @@ bool appl::TextPluginMultiLineTab::onEventEntry(appl::TextViewer& _textDrawer,
|
||||
} else {
|
||||
// indent
|
||||
data.insert(0, 1, u32char::Return);
|
||||
for (int32_t iii=1; iii<data.size(); iii++) {
|
||||
if (data[iii-1] != u32char::Return) {
|
||||
for (size_t iii=1; iii<data.size(); iii++) {
|
||||
if ((char32_t)data[iii-1] != u32char::Return) {
|
||||
continue;
|
||||
}
|
||||
if (true == _event.getSpecialKey().getCtrl() ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user