Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij - How do I change the file extension of a file from within the IDE?

Intellij - How do I change the file extension of a file from within the IDE? I want to change a file from .java to .groovy, but I can't figure out how from inside the IDE.

like image 454
Kyle Avatar asked Jan 24 '11 22:01

Kyle


People also ask

Can you customize IntelliJ?

You can install a custom theme from the JetBrains Plugin Repository as described in Managing plugins. It is also possible to create your own UI themes for IntelliJ IDEA and customize the built-in themes.

How do I change a read only file in IntelliJ?

To toggle read-only attribute of a file, open file in the editor, or select it in the Project tool window. Do one of the following: On the main menu, choose File | File Properties | Make File Read-Only , or Make File Writable .

Which file name extension is used by idea when saving a file?

IML file. The . idea folder and directory-based project format replaced IntelliJ IDEA's previous file-based project format, which utilized . IPR files.

How do I view modified files in IntelliJ?

The change history for a file is displayed in the dedicated History tab of the Version Control tool window Alt+9 . The change history for a selection of code is displayed in a separate window, in the form of the differences viewer.


2 Answers

Use project view -> right click on file -> refactor -> rename file

By default there is no shortcut assigned to this refactoring (Using Intellij 12.1.6) Refactor | Rename as CrazyCoder mentioned does not work for me. The file extension is not displayed.

like image 182
wischan Avatar answered Oct 14 '22 02:10

wischan


Use Refactor | Rename File….

This action has no default shortcut, but you can assign one in the Keymap settings.

rename file

like image 36
CrazyCoder Avatar answered Oct 14 '22 04:10

CrazyCoder