Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 455586 - Clicking on hyperlinks gives java.lang.NullPointerException
Summary: Clicking on hyperlinks gives java.lang.NullPointerException
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: eclipse-pydev
Version: 8
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ---
Assignee: Jeff Johnston
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-07-16 13:23 UTC by colin bernet
Modified: 2008-11-06 19:30 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-11-06 19:30:53 UTC


Attachments (Terms of Use)

Description colin bernet 2008-07-16 13:23:35 UTC
Description of problem:

Hyperlinks do not work. 
pressing Ctrl on hovering the mouse over a variable shows 
the hyperlink, but clicking on it has no effect. 

Version-Release number of selected component (if applicable):

eclipse
PyDev 1.3.17 and 1.3.18

How reproducible:

always

Steps to Reproduce:
1. open a python script
2. press ctrl and click on an hyperlink
3.
  
Actual results:

No effect, but the following exception occurs:

Error received...
No message gotten.
No message gotten.
java.lang.NullPointerException
        at org.python.pydev.core.REF.getFileAbsolutePath(REF.java:355)
        at
org.python.pydev.editor.refactoring.PyRefactoring.findDefinition(PyRefactoring.java:157)
        at
org.python.pydev.editor.hyperlink.PythonHyperlink.open(PythonHyperlink.java:52)
        at
org.eclipse.jface.text.hyperlink.HyperlinkManager.mouseUp(HyperlinkManager.java:429)
        at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:206)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3319)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
        at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
        at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
        at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
        at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
        at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
        at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
        at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
        at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:623)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1169)

Expected results:

the hyperlink should lead to the definition of the variable, function
or class, in the current file or in another file present in PYTHONPATH

Additional info:

Comment 1 Jeff Johnston 2008-07-22 21:29:40 UTC
Hello.  Please elaborate on what eclipse rpms you have installed (rpm -qa | grep
eclipse) and provide a test case.  I am able to run a simple test where I set a
variable a to 3 and then print it.  Clicking CTRL while mousing over "a" then
clicking results in bringing me to the line where a is initialized.  I tried
this test on F-8 and F-9 for x86 and on F-8 for x86-64.

Comment 2 colin bernet 2008-07-23 12:23:51 UTC
Hello, and thank you very much for your answer. 
I did exactly your test 

- create a test.py containing:
a = 3
print a 

- open this file in eclipse

- ctrl + click on a on the print line does not bring to the line where a is
initialized.

Now, instead of opening a python file, I created a python project from eclipse,
and inside this project a similar script 

a = 3
print a 

if I save this script, the link works
if I add a variable:

a = 3
b = 1
print a 
print b

neither a nor b links work.

If I save, both links work.

I'm using
eclipse-jdt-3.3.0-31.fc8
eclipse-pde-3.3.0-31.fc8
eclipse-cvs-client-3.3.0-31.fc8
eclipse-changelog-2.6.1-3.fc8
eclipse-pde-runtime-3.3.0-31.fc8
eclipse-ecj-3.3.0-31.fc8
eclipse-mylyn-ide-2.0.0-9.fc8
eclipse-rpm-editor-0.4.0-3.fc8
eclipse-mylyn-java-2.0.0-9.fc8
tomcat5-jasper-eclipse-5.5.26-1jpp.2.fc8
icu4j-eclipse-3.6.1-1jpp.3.fc8
eclipse-mylyn-2.0.0-9.fc8
eclipse-rcp-3.3.0-31.fc8
eclipse-pydev-1.3.17-1.fc8
eclipse-cdt-4.0.1-3.fc8
eclipse-mylyn-bugzilla-2.0.0-9.fc8
eclipse-platform-3.3.0-31.fc8
eclipse-subclipse-1.2.4-5.fc8

I'm running eclipse like this:
eclipse -vm /usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre/lib/x86_64/client  

Could you tell me which version of java you're using ? Here's the output of 
rpm -q -a | grep java
on my system:

java_cup-0.10-0.k.6jpp.1
tzdata-java-2008d-1.fc8
java-1.7.0-icedtea-plugin-1.7.0.0-0.20.b21.snapshot.fc8
gcc-java-4.1.2-33
mysql-connector-java-3.1.12-3.fc6
java-1.5.0-gcj-devel-1.5.0.0-17.fc8
eclipse-mylyn-java-2.0.0-9.fc8
java-1.7.0-icedtea-1.7.0.0-0.20.b21.snapshot.fc8
java-1.5.0-gcj-1.5.0.0-17.fc8
ant-javamail-1.7.0-1jpp.2.fc8
subversion-javahl-1.4.4-7
libreadline-java-0.8.0-19.fc8
java-1.5.0-gcj-javadoc-1.5.0.0-17.fc8

cheers, 
Colin         

Comment 3 Jeff Johnston 2008-07-23 18:45:49 UTC
Thanks Colin for the additional information.  I was able to recreate the problem
as you stated when the file is not saved.  I was also able to reproduce the
problem with downloaded Eclipse and downloaded pydev which means the problem is
in the upstream pydev package.  I have filed a bug upstream at sourceforge.net
(bug 2025995).  You can watch or add to the bug upstream if you like.  Regarding
the trace-back: I am using java-1.7.0-icedtea-1.7.0.0 and I do not get the
exception as you have quoted above.  I suggest you try using iced tea.

Comment 4 Alexander Kurtakov 2008-11-06 19:30:53 UTC
Upstream bug is closed as fixed and it works now.


Note You need to log in before you can comment on or make changes to this bug.