Though IntelliJ IDEA is a project-based IDE, you still can open (and even compile) files that are not currently within your project sources.
Steps to open non-project files:
1. Press Open File at the Toolbar or select File | Open File menu item.
2. The Open File dialog appears. Find and select a desired file and press Open.
3. If you open a java file, the External File dialog appears. Press Add Temporarily. This will open the file in the editor and a new entry will be added to the source path until the current IntelliJ IDEA session ends. This entry will represent the default package of the selected file. If you open a non-java file, it will be just open in the editor.
There are no comments on this document