Commit Graph

1538 Commits

Author SHA1 Message Date
Martín Lucas Golini
fe8417bdc7 Fix debugger crash when attaching to a PID: Guard against dereferencing an empty debugger command and use stdio for local PID attachments unless socket transport is explicitly requested. 2026-08-01 23:32:48 -03:00
Martín Lucas Golini
da4d201eeb Implemented both opt-out settings for vscode config load, although enabled by default:
```json
  // autocomplete.json
  {
    "config": {
      "load_vscode_snippets": false
    }
  }

  // debugger.json
  {
    "config": {
      "load_vscode_launch_config": false
    }
  }
```

Disabling them affects only .vscode imports. Personal/.ecode snippets and .ecode/launch.json continue loading normally.

Refs SpartanJ/ecod€#111
2026-08-01 01:38:14 -03:00
Martín Lucas Golini
24302ec9f1 eterm: Use usable bounds instead of display bounds for window sizing. 2026-08-01 00:41:19 -03:00
Martín Lucas Golini
14207f228b eepp: Fixed a crash on single click navigation when selecting folder or file in UIFileDialog.
eeiv: Add drag & drop of images and folders. Added small welcome screen.
eterm: Detect windows below the default width and height and resize the window to fix the screen.
2026-08-01 00:31:55 -03:00
Martín Lucas Golini
13508c20d1 UIImageViewer expanded capabilities.
ecode image viewing will not auto-scale images to the pixel density.
eeiv: Modernizing eeiv to use eepp GUI, already working just like before, there are probably a few things to fix.
2026-07-31 01:25:41 -03:00
Martín Lucas Golini
51ceff9b08 Move eeiv to the main repo, I'll start modernizing the tool. 2026-07-31 00:04:21 -03:00
Martín Lucas Golini
1dc8195187 - add a searchable Insert Snippet Universal Locator provider
- support runtime locator provider registration and removal
- filter snippets with workspace-relative include/exclude globs
- add the remaining VS Code-compatible snippet variables
- support camelcase, pascalcase, snakecase, and kebabcase modifiers
- reuse the existing insertion flow for locator-selected snippets
- expand snippet parser and store test coverage
- update the implementation plan and C/C++ example snippets

Refs: SpartanJ/ecode#111
2026-07-29 18:49:01 -03:00
Martín Lucas Golini
683b35b249 feat(ecode): add VS Code-compatible user snippets
Add user-defined snippet support to the autocomplete plugin, including
language-specific, global, .vscode, and .ecode project snippets.

Support JSONC parsing, scopes, hot reload, source-aware ranking, exact
prefix replacement, multi-cursor insertion, contextual indentation,
variables, transforms, choices, linked placeholders, and tab navigation.

Recognize .code-snippets files as JSON and preserve existing LSP snippet
completion behavior.

Refs SpartanJ/ecode#111
2026-07-29 01:11:01 -03:00
Martín Lucas Golini
acd19069c3 Add table/tree view CSS properties, UIModelCreator, and optimize string allocations
- Add CSS properties: editable, selection-type, selection-kind, icon-size,
  sort-icon-size, main-column, row-header-width, table-flags (pipe-separated),
  indent-width, expander-icon-size, table-model
- Create UIModelCreator static factory with 4 built-in models:
  widgettree, filesystem, diskdrives, cssproperties
- Eliminate 17 heap-allocating std::string copies in applyProperty()
  handlers across 12 files using String::iequals with const refs
- Replace table-flags token parsing with allocation-free String::splitCb
- Update cssspecification.md with all new property documentation

Fixed fall-through bugs in applyProperty.
Fixed status terminal button "Terminal" not setting the tooltip text correctly.
2026-07-28 00:15:04 -03:00
Martín Lucas Golini
a113c0f6c9 Rename FrameBufferRegistry, ShaderProgramRegistry and VertexBufferRegistry file names.
Rename class and file of PackManager to PackRegistry to follow the new naming convention.
2026-07-26 23:16:24 -03:00
Martín Lucas Golini
9f4ae9e83c Font SubPixel antialiasing support for eterm and ui_html. 2026-07-25 21:24:45 -03:00
Martín Lucas Golini
27a57960f4 SubPixel hinting support. 2026-07-25 18:59:20 -03:00
Martín Lucas Golini
b940407102 ecode: The custom fallback font reused the "fallback-font" resource key, replacing the built-in CJK fallback in FontService.
Fix:

  - User fallback now uses "user-fallback-font".
  - Built-in CJK and custom fallback fonts remain registered together.
  - Added and passed a regression test verifying both fallback resources remain in the chain.

Fixes in premake5.lua:

  - Removed obsolete PRECISE_F32=1; Wasm already provides precise float behavior.
  - Moved ENVIRONMENT=worker,web to final application link options.

Fixed MarkdownView not getting the correct CSS style from the base theme.
2026-07-25 01:36:00 -03:00
Martín Lucas Golini
caa461a735 complete scoped ownership migration
- migrate themes, skins, icons, shaders, and shader programs to resource handles
  - make UIThemeManager scene-owned and publish resources through scopes and catalogs
  - retain shaders through their programs and expose non-owning GPU registries
  - replace FrameBuffer and VertexBuffer factory ownership with unique pointers
  - migrate engine, UI, tools, examples, tests, and eterm to the new ownership APIs
  - remove the obsolete raw-owning ResourceManager templates
  - document the completed Stage 7 architecture and remaining validation work
  - add ownership, registry, and scoped shader-program coverage
2026-07-24 22:45:31 -03:00
Martín Lucas Golini
6b277e508b migrate fonts to scoped resource ownership
- replace FontManager with per-ResourceScope FontService instances
  - publish font factories into explicit or default resource scopes
  - import default resources into UI scene scopes unless explicitly disabled
  - keep related font faces strongly owned without hot-path weak_ptr locking
  - add cached glyph advance queries without creating texture pages
  - fix font picker preview ownership, cleanup, and rapid switching
  - selectively evict TextLayout cache entries when referenced fonts unload
  - document FontService, ResourceCatalog, and cache invalidation semantics
  - migrate examples, tools, benchmarks, and tests to the scoped font API
  - expand coverage for font ownership, texture release, and layout caching
2026-07-24 01:54:51 -03:00
Martín Lucas Golini
373bd40e59 migrate texture atlases to scoped ownership
- replace TextureAtlasManager and GlobalTextureAtlas with catalog-backed atlas ownership
  - make TextureAtlas and TextureRegion creation return explicit resource handles
  - let atlases retain their textures and regions through shared ownership
  - add atlas publication, lookup, removal, and enumeration to ResourceCatalog and ResourceScope
  - make TextureAtlasLoader publish atlases and regions into an explicit resource scope
  - move theme atlas ownership into each theme resource catalog
  - migrate maps, editors, examples, and tests away from the global atlas manager
  - add scope-aware Sprite pattern-loading overloads while preserving default-scope compatibility
  - fix re-entrant style-state invalidation when applying styles creates new widgets
  - add atlas ownership, scoped Sprite lookup, and style-state regression coverage
  - update the resource ownership plan and texture atlas editor launch configuration
2026-07-23 01:41:11 -03:00
Martín Lucas Golini
b5efd6d709 Graphics: refine drawable cloning and icon source rendering:
Rename Drawable::createInstance() to clone() and update drawable implementations,
typed helpers, consumers, tests, tools, and external modules.

Avoid retaining private icon clones for immediate single-threaded rendering in the
code editor and ecode plugins. Borrow cached per-size icon sources instead, restoring
temporary color changes after drawing, while preserving owned clones for widgets,
menus, models, and other stateful consumers.

Reduce common drawable allocation overhead by lazily creating DrawableResource
callback state, using inline callback storage and notification snapshots, and safely
supporting callback disconnection during notification.

Lazily allocate UIImage and UINodeDrawable asynchronous lifetime tokens only when
an uncached asynchronous load is actually scheduled.

Document the distinction between borrowed immediate rendering and independently
owned drawable state.
2026-07-21 21:16:32 -03:00
Martín Lucas Golini
dc377335b9 graphics: migrate drawables to shared ownership
- introduce DrawablePtr and per-consumer createInstance() semantics
  - add TextureDrawable wrappers backed by shared TexturePtr handles
  - migrate regions, sprites, nine-patches, state lists, skins, groups, gradients,
    UI widgets, tools, modules, ecode, and eeiv to shared drawable ownership
  - remove ownIt flags, manual drawable deletion, and unload-based lifetime handling
  - replace drawable callback IDs with RAII change connections
  - move Variant drawable storage outside its scalar union
  - split UIIcon source lookup from explicit drawable instance creation
  - retain icon instances used by rendering loops instead of cloning per frame
  - avoid shared source mutation in texture-region consumers
  - use drawable type tags instead of RTTI casts
  - fix nearest-size UIIcon lookup
  - document the drawable source/instance contract and add ownership tests
2026-07-20 01:09:36 -03:00
Martín Lucas Golini
04f600bef5 graphics: move texture ownership to catalogs and scopes
Add ResourceCatalog and ResourceScope to provide explicit strong ownership
  and deterministic semantic lookup independently from the live texture
  registry.

  Let Engine own the global catalog and default Graphics scope, and give
  each UISceneNode an isolated scope that can be explicitly shared with
  other scenes.

  Remove TextureFactory's strong texture retention and name/hash lookup.
  The factory now observes textures weakly for identity, diagnostics, and
  deferred destruction without controlling their semantic lifetime.

  Migrate drawable resolution, texture atlas loading, UI image caches,
  tile maps, ecode resources, and related tests to scoped lookup and
  publication.

  Allow final TexturePtr release from worker threads while keeping actual
  texture destruction deferred to the graphics thread. Fix mismatched
  pixel deallocation uncovered by asynchronous texture loading tests.

  Add ownership, scope isolation, scene sharing, worker release, and
  decoder allocation regression tests, and update the shared-resource
  architecture plan through Stage 3.
2026-07-19 23:06:23 -03:00
Martín Lucas Golini
8556bda68c migrate texture consumers to shared ownership
- return TexturePtr from texture creation and lookup APIs
  - retain texture handles in regions, atlases, fonts, framebuffers, sprites, UI, and maps
  - keep queued batch textures alive until rendering completes
  - preserve asynchronous atlas load results directly
  - replace TextureLoader unload semantics with reset
  - remove public texture deletion APIs and obsolete Sprite ownership flags
  - migrate bundled tools, examples, tests, ecode, and diagnostics
  - document Stage 2 completion and the temporary factory retention boundary
2026-07-19 21:27:30 -03:00
Martín Lucas Golini
b0129880d8 Add LSP snippet navigation and expansion support
Implement LSP snippet parsing and editing sessions with tab stops, linked placeholders, choices, variables, transforms, visual feedback, and multi-cursor insertion.
This adds snippet support for LSP completion items. User-defined snippets will be implemented separately.
Refs SpartanJ/ecode#111
2026-07-18 16:51:45 -03:00
Martín Lucas Golini
f5ce1589e3 Some snippets improvements to support insertTextFormat (SpartanJ/ecode/discussions#929).
Closes SpartanJ/ecode#933
2026-07-18 13:31:06 -03:00
Martín Lucas Golini
0707225e13 Add shared texture lifetime scaffolding
- introduce process-wide ResourceId, resource handles, and shared metrics
  - manage textures through factory-owned control blocks and a weak live registry
  - defer final texture destruction until display-time batch work is flushed
  - diagnose externally retained textures during Engine shutdown
  - migrate texture identity APIs and consumers from Uint32 to ResourceId
  - decouple texture memory accounting from the TextureFactory singleton
  - replace UITextureViewer callbacks with generation-based weak snapshots
  - remove obsolete texture context-reload APIs and loader callback registry
  - add registry, identity, memory, restart, and deferred-release tests
  - mark Stage 1 complete in the shared-resource architecture plan
2026-07-15 01:42:46 -03:00
Martín Lucas Golini
0ae2537713 fix: bind UI resource deliveries to Engine lifetime
- add explicit open, closing, and closed states to the UISceneNode async delivery queue
    - reject delivery execution during shutdown and purge retained captures after scene producers join
    - reopen the queue cleanly when recreating Engine state in tests
    - add regressions for stale deliveries, retained captures, concurrent producers, and Engine restart
    - remove the obsolete and unused FrameBuffer context-loss reload API
    - simplify redundant namespace qualification in UI tests and ecode declarations
    - consolidate completed resource plans into the active ownership architecture
    - defer TextureLoader callback removal directly to Stage 1 live-texture observation
    - document the requirement to validate legacy lifecycles and prefer removing dead mechanisms
2026-07-14 21:05:39 -03:00
Martín Lucas Golini
513ef0f12b Move backward implementation to its own module but still have an special version for ecode. Integrate backward into unit-tests. 2026-07-13 11:00:35 -03:00
Martín Lucas Golini
a3d78a1217 Implemented Built-in Scientific Calculator in the universal bar for ecode (SpartanJ/ecode#701). 2026-07-02 18:51:12 -03:00
Martín Lucas Golini
2810501cba Added UIFilePickerDialog support for ecode (SpartanJ/ecode#903) and improved the dialog. 2026-06-30 00:05:29 -03:00
Martín Lucas Golini
3a1c75f4f6 Added Insert Date / Time functionality (Settings -> Edit -> Insert Date, plus commands for each option).
Fixed a use after free bug in UICodeEditorSplitter.
2026-06-28 01:52:14 -03:00
Martín Lucas Golini
e720b70863 • Fixed the keybinding merge bug. The helper was restoring missing default commands
by overwriting an occupied default shortcut, which treated user bindings like mod+d=duplicate-line-or-selection as stale
  because that command is not in the default keybinding table. Now it only adds a default when the default shortcut is actually
  free.

  Added a regression test in src/tests/unit_tests/uicodeeditor_tests.cpp:108 covering the reported case: mod+d reassigned, then
  an extra mod+e=show-markdown-preview binding exists. This was reported in SpartanJ/ecode#914.

• Implemented the splitter-level focus state cache, it will remember closed documents cursor state when reopened and it will restore cursor state per-code editor and not per-document (SpartanJ/ecode#893).
2026-06-25 11:26:31 -03:00
Martín Lucas Golini
0693688f73 Cache cursors in local sessions, this will restore last cursor position of a recently closed file. 2026-06-24 01:42:12 -03:00
Martín Lucas Golini
b83c21bfdd ecode: Display the keybindings of some commands I forgot to add the keybind display. 2026-06-15 13:25:22 -03:00
Martín Lucas Golini
3312419fd6 Fix horizontal scroll when line wrap type set is Line Breakin Column (SpartanJ/ecode#915).
A few improvements for related to LSP rules overriding (SpartanJ/ecode#913).
2026-06-13 18:40:33 -03:00
Martín Lucas Golini
96cee9d1c4 This should make premake5 configuration beta8 friendly.
Improvement for: SpartanJ/ecode#913.
2026-06-12 14:43:35 -03:00
Martín Lucas Golini
b91b922ac8 This should fix the use after free rare issue: C++ destroys class members in reverse declaration order. mProcess was declared before mHandlers. So during destruction, mHandlers was freed first, then mProcess destructor ran and joined the async read threads but by then the threads were already accessing freed memory. 2026-06-11 20:47:27 -03:00
Martín Lucas Golini
10588e3eb4 Revert last commit, won't fix it properly. 2026-06-11 15:29:36 -03:00
Martín Lucas Golini
ff97358695 This should fix a possible but very implausible heap-use-after-free issue in the LSP client. 2026-06-11 02:16:24 -03:00
Martín Lucas Golini
650bbed0c5 Add MiMo support. 2026-06-11 01:57:57 -03:00
Martín Lucas Golini
e8be533de6 eepp: Added FileMapped class for mmap'ed files, added IOStreamFileMapped to be able to use it as any other IOStream implementation.
Some nits in FileSystem::fileGet, added support for case-insensitive BMH implementation.
ecode: project global search now uses mmap'ed files for big files and made several tweaks and optimizations to avoid trashing the memory allocator.
2026-06-10 02:03:31 -03:00
Martín Lucas Golini
b64b8f21f0 Improve signature documentation pop-up positioning when displaying signature help.
In system font resolver: Prefer native/open desktop families for CSS generics.
2026-06-09 01:23:32 -03:00
Martín Lucas Golini
9bc9b099ad Implemented calc, min, max, clamp CSS functions. 2026-06-06 02:19:40 -03:00
Martín Lucas Golini
9bfa128658 Use the new tab position setting for *all* new tabs (SpartanJ/ecode#904). 2026-06-04 16:42:10 -03:00
Martín Lucas Golini
5d0e31e52e Allow to inspect widget style from widget inspector. 2026-06-04 02:00:39 -03:00
Martín Lucas Golini
11a2ca801c Optionally display signature help documentation in signature help (enabled by default), SpartanJ/ecode#911. 2026-06-03 11:27:51 -03:00
Martín Lucas Golini
0c98717089 Improvements for SpartanJ/ecode#906. 2026-05-26 19:49:32 -03:00
Martín Lucas Golini
28290c20ef Quick crash fix SpartanJ/eepp#181. 2026-05-26 13:56:48 -03:00
Martín Lucas Golini
89028491ef Try fix macOS not passing tests due to incorrect Window sizing in macOS CI.
Add support to diff images in UIDiffView.
2026-05-23 14:17:48 -03:00
Martín Lucas Golini
7daca81bd6 Allow to select the default "New Tab Position" (SpartanJ/ecode#904) from the settings menu at Settings -> Document -> Global Settings -> New Tab Position.
| Option | Behavior |
	| --- | --- |
	| **`afterActive`** | Opens immediately to the right of your currently focused tab. *(VS Code default)* |
	| **`last`** | Opens at the very end of the entire tab bar, to the right of all open tabs. |
	| **`first`** | Opens at the very beginning of the tab bar, to the far left. |
	| **`leftOfActive`** | Opens immediately to the left of your currently focused tab. |
2026-05-19 20:38:24 -03:00
Martín Lucas Golini
9d8dc55445 Fix crash when displaying signature help (SpartanJ/ecode#902). 2026-05-19 01:40:10 -03:00
Martín Lucas Golini
97fc336955 Fix: When build is triggered with unsaved files don't display the file save dialog for files that are just in text buffer.
Fix: Ctrl+W does not close the tab in Build Settings: Added Event::OnFocusWithin so the tab widget registers that event to setCurrenWidget in UICodeEditorSplitter.
2026-05-18 01:08:14 -03:00
Martín Lucas Golini
a870a278bb Forgot to update versioning. A couple of minor nits. 2026-05-08 16:50:46 -03:00