user626912
user626912

Reputation: 2560

Primefaces component library in IntelliJ IDEA 11

Is it possible to add the Primefaces component library to IntelliJ IDEA 11 so I can use autocompletion on those tags too? In Eclipse it automatically supports this, but I don't know why it does so or how it works so I am not able to fix this.

Here are two images on how it looks:

enter image description here

enter image description here


UPDATE and FIX
In order to fix this you have to go to project settings | libraries and then add the component library.

Upvotes: 5

Views: 6218

Answers (3)

Olatunde Garuba
Olatunde Garuba

Reputation: 1069

To add primefaces to your project in Intellij, add the dependency i.e

<dependency>
   <groupId>org.primefaces</groupId>
   <artifactId>primefaces</artifactId>
   <version>4.0</version>
</dependency>

to your pom.xml. and compile your project. After that, add primefaces URI to the list of tags usable on that page such as xmlns:p="http://primefaces.org/ui" and you will be fine.

Upvotes: 0

Stojan Končar
Stojan Končar

Reputation: 131

Set your cursor on the "http://primefaces.org/ui" text and ATL+ENTER. Choose 'Manually setup external resource'. 'Map External Resources' popup will appear. Choose 'Explorer' tab and select 'primefaces-p.taglib.xml' from primefaces.jar file.

Upvotes: 8

mikiSkipton
mikiSkipton

Reputation: 21

You need to add a technology (I think it's called - might be a facet).

When you create a Web Module Project, you have the option of selecting additional technologies. JSF is an option for Web. Under the JSF node is a sub-node with 4 faces technologies - one of which is Primefaces (others are IronFaces, RichFaces, and another).

When you select the required support option, IntelliJ IDEA will download the required libraries and add them to an existing or new lib.

I believe this functionality is only available in the full version; i.e., not Community Edition.

Upvotes: 2

Related Questions