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.

Bug 90566 - Review a friend API among the IDE's java compiler and the j2me preprocessor
Summary: Review a friend API among the IDE's java compiler and the j2me preprocessor
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 2 votes (vote)
Assignee: Tomas Zezula
URL:
Keywords: API_REVIEW_FAST
Depends on:
Blocks:
 
Reported: 2006-12-05 10:32 UTC by Tomas Zezula
Modified: 2007-01-17 10:09 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
New SPI interface (2.82 KB, text/plain)
2006-12-05 10:34 UTC, Tomas Zezula
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Zezula 2006-12-05 10:32:02 UTC
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.
Comment 1 Tomas Zezula 2006-12-05 10:34:21 UTC
Created attachment 36473 [details]
New SPI interface
Comment 2 Tomas Zezula 2006-12-05 10:36:33 UTC
Usage of the interface by a client (j2me module): The implementation of the
interface has to be placed in the project's Lookup.
Comment 3 Adam Sotona 2006-12-06 16:58:27 UTC
The SPI works for me and the test implementation works well with the Mobility
preprocessor. 
I have no objections, please proceed.
Comment 4 luky 2006-12-06 17:01:47 UTC
Did a review. Looks it will do the job we need it from it. I guess we can 
proceed
Comment 5 Jaroslav Tulach 2006-12-07 10:34:47 UTC
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
Comment 6 Tomas Zezula 2006-12-07 10:46:20 UTC
Thanks Jarda, I will do it in the proposed way, I'll add an module
preprocessorbridge.
Comment 7 Tomas Zezula 2006-12-08 10:03:17 UTC
Commit log: http://java.netbeans.org/servlets/ReadMsg?list=cvs&msgNo=12759