Opening Pydev editor in Eclipse - eclipse

I am a newbie to using pydev in eclipse. How do I start working in the editor. I have done all the configs. and project set up but just can't use the editor. What are the steps involved? Can you help?

If everything is set up you should be able to follow these steps:
Right click on your project and select New -> PyDev Module
Enter a name for your module and click Finish
The editor will open and you can start coding

Related

Eclipse Oxygen with pydev has wrong index, cannot rebuild it

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

Run as Ant build' Missing in my eclipse

I am unable to right click and run my build.xml file by choosing 'Run as Ant' . Whenever I click it says run configuration and that goes into running Java file options .
This works for me.
Go to..
1. Help -> Install New SoftWare
Work With -> "http://download.eclipse.org/releases/juno"
Drop down list "General Purpose Tools"
select "Eclipse Plug-in Development Environment"
After doing this...eclipse started showing option of Ant Build in Run as
In Eclipse Neon, the Ant Build moved to Run > External Tools > External Tools Configurations ... it is not located in the default Run anymore.
An example of a build xml file and how to run it
I hope this helps!
I encountered a configuration where depending on the filename of build.xml file the "Run As" menu did not contain the "Ant Build" and "Ant Build..." commands. The commands "Ant Build" and "Ant Build..." (see the image in ricardoramos's answer) are present if the build file is named build.xml, but absent if the file is named build-something.xml.
I tracked down that the cause of this issue in my configuration was plugin LiClipseText. Uninstalling the plugin resolved the issue. I observed this with LiClipseText version 2.1.2 and with Eclipse versions "2018-09" (4.9), "Photon" (4.8) for Java EE Developers.
The plugin provides its own editor for XML files, and I guess that interferes with the way how Eclipse detects that an XML file is an Ant build file.
It may be that this will be fixed in a future version of LiClipseText.
For a recipe on how to uninstall the plugin - see question 6174725. For a cleanup afterwards - see question 221476.
Another possibility is your build.xml file is not parseable by ant
For example, if you open the Ant Perspective (Open Perspective | Other | ant) and then choose the Add Buildfiles toolbar button, then choose your build.xml file, if it is not a valid build file, you may see an error message "Unable to parse as an ant build file".
Once you fix your build.xml file, the Run As ant RMB command on the build.xml file will appear.
(above was my experience on Eclipse Mars.2)
Follow the below steps.
Go to Windows -> Preferences -> General -> Content Types -> Text -> XML -> Ant BuildFile.
Just click on Add button and add your AntBuild file. click ok.
Restart your Eclipse.
Follow the below steps.
Go to Windows -> Preferences -> General -> Content Types -> Text -> XML -> Ant BuildFile.
Just click on Add button and add your AntBuild file. click ok.
Workaround:
Open the ANT-View, add the build file and start it from there.
(Had the problem in JBDS8 after installing IBM Diagnostics Tools)

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 is the Eclipse sample project "Multipage Editor" supposed to run?

I installed Eclipse Luna in XP yesterday and opened the sample project "Mutlipage Editor". When I click "Run" all that happens is another copy of Eclipse opens looking like the first copy but all the workspace boxes are empty.
I guess I was expecting either an emulator to start or the ability to run it on my Android phone. Can anyone get me started please?
When you run an Eclipse plugin it has to run in an instance of Eclipse so that all the other plugins that the plugin depends on are available.
The default 'Multipage Editor' is associated with a file type (.mpe I think). So create a file with that type and open it to see the editor.
You can also write an Eclipse Rich Client Program (RCP) where you can select the available plugins and the look of the UI, but this requires additional code.

Eclipse Plugin - XML Editor

I've followed this tutorial:
Eclipse Plugin
This tutorial explain why create a HTML Editor.
I need a Text editor,just for auto-highlight some words, anyway I thought this tuto should be a good one to start with.
The thing is that I created the Plugin project and the only thing that I changed it was the extension "pat" instead "html, htm", just that. After that I created a .pat file, but eclipse doesn't open it with my plugin, and my text editor is not in the editor's list.
Any suggestion??
Let me know if you need more information.
My guess is that you have just created the plugin, but aren't running it in your current Eclipse instance. That can be verified by opening the view "Plugin registry". That will show a list of all plugins, see if the plugin you have created is in that list.
If you click on the run button in Eclipse you will open a run configuration dialog. In one of the tabs, you get to choose what plugins should be available. Make sure your plug-in is selected. This will start up a new Eclipse instance that will run your plugin.
To make your plugin be a part of your ordinary Eclipse installation, you will need to export it to a jar and copy that jar to the dropins catalog.