AW: applying aspects on a big Java Project

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

AW: applying aspects on a big Java Project

Matic, Dragan
Hi Matt,
 
<You need to give more memory to the eclipse process>
well, that was my 1st action; I gave -Xmx1024m !, but the process continued to grow up in a logarithmic way; and no garbage collection was possible.
 
<You can do that either by creating a linked source folder in the AspectJ project, or by doing binary weaving >
I also tryed the linked source folder, but without success. Maybe I it didn't run because of the large amount of files (but the weaving process didn't even seem to start). For the binary weaving, it's less what I need, because I want to show the errors/warnings in the task list of eclipse. However, I could try that, if you give me a recept how to do it (I never made that before).
 
Regards,
Dragan

 

Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Matt Chapman
Gesendet: Donnerstag, 9. Juni 2005 18:21
An: [hidden email]
Betreff: Re: [aspectj-users] applying aspects on a big Java Project


"Matic, Dragan" <[hidden email]> 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, [hidden email]
AJDT Development, http://www.eclipse.org/ajdt

_______________________________________________
aspectj-users mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/aspectj-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: AW: applying aspects on a big Java Project

Matt Chapman-2

"Matic, Dragan" <[hidden email]> wrote on 10/06/2005 07:36:58:
> well, that was my 1st action; I gave -Xmx1024m !, but the process
> continued to grow up in a logarithmic way; and no garbage collection
> was possible.


Hmm, maybe that's still not enough. Do you know how many lines of code you have? You could try opening the AJDT Event Trace view (Window > Show View > Other > AspectJ) to see what it's doing.
 
> I also tryed the linked source folder, but without success. Maybe I
> it didn't run because of the large amount of files (but the weaving
> process didn't even seem to start). For the binary weaving, it's
> less what I need, because I want to show the errors/warnings in the
> task list of eclipse. However, I could try that, if you give me a
> recept how to do it (I never made that before).


Binary weaving will still show the errors/warnings in the Problems view, but you will not be able to double-click to navigate to the source location, as it only knows about the .class files. To do this with a plain Java project, create an AspectJ project to do the weaving in, and go to Properties > AspectJ InPath, then from the first tab press "Add Class Folder..." and choose the output folder of the Java project. Another useful option here is AspectJ Compiler > Other > Output weaving messages to the problems view. This will add information-level entries whenever something is woven.

Regards,

Matt.

_______________________________________________
aspectj-users mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/aspectj-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

AW: AW: applying aspects on a big Java Project

Matic, Dragan
In reply to this post by Matic, Dragan
Thanks. With the 2nd solution, it did work.


Von: [hidden email] [mailto:[hidden email]] Im Auftrag von Matt Chapman
Gesendet: Freitag, 10. Juni 2005 10:25
An: [hidden email]
Betreff: Re: AW: [aspectj-users] applying aspects on a big Java Project


"Matic, Dragan" <[hidden email]> wrote on 10/06/2005 07:36:58:
> well, that was my 1st action; I gave -Xmx1024m !, but the process
> continued to grow up in a logarithmic way; and no garbage collection
> was possible.


Hmm, maybe that's still not enough. Do you know how many lines of code you have? You could try opening the AJDT Event Trace view (Window > Show View > Other > AspectJ) to see what it's doing.
 
> I also tryed the linked source folder, but without success. Maybe I
> it didn't run because of the large amount of files (but the weaving
> process didn't even seem to start). For the binary weaving, it's
> less what I need, because I want to show the errors/warnings in the
> task list of eclipse. However, I could try that, if you give me a
> recept how to do it (I never made that before).


Binary weaving will still show the errors/warnings in the Problems view, but you will not be able to double-click to navigate to the source location, as it only knows about the .class files. To do this with a plain Java project, create an AspectJ project to do the weaving in, and go to Properties > AspectJ InPath, then from the first tab press "Add Class Folder..." and choose the output folder of the Java project. Another useful option here is AspectJ Compiler > Other > Output weaving messages to the problems view. This will add information-level entries whenever something is woven.

Regards,

Matt.

_______________________________________________
aspectj-users mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/aspectj-users
Loading...