Exclude *.pyd files from go to definition (with ctrl+click) - eclipse

I have a small problem with my Eclipse IDE PyDev plugin - when I'm developing a program using Python with libraries in *.pyd format, I can't go to definition, because It's binary format. But there are corresponding *.pyi files with source code. How to "force" PyDev to use *.pyi files instead of *.pyd files for Go To Definition?

Related

ANTLR4 under eclipse generates sources inside incorrect packages

I'm trying to convert my project to antlr4. I converted grammar, but i can't generated sources to correct package.
When I run build, Eclipse placed generated sources in incorrect packages. If i place my grammar directly inside src/, sources are generating inside default package. If i move my grammar to be inside package my.sources.package, Eclipse generates correctly entire package structure, but it place it relatively to place where is the grammar my.sources.package.my.sources.package.
If that helps, i'm using Eclipse Luna 4.4.2, antlr4ide 0.3.5 and Antler 4.4
Don't put the grammar files inside a Java package. Add 'folders' under src with the path you want to create for the package name.
In the project properties, go to ANTLR4 -> Tool and set the desired output directory in the Options -> Directory field.
Attached is a screenshot showing the directory structure and properties window.
Screenshot showing directory structure and properties window

Eclipse doesn't search java files generated by JavaCC

I'm using the JavaCC Eclipse Plug-in 1.5.30 with Eclipse Luna Service 2(4.4.2).
When I use JavaCC to generate java files from the st4tic.jtb program grammar, Eclipse seems to completely ignore them when I do a file search.
In the navigator view, all of the generated files have appended to their names e.g. NodeList.java <st4tic.jtb>
There is an option for the plugin to not mark generated files as generated.

java API source files in eclipse

In some eclipse installations I have noted that they are able to view all the source files inside a jar(may be if the jar has source files packaged in it or another jar for source?).
If we ctrl+click or f3 on a class type, then it shows the source code of the JAVA API for that class. Likewise for many classes. even for some third party classes like apache's. But in my installation i just get a white screen with the name of the jar and some mess of unreadable content. And also previously I have got javadocs of JAVA API very well before when i hover my mouse over the class or function names. But in my current installation even that is gone.
How to get java docs and source file viewing in eclipse? i am using eclipse juno... downloaded within 6months..
Make sure that Eclipse is using a full JDK rather than just a JRE. Look in Preferences / Java / Installed JREs to see what Eclipse is using.

Eclipse plugin to compare zip files

In projects I work on occasionally files are stored in an archive. Editing things in eclipse is straight forward one installed the Eclipse Zip Editor Plugin. However, I can't compare the changes made in the zipfile using the standard Team->compare functionality. Are there any tricks to accomplish this within eclipse?
Eclipse has native comparison support for .zip archives and .jar files. Select the two files you wish to compare, then right-click on one of them and choose Compare With > Each Other.

How to format all Java files in an Eclipse project at one time?

I have an old Eclipse project and the code is not well formatted. I'd like to format all the .java files according to the settings in Eclipse. I don't want to edit every individual file with Ctrl+Shift+F. Is there a way to format all my files? Perhaps an Eclipse plugin?
Right click on the project root and select Source -> Format. This should work for at least version 3.8.1. and above.
If the above does not work, you're probably using an older Eclipse-version. In such case you can select your Source Folders by clicking on them while holding down CTRL, then select Source -> Format from the right-click -menu. Works with package-folders and class files also, in case you don't want to format the entire project.
I also had the Java Perspective ON and this was still not working. My eclipse was only formatting css and Html files, but not JAVA ones.
Then, I located this answer that explains this:
You must add Java Facet to the project to allow Java classes to be detected by Eclipse formatter
Then, you should check on PROJECT-PROPERTIES-PROJECT FACETS and activate the Java facet for the project:
And by right-clicking on top of the PACKAGE-EXPLORER you will find the SOURCE - FORMAT option, and it will format Java files too.
Be careful, check it´s package explorer, not Project Explorer (click
Window-Show View-PackageExplorer)
This is the purpose of
Source ->Clean Up...
selecting the appropriate options.
In older versions of Eclipse (Indigo) it works from Package Explorer (not Navigator). Right click the package you wish to format then choose Source -> Format. It will format all classes in that package and its sub-packages.
In Eclipse Mars.1 Release (4.5.1) version and above, just press
Right click on the code typing area
Src > Source > Format.
If you want to format individual java / xml file just do Ctrl+Shift+f