-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New: Add support for string concat expressions in MixinExtras. #2281
Merged
Earthcomputer
merged 1 commit into
minecraft-dev:mixinextras-expression
from
LlamaLad7:feature/mixinextras-string-concat-expressions
Apr 16, 2024
Merged
New: Add support for string concat expressions in MixinExtras. #2281
Earthcomputer
merged 1 commit into
minecraft-dev:mixinextras-expression
from
LlamaLad7:feature/mixinextras-string-concat-expressions
Apr 16, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src/main/kotlin/platform/mixin/handlers/mixinextras/ModifyExpressionValueHandler.kt
Outdated
Show resolved
Hide resolved
LlamaLad7
force-pushed
the
feature/mixinextras-string-concat-expressions
branch
from
April 14, 2024 22:14
b9b5671
to
e093065
Compare
Earthcomputer
approved these changes
Apr 16, 2024
Earthcomputer
merged commit Apr 16, 2024
ab50622
into
minecraft-dev:mixinextras-expression
4 checks passed
Earthcomputer
added a commit
that referenced
this pull request
Jul 12, 2024
* Start on MixinExtras Expression language * MEExpression color settings page * MEExpression annotator * MEExpression brace matcher and quote handler * Switch LHS of MEExpression assignmentExpression to themselves be certain types of expression * MEExpression language injection inside @expression * Fix formatting and licenses * Add MIXINEXTRAS:EXPRESSION injection point and add @expression annotation on completion * Fix licenser errors * Add new ME expression features * Implement MixinExtras expression collect visitor * Fix cast expressions * Simple best-effort source matching for ME expressions * Fix name expression source matching * Fix MEName.isWildcard * Fix MELitExpression source matching * operationSign - operationTokenType * Add built-in definitions * Update MixinExtras * Start with ME definition references * Attempt to overhaul ME expression injection * Some fixes to the new injection + navigation * MixinExtras: Add handler signature support for expressions. (#2244) * Partially fix ME definition renaming * Attempt to get inplace rename refactoring to work (it doesn't) * MixinExtras: Use expression-suggested parameter names if they're present. (#2257) * Fix MEExpressionInjector. Rename refactoring works! * Suppress deprecation warning * ME expression `@Definition` find usages * Fix/expressions int like types (#2261) * Mixin: Combine parameter and return type inspections. * MixinExtras: Offer a choice between all valid int-like types. * Mixin: Fix tests for handler signature inspection. * Add simple keyword completion to ME expressions * Why didn't my local ktlint tell me about these * Store whether a declaration is a type in the ME PSI * Add completions for items that already have a definition * Extract some ME expression matching into its own class, and cache some more things * Remove some debug code * First attempt at bytecode-based completion (it's broken) * Bytecode-based completion fixes * Add new definition annotations below existing definition annotations, or at the top * Fix cursor offset * Add utilities to textify various ASM nodes * Add expression variants, to allow MixinExtras to match expressions as if they were other types of expressions * Merge two expression types into a single MENewExpression, improve ME expression completion * Add better completion tail types * Fix completion not working inside of constructors * Add errors/warnings for unused and unresolved definitions, and highlight primitive types specially * Split MatchUtil into CompletionUtil * Fold @At.target for definition completions * Local variable completions * Some fixes to local variable completion * Fix can-be-implicit locals with inaccessible types not showing template * Show field and method types in completion list * Add completion tests, and make some fixes to completion * Fix folding on completion * Refactor mcdev settings, move shadow setting into a project setting * Add setting for position of @Definition relative to @expression * Add folding for @definitions * Fix array literal input completion * Fix ktlint * Relax uniqueness in ME expression completions * Initial switch from @Definition.at to field and method * Fix tests * Add references to @Definition.field and method * Add folding to @Definition.field and method * Add comments to MEExpressionCompletionUtil to explain the completion process in more detail * Fix @Local.type extraction * Add string literal completion for ME expressions * Fix @Local.type for source matching too * Fix parsing of multiple @expression annotations in a single modifier list * Format MEExpressionLexer.flex * Better handle parenthesized expressions in Java source matching * Add method reference expressions * Fix presentable name of method reference completions * Override matches(Handle) for method MemberDefinition * Update MixinExtras and don't assume that instructions are part of the method * Wrap expanded instructions in a custom type to prevent them accidentally being used when an instruction in the original method is expected or vice versa. * Fix IdentityHashMap with VirtualInsn keys * Update MixinExtras * Fix completion of new expressions with new MixinExtras update * Update MixinExtras, fixes compound instructions * New: Add support for string concat expressions in MixinExtras. (#2281) * Address PR comments * MixinExtras Expressions: Migrate to Expressions library. * Fix: Resolve being unable to get the descriptor for some complex types. * MixinExtras Expressions: Recreate `ClassInfo#getCommonSuperClassOrInterface`. It's quite scuffed and often returns `Object` even when there is a suitable common interface, but what's important is that this matches the runtime logic. * MixinExtras: Fix completion confidence. * Expressions: Autocomplete `method`s and `field`s using flows not instructions. * Expressions: Autocomplete `method`s for method references. * Expressions: A class constant is an expression. * Expressions: Show instantiation desc in autocomplete. * Expressions: Make completions always unique to stop them being filtered. We filter duplicates ourselves. * Expressions: Overhaul array completions. Make the preview text more representative of the actual completion and support array literals which were previously missing. * Expressions: Fix super call completions. * Expressions: Confidently suggest completions after `::`. * Expressions: Add intention action to define unresolved identifiers. * Expressions: Fix `@Local`s not properly handling compound insns. Also adapt to related MixinExtras changes. * Refactor: Add `project` as parameter to `MEExpressionCompletionUtil.addDefinition` * Use maven central MixinExtras library * Remove reference to light service in plugin.xml * Use ReentrantReadWriteLock.read and write extension functions --------- Co-authored-by: LlamaLad7 <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.