Bug 158937 - declare statements appear with "()" in views
Summary: declare statements appear with "()" in views
Status: RESOLVED FIXED
Alias: None
Product: AJDT
Classification: Tools
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.4.1   Edit
Assignee: Matt Chapman CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-27 04:43 EDT by Helen Beeken CLA
Modified: 2006-10-05 05:18 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Helen Beeken CLA 2006-09-27 04:43:16 EDT
Declare statements appear with an extra "()" in the different AJDT views.

For example, given the following declare statement:

     declare warning : execution(* *.*(..)) : "blah";

this appears as

     declare warning : "blah"()

in the package explorer, outline view and xref view.

The reason for this is that the JavaElementLabelProvider is used. It thinks the declare statement is a method and so adds the "()" (org.eclipse.jdt.ui.JavaElementLabels.getMethodLabel line 515).
Comment 1 Matt Chapman CLA 2006-10-04 11:10:26 EDT
Yes, the () doesn't make sense for declare statements.
Same is true for ITD fields.
Comment 2 Matt Chapman CLA 2006-10-05 05:18:11 EDT
Fixed in:

1.4.1.200610041302 for Eclipse 3.2 (build.212)
1.5.0.200610050456 for Eclipse 3.3M2 (build.49)