open file with full project path in eclipse - eclipse

This should not be too hard: I've got the path of a file relative to my project root (e.g. copied from the console: src/main/java/org/hello/World.java) and want to open this file in eclipse. I can't find how to do this.
I can open a resource and give it "world.java", but I might have many world.java files and I already have the full path in my clipboard so why start searching again.

Use Ctrl+Shift+R and put */ in front of the path (i.e. type Ctrl+Shift+R*/Ctrl+V)

Related

Files appear twice in quick open list

I am using vscode for java and c++ projects.
In both cases, when I want to open a file with quick open (ctrl+P) the file appears twice.
One time marked as 'recently opened' with relative path to my workspace and
A second time with an absolute path in home (~/home/harri/...)
It seems as vscode manages the files twice generally. I think so because if I opened a file from project explorer and go to a methods definition (command: Go to Definition | F12) then the file is opened a second time. I can see in the files editor tab that the paths do differ. One relative path one with absolute path.
Is this a problem of my settings?
I am running vscode 1.74.3

Netbeans ignoring upload relative file path

Netbeans has stopped uploading files using the relative file structure. No matter what I upload path settings I enter, it uploads only to the server root. How can I fix this?
The problem is just for one project; other projects using the same configuration are okay.
I compared the files in nbproject with a working project and there are no differences.
I changed the "upload directory" but it doesn't change where the file gets uploaded to
I deleted the project and
created it anew.
It seems to be simply ignoring the config.
On my local computer, the path is:
/MyNetbeans/Project
/Source Files
/folder1
/folder2
MyFile.php
/Include Path
/Remote Files
When I upload, it saves the file to
/folder2/MyFile.php
but it should save it to
/folder1/folder2/MyFile.php
Netbeans 12.0,
Windows 10
Any ideas for getting it to upload using the relative path?
SOLUTION: change the Sources folder in Project Properties.
From the Netbeans File menu > Project properties > under Categories select "Sources". Next to "Source folder:" click BROWSE. Navigate to the folder, higher or lower, in the local directory structure which matches the directory structure on the server > OK.
Upload the file and check the server to see where it was saved. Rinse, lather and repeat as necessary.

Viewing a modified file in eclipse

I was adding a simple file to one of my programs that updates when I run the program with a particular parameter.
The file updated fine, but it is stored in the /bin directory and I can't figure out how to view the file within the editor.
I can see that the file is updated when I traverse the bin folder manually and open it with notepad.
Is there a way to view the file within the editor?
edit: I have a file in the project already but I doesn't update, instead the copy in the bin folder does; Can I connect the two somehow?
Your <project>/bin directory is being filtered from view. Right click on your project, select Show In->Navigator then you should be able to see your /bin directory and double click your file to have it open in an editor.
Alternatively, you can use ctrl-shift-r to open the Open Resource dialog, from the triangle drop down menu check Show Derived Resources, and then type in the name of your file.
The /bin directory is managed by the Eclipse builders and so you may lose your file if you do a clean. I would suggest using a different directory to house your runtime files.

Open Type/Resource in Eclipse restricted to particular directory

When I use Open Type / Open Resource dialog in Eclipse and start typing the resource name I get the results from the entire project rather than from the source directories I specified in the project configuration. To be more specific - WEB-INF/classes binary directory is a part of my project but I do not want the files from that directory to appear in the Open Resource dialog results. Is there any way to restrict it?

How to rename subpackage folder name in eclipse

I am using WaveMaker and Eclipse IDE. In WaveMaker,I create java services and edit them using eclipse. Have to set its default service package's path into services/serviceName/src package folder.Right clicking on src folder and select 'Use as Source Folder' option open another window.
Now the problem is:
my folder name is now : services/serviceName/src/com/subpackage1/subpackage2/subpackage3/subpackage4/subpackage5
I want to rename it as services/serviceName/src with default package in which java file is there. Its not allowing me to rename it as above..
Below is the screenshot.
I want to rename it to services/userSignupService/src
I think you're slightly mistaken here.
services/serviceName/src/com/subpackage1/subpackage2 is not the name of your folder. It is just the full package path.
Your services/serviceName/src will still be there if you can go to the workspace in Windows Explorer and explore
Okay. I was giving full path name while creating java service in wavemaker. I've created it without full path. and in Eclipse, Right Click>Build Path>Use as source folder works.