Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339750 - The editor warns for private method not use but the method is used...
Summary: The editor warns for private method not use but the method is used...
Status: NEW
Alias: None
Product: AJDT
Classification: Tools
Component: Core (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: AJDT-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-11 14:10 EST by Jorelia CLA
Modified: 2011-04-26 22:09 EDT (History)
1 user (show)

See Also:


Attachments
Screen capture of the editor that reports the false warning (103.12 KB, image/gif)
2011-03-11 14:11 EST, Jorelia CLA
no flags Details
The verbatim AspectJ source code involved (2.30 KB, application/octet-stream)
2011-03-11 14:13 EST, Jorelia CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jorelia CLA 2011-03-11 14:10:46 EST
Build Identifier: Build id: 20110301-1815

A private method inside an AspectJ classe is underlined as "Method not use" but the method is really called inside the class.

Reproducible: Always
Comment 1 Jorelia CLA 2011-03-11 14:11:48 EST
Created attachment 191019 [details]
Screen capture of the editor that reports the false warning
Comment 2 Jorelia CLA 2011-03-11 14:13:15 EST
Created attachment 191020 [details]
The verbatim AspectJ source code involved
Comment 3 Andrew Clement CLA 2011-04-26 18:34:13 EDT
Distilled it down to this:

===
package com.ubeker.bv.server.aspects;

import org.aspectj.lang.JoinPoint;

public aspect LoggingBehavior {

	pointcut daoLogger() : execution(* *(..));
	
	before() : daoLogger() {
		buildParameters(thisJoinPoint.getArgs());
    }
	
	private void buildParameters(Object[] ps) {
		
	}
}
===
which shows the same problem.

The error only appears in the editor, not in the problems view.  That indicates it is a reconciling issue and not a compiler issue.  Reassigning this to AJDT.
Comment 4 Andrew Eisenberg CLA 2011-04-26 22:09:55 EDT
This problem is arising because of the way that we do reconciling in the AJ editor. We use the Java reconciler, but pass it AJ code.  This means that we need to massage a few things.  For instance, references to thisJoinPoint need to be ignored by the reconciler, but by doing this, we also ignore the call to the private method that you declared.  Thus, the reconciler thinks that there are no calls to the private method.