Eclipse Oxygen with pydev has wrong index, cannot rebuild it - eclipse

I have installed pydev on eclipse oxygen, and globally search the content by pressing "Ctrl+H", but the search result has wrong line numbers, I cannot get correct search result either by doing "Refresh" or re-creating the workspace, anyone has come into the same situation and help me ? Thx.

Do you have auto-build turned on (in the menu: project > build automatically)?
You can also trigger a reindex by doing the following: open a PyDev editor, trigger: Ctrl+2 and then choose --reindex in the menu that opens (considering you're doing a search in the PyDev tab).

Related

Java code completion in Eclipse IDE

A few years ago i set up my first Eclipse IDE env at work to begin studying the language. As i remember, it was some Luna build and it had a specific and really addictive code completion, which understood skipping some letters... like "p l n" would find "println".
Now i'w installed Mars build(the Luna's one has gone with the past harddrive), and cant find this option. Some code completion works, but it looks only by the current character.
Could someone tell me where to look.
Eclipse does understand skipping some letters in code complete, for example, if I have:
System.out.pln
with my cursor after the n and I press Ctrl+Space I am presented with all the println choices:
If it is not working for you I suspect that you don't have Code Recommenders installed or enabled. It should come by default with Eclipse IDE for Java Developers.
To check to see if it is installed and enabled, in Preferences, choose Java -> Editor -> Code Assist -> Advanced and see if Java Proposals (Code Recommenders) is listed and checked:
If it is not installed, install it from the Mars update site:
From Help menu, choose Install New Software
Choose Work With: as Mars - http://download.eclipse.org/releases/mars . from the drop-down list.
Choose Code Recommenders for Java Developers from the list. You may need to uncheck Group items by category to find it.
Complete the wizard, restart, check setting about and away you go.
In Eclipse just press ctrl + space bar. to auto code completion

Eclipse f3 not opening declaration

I have Eclipse (Mars) web development tools installed on a MacBook Air. Recently, hitting f3 stopped opening the declaration.
The key mapping in Eclipse (Mars) - web development tools:
In another Eclipse install (Luna) - Android development tools, where the f3 function is working, the key mapping is:
What is wrong with the Mars version? What do I need to add to get it to work in the Java editor?
I have seen this post, but I don't have the exact same issue. Nothing happens when I hit f3.
Additionally
Other short cut keys work.
Opening the declaration with the context menu does work.
But there is no key short cut listed in the context menu.
Did this key mapping change with Mars? In my Luna verion, the context menu has the key map listed:
I've the same issue. You can use "Ctrl + Left mouse click" instead.
Make sure your function lock key is not pressed. I apparently hit mine and didn't notice given that F3 is the only function key I use.
Seems stupid but this literally happened to me and the other suggestion didn't help.
In eclipse mars goto:
window
preferences
General
Keys to open the key mapping view.
type 'open declaration' in the filter text.
copy one of the commands that are already there Copy Command
Enter 'F3' in the Binding.
In the drop down menu of the combo box of 'When' select Editing
Then whatever Language You Are Using
Source
Apply
and press Ok
I had the same issue after installing Apache Directory Studio.
Go to Window->Preferences, General->Keys. Filter for F3 and you'll see all the different ways that F3 is bound. I got it to work again by disabling F3 in the LDAP windows (i.e. deleting the binding).
Some suggestions to try:
1) Try creating a new workspace, and check if F3 works
2) Try switching to a different perspective
3) Try downloading a different eclipse release, maybe the java developers release, check that F3 works, then install whatever you need for web development.
Good luck :)
Right Click on the project -> Properties -> Project Facets -> Click on the Configuration Link -> Click on Apply Button -> Click on OK button.
The above steps should set your project as a Java project.
Looking at the comparison of the preferences that work vs what does not work, the issue is clear.
Go to: Window/preferences/General/Keys to open the key mapping view.
Type 'Open declaration' in the search box
Enter 'F3' in the Binding textbox.
If you are editing for C++, Java any language, you need to have a specific F3 binding for that language!
Example for Java source code select 'Editing Java Source' in the 'When' dropbox.
Apply and press Ok
Even I faced the same issue in windows,I was using cucumber and was unable to navigate using F3. I solved by doing the following:
Click on Help in Eclipse >
Eclipse MarketPlace
type "Natural" in search and press enter
Install "Natural 0.9" plugin
Restart Eclipse
This should work, if not working even after that, uninstall cucumber plugin in Eclipse Marketplace
You will be able to navigate from Gherkins, even after this if you are finding issues do the following:
Go to Window ->Preferences, General->Keys > Click on "Restore Defaults"
I had a similar problem today - Unable to open Declarations in Java Editor using F3 or CTRL+Left Click.
Solution :
STEP1: Selected any java file in Eclipse Explorer.
STEP2: Clicked the - sign at the top of the Eclipse explorer. This compressed view of all modules in Eclipse.
STEP3: Right click on the empty space on the Eclipse Java Explorer and chose Refresh Option (F5) .
STPE4 : Happily the navigate options like F3, F2 , CTRL + Right Click all started working.
Solution :
1. Download and install this eclipse
eclipse-jee-2019-12-R-win32-x86_64
F3 shortcut key is worked for java file and Testng.xml.
i am able see package name and class name and also it navigate methods.

How to open Pydev Package Explorer

so I guess this quest is kind of stupid, but I am completely new to eclipse and pydev. I recently switched from using SPE. So I closed the Pydev Package explorer, how do I open it again? I am using LiClipse 0.9.7. Thanks in advance
I don't see what you see, but try...
Window | Show View | Other... | Pydev Package Explorer
#Grzegorz Oledzki is right, but I wanted to add some more info:
If you're in the PyDev perspective (window > open perspective > pydev), you can use Shift+Alt+W when you're inside any editor and then select to show that editor in the pydev package explorer (this also works to show in other places such as the outline and it's very handy to go from the editor to the pydev package explorer).
Also, in the latest version (3.3.3), you can use Ctrl+3 and then write 'pydev package explorer' to go to it (actually, it'll show much earlier to select and that can be used to go to any view or preferences page or even to activate some menu).
Note: this would also work on earlier versions if the Ctrl+3 binding that did a comment in the PyDev editor was removed (to let the default Ctrl+3 from Eclipse do its work).

Why can't I type an asterisk in Eclipse?

I just upgraded Eclipse from Juno to Kepler, and suddenly I can no longer type asterisks. I have to open up a text editor, type the asterisk there, then copy-paste it into Eclipse. I can type an asterisk in Eclipse when I am using Find/Replace, but I am unable to when I am editing a python or Java file.
As shown in the image, the shortcut key shift+8 was assigned for the import command. You have to change this assignment by specifying a new one or removing it using the unbind command button.
Do the same for all the commands, click apply and then restart Eclipse.
If you'd rather not hand-edit your workbench.xmi, you can also reassign the bindings by going to Eclipse > Preferences... > General > Keys. The two culprits in this case are "Import" and "Add to Working Set". (Scan the list of search results for the ones with ⇧8 in them, then reassign or unassign them entirely.)
Close eclipse. grep your workspace for SHIFT+8; it should return matches in workbench.xmi:
workspace/.metadata/.plugins > grep -R "SHIFT+8" *
org.eclipse.e4.workbench/workbench.xmi: <bindings xmi:id="_aLHQwCaAEeOBOe4lOFe2qQ" keySequence="SHIFT+8 W" command="_eZ-6uoZrEeKW-cnY0IziBw">
org.eclipse.e4.workbench/workbench.xmi: <bindings xmi:id="_aLH30CaAEeOBOe4lOFe2qQ" keySequence="SHIFT+8 I" command="_eZucD4ZrEeKW-cnY0IziBw">
Edit the workbench.xmi file and remove the binding elements.
Restart eclipse and it should be fixed.
I had this same issue with Eclipse Photon, and fixed it by uninstalling the Eclipse SDK Test plugin. The fix was originally reported in this eclipse bug report.
Go to Help -> About Eclipse IDE -> Installation Details
Search for Eclipse * Test
Select the Eclipse SDK Tests
Uninstall
Restart Eclipse
Found a related post on Eclipse forums: http://www.eclipse.org/forums/index.php/m/1072966/?srch=asterisk#msg_1072966

pydev plugin in eclipse not showing the files in the project explorer

I am using pydev plugin in eclipse. I can create the project, but I cannot see the files in the project explorer.
I am attaching the screenshot. Any idea how to fix it.
Thanks
Kiran
in Pydev explorer Ctrl+F10 then from Top Level Elements choose Projects. It will show the projects in your workspace
I got a little workaround. I'm not sure what the difference between "PyDev Package Explorer" and "Package Explorer" is supposed to be, but it's clear that one of them is buggy.
I'm well aware that this is from 2011, but I came across this question while searching for it. I hope my answer will help someone.
Ensure you are in the "PyDev" perspective.
Top menu bar > Window > Customize Perspective...
Menu Visibility tab
Under "Edit", tick the "Show views" box (it might be half-ticked somehow depending on how your OS displays that). Press OK.
Top menu bar > Window > Show view > Package Explorer
A new 'view' should now be visible, called "Package Explorer". Move Package Explorer to an appropriate space (click and drag).
Delete the old "PyDev Package Explorer".
It seems that Eclipse does not have the resources up to date...
Have you configured Eclipse to do automatic refresh of resources?
Preferences > General > Startup and Shutdown: check 'Refresh workspace on startup'
Preferences > Workspace: check: Refresh automatically (this depends on your Eclipse version -- in 3.7 the settings were changed a bit, but it should be easy to know which configurations are related).
You can also try making a manual refresh: either F5 or right-click: refresh.
Another thing to check is if the path of the project is actually the path you're expecting (i.e.: the path that has the resources) -- you can press Alt+Enter to open the properties for the project and check if the location is actually correct.