Eclipse "go to definition" problem - eclipse

I'm using PyDev for eclipse and am experiencing some issues with "go to definition". It works for most modules, but for some site packages it does not. It does the "bump" sound and then nothing happens. One of the packages that doesn't work is Twisted, which is weird since the source is included and right there. Any idea how to fix this?

The go to definition works just fine. The problem was that eclipse didn't know where to find the source. You can go to window > preferences > pydev > interpreter > New folder, and add the folders missing. Even though you've added site-packages to the configuration, you still have to add subfolders separately to get code assist and to be able to go to the definition.

Pydev (also bundle with the Aptana distro) does not seem to have any bug exactly similar to the one you are describing.
Here is the list of bugs including the word "definition" for PyDev: bugs
You could open a bug report there with the exact version of eclipse, pydev, java used
But first:
What version of Pydev are you using? The open-source one or the commercial one (i.e. open-source + Pydev extensions)?
Because the matrix feature is quite clear:
Feature List Pydev "Open Source" Pydev Extensions
---------------------------------------------------------------
Go to definition BRM* Pydev Extensions(2)
BRM*: Bicycle Repair Man is an open-source program that provides 'go-to-definition' and refactoring. Its 'go-to-definition' only works for Python, and only works 'well' for global or local tokens (does not work very well on methods from parameters or on 'self'). It is currently 'unsupported'.
Pydev Extensions (2): Pydev extensions provides a 'go-to-definition' that works for python and jython, and should work even on methods from parameters and 'self'.

Related

Gtkmm in Eclipse makefile project: "could not be resolved"

I am trying to migrate a custom C++ project which uses Gtkmm3.0 to Eclipse (Oxygen) on Ubuntu 16.04. The project has its own Makefile and builds fine from the terminal within Eclipse. What I have not been able to do so far is tell the indexer about Gtkmm, and I get lots of these (which is very annoying):
When I hover over the little red bugs, it says:
Type 'Cairo::RefPtr<Cairo::Context>' could not be resolved.
I have done a lot of Googling on this and found nothing so far because all answers seem to assume the project's build tools are managed by Eclipse (See this or this, for example). In my case I have a makefile project instead of an executable project and hence some options are not available to me. For example, the first links speaks about configuring the builder:
We have to add all this directories. On Eclipse select the Project->Properties menu option. Select C/C++ Build->Settings property page and GNU C++ Compiler->Directories from the Tool Settings tab. Now we have to add all directories. In my case (Makefile project) only two tabs are available there: Binary Parsers and Error Parsers.
How can I tell the Eclipse indexer I am using Gtkmm3.0?
Found the solution that works for me:
Open a terminal and enter:
pkg-config --cflags gtkmm-3.0
You will see a list of includes directories (starting with -I). These are the directories you want to add in Eclipse so that it can locate the Gtkmm symbols in the editor.
In Eclipse, go to:
Project -> Properties -> C++ General -> Paths and Symbols
In the Includes tab, select GNU C++. You need to add here add the include directories found in step 1. There is no automated way to do this, yo must enter them one by one.
One trick that can save you some time is to edit manually the Eclipse project setting XML file and add the include directories directly in the XML file. By the end, you should have something that looks like this:
That did it for me, hope this helps!

Add ttcn3 syntax highlighting to eclipse

I don't work with ttcn3 full-time, what I need is just basic syntax highlighting and commenting on Ctrl+/ added to eclipse.
After some googling I discovered Eclipse Titan, but it seems to be a full-blown IDE for ttcn3 with compiler and stuff, and I need just a plugin to eclipse.
I would like to find something like "Set syntax: ttcn3" from SublimeText, is it possible in eclipse?
if you go to this link:
https://projects.eclipse.org/projects/tools.titan/downloads
you will find that you can download the Titan plugins for Eclipse (today they look like this):
Eclipse plug-ins 6.2.0
You may want to install them in your current Eclipse and find out if that is what you are after.
Gustavo.
After installing the plugin
1.change the nature of your ttcn project for "TITAN Nature" this way:
Project popup>Properties>Project Natures>Add...>TITAN Nature.
(if this is not enough:)
2.Select Window>Preferences>TITAN Preferences>On-the-fly checker>Enable parsing of TTCN-3, ASN.1 and runtime configuration files
(You can also set perspective TITAN Editing/Titan Executing/TITAN Log Viewer)

Eclipse debugger "Failed to read variables"

Any idea why Eclipse Luna does not present the variables when trying to debug Node project? Instead of variables we see "Failed to read variables" as shown here
First, you should learn what actual plugin you are using.
For Node.js is Nodeclipse /noʊdˈklɪps/ http://www.nodeclipse.org/ This effort that is not backed by any business, there were several people spending personal time, including me.
You don't even spell right, that mean you did no effort to read project pages.
Second, if it works on one computer and does not on other, then it is bug.
You should raise issue specifying exact OS, Java, Eclipse and Nodeclipse plugin versions (as visible Window -> Preferences -> Nodeclipse) and steps how to reproduce at
https://github.com/nodeclipse/nodeclipse-1/

AspectJ causing "Editor does not contain a main type" error

After installing the AspectJ Development Tools into Eclipse, the "Run" button and the Ctrl-F11 shortcut both become nearly useless: using them (or the Debug button) will throw an "Editor does not contain a main type" error message, even for projects that do not require a main type to be present (eg. Android application projects). Standalone Java projects with a proper main type defined work fine - so it seems AJDT is forcing Eclipse to check for a Java main() without checking the project type first. Whether or not the project is an AspectJ project makes no difference, either.
The problem only appears when the file you are currently editing has either ".java", ".aj" or ".class" anywhere within its filename (note: it doesn't actually have to end with those extensions, as long as it's anywhere in there - readme.txt will work, readme.java.txt won't).
Two ways I've found to work around this - regardless of whether or not it's an AJ project - after installing AJDT is:
Select a file within your project in the Package Explorer whose name doesn't contain .java, .class or .aj, and then hit Run (the Package Explorer has to remain active and selected).
Create a new Run Configuration for your project, and use it to launch your project. This still adds a pointless extra step, as well as being impractical for those who work with a lot of projects.
I've tried this on both Eclipse Juno and Helios (Windows XP x86 as well as Win7 x64), the result is the same. While it might seem like nitpicking it certainly isn't: AJDT is hijacking the most frequently used function of the IDE.
I've resorted to having two different Eclipse installations with their own separate workspaces on my work PC, one with AJDT installed, and one without, so I can use the IDE properly when I'm not working on anything AJ-related. Since my company is working on a project that would require other developers to install AJDT into their IDEs, this is a significant issue for us that goes beyond our own loss of time - I can't imagine a lot of developers would be willing to put up with a significant bottleneck being added to their workflow for absolutely no reason at all. So most likely, they will just ditch our product instead!
Update: This has been identified to be a bug inside AspectJ, and has been reported to the AJ development team. You can keep track of it here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=399660
As of this writing, the bug has already been partially fixed, restoring Run functionality to non-AJ-enabled projects.
I was just coming on this site to ask the same question. While I don't have an answer for why this is going wrong, I have a workaround which is helping me currently:
Go to Preferences > Run/Debug > Launching and select Always launch the previously launched application. This will introduce bearable behaviour when working on a single project. You will need to manually create a run configuration for your main class.

In Eclipse, why does "Build Automatically" get mysteriously disabled?

I'm running Eclipse Europa (3.3). I leave the "Build Automatically" setting, under the Project menu, on all the time. Once in awhile my code isn't compiling, and I puzzle over it and then pull down the Project menu ... lo and behold, it's not set anymore. What gives? Is this a bug, or is there something else I'm doing that could cause it?
Edit: I am running the regular Java developer installation, plus Subversive and its connectors, Jetty Launcher, and I believe no other plugins. Other people at my workplace have had the same problem.
Edit: I am still having this problem once in a blue moon, only now I'm using Eclipse Galileo (3.5) for Windows. I haven't had this problem in Galileo for OS X, neither in Cocoa nor Carbon, but I have not used that for as long.
With Eclipise Mars.1 (4.5.1), Oomph may be the culprit. Eclipse Oomph supports automatically disabling Build Automatically with entries in
On Windows
%USERPROFILE%\.eclipse\org.eclipse.oomph.setup\setups\user.setup
If you want to disable this Oomph behavior try deleting the following setting
"Eclipse->Navigate Menu-> Open Setup menu entry-> Open User menu entry", a Preference Task under "User Preferences -> org.eclipse.core.resources -> description.autobuilding"
I learned about this setting by posting to the Oomph Eclipse Community Forum on Feb 8th, 2016. I posted a question titled "Oomph Defect? Build Automatically Keeps Getting Disabled". Ed Marks replied the same day with details about Oomph's support for managing the Eclipse "Build Automatically" setting.
https://www.eclipse.org/forums/index.php/m/1722751/#msg_1722751
I don't have eclipse right here to test and make sure but here is an idea.
Is any of the project or even workspace file in SVN ? if they are and they were uploaded with auto build disabled that might explain it
You update and overwrite your settings. This doesn't become apparent until you restart eclipse. this would also explain why other people at your workplace experienc this. it would even explain why some don't : thay are the ones who are careful what they update and don't allow eclipse to overwrite their own settings plus the ones who actually prefer to have autobuild disabled :)
I had the same problem and when I looked at the Source tab under Java Build Path (under the menu Project > Properties ) there were some source directories that didn't exist anymore (marked with a red X). After I deleted them, compilation worked fine and all new .class files are under the bin folder.
Strange. Is there perhaps a plugin installed that turns this off without your knowledge?
Maybe there is some conflicting shortcut. For example, some duplicated shortcut may be toggling it.
I am running 3.4 and I also have this mysterious behavior. I had it in 3.3 as well. I use CVS not SVN. Does not seem to follow a pattern just once in a while it gets switched off and then weird confusing stuff happens until I remember to check it and switch it back on. I am almost to the point where I want to write a plugin to always turn it on when eclipse loads.
When installing Google Plugin for Eclipse, 'Google App Engine for Android' is also installed.
For me, I uninstalled 'Google App Engine for Android', which I didn't need, and solved this problem.