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

Bug 321402

Summary: "Copy Qualified Name" action not working for method bindings
Product: [Tools] Objectteams Reporter: Stephan Herrmann <stephan.herrmann>
Component: OTDTAssignee: Stephan Herrmann <stephan.herrmann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.7   
Target Milestone: 0.7.1   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
fix none

Description Stephan Herrmann CLA 2010-07-30 16:30:32 EDT
When selecting a callout or callin method binding, e.g., in the editor's
breadcrumbs, and invoking the action "Copy Qualified Name" from the context
menu, you'll get a JavaModelException saying the element "does not exist".
Comment 1 Stephan Herrmann CLA 2010-07-30 17:10:15 EDT
Created attachment 175617 [details]
fix

The fix consists of two parts:

- OTJavaElement.getCorrespondingResource() was not working because it called
  exists() on the correspondingJavaElement which however is fake thus cannot
  fetch infos.
  Solution is to copy the method body from SourceRefElement, which uses the
  right version of exists() and in case of success(!) returns null.

At this point the exception was fixed, but the action did not fetch a 
qualified name.

- ViewAdaptor.JavaElementLabels.getElementLabel did check for M_POST_QUALIFIED
  but failed to handle M_FULLY_QUALIFIED. Fixed.
Comment 2 Stephan Herrmann CLA 2010-07-30 17:13:47 EDT
Fix has been committed as r651 - r653.
Comment 3 Stephan Herrmann CLA 2010-09-23 08:44:54 EDT
Verified using I201009211735