Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 355039

Summary: [nls tooling] Error searching references to the selected properties key
Product: [Eclipse Project] JDT Reporter: Nicolas Bros <nicolas.bros>
Component: TextAssignee: Dani Megert <daniel_megert>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: amj87.iitr, daniel_megert
Version: 3.7   
Target Milestone: 3.8 M7   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
stacktrace none

Description Nicolas Bros CLA 2011-08-18 04:37:23 EDT
Created attachment 201699 [details]
stacktrace

I control-clicked on a property key in a bundle.properties file and got the attached error:

ClassCastException: org.eclipse.core.internal.resources.Project cannot be cast to org.eclipse.core.resources.IStorage



eclipse.buildId=I20110613-1736
java.version=1.6.0_26
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=fr_FR
Comment 1 Ayushman Jain CLA 2011-08-18 05:57:56 EDT
Can you please attach the entire stacktrace? If possible, a reproducible test case as well. Thanks!
Comment 2 Nicolas Bros CLA 2011-08-18 06:28:47 EDT
I have already attached the stacktrace.

To reproduce:
- With these projects:
https://dev.eclipse.org/svnroot/modeling/org.eclipse.emft.facet/trunk/plugins/org.eclipse.emf.facet.widgets.nattable
https://dev.eclipse.org/svnroot/modeling/org.eclipse.emft.facet/trunk/plugins/org.eclipse.emf.facet.common.ui
- Open /org.eclipse.emf.facet.widgets.nattable/OSGI-INF/l10n/bundle.properties
- Control+Click on the key: "add.query.column"


In the context of the exception, match is a FieldReferenceMatch:
Search match
  accuracy=INACCURATE
  rule=EXACT
  raw=false
  offset=12075
  length=6
  element=setColumnWidth(org.eclipse.swt.widgets.Item, int) {key=Lorg/eclipse/jface/util/ConfigureColumns$ConfigureColumnsDialog;.setColumnWidth(Lorg/eclipse/swt/widgets/Item;I)V} [in ConfigureColumnsDialog [in ConfigureColumns$ConfigureColumnsDialog.class [in org.eclipse.jface.util [in C:\Users\Travail\bin\com.mia.dev.eclipsepackage_indigo_win32_x86_64_win32_2011-08-09\plugins\org.eclipse.jface_3.7.0.I20110522-1430.jar]]]]

And match.getResource() returns an org.eclipse.core.internal.resources.Project:
org.eclipse.emf.facet.common.ui
Comment 3 Ayushman Jain CLA 2011-08-18 07:39:33 EDT
Sorry, my bad. I did not see the attachment.

Moving to JDT/UI
Comment 4 Dani Megert CLA 2011-08-18 07:47:14 EDT

*** This bug has been marked as a duplicate of bug 332635 ***
Comment 5 Dani Megert CLA 2012-03-22 09:23:33 EDT
We should not wait for bug 332635.