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.
I need to add the following interface to the Java Editor API to provide a proper fix for issue 92669: /** * Interface that allows to hook custom code to the action of inserting import * when code completion is called within embedded Java code * * @author Tomasz.Slota@Sun.COM */ public interface ImportsProcesor { /** * Handle request to add unresolved import * (top-level-language specific way) * * @param doc * @param fullyQualifiedClassName */ void addImport(Document doc, String fullyQualifiedClassName); }
Created attachment 93291 [details] interface + corresponding implementation in SourceUtils
Please follow the API review process http://wiki.netbeans.org/APIReviews. changes.xml, since, API diff, stability, etc. I don't understand the diff file. Seems as an original SourceUtils class.
I doubt this interface belongs to API, seems rather a SPI to me. Why the interface is not a friend SPI (preprocessorbridge)?
(In reply to comment #2) > I don't understand the diff file. Seems as an original SourceUtils class. It is mangled. Please do not use Team > Diff to generate patches for review. Use 'hg diff --git'. See e.g.: http://wiki.netbeans.org/HgHowTos#Develop_API_review_patches_using_MQ
Nonsensical BZ version. And [JG01] "processor" is misspelled. Also note that in English, the first word of a compound noun is typically given in the bare form even if it might be semantically a plural: "ClassDeleter" rather than "ClassesDeleter", etc.
tzezula: the API Reviews wiki does not mention most of those artifacts.. jglick: I've applied your naming suggestion, what do you mean by 'Nonsensical BZ version'? I will probably invalidate this issue and move this stuff to the friend SPI as suggested by tzezula
(In reply to comment #6) > what do you mean by 'Nonsensical BZ version'? The Version field in this issue was set to 'S1S' (Sun ONE Studio).
Here is a better link describing the API review process http://openide.netbeans.org/tutorial/review-steps.html
Created attachment 93376 [details] New diff
Created attachment 93378 [details] newer diff - the ImportProcessor interface moved to Preprocessor Bridge and is now exposed as friend API only
if there are no objections the changes will be integrated tomorrow
change integrated to web-main http://hg.netbeans.org/web-main/rev/ff47cd5fa54e
Integrated into 'main-golden', will be available in build *201001240200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/ff47cd5fa54e User: Tomasz Slota <tslota@netbeans.org> Log: #179508: API review needed for adding ImportProcessor to the Java Editor API