Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321402 - "Copy Qualified Name" action not working for method bindings
Summary: "Copy Qualified Name" action not working for method bindings
Status: VERIFIED FIXED
Alias: None
Product: Objectteams
Classification: Tools
Component: OTDT (show other bugs)
Version: 0.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 0.7.1   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-30 16:30 EDT by Stephan Herrmann CLA
Modified: 2010-09-23 08:44 EDT (History)
0 users

See Also:


Attachments
fix (1.66 KB, patch)
2010-07-30 17:10 EDT, Stephan Herrmann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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