Bug 253528 - [build] Compilation folder is not marked as 'Derived'
Summary: [build] Compilation folder is not marked as 'Derived'
Status: RESOLVED FIXED
Alias: None
Product: AJDT
Classification: Tools
Component: Core (show other bugs)
Version: 1.6.1   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 1.6.2   Edit
Assignee: AJDT-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 258325
Blocks:
  Show dependency tree
 
Reported: 2008-11-03 19:18 EST by Yuriy Gorvitovskiy CLA
Modified: 2008-12-14 11:50 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuriy Gorvitovskiy CLA 2008-11-03 19:18:18 EST
I have trouble to make AJDT work with Perforce plug-in (P4WSAD). 

The problem is that AspectJ output folder is not marked as Derived Resource. Because of it P4WSAD trying to add every compiled file into change request. 

Can you call IResource.setDerived(true) for the compilation output folder, please?

The work around is add this folder to the Ignore list.

Thank you,
Comment 1 Andrew Eisenberg CLA 2008-11-03 19:38:51 EST
Will investigate further.

Is it a requirement that the output folder *and* all of its children be marked as derived, or is it sufficient for the output folder only to be marked as derived?
Comment 2 Yuriy Gorvitovskiy CLA 2008-11-03 19:41:08 EST
The requirement is only for the root folder.
Comment 3 Andrew Eisenberg CLA 2008-11-03 23:43:16 EST
Hmmm...seems that Java projects do *not* have the output folder itself as derived, but all of its children are derived.

In AspectJ, files are not marked as derived.  I think the proper behavior is to replicate the behavior of Java projects.
Comment 4 Andrew Eisenberg CLA 2008-11-03 23:45:19 EST
However, the creation of files and folders during compilation is the job of the AspectJ compiler, not AJDT.

Andy, is this something that you can do in the compiler?  When creating files and folders during a build, simply call resource.setDerived(true).
Comment 5 Andrew Clement CLA 2008-11-04 01:52:13 EST
assign it to me and i'll look at it at some point
Comment 6 Andrew Clement CLA 2008-11-04 11:20:40 EST
after a bit of further thinking on this I'm not sure I'll be able to do much as I don't have the IResource for the files I create, I create them directly on the disk using java.io.  The best I can do is either call AJDT back on creating each file for it to do 'whatever' for the files being created, or return a big list of them at the end.  Or do you just need the first level of files/folders below the root output folder?
Comment 7 Andrew Eisenberg CLA 2008-11-11 18:38:24 EST
To Mimic the behavior of the JavaBuilder, this needs to be done for *every* file and folder that has been created by the compiler (including non-Java resources copied over), but not for the output folder root itself.

I don't have a preference for whether it happens as a call back or in batch after the compile.
Comment 8 Andrew Eisenberg CLA 2008-12-11 13:12:14 EST
I should be able to squeeze this into the 1.6.2 release that is coming out on January 5.
Comment 9 Andrew Eisenberg CLA 2008-12-14 11:50:54 EST
Fix has been committed to head (non-weaving branch) with tests.  Will be out in next dev build available at the update site:

http://download.eclipse.org/tools/ajdt/34/dev/noweaving