# Creating a fake local variable in a method

**URL:** <https://platform.jetbrains.com/t/creating-a-fake-local-variable-in-a-method/3954>\
**Category:** IntelliJ Platform\
**Tags:** api, plugin-development\
**Created:** [March 26, 2026, 11:05pm UTC](https://platform.jetbrains.com/t/creating-a-fake-local-variable-in-a-method/3954 "2026-03-26T23:05:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cputnam-a11y](https://sea1.discourse-cdn.com/flex001/user_avatar/platform.jetbrains.com/cputnam-a11y/32/2743_2.png) [@cputnam-a11y](https://platform.jetbrains.com/u/cputnam-a11y)\
**Post date:** [March 26, 2026, 11:05pm UTC](https://platform.jetbrains.com/t/creating-a-fake-local-variable-in-a-method/3954/1 "2026-03-26T23:05:31Z")

</div>

Hi, I’ve never made an idea plugin before, but I am comfortable programming with java and kotlin. I am trying to create an idea plugin to mimic the javac transforms happening in [GitHub - Auties00/Reified: Reified in Java 11 and upwards · GitHub](https://github.com/Auties00/reified) , but I figured a good place to start would be adding a fake local variable to a scope / method. I asked A.I. what the best method to use for this would be, and it suggested `com.intellij.psi.augment.PsiAugmentProvider`, but it seems like that only works for fields / methods. Any help would be appreciated 🙂.

I am using IntelliJ IDEA 2025.3.3 currently, but planning to update to latest soon.

---

<div class="post-metadata">

**Author:** ![bart.vanhelvert](https://sea1.discourse-cdn.com/flex001/user_avatar/platform.jetbrains.com/bart.vanhelvert/32/814_2.png) [@bart.vanhelvert](https://platform.jetbrains.com/u/bart.vanhelvert)\
**Post date:** [April 1, 2026, 1:14pm UTC](https://platform.jetbrains.com/t/creating-a-fake-local-variable-in-a-method/3954/2 "2026-04-01T13:14:55Z")

</div>

Hi, `PsiAugmentProvider` doesn’t provide the ability to change PSI and add local variables. What kind of IDE functionality are you trying to provide? Maybe changing the PSI is not needed.
