Idea Phpstorm



PhpStorm hides the.idea folder in the project tool window by default. However, I'd like to show it in order to inspect the files and add/edit a.idea/.gitignore file to include and exclude specific files from version control. I have searched for project configuration options in order to unhide the.idea. IntelliJ IDEA: Capable and Ergonomic IDE for JVM. Out of the box, IntelliJ IDEA provides a comprehensive feature set including tools and integrations with the most important modern technologies and frameworks for enterprise and web development with Java, Scala, Groovy and other languages; PhpStorm: Professional IDE for PHP and Web Developers. IntelliJ IDEA vs WebStorm features. IntelliJ IDEA remains JetBrains' flagship product and IntelliJ IDEA provides full JavaScript support along with all other features of WebStorm via bundled or downloadable plugins. The only thing missing is the simplified project setup.

FeaturesIntelliJ IDEA

Co-Author: Rudy De Busscher, Payara

In this blog, we’re going to look at how to use Payara Server with IntelliJ IDEA Ultimate. We’ll cover how to create a simple web application that runs on a Payara server. We’ll also explore some of the features available to help you develop your enterprise applications.

Payara Server Support in IntelliJ IDEA

IntelliJ IDEA provides great tooling for developing with Payara servers. By default, IntelliJ IDEA Ultimate comes with the Glassfish plugin installed and enabled. You can use the Glassfish plugin to start, stop and debug Payara servers along with other server functionality.

The Payara Platform Tools plugin provides all the features available in the Glassfish plugin plus additional tooling features like the Hot Deploy functionality available in Payara. To install the Payara Platform Tools plugin, go to your IDE settings (File -> Settings for Windows/Linux or IntelliJ IDEA -> Preferences for macOS) and navigate to Plugins. Select the Marketplace tab and search for Payara. Click on the Install button. Once the plugin is finished installed, you can start using it without needing to restart the IDE.

Configuring Payara Server in IntelliJ IDEA

If you do not have Payara Server installed already, you can go to the Payara Platform Community Edition downloads page and download the latest version – for this blog I’m using Payara Server 5.2021.2 (Full). After you download the zip file, extract it.

In IntelliJ IDEA, go to Run -> Edit Configuration… then click the + button in the top left corner. If you’re using the Payara plugin, choose the Payara Server -> Local configuration option. If you’re using the Glassfish plugin, choose the Glassfish Server -> Local configuration option.

Idea.log

In the Server tab, Click on the Configure… button and specify the directory where you have unzipped the Payara Server. You can tell if you have selected the correct directory if the dialog indicates the version of the Payara server that is installed there. Click OK.

Creating a new Web Application

In IntelliJ IDEA Ultimate, I’ll create a new project by clicking File -> New -> Project…. I’ll select the Java Enterprise option on the left menu. Then, I’ll choose the project’s SDK. If you have an existing configured SDK in IntelliJ IDEA, it will be listed in the top of the SDK list. Or you can use the Download a JDK… option. I will use this option to download Java 11 since it’s the latest Java version compatible with Payara. In the Download JDK Version field, I will select Java 11 as my Java version – which will give me a list of vendors to choose from. You can select any of the vendors. For this tutorial, I will select AdoptOpenJDK with Hotspot. Then click Download.

I will use the Web application project template which will provide me with some basic template files for my application.

For the Application Server field, I’ll click on the drop-down menu and select the Payara Server that we configured in the previous step. Then, I’ll click Next.

In the next window, I will leave Java EE 8 selected with the Servlet framework checked then click Next.

Then, I’ll give my project a name – I’ll call it PayaraHelloWorld. I’ll also specify the Group id corresponding to my company name. Then, I’ll click Finish.

IntelliJ IDEA creates a simple web application and loads the project.

Note: the New Project window has changed slightly starting IntelliJ IDEA version 2021.1. You can perform similar steps to create your new project in 2021.1 and later versions.

Running the Web Application

In IntelliJ IDEA, I can use Shift+F10 for Windows/Linux or ^R for macOS to run my web application. The Services Window will come up and I’ll see the server logs showing the server starting.

Once the application is deployed, IntelliJ IDEA will open up my default browser and navigate to my web application in the browser.

Our web application is up and running!

Features for Jakarta EE Developers

IntelliJ IDEA Ultimate has many advanced features that makes development much easier for a Jakarta EE developer. Let us pick a few of them as covering them all will take too much space.

Code Completion and Refactoring

IntelliJ IDEA is aware of the context you are typing. A String is not just a series of characters when you are typing a JPA Query. The IDE detects that you are writing a query and offers you code completion as well as syntax checking.

For example, if you’re writing a JPA Query with an entity class called Customer, IntelliJ IDEA will provide you a list with the possible fields that you can use in the query.

The same goes for when you are writing JSF views. IntelliJ IDEA uses the information it finds in your CDI beans, for example, to suggest field values (although you still need to check if the values will be accepted since it also proposes Method Expressions when in this case only Value Expressions are allowed).

In addition, when you refactor your code, it replaces occurrences within Strings that describes your JPA Queries or JSF views. This way, you can write much more efficient and bug free code.

Validation

Along with the validation we already mentioned in the previous section, validations happen in many cases so that you get informed of problems before you need to test your application. For example, in the following image, IntelliJ IDEA Ultimate informs you that a JAX-RS resource class needs methods that are annotated with HTTP methods like @GET and @POST.

Or that a placeholder for a path parameter doesn’t match the value in the annotation.

Tools

IntelliJ IDEA has many tools built-in so you don’t need to leave your IDE. For example, you can interact with your Docker or Kubernetes environment right within the IDE. You see what is available, running and test your application immediately in a Docker Container.

Another useful tool is the Endpoints tool. You can have a look at all the JAX-RS endpoints that you have already defined in the application and view the OpenAPI document to see if they match with the requirements you have.

You can test out these endpoints and see not only the response but also the headers that you receive from the Payara Server.

Summary

IntelliJ IDEA has powerful enterprise features that make developing your enterprise applications easier, reliable and more efficient. Create your first web application on a Payara Server and try it out!

Idea Phpstorm 2019

See also

PhpStorm is a cross-platform IDE that provides consistent experience on the Windows, macOS, and Linux operating systems.

System requirements

RequirementMinimumRecommended
RAM2 GB of free RAM8 GB of total system RAM
CPUAny modern CPUMulti-core CPU. PhpStorm supports multithreading for different operations and processes making it faster the more CPU cores it can use.
Disk space2.5 GB and another 1 GB for cachesSSD drive with at least 5 GB of free space
Monitor resolution1024x7681920×1080
Operating system

Officially released 64-bit versions of the following:

  • Microsoft Windows 8 or later

  • macOS 10.13 or later

  • Any Linux distribution that supports Gnome, KDE, or Unity DE.

Pre-release versions are not supported.

Latest 64-bit version of Windows, macOS, or Linux (for example, Debian, Ubuntu, or RHEL)

You do not need to install Java to run PhpStorm because JetBrains Runtime is bundled with the IDE (based on 11).

Install using the Toolbox App

The JetBrains Toolbox App is the recommended tool to install JetBrains products. Use it to install and manage different products or several versions of the same product, including Early Access Program (EAP) releases, update and roll back when necessary, and easily remove any tool. The Toolbox App maintains a list of all your projects to quickly open any project in the right IDE and version.

Install the Toolbox App

  1. Download the installer .exe from the Toolbox App web page.

  2. Run the installer and follow the wizard steps.

After you run the Toolbox App, click its icon in the notification area and select which product and version you want to install.

Log in to your JetBrains Account from the Toolbox App and it will automatically activate the available licenses for any IDE that you install.

Install the Toolbox App

  1. Download the disk image .dmg from the Toolbox App web page.

    There are separate disk images for Intel and Apple Silicon processors.

  2. Mount the image and drag the JetBrains Toolbox app to the Applications folder.

After you run the Toolbox App, click its icon in the main menu and select which product and version you want to install.

Log in to your JetBrains Account from the Toolbox App and it will automatically activate the available licenses for any IDE that you install.

Install the Toolbox App

  1. Download the tarball .tar.gz from the Toolbox App web page.

  2. Extract the tarball to a directory that supports file execution.

    For example, if the downloaded version is 1.17.7391, you can extract it to the recommended /opt directory using the following command:

    sudo tar -xzf jetbrains-toolbox-1.17.7391.tar.gz -C /opt

Execute the jetbrains-toolbox binary from the extracted directory to run the Toolbox App and select which product and version you want to install. After you run the Toolbox App for the first time, it will automatically add the Toolbox App icon to the main menu.

Log in to your JetBrains Account from the Toolbox App and it will automatically activate the available licenses for any IDE that you install.

You can use this shell script that automatically downloads the tarball with the latest version of the Toolbox App, extracts it to the recommended /opt directory, and creates a symbolic link in the /usr/local/bin directory.

Standalone installation

Install PhpStorm manually to manage the location of every instance and all the configuration files. For example, if you have a policy that requires specific install locations.

  1. Download the installer.exe.

  2. Run the installer and follow the wizard steps.

    On the Installation Options step, you can configure the following:

    • Create a desktop shortcut for the launcher relevant to your operating system.

    • Add the directory with PhpStorm command-line launchers to the PATH environment variable to be able to run them from any working directory in the Command Prompt.

    • Add an item Open Folder as Project to the system context menu (when you right-click a folder).

    • Associate specific file extensions with PhpStorm to open them with a double-click.

    • Install the 32-bit version of JetBrains Runtime if you are running a 32-bit Windows version.

To run PhpStorm, find it in the Windows Start menu or use the desktop shortcut. You can also run the launcher batch script or executable in the installation directory under bin.

  1. Download the disk image.

    There are separate disk images for Intel and Apple Silicon processors.

  2. Mount the image and drag the PhpStorm app to the Applications folder.

Run the PhpStorm app from the Applications directory, Launchpad, or Spotlight.

  1. Download the tarball.tar.gz.

  2. Extract the tarball to a directory that supports file execution.

    For example, to extract it to the recommended /opt directory, run the following command:

Do not extract the tarball over an existing installation to avoid conflicts. Always extract it to a clean directory.

Execute the PhpStorm.sh script from the extracted directory to run PhpStorm.

To create a desktop entry, do one of the following:

  • On the Welcome screen, click Configure | Create Desktop Entry

  • From the main menu, click Tools | Create Desktop Entry

When you run PhpStorm for the first time, some steps are required to complete the installation, customize your instance, and start working with the IDE.

For more information, see Run PhpStorm for the first time.

For information about the location of the default IDE directories with user-specific files, see Default IDE directories.

Silent installation on Windows

Silent installation is performed without any user interface. It can be used by network administrators to install PhpStorm on a number of machines and avoid interrupting other users.

To perform silent install, run the installer with the following switches:

  • /S: Enable silent install

  • /CONFIG: Specify the path to the silent configuration file

  • /D: Specify the path to the installation directory

    This parameter must be the last in the command line and it should not contain any quotes even if the path contains blank spaces.

For example:

PhpStorm-*.exe /S /CONFIG=d:tempsilent.config /D=d:IDEPhpStorm

Intellij Idea Phpstorm

To check for issues during the installation process, add the /LOG switch with the log file path and name between the /S and /D parameters. The installer will generate the specified log file. For example:

PhpStorm-*.exe /S /CONFIG=d:tempsilent.config /LOG=d:JetBrainsPhpStorminstall.log /D=d:IDEPhpStorm

Silent configuration file

You can download the default silent configuration file for PhpStorm at https://download.jetbrains.com/webide/silent.config

The silent configuration file defines the options for installing PhpStorm. With the default options, silent installation is performed only for the current user: mode=user. If you want to install PhpStorm for all users, change the value of the installation mode option to mode=admin and run the installer as an administrator.

Phpstorm Idea Folder Location

The default silent configuration file is unique for each JetBrains product. You can modify it to enable or disable various installation options as necessary.

It is possible to perform silent installation without the configuration file. In this case, omit the /CONFIG switch and run the installer as an administrator. Without the silent configuration file, the installer will ignore all additional options: it will not create desktop shortcuts, add associations, or update the PATH variable. However, it will still create a shortcut in the Start menu under JetBrains.

Install as a snap package on Linux

You can install PhpStorm as a self-contained snap package. Since snaps update automatically, your PhpStorm installation will always be up to date.

Laravel Idea Phpstorm

To use snaps, install and run the snapd service as described in the installation guide.

On Ubuntu 16.04 LTS and later, this service is pre-installed.

PhpStorm is distributed via two channels:

  • The stable channel includes only stable versions. To install the latest stable release of PhpStorm, run the following command:

    The --classic option is required because the PhpStorm snap requires full access to the system, like a traditionally packaged application.

  • The edge channel includes EAP builds. To install the latest EAP build of PhpStorm, run the following command:

    sudo snap install phpstorm --classic --edge

When the snap is installed, you can launch it by running the phpstorm command.

Download Intellij Idea

To list all installed snaps, you can run sudo snap list. For information about other snap commands, see the Snapcraft documentation.