Fixed Android build.

Minor fixes.
ecode: moved modules files.
This commit is contained in:
Martín Lucas Golini
2022-04-18 02:51:15 -03:00
parent d17ddef3f2
commit 5647f7a4bd
21 changed files with 1870 additions and 1855 deletions

View File

@@ -1,7 +1,7 @@
#include "ecode.hpp"
#include "autocompletemodule.hpp"
#include "formattermodule.hpp"
#include "lintermodule.hpp"
#include "modules/autocomplete/autocompletemodule.hpp"
#include "modules/formatter/formattermodule.hpp"
#include "modules/linter/lintermodule.hpp"
#include <algorithm>
#include <args/args.hxx>
@@ -361,18 +361,23 @@ void App::onFileDropped( String file ) {
Vector2f mousePos( mUISceneNode->getEventDispatcher()->getMousePosf() );
Node* node = mUISceneNode->overFind( mousePos );
UICodeEditor* codeEditor = mEditorSplitter->getCurEditor();
UITab* tab = nullptr;
if ( !node )
node = codeEditor;
if ( node && node->isType( UI_TYPE_CODEEDITOR ) ) {
codeEditor = node->asType<UICodeEditor>();
if ( !codeEditor->getDocument().isEmpty() && !Image::isImageExtension( file ) ) {
if ( ( codeEditor->getDocument().isLoading() || !codeEditor->getDocument().isEmpty() ) &&
!Image::isImageExtension( file ) ) {
auto d = mEditorSplitter->createCodeEditorInTabWidget(
mEditorSplitter->tabWidgetFromEditor( codeEditor ) );
codeEditor = d.second;
d.first->getTabWidget()->setTabSelected( d.first );
tab = d.first;
}
}
loadFileFromPath( file, false, codeEditor );
loadFileFromPath( file, false, codeEditor, [tab]( UICodeEditor*, const std::string& ) {
if ( tab )
tab->getTabWidget()->setTabSelected( tab );
} );
}
void App::onTextDropped( String text ) {

View File

@@ -1,6 +1,6 @@
#include "formattermodule.hpp"
#include "thirdparty/json.hpp"
#include "thirdparty/subprocess.h"
#include "../../thirdparty/json.hpp"
#include "../../thirdparty/subprocess.h"
#include <eepp/system/filesystem.hpp>
#include <eepp/system/iostreamstring.hpp>
#include <random>

View File

@@ -1,6 +1,6 @@
#include "lintermodule.hpp"
#include "thirdparty/json.hpp"
#include "thirdparty/subprocess.h"
#include "../../thirdparty/json.hpp"
#include "../../thirdparty/subprocess.h"
#include <algorithm>
#include <eepp/graphics/text.hpp>
#include <eepp/system/filesystem.hpp>