Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ajdt-dev] Building projects with ajproperties

Hello!

I'm facing some problems trying to get some information from projects that uses .ajproperties files to build its models (i.e. Space War Example, TeleCom Example in the AJDT Examples).

I'm following the example below to get the model for a generic project:

// Build the project to generate the model
this.project.build( IncrementalProjectBuilder.FULL_BUILD, null);

//Get the model associated with this build
this.model = AJProjectModelFactory.getInstance().getModelForProject(this.project);

The problem is here... when I try to get an aspect for a CompilationUnit:

// Getting aspects for a CompilationUnit
IJavaProject javaProject = JavaCore.create(this.project);
AJCompilationUnits = AJCompilationUnitManager.INSTANCE.getAJCompilationUnits(javaProject);
for (AJCompilationUnit ajUnit : AJCompilationUnits) {
     Set<AspectElement> aspectsSet = (Set<AspectElement>)this.model.aspectsForFile(ajUnit);  // <-- The result here is NULL :(
}

The Set of AspectElements for this type of project is always NULL when ,in projects that does not use .ajproperties files, the Set is correctly filled.

Ok... I've tried to associate the .ajproperties file with the build using the menu "AspectJ Tools -> Apply build configurations" but I got nothing again, and even that association could work, I don't see any way to include this files in the project build programatically.

Any suggestions?

Thanks for your time!

--
André Fonseca
Linux User #414248

Back to the top