Eclipse: Is it Possible to Open Files that are in a Workspace But Not in a Project? - eclipse

I have a folder hierarchy that looks like this:
- workspace
- some_folder
+ eclipse_project
Is it possible to open and view the hierarchy in the project explorer of Eclipse beginning at "some_folder," instead of at "eclipse_project?" If so, how is this accomplished? When I try importing, Eclipse obviously refuses to because the files in the outer folder are already in the workspace.
Or does this contradict the principle behind Eclipse and projects?
Thanks.

Or does this contradict the principle behind Eclipse and projects?
Yes, it does. The File menu does offer to let you Open File..., but whether it's supported by an editor and how much functionality is retained is entirely up to that editor. Some will flat-out fail.
As a workaround, you can create a New General->File, expand the Advanced section of the wizard, and set the new in-workspace file to link to the real file's physical on-disk location, as long as that location is not in some way under the workspace's location. Note that even this may not always be supported by extremely old editors.

Related

How to view multiple projects in one window in IntelliJ IDEA IDE?

In Eclipse IDE you have the concept of "workspaces" allowing you to manage/view your projects in one side pane easily and allowing you to switch between projects easily.
As i gather IntelliJ doesn't have that feature because everytime when i open a new project it always asks to either open in a different window or same window? And in the latter option it overrides my existing open project.
You're right; IntelliJ simply doesn't have this functionality. Each project is opened in a single window, either overwriting your current window or spawning a new window.
If you feel that this sort of behavior is something you want, then feel encouraged to put in a feature request on their issue tracker.
You can create a new empty project and import into it the modules from the other projects.
This works for me, although is not exactly the same as what you're trying to achieve. Note that you will lose (e.g. have to specify manually) the specific projects' settings.

Sublime Text: quickly access files outside the current project

To facilitate code reuse across projects, I set up this (quick and dirty) method to access recent projects.
In the current project, I add a link (z-themes) to a folder that contains links to recent projects. This enabled me to access those files without having to open the whole project (this worked in Espresso).
In Sublime Text, links are not followed and symlinks mess with the file search (files in the linked folders appear in the Go to file panel, so I might open the wrong file)
The question is: how do easily I access files in predefined folders outside the current project?
Plugins and alternative workflows are welcome.
Perhaps something like FuzzyFileNav? That plugin allows you to set up bookmarks to a particular folder. You can then navigate through folders as you would normally in the file system.
I found Goto Folder: it's very simplistic and doesn't allow for any file management like FuzzyFileNav does (which could be nice) but it allows for simple bookmarks and it behaves well.
Edit: I also found FileBinder
This is what I use now: I created a previous projects "project" just for the older files.
simple to add projects (drag their folder to the sidebar)
use Sublime's file search across all the files
old projects' files are separated from the current project
no plugins to update/figure out
Only thing is that I'll have to keep a separate window open just for this, but it's not a big deal.

Is it possible to prevent Eclipse from closing up the project space when you close the app?

I have a Java project in Eclipse that mirrors a directory structure on my hard drive and every time I open Eclipse I have to manually open all of the folders to see the source files inside them. Is there a way to avoid this so that everything stays open between app sessions?
With the CNF alone (the Common Navigation Framework), I don't think so.
But with Mylyn (which is part of certain Eclipse packages), you can because the Mylyn task will keep the relevant files/classes/methods visible from one session ot the next.

How to search all open files in Eclipse?

Simple question: how do I search all the files currently open in Eclipse? Note: I don't wanna search all the files I have in that workspace, just the ones open in tabs. Is there an easy way to do this?
Closest way is selecting several resources in Navigator or Package Explorer view, then press Ctrl+H and choose 'Selected Resources' radio button. It will limit search only to selected files.
CTRL+E on Windows or Linux, and Command+E on OSX.
There's no way to do that at the moment.
The easiest solution would be to select your files manually (holding CTRL + click on file) and to specify "selected resources" as your search scope.
This may come too late for the original poster, but just in case somebody else needs to find out an answer, I had the same problem and found my solution by installing a plug-in named Instasearch. You can get it by going to Help/Eclipse Marketplace and searching for Instasearch.
You can find more about this plug-in in the following address.
http://marketplace.eclipse.org/content/instasearch
Spring produces a stand-alone Eclipse plugin (no dependencies on Spring) called Quick Search
http://marketplace.eclipse.org/content/quick-search-eclipse
For efficiency, it searches your open files first. So while it isn't purely restricting to opened files as you requested, you can still get a similar effect in practice by just clicking the first results that come up.
The currently opened files simply aren't considered special in eclipse - you have far more advanced methods of organizing your files: projects and working sets.
Working sets allow you to define sets of files, which can be used as constraints for many operations. You have to define them explicitly, but then they don't change just because you've closed a file.
There is no find-in-open-files command in Eclipse, no.
I think that the main reason find-in-open-files is not implemented in Eclipse is probably because the set of open files is for many users rather insignificant. (In fact, I don't know (or care) which files I have open. (I even have Eclipse set to automatically close editors/files when they become too many). If I want to navigate to a file, I open it. Limiting a search to the files I currently have open would be completely pointless for me.)

Opening a temporary buffer / scratchpad in Netbeans?

I often have to open a secondary editor outside of Netbeans in order to work on temporary bits of text outside of my project files. Is there a way to create temporary files in Netbeans without adding them to a project?
File -> New expects every file to be part of a project.
I know this has already been answered successfully, but there is now a proper Netbeans plugin for this requirement: http://code.google.com/p/netbeans-scratchpad-plugin/ It works nicely for me and allows multiple scratchpads which can be handy.
Also note that the Copy/Paste History plugin which is available by default (with NB7 at least) is handy for this too.
HTH,
JD
By default, there is no such feature yet (I'm using 6.5).
You could include a folder in the Favorites window, and right click > New > Empty File from the folder, it won't be part of the project.