Skip to content

Conversation

@InversionSpaces
Copy link
Collaborator

@InversionSpaces InversionSpaces commented Mar 5, 2025

JBRes-???? Support Java methods and lambda expressions modification in function modification stage

Description

Support body replacement with throw new UnsupportedOperationException("Removed by DD"); for Java methods and lambda expressions. For this, PSI collection was updated to include Java source files and PsiBodyReplacer was updated to support corresponding Java PSI elements.

How to test

Automated tests

project-minimization-plugin/src/test/kotlin/psi/manager/MinimizationPsiManagerGettingJavaTest.kt and project-minimization-plugin/src/test/kotlin/lens/FunctionModificationLensTest.kt

Self-check list

  • PR title and description are clear and aligned with a format.
  • I've added enough comments to my code, particularly in hard-to-understand areas.
  • The functionality I've repaired, changed or added is covered with automated tests.
  • Manual tests have been provided optionally.
  • The documentation for the functionality I've been working on is up-to-date/provided.
  • The link to this PR is commented on in the corresponding YT ticket.

Hint: [x] is a marked item

@InversionSpaces InversionSpaces changed the base branch from main to sbone/restructure March 5, 2025 09:44
@InversionSpaces InversionSpaces force-pushed the feat/support-java branch 4 times, most recently from 666741f to 32c7a38 Compare March 7, 2025 21:36
@InversionSpaces InversionSpaces changed the base branch from sbone/restructure to main March 10, 2025 07:26
@InversionSpaces InversionSpaces changed the base branch from main to sbone/restructure March 10, 2025 08:01
Base automatically changed from sbone/restructure to main March 10, 2025 13:23
@InversionSpaces InversionSpaces changed the title JBRes-???? Support Java [WIP] JBRes-???? Support Java in Function Modification Stage Mar 12, 2025
Copy link
Collaborator

@SBOne-Kenobi SBOne-Kenobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but it needs testing on some project

@InversionSpaces
Copy link
Collaborator Author

Checked by adding a java file to one of the test projects. It did work.

@InversionSpaces InversionSpaces merged commit 1479109 into main Mar 13, 2025
4 checks passed
@InversionSpaces InversionSpaces deleted the feat/support-java branch March 13, 2025 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants