Bug 54008 - An aspect with main method can not be run via the Run - menu
Summary: An aspect with main method can not be run via the Run - menu
Status: RESOLVED FIXED
Alias: None
Product: AJDT
Classification: Tools
Component: Core (show other bugs)
Version: 1.1.4   Edit
Hardware: PC Linux
: P3 minor (vote)
Target Milestone: 1.2.0   Edit
Assignee: Sian January CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-08 05:58 EST by Antti Karanta CLA
Modified: 2004-09-08 08:38 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 Antti Karanta CLA 2004-03-08 05:58:57 EST
If an aspect contains a main mehod (public static etc), it still can not be run 
via the Run --> Run As... --> Java application. The message is: "The active 
editor does not contain a main type".

Try this out by opening the examples that come with aspectj and try to run 
introduction.HashablePoint
Note that it runs fine from the command line.
Comment 1 Adrian Colyer CLA 2004-03-08 11:09:38 EST
This will be fixed in the forthcoming AJDT release. In the meantime, there is a 
workaround, which is as follows:

* create a run "Java Application" launch profile by selecting "run..." and then 
clicking new.
* Ignore the "search" button next to the "main class" entry field and just type 
in the fully-qualified name of the aspect you want to run.
* Click apply, and then run.
* The saved launch profile can be used immediately for running or debugging from 
now on.
Comment 2 Sian January CLA 2004-09-08 08:38:00 EDT
A new launching option - Run 'AspectJ/Java Application' has been added to the 
run menu that finds main methods in aspects.  We have also added shortcuts to 
this launcher from aspects in the package explorer by right clicking on an 
aspect then clicking Run > 'AspectJ/Java Application'.

Available in CVS now and to be included in the 1.1.13 release of AJDT.