Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Newbie Question: Eclipse/AJDT integration

Thanks for your information, Andrew.

I tried opening the <AspectJ Visualization> and then resetting and closing. It closed that perspective but the option is still on the "Open Perspective" menu just as the "AspectJ Visualization" perspective is. I tried closing both perspectives, then opening, resetting and closing the one with the angle brackets but it still appears in the Open Perspective menu. In short, it doesn't seem to want to go away.

I was worried that I'd misinstalled AJDT somehow but apparently I haven't so I can live with the duplicate perspective and quickfixes. I'm not that hard to get along with ;-)

I'm getting one other bit of odd behaviour. In the current version of my aspect, as shown below, Eclipse gives me warning on the befores and afters, suggesting that I make them static. When I make the static though, the warning message persists, even if I save the files and rebuild the project.

==============================================================
package test;

public aspect LogCount {

pointcut howManyNeedles() : execution(private static int Test01.count(..));

    /* First Before */
    before() : howManyNeedles() {
        System.out.println("About to count....");
    }

    /* First After */
    after() returning() : howManyNeedles() {
        System.out.println("...Needles counted");
    }

    /* Second After */
    after(String needle, String haystack) returning(int num):
        args(needle, haystack)
&& call(private static int count(String, String)) {

System.out.println("** needle = " + needle + "; haystack = " + haystack + "; num = " + num);
    }


}
==============================================================

The funny thing is that if I completely retype the statement using a 'static' modifier, it doesn't get flagged by the compiler. If I simply add 'static' in front of the flagged statement, it stays flagged.....

Is this a known bug or should I be reporting it via Bugzilla?

--
Rhino

On 2012-02-24 22:17, Andrew Eisenberg wrote:
Neither of those are problems and they do not indicate a bad
installation of AJDT.  The second Aspect Visualization perspective
(with the<  >  is a custom perspective that sometimes gets created by
accident.  You can right-cick on the perspective icon and select
"reset" and then "close" and it should go away.

The duplicate quickfix proposals are a known problem.  One set of
quickfixes are contributed from AJDT and the other set from JDT.  Some
are duplicates and some are not.  So far, it has been difficult to
tease out which framework contributes what, so we have a few
duplicates.

Good luck with your aspectj endeavours.

On Fri, Feb 24, 2012 at 3:15 PM, Rhino<rhino1@xxxxxxxxxxxx>  wrote:
This is the third of my newbie questions and probably the last of the day.
This one is unrelated to the other two (I think) and deals with the
integration of Eclipse and AJDT.

I'm wondering if I've messed up the installation of AJDT somehow?

I'm running Eclipse 3.71 (Build id: M20110909-1335). When I click on
Windows/Open Perspective, I get TWO instances of Aspect Visualization, one
that says "<Aspect Visualization>" and one that says "Aspect Visualization".
In other words, the two instances differ only by the presence of angle
brackets around the first one. I'm a little concerned about that but I'm not
sure what to do about it.

Also, when I find warnings underlined in yellow in my aspects and
right-click, I frequently get some of the same options twice. For instance,
I have the following in one aspect with the first line underlined in yellow:

after() returning() : count2() {
        System.out.println("...Needles counted");  //$NON-NLS-1$
    }

When I right-click on the first line, I get three quick fixes:
- add "static" modifier
- add @SuppressWarnings "static-method' to 'a()'
- add @SuppressWarnings "static-method' to 'a()'

It's no big problem to ignore the duplicate fixes but I'm a little concerned
that this may indicate some kind of problem, perhaps with the installation.
I didn'notice any error messages when I installed AJDT but maybe I missed
something....

I should mention that I installed the current release yesterday so the code
should be up-to-date.

Should I uninstall/reinstall AJDT??
--
Rhino
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users




Back to the top