The plugin requires a YAML configuration file. By default, it looks for codecocoon.yml in the project root.
Alternatively, you can overwrite the path in gradle.properties:
codecocoon.config=/path/to/config.ymlExample structure for the config file:
# Absolute or project-local path to the root of the project you want to transform
projectRoot: "/absolute/path/to/your/project"
# Optional: limit transformations to these files (relative to the root). Leave empty to target the entire project
files: ['path/to/file1.kt', 'path/to/file2.kt']
# The transformation pipeline. Order matters. Each transformation has:
# - id: unique identifier
# - config: arbitrary nested settings; only the selected transformation should interpret it
transformations:
- id: "TransformationA"
config:
prefix: "Tmp_"
includeScopes:
- "src/main"- Rename Method (id:
rename-method-transformation)- Renames Java methods to an LLM-suggested, semantically similar name and updates usages/overrides.
- Skips: overrides, tests, interface methods extending library interfaces, annotated methods, constructors, toString/get*/set*/is*, public methods with no refs, and methods referenced from non-Java/Kotlin files.
- Rename Class (id:
rename-class-transformation)- Renames Java classes to an LLM-suggested, semantically similar name and updates usages/overrides.
- Skips: classes referenced from non-Java files, test class names and annotated classes.
- Rename Variable (id:
rename-variable-transformation)- Renames Java variables to an LLM-suggested, semantically similar name and updates usages.
- Skips: variables in test classes, enums, and those declared in library-files.
- Create a new IntelliJ Platform Plugin Template project.
- Get familiar with the template documentation.
- Adjust the pluginGroup and pluginName, as well as the id and sources package.
- Adjust the plugin description in
README(see Tips) - Review the Legal Agreements.
- Publish a plugin manually for the first time.
- Set the
MARKETPLACE_IDin the above README badges. You can obtain it once the plugin is published to JetBrains Marketplace. - Set the Plugin Signing related secrets.
- Set the Deployment Token.
- Click the Watch button on the top of the IntelliJ Platform Plugin Template to be notified about releases containing new features and fixes.
- Configure the CODECOV_TOKEN secret for automated test coverage reports on PRs
This Fancy IntelliJ Platform Plugin is going to be your implementation of the brilliant ideas that you have.
This specific section is a source for the plugin.xml file which will be extracted by the Gradle during the build process.
To keep everything working, do not remove <!-- ... --> sections.
-
Using the IDE built-in plugin system:
Settings/Preferences > Plugins > Marketplace > Search for "CodeCocoon-Plugin" > Install
-
Using JetBrains Marketplace:
Go to JetBrains Marketplace and install it by clicking the Install to ... button in case your IDE is running.
You can also download the latest release from JetBrains Marketplace and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...
-
Manually:
Download the latest release and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...
Plugin based on the IntelliJ Platform Plugin Template.