If you encounter issues while working with the IntelliJ IDEA plugin, please report them. Internal people can report to JIRA in PFAUT project. Partners or customers can raise a ticket to the Support portal. If possible, add a screenshot or attach the IntelliJ IDEA log file to the message. The log file is located at Help > Show Log in Files/Explorer/Finder; idea.log is the current log file.
Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Why Auto-completion Is Not Working?
Logic 'elements' folders must be marked as a 'Source' folder
Did you mark the logic elements directories as source?
Pricefx Framework must be added to the project
Have you added the Pricefx Framework support? You should Upgrade Studio Project Libraries when a major Studio or Pricefx versions are released.
Re-activate GDSL Script Execution Once It Crashes
Info |
---|
This hint is applicable only for Studio version 8.3 and lower. |
GDSL is IntelliJ's native DSL Groovy-based language for defining additional auto-completion rules. Sometimes the GDSL execution crashes (typically when switching branches) and then IntelliJ IDEA stops the auto-completion for all projects.
When this happens, navigate to External Libraries > Pricefx API > logic-core.jar > PFXIdeaPublicGroovyAPI.gdsl in the project tree. If the auto-completion has crashed, then a yellow popup with the Activate back button appears. Note that it may take couple of seconds to appear. Once you click the button, the auto-completion is enabled again.
...
After re-activation, you can also purge the IntelliJ cache: File > Invalidate Caches / Restart > Invalidate and Restart. This forces IntelliJ IDEA to rebuild caches for the API documentation.
Make Logic Element Names Unique
It can happen that auto-completion does not work for referring elements within the same logic or in 'libs' (resp. legacy 'lib').
If you have two elements of the same name in the project, IntelliJ IDEA does not know which Class (each logic element is turned into a Class) should be evaluated.
The solution is to avoid having elements of the same name in the same project. You can, for example:
...
For library logics add a suffix "Utils" to the names of the Groovy library elements.
For other logics:
...
Rename the elements, if possible and reasonable.
...
Make sure Groovy API Library Is Added to Project
The Groovy API library must be part of the project, since it contains Pricefx interfaces/classes which are used by IDEA for auto-completion.
Open the project in IntelliJ IDEA.
Open the Maven tool window and click the Reload button. If you don’t see Maven tool window, right click the root folder and select Pricefx > Generate pom.xml.
Click Local Maven Project in the popup that appears.
This will add Studio: net.pricefx:groovy-api library in External libraries and auto-completion should work from now.Go to File > Invalidate Caches, select Clear file system cache and Local history and Clear VCS Log caches and indexes and click Invalidate and Restart.
Logic 'elements' Folders Must Be Marked as a 'Source' Folder
Did you mark the logic elements directories as source? To do that, open the Maven tool window and click the Reload button. If you don’t see Maven tool window, right click the root folder and select Pricefx > Generate pom.xml. Click Local Maven Project in the popup that appears.
...
Auto-Completion Works in General, but Not for
...
Some Classes
If the auto-completion does not work for Filter or if you you have an element called "Filter" in one of your logics? Try to give it another name , rename it as described in Naming Conventions. Alternatively explicitly add import com.googlecode.genericdao.search.Filter
.
Why the ctrl+click in code navigates me to a completely different element?
Make sure the element name is unique within a project, see related article:
How to Ensure Studio Uses the Latest Groovy API?
Each Studio version is bundled with a certain version of Groovy API. Make sure you are using the latest Studio to have the latest Groovy API. For details see Upgrade Studio Project Libraries.
...
Cannot Upgrade Studio
If you have not switched to JetBrains MarketPlace yet, follow these steps: https://pricefx.atlassian.net/wiki/spaces/KB/pages/1679196175/Install+Studio#Remove/Reinstall-Plugin.
PKIX Path Building Failed: SunCertPathBuilderException
If you get a following exception:
“net.pricefx.restapiclient.PfxClientException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target”
your computer is not able to cannot connect to Pricefx in a secure vay.
...
backend via SSL.
Troubleshooting steps:
Make sure you are using the latest supported IDEA version (as listed in the release notes). This will ensure that the latest certificate store database is used.
Go to the Pricefx partition using the web browser. If the browser display displays a problem with the certificate, check the error message. In case If the certificate expired, contact our support Pricefx Support via Helpdeskhelpdesk.
If your company requires using that a proxy server is used, set up the proxy server also in IDEA. See https://pricefx.atlassian.net/wiki/spaces/KB/pages/1679196175/Install+Studio#Install-Plugin.
if If you still cannot connect, your certificate store may be outdated (for older computers). In that case visit the pricefx Pricefx partition using the web browser. Export the certificate using the browser and import it to the IDEA certificate store in Preferences -> search “Server Certificates” > search “Server Certificates”.
If you are trying to connect to a partition on your localhost server with SSL enabled, you might need to generate a certificate that includes Subject Alternative Name (SAN) referencing the localhost domain name. An example using openssl:
Code Block language bash openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout privatekey.key -out certificate.crt -subj '/CN=localhost' -extensions san -config <(echo '[req]'; echo 'distinguished_name=req'; echo '[san]'; echo 'subjectAltName=DNS:localhost,IP:127.0.0.1')
Use that certificate in your Apache config and import it to the keystore of the JVM used to run Idea. It is usually located in the <Idea directory>/jbr/lib/security. Copy the certificate.crt there and run:
Code Block language bash keytool -keystore cacerts -importcert -alias certificate -file certificate.crt
If asked about a password, the default is “changeit”.
Restart Idea/PFX Studio and Apache and you should be able to connect to the localhost server’s partition.
IntelliJ IDEA General Troubleshooting
If IntelliJ IDEA is behaving strangely, the last chance is to remove the project related config files:
Invalidate caches: To invalidate caches, go to File > Invalidate Cache / Restart > Clear file system cache and Local History and Clear VCS Log caches and indexes and confirm Invalidate and Restart.
Close IDEA.
In the MacOS, delete IDEA config files of the project:
Browse to the project folder.
Find the .iml file in the project root and delete it.
Find the .idea folder in the project root and delete it.
Reopen the project in IDEA.
...