liferay / liferay-intellij-plugin

Other
24 stars 30 forks source link

JSP could not detect the variables created by tags in IDEA Ultimate edition #126

Closed jtydhr88 closed 3 years ago

jtydhr88 commented 4 years ago

Create one 7.3 Liferay workspace along with one mvc-portlet module, open view JSP, and add the following codes, notice the testURL marked by red, means it is not able to be detected in this JSP file, but it should. image

dmarks2 commented 4 years ago

@jtydhr88 I know that it was working in the past. It seems that it stopped working somewhere with IntelliJ 2019.3 or so.

I've seen that problem, too, but I don't have a solution for that yet. If I am able to fix it I will send a PR...

dmarks2 commented 4 years ago

Hey @jtydhr88,

I was able to reproduce the problem. It seems that IntelliJ tries to load the ActionURLTei.class. However that does not work because the class needs com.liferay.portal.kernel.util.Validator (inside portal-kernel.jar) and that class again needs com.liferay.portal.kernel.util.StringBundler (again inside portal-kernel.jar) and that class again needs com.liferay.petra.lang.CentralizedThreadLocal (petra-lang.jar).

I was able to "fix" the problem by just adding a dependency to petra-lang in the mvc-portlet module.

I think there not much about what we can do inside the IntelliJ plugin to handle this.

gamerson commented 4 years ago

Hey Dominik, Could you try this dependency in the mvc-portlet project?

compileOnly group: "com.liferay.portal", name: "release.portal.api", version: "7.3.4-ga5"

You can remove all of the other compileOnly dependencies in that mvc-portlet project as the "release" api has everything in it that you should need to compile against. Let me know how it goes.

On Thu, Sep 3, 2020 at 5:08 AM Dominik Marks notifications@github.com wrote:

Hey @jtydhr88 https://github.com/jtydhr88,

I was able to reproduce the problem. It seems that IntelliJ tries to load the ActionURLTei.class. However that does not work because the class needs com.liferay.portal.kernel.util.Validator (inside portal-kernel.jar) and that class again needs com.liferay.portal.kernel.util.StringBundler (again inside portal-kernel.jar) and that class again needs com.liferay.petra.lang.CentralizedThreadLocal (petra-lang.jar).

I was able to "fix" the problem by just adding a dependency to petra-lang in the mvc-portlet module.

I think there not much about what we can do inside the IntelliJ plugin to handle this.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/liferay/liferay-intellij-plugin/issues/126#issuecomment-686389691, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAERKFIVKYY5N622SAM5F3LSD5TJ7ANCNFSM4QMFODNQ .

-- Greg Amerson Liferay Developer Tools Liferay, Inc. www.liferay.com

jtydhr88 commented 3 years ago

Fixed in intellij plugin 1.8.1 with portal 7.3 ga6, and configured target.platform.index.sources = true in liferay workspace. Closed.