Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] applying aspects on a big Java Project


"Matic, Dragan" <dragan.matic@xxxxxxx> wrote on 09/06/2005 15:44:54:
> We've got a big java application (ca. 1700 java classes), and I wanted
> to apply some architectural rules on it, in order to check the code,
> using aspects. But, transforming the app into an Aspect-Project, runs
> the IDE (eclipse 3.0.2) into OutOfMemoryException.
> Does someone have an idea, how I could overcome this problem ?

You need to give more memory to the eclipse process. You can do this by passing the "-vmargs" option to the eclipse executable, for example "-vmargs -Xmx512m". You can do this from the command line, or create a shortcut (Windows), a shell script (Linux) or show the contents of Eclipse.app and edit the Info.plist file (Mac OS X).

> In fact, a good solution, if it were possible, would be to let my Java
> Project as it is, and make an aspect project relying on the first one,
> to give me the errors and warnings I expect out of my rules. Is that
> possible ?

You can do that either by creating a linked source folder in the AspectJ project, or by doing binary weaving in the AspectJ project using the AspectJ InPath setting. But in both cases you lose some of the AJDT support with advice markers etc. Plus even more memory is required, because you have the Java project in addition to the AspectJ project.

Regards,

Matt.

--
Matt Chapman, mchapman@xxxxxxxxxx
AJDT Development, http://www.eclipse.org/ajdt

Back to the top