Eclipse plugin for auto import java classes - eclipse

Is there a plugin in eclipse that when you type 'new JavaClass' it will auto import like 'import java.class.JavaClass' just like in FlashDevelop where-in when you type 'new MovieClip' it will put automatically 'import flash.display.MovieClip' ?
Thanks.

When you type a class name without the package, invoke the Content Assist feature by pressing Ctrl+Space (on Mac, use Command+Space) and Eclipse will auto-complete it by adding an import statement. You can also use the Organize Imports shortcut (Ctrl+Shift+o or Command+Shift+o) at any time to complete and organize the imports.

If the dependent libraries locations are added to Eclipse, eclipse does that by default. There is no need for a separate plugin for it.

Related

PyDev doesn't auto-complete my imported modules

I have Eclipse 4.7.3 with PyDev installed. When I import modules from another directory (or any for that matter) pydev doesn't show a warning that it can't find the import but it doesn't do autocomplete for functions within that import.
Ex import DataDefines as df and then when using it like df.INSERTFUNCTIONHERE it doesn't give any usefull suggestions for functions found in that file. When I run it, it grabs the imports fine but I want to be able to auto-complete for syntax and spelling reasons. What could be going wrong? I have configured my python interpreter which helped make the program actually run and I have modified settings in Preferences -> PyDev -> Code Completion but now I am stuck.
Are your sources under a source folder?
Have you tried following the getting started?
http://www.pydev.org/manual_101_root.html
If you're not able to figure out from that, please provide a screenshot of your pydev package explorer showing the modules you have and the actual issue on the completion.

pydev source helpers for indirect packages

I'm using PyDev 6.0.0 under Eclipse Neon, and I find that PyDev doesn't find the source for some modules.
For example, when using wxPython, when I edit a source file that contains:
mylist = wx.ListCtrl(parent, ID)
If I hover over ListCtrl, I only see:
ListCtrl.__init__ found at wx.__init__
and in wx.init has:
# Import all items from the core wxPython module so they appear in the wx
# package namespace.
from wx.core import *
# Clean up the package namespace
del core
del wx
So, ListCtrl is really in wx.core but imported into wx.
PyDev can't provide code completion, or doc hover help, etc. etc for this kind of structure.
Is there anyway to configure around this problem?
I'm new to the wxPython library and it would really be nice to have IDE support for it.
You will almost certainly have to create stubs for it. Because wxPython is a wrapper around C++, it can be harder for some IDEs to autocomplete. I think Wingware and PyCharm work though. See the following for more information on creating stubs:
How do I fix PyDev "Undefined variable from import" errors?
I think it may be a bug in PyDev though:
Autocompletion in Pydev- Eclipse for wxpython
The bug tracker for PyDev is not very friendly, so I wasn't able to actually find a bug number for you.

Get Import Suggestions in IntelliJ

Is there a way to get a list of import suggestions in IntelliJ IDE? I'm looking for the equivalent of CTRL+SHIFT+O functionality from Eclipse, which automaticaly lists import suggestions.
Thanks!
On my current machine (on Windows), it's Ctrl-Alt-O, and the command is named "Optimize imports".
In general, in IntelliJ IDEA, you can use Ctrl-Shift-A and press part of a command to find it and know the appropriate shortcut. Typing Ctrl-Shift-A (or if you're on
a Mac ⌘-Shift-A) and then search for "import" allows finding this command easily.
That said, it seems this command doesn't suggest imports like Eclipse does.

Eclipse import dialog missing "General" folder--how to restore?

I'm trying to import an existing project into Eclipse. Instructions everywhere say to use "File | Import... | General | Existing Project". Sounds great, but in my Eclipse there is no "General" folder in the Import dialog. This is a customized Eclipse setup for work, so am assuming this option is disabled for some reason. Is there an easy way to turn this back on?
Looked thru prefs dialog and saw nothing obvious.
Thanks!
I'm not sure which plugin supplies the "General" folder in the import dialog. Check that org.eclipse.jdt is available. If JDT doesn't supply this entry, it depends on something which does, so installing JDT should solve the issue.

source for eclipse plugin.xml page

I would like to know where can I find the code which eclipse uses to display the forms in the plugin.xml file. In particular I am looking for the form layout used in the extension tab in the plugin.xml
You can import the eclipse plugins into your workspace by using import -> Plugins and Fragments from the package explorer. Then use the following options:
Select from all plug-ins and fragments found at the specified location
import from the target platform with source folders (last option)
Import the org.eclipse.pde.ui plugin
The code you seek is in org.eclipse.pde.internal.ui.editor.plugin
More specifically, the ExtensionPointsPage class
Unfortunately, Eclipse's plugin search doesn't work for referenced plugins. To do these searches I created a workspace that contains all the plugins from my eclipse install as source folders. I just open the workspace and perform my plugin search there. Just open the search dialog and choose plugin.