- Trim trailing blank lines from JSDoc descriptions to remove extra bottom space
- Add tooltip panning: drag M1 anywhere on tooltip panel body to reposition it freely
- HoverState: add smooth-scroll lerp (updateSmoothScroll, targetScrollOffset),
scrollbar thumb bounds (setScrollbarThumb), click/drag/release state methods,
and fix broken scrollTooltip/getTooltipScrollOffset/resetTooltipScroll methods
that referenced the deleted int field
- TokenHoverRenderer: call updateSmoothScroll each frame; store thumb bounds
for drag+hover detection; highlight thumb on hover/drag; reduce empty
DocumentationLine height from lineHeight+LINE_SPACING to lineHeight/2
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <[email protected]>
- Fixed clicking and adding hooks not properly resolving added types like INpcEvent.CollideEvent
- Imported wildcards of all available events in the given context.
i.e ScriptContext NPC has INpcEvent,IProjectileEvent,IAbilityEvent,etc.. as available wildcard imports
- Added nested types to autocomplete of outer classes so INpcEvent. shows InitEvent, UpdateEvent, InteractEvent,etc...
- Added wildcard imports to autocomplete
This change enables the script editor to display and validate generic type arguments
for method parameters that are erased to Object in Java's built-in collection interfaces.
MOTIVATION
----------
Java's Map, Collection, List, Deque, and concurrent variants use Object-typed parameters
(e.g., Map.get(Object), Collection.contains(Object)) for backward-compatibility reasons.
When the receiver is parameterized (e.g., HashMap<String, Integer>), the editor should
show get(String) instead of get(Object) to provide better hints and stricter validation.
IMPLEMENTATION
--------------
New GenericParameterAdapter utility (contract-level rules, NOT per-concrete-class):
- Covers 8 JDK collection contracts exhaustively (Map, ConcurrentMap, Collection, List,
Set, Deque, BlockingQueue, BlockingDeque)
- 35+ rules total mapping erased Object params to appropriate type arguments (K, V, or E)
- Integrated into MethodInfo.fromReflection() so all code paths (autocomplete, hover,
validation) use the same adapted parameter types
- Hover signature rendering now routes through MethodInfo for parameterized receivers,
ensuring consistency with autocomplete
Related-to: Generic type argument substitution framework (TypeSubstitutor, GenericContext)
which already applied V correctly; this extends that same mechanism to K/E for the
JDK's intentionally-erased-for-compatibility method parameters.
When the menu shrinks in windowed/cramped layouts, several paths still assumed MAX_VISIBLE_ITEMS (10) for maxScroll/hover/scrollbar calculations, making the last entries unreachable. Use the actual visible capacity (visibleItemsCount) consistently and normalize scissor Y conversion for scaled GUI coords
- add full parser/type-resolver support for Java method and constructor references
- infer SAM callback types for named JS script methods with conflict reporting
- surface argument-level SAM/type mismatch errors in method validation
Problem:
- function(act){...} expressions not reaching ExpressionParser
- resolveExpressionType only checked containsOperators() or startsWith("(")
- Function expressions went through simple resolver and returned null type
Solution:
- Added looksLikeFunctionOrLambda helper (lines 4766-4773) to detect:
* JS functions: function(...)
* Arrow functions: =>
* Java lambdas: ->
- Updated gate condition at line 4144 to route these into ExpressionParser
- Function expressions now reach ExpressionTypeResolver.resolveJSFunctionType
Impact:
- SAM typing now works in pass-2 when expected type is known
- Fixes schedule("TpGainAction", function(act){...}) argument typing
- Enables proper overload resolution for function/lambda parameters
ScriptDocument now tracks locals inside lambdas/function expressions and resolves identifiers by consulting the innermost callable scope before falling back to method/global scope.
Adds expression resolver nodes/type resolver and wires position-aware resolution for lambda bodies, plus basic lambda operator marking and return type validation against expected functional interface SAM.