Package and HTML editor issue with Eclipse and Gradle - java

I have created a gradle project in Eclipse and want to make it a web app. So I added the packages src/main/resources and src/main/webapp.
The thing now is that they wont show up in the project explorer.
My first question, how do I see my packages?
I can see the file inside the src directory, but then when I add a file index.html inside the src/main/webapp directory, it wont show up innside the editor window it starts running as a html document. How do I fix this?

In project explorer you might have checked empty packages.
Check the flag and make it unchecked as shown:
And the open html settings:
See associations:

Related

Customizing which files are shown in Netbeans' Project View under Project Files

I'm using Netbeans IDE (Version 13) for Java development.
In the projects view Netbeans shows a tab for "Project Files". This usually contains files like pom.xml, settings.xml and nb-configuration.xml for an opened Java project.
Now I have added some custom files in the same folder directory as the aforementioned files, namely a Jenkinsfile.config as well as a lombok.config file.
I would like Netbeans to show these files under the "Project Files" tab for each project but until now I wasn't able to find a solution for this.
I already added the file type ".config" as a file association for Netbeans and associated it to the MIME type "Properties Files".
Now Netbeans recognizes the files (an even their contents) when in the "Files" view but they are still not shown anywhere in the "Projects" view.
Does anyone have any suggestions?
[EDIT]: Ideally I would prefer a solution that doesn't require installing any plugins from sources outside of Apache (or similar).
Maybe it is even possible to just configure Netbeans to show the desired behaviour.
You can download and install plugin readmeinprojectview, see here how.
Then go to Tools -> Options -> Miscellaneous -> Display more files. Add the files you need to show in the Project tab. In your case they are Jenkinsfile and lombok.
The plugin by default adds the following files to the project tab under the root project node. Without the plugin, NetBeans for Maven-based projects displays ONLY logical folders under the root project node i.e. "Source Packages" or "Project Files"...
Currently you cannot put the files you want under the "Project files" node. Here is the source code of NetBeans for Maven-based project types. As you can see under the "Project files" node goes the following files only:
pom.xml
nbactions.xml
Files that start with nbactions- and end with .xml
nb-configuration.xml
Maven's default settings.xml

How do I get IntelliJ's Project Files view to show the packages and directories in the source folders?

I can't seem to figure out how to get IntelliJ to show the directories under src/main/java and src/main/resources. I've tried to delete my .idea file and reimport the project but that did not help. If you notice in the first image below, there is no arrow next to these source folders. The second image is what my source folders look like when I go to File > Project Structure > Modules. I see all of the directories/packages in the second picture, but I want to be able to navigate to them in the Project Files section.
How do I correct this?
Found the answer, just in case anyone else runs into this problem.
FYI, I'm on a Mac.
Go to File > Project Structure.
Make sure you are under the "Modules" section (under Project Settings on the left).
Select/Single-click the module that is giving you issues.
Click the minus sign above the module to delete the module (this will not delete the module from disk).
After deleting the module, add the project/module back again by going to the same place as before, but clicking the plus sign instead of the minus.
I think my particular issue is when I originally added my project and modules, I selected a specific Maven profile and for some reason IntelliJ wasn't allowing me to see my sub-directories under my source files in my project files view.

My src in Java Resources suddenly disappear

Im creating a Dynamic Web Project, and I have src in my Java Resources then suddenly src disappear inside of it. I find out that the src became a context folder in the root along with Java Resources, Build, WEB-INF and WebContent folders. Why this happened. Sorry for bad grammar. Thanks in advance.
Verify your java build path of the project and check if src is present there.
Right click on the project and select Build Path -> Configure Build Path.If src is not in build path it won't show you can add src folder in your build path of the project by following below steps,
right click on project
select properties
select java build path
goto source tab
click add folder
select your source folder (src/main/java)
Also look at perspective is will be in Navigator perspective.
In your IDE goto Windows-> Show View -> Navigator, check the image for the same try to change it to "navigator" view your will be able to see it. If not please share the images of it, then we will help you more
#msagala you have to Configure build path. Then under Source tab click Add button and you will see your existing source folder.
I hope this will help you.

How to add Open Sources Code Files in Eclipse, so that `Ctrl+Shift+R` shows the Source Code Files?

I am using Eclipse Luna, JDK1.7, JBPM7 and Maven in MyProject.
I want to debug my JBPM source files(TaskEventsServiceImpl.java,TaskContentServiceImpl.java), so i downloaded the Source files of JBPM
My Question :
How to add these files into my Project so that i can view the file(TaskContentServiceImpl.java) when i search in Ctrl+Shift+R?
WorkDone:
I added the following source folder in my Build Path of **MyProject** and Restarted my Eclipse.
But i am not able to view the file in my Ctrl+Shift+R.
Please, let me know the process of configuration so that i can view my source files when i search in Ctrl+Shift+R.
I believe Ctrl+Shift+R will only show you resources in t he current work space. To open a file on the project class-path I believe Ctrl+Shift+T should do the trick.

How to add pdf files to NetBeans project?

I'd like to be able to open pdf files in a NetBeans project like this for a help menu but I don't see a way to add the pdf files to the project in a way that they will become part of the distribution. The application needs to be able to find the pdf files. I thought there might be an option to add the files to the project resources but this doesn't seem to be an option.
If you have a resource folder in your project then just copy it in there and then clean and build
or right-click on the folder and create a package
folder called "documents". Put your pdf in there and clean-and-build.

Categories