This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Please review the friend API used by the J2ME module to preprocess the java files before they are passed to the IDE's java compiler. Usecase: The J2ME java file uses preprocessor to allow several different versions of a single java file according to active configuration. When java infrastructure reads such a file from disk (an initial scan, reading of a non opened file) it should use the preprocessor to read the right content. In the previous versions of the IDE the j2me module had to open all the source files to force the java infrastructure to read the content from documents not from the disk, but this solution does not scale. Stability Category: Friend - used only by the j2me module. Implementation: The implementation of the Javac's JavaFileManager uses the supplied interface to do the preprocessing. Limitations: The positions in the filtered content have to correspond to the positions in the document.
Created attachment 36473 [details] New SPI interface
Usage of the interface by a client (j2me module): The implementation of the interface has to be placed in the project's Lookup.
The SPI works for me and the test implementation works well with the Mobility preprocessor. I have no objections, please proceed.
Did a review. Looks it will do the job we need it from it. I guess we can proceed
Nothing against the proposed interface, but what module you want to put it in? If, by a chance, the module already exports a stable API, then you have a problem. NetBeans modules cannot share public and friend APIs (enforced on the runtime level, which I think you want). That is why I guess you may want to use the advice describe at bottom of issue 63997
Thanks Jarda, I will do it in the proposed way, I'll add an module preprocessorbridge.
Commit log: http://java.netbeans.org/servlets/ReadMsg?list=cvs&msgNo=12759