Foros de discusión

Trying to add src folder to Project Explorer In LR IDE

Peter Helgren, modificado hace 6 años.

Trying to add src folder to Project Explorer In LR IDE

Regular Member Mensajes: 124 Fecha de incorporación: 14/11/13 Mensajes recientes
I admit that it has been 2 months since I attended Liferay DXP developer training so I may be missing something VERY simple here. Here is the issue:

1) I have a service builder project that I put together shortly after returning from training. The -api and -service folders were created and when I run the gradle task buildService it completes normally. But, I don't see any src folder where the SB source should be. So I went to the module folder and checked the properties, taking the option to add the folder to the build path. But, in the Project Explorer view and the Navigator view I don't even see the folder in "Add folder". Further, when I try to add the folder or link to it I see the error "Folder already exists with a different case". The folder and the source files DO exist when I view them in Windows Explorer, I just can't expose them in the IDE so I can view or edit them.

2) Both my Liferay Workspace and the Liferay perspectives display as <Liferay Workspace> and <Liferay>. Are the < > symbols around the perspective names trying to tell me something (that might explain the src folder issue) ?

The development environment on my laptop that I used at the LR Training has neither of these problems. the src folders show up where they are supposed to and the perspectives don't have the < > around them. The Liferay IDE version I see in the installation details are the same: Liferay IDE 3.0.1.201606151031-ga2 on Eclipse Mars.2

Sigh...I missed some step in the setup. Any idea of what that might be?
thumbnail
Eddie Chow, modificado hace 6 años.

RE: Trying to add src folder to Project Explorer In LR IDE

Junior Member Mensajes: 53 Fecha de incorporación: 28/08/13 Mensajes recientes
Hey Pete,

What you may be experiencing is that Liferay Workspace may be out of date with the changes that you made after running service builder. What you can try to do is perform a Gradle refresh in the IDE and it should bring up the src folder and all the classes that are with it (*LocalServiceImpl, etc etc).

- Right Click on the Workspace in the IDE
- Select Gradle
- Click on Refresh Gradle Project

Or you can click on the Liferay Workspace and use the keyboard shortcut Ctrl + F5.

Let me know if this works out for you.
Peter Helgren, modificado hace 6 años.

RE: Trying to add src folder to Project Explorer In LR IDE (Respuesta)

Regular Member Mensajes: 124 Fecha de incorporación: 14/11/13 Mensajes recientes
Thanks! That set me down the right path, although it had a couple of more twists and turns. The base issue was, I think, the Grade refresh that was needed. But when I was trying to refresh the workspace I noticed I had an error message on the Microsoft TFS plugin, which was weird. So I researched that error and the recommendation was to close eclipse and then delete the .lock file in the metadata folder. So I did that and restarted Eclipse. There wasn’t any change. So, I went over the <Liferay Workspace> perspective CTRL-F5 and no joy. BUT!! I went back over to my project folders in the “Package Explorer” perspective and NOW I had the option to “Refresh Gradle project” and THAT did the trick. The folders for src appeared!

I still don’t know why I have the <Liferay> and <Liferay Workspace> listed like that with the <> but the folders are back and that was what I needed!

Not sure if it was the issue with Microsoft TFS OR just the .lock file, but all is (mostly) well now.
thumbnail
Andy Wu, modificado hace 6 años.

RE: Trying to add src folder to Project Explorer In LR IDE

Regular Member Mensajes: 195 Fecha de incorporación: 5/05/15 Mensajes recientes
Thanks for the reply Eddie , actually , in the next release ide 3.1 m3 , we have add such a feature that ide will auto-gradle-refresh after build-service if source folder doesn't exist.