sublime text - eclipse App Explorer equivalent - eclipse

Hi I wondering if there is the equivalent to an App Explorer in Sublime Text 2.
When using eclipse, I use the App Explorer panel to search by file name.
I have a file naming convention that helps me find files by there functionality within the system.
So say I want to list all files relating to the registration process. I search for "regis" via the App Explorer and get a nice list of the relevant files. This filtered list is available all the time until I search again.
I can use Sublime Text's cmd+p but prefer the above as I can see the folder hierarchy etc.
In essence it is merely a file name filter on the folder list.
Are there any plugins that may give me something similar.
Any help much appreciated.

No, as far as I can tell nothing like this has been implemented in Sublime Text 2. I would suggest opening an issue at Sublime's UserEcho forum.
In the meantime:
Typing "regis" into Sublime's 'GoTo Anything' panel will bring up the files you're looking for, and show you their paths (I realize this doesn't help you with visualizing the hierarchy, but that's as close as it gets).
I use a package called SyncedSideBar - this will at least show you a visual representation of the folder hierarchy in the sidebar, for the open file, if it's added to the project.
The GoTo Folder package by freewizard may do something similar to what you're looking for, but I had trouble getting it to work. Maybe you'll have more success.
Good luck!

Related

Eclipse Ctrl+Shift+R not showing all files in the project

When i press Ctrl+Shift+R to open the Open Resource Dialog box, the filter box does not show most of the other resource files for example.. jsp, xml etc. it works fine with all the java files.. This is happening for only this particular java project. i have refreshed the project multiple times but still no-go. I have also rebuilt the index for eclipse under workspace/.metadata/.plugins/org.eclipse.jdt.core by deleting the index files but to no avail.
I am using eclipse Kepler version. Any help would be great..
Thanks All. Yes i had closed and opened the project many times. I have also not set any Resource filter exclusions. What i noticed was that opening any of these files for edit would set off an alert saying file was derived and would i like to edit? But on the properties for these file they were not ticked as derived but rather as Archived. So had to manually hunt for the parent folder which was making these files as derived. Also noticed that the Open Resource Dialog box has option for including Resource files "Show Derived Resources"...
This one helped me solve the problem
Eclipse treating all the files in a project as Derived
This is going to sound ridiculous...but maybe this'll help others too: make sure your file search string is correct! You may need to begin it with a wildcard (*).
I lost about 45 minutes on this as the result of user error.
I was looking for some local files named eRCaGuy_PPM_Writer.h and eRCaGuy_PPM_Writer.cpp (from my repo here). So, I pressed Ctrl + Shift + R and searched for ppm_writer, as shown here:
Nothing! It would not find those files! No matter what I did to the files it couldn't seem to find them. I tried all sorts of things. Then, I realized Eclipse doesn't have a fancy fuzzy search like Sublime Text 3, so I simply added an asterisk (*) to the front of the search, and voila! It works perfectly. Since the "PPM_Writer" part of those two file names is NOT at the beginning, I must start the search with a wildcard (*).
Now it works fine, as you can see here:
I've just added a note about this to my personal Eclipse setup and configuration instructions here: https://github.com/ElectricRCAircraftGuy/eRCaGuy_dotfiles/tree/master/eclipse (for my full documentation, see also the PDF and Google Drive links at the top of that page).

There is a plugin or way to jump/go to definition/declaration in Sublime Text 3 like in Eclipse by Command+L-Click?

In Eclipse you can jump to definition/declaration by clicking on hyperlinks with pressing command key (control for Windows). I would like to use the same functionality for Sublime Text 3. Mostly I work with Robot Framework with a lot of files and would like to jump to the source of Keyword through whole project.
In sublime this kind of feature is provided by plugins.
Look at https://sublime.wbond.net/packages/Robot%20Framework%20Assistant or https://sublime.wbond.net/packages/Robot%20Framework, but be aware you can't use both, they conflict.
This plugin allows you to jump from .txt (.robot) files to the keyword's definition in .py and in .txt (.robot) in case they are resource files. Please read more here: https://github.com/andriyko/sublime-robot-framework-assistant
You can add below two plugins in pycharm, it will then allow you to navigate.

In Eclipse, is there a way to open a file by typing its path and name?

IDEs are wonderful for many things. But I dislike how they make me use a GUI for something I can do faster typing in a command line. For example, opening a known specific file. If I know the name of a file, from the command line I can just type the name of my editor and the filename. With tab-completion I can accomplish this very quickly in a reliable amount of time. No searching through output or moving my fingers off the keyboard.
Is there a way in Eclipse to open a known file simply by typing its path+filename? Maybe through a plugin?
The "Open Resource" shortcut (ctrl-shift-R) is almost it, but it only lets you type the name of the file, not the path. If you have several files of the same name in different directories, you must again hunt with the mouse for what you want.
Actually, if you are using Helios (Eclipse 3.6) you can use paths; for details, see "New features in Open Resource dialog" in that version's "New and Noteworthy" page.
Also, you can Tab to the list of results and use the arrows to pick the right one.
Well, there's the general File>Open option which is meant for opening arbitrary, but I don't know what that does if you point it to a file inside your workspace. This opens your normal platform open dialog which you might be more comfortable using quickly.
I think Open Resource is the closest you're going to get. You shouldn't have more than a couple of files with the same name, I would think, plus you can use wildcards to open files quickly. Also, remember that files you open more recently appear higher up the list of matches so you may find that the file you want is at/near the top of the list already.
In the "Open File" dialog, if you just start typing or paste from clipboard by Ctrl+V, the desired file will be selected.
The dialog before typing something:
The dialog after pasting the file location:
I'm using Neon.3 Release (4.6.3).

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.)

How to Change Netbeans Fonts and Colors Preview Document?

Within the Netbeans 6.5's Tools -> Options -> Fonts & Colors -> Syntax dialog, you have the ability to change the look and feel of the Netbeans text editor. When you select a language, you are presented with a preview of your font/color scheme. However, when I preview Java, there are far more options for syntax changes than are being displayed in that preview window. If I were able to view a more robust piece of code, I'd be able to see the immediate effect of more of the options.
How can I supply a preview document to view my font/color changes?
UPDATE:
After looking into this some more, I've been able to narrow down the problem a bit. From what I can tell, everything in Netbeans is considered a plugin. The GUI editor is a plugin, and even the text editor is a plugin. This means that what ever piece of Netbeans that actually analyzes Java code and does syntax highlights is also a plugin (since Java is just one of many languages Netbeans highlights, it makes sense this is a plugin).
I think fromvega is on the right track with his suggestion. The tutorial for creating a manifest file editing plugin pointed me in the right direction. The tutorial eludes to a file used as a sample document used for font/color previews. It tells you how to create one inside this new plugin project. (Located in "Registering the Options in the NetBeans System Filesystem", part 4. About 4/5 of the way down the page.)
My next line of thought was to look for the Java syntax editing mode plugin and find this file and update it with a richer example file. I looked in the installation directory and came up empty, but I found what looks like the appropriate files within my user settings directory. There is a config directory with a lot of subfolders within my user directory (Windows: C:\Documents and Settings\saterus.netbeans\config).
I've been poking around inside this directory a bit, but have only found the xml files the manifest tutorial talks about. I have been unable to find the extensionless sample file for the Java plugin that I believe should be there.
Since I've hit a brick wall for the moment, I thought I'd toss it back to the SO community and see if you guys might make the last leap and find the solution.
Just for anyone who wants to alter this themselves it is possible on a unix machine to use grep to locate the file i.e.
grep -lr "some part of the current sample code" /path/to/netbeans
I used this method to locate the ruby example filename and from that identified that it is kept in org-netbeans-modules-ruby.jar as a file called RubyExample. By simply altering that file I was able to construct a better sample file for my own use.
Hope this helps someone!
The document which is displayed (for each mime type) is specified in a particular folder in the "system file system" (which is a NetBeans concept which is a virtual file system composed from contributions from individual modules; this is how functionality is dynamically registered in NetBeans).
Modules typically specify their system file system contributions in a file named "layer.xml" in the plugin. The create plugin templates typically offer to create this for you.
For example, here's how the Python example is registered:
<filesystem>
...
<folder name="OptionsDialog">
<folder name="PreviewExamples">
<folder name="text">
<file name="x-python" url="PythonExample.py"/>
</folder>
</folder>
...
Here, PythonExample.py is a sample file in the same directory as the layer file.
Therefore, what you need to do is create a plugin which overrides the existing registration(s) for the mime type(s) you care about and provide alternate sample documents. You may need to hide the existing registration first (see the _hidden
part from http://doc.javanb.com/netbeans-api-javadoc-5-0-0/org-openide-filesystems/org/openide/filesystems/MultiFileSystem.html ).
Hopefully this guides you in the right direction.
However, in thinking about it, we probably ought to make the preview area editable - so people can cut & paste whatever codefragment they care about right in there. This wouldn't be persistent, so whenever you change languages you get the original samples back - but it provides a quick way to see your own code. This shouldn't be just for the Fonts & Colors customization, but for the Formatting preview panels as well.
I've filed an issue against NetBeans for this:
http://www.netbeans.org/issues/show_bug.cgi?id=155964
-- Tor
I think you can only accomplish that with a new plugin, since you need somekind of parsing to define what is what.
Give a look a these tutorials, I haven't read them in details but they seem to show you how to do what you want:
http://platform.netbeans.org/tutorials/nbm-mfsyntax.html
http://www.antonioshome.net/kitchen/netbeans/nbms-coloring.php