Bug 179508 - API review needed for adding ImportProcessor to the Java Editor API
API review needed for adding ImportProcessor to the Java Editor API
Status: RESOLVED FIXED
Product: java
Classification: Unclassified
Component: Editor
6.x
PC All
: P2 (vote)
: 6.x
Assigned To: Tomasz Slota
issues@java
: API_REVIEW_FAST
Depends on:
Blocks: 92669
  Show dependency treegraph
 
Reported: 2010-01-14 08:45 UTC by Tomasz Slota
Modified: 2010-01-24 08:36 UTC (History)
5 users (show)

See Also:
Issue Type: TASK
:


Attachments
interface + corresponding implementation in SourceUtils (55.19 KB, patch)
2010-01-14 08:56 UTC, Tomasz Slota
Details | Diff
New diff (9.00 KB, patch)
2010-01-18 07:24 UTC, Tomasz Slota
Details | Diff
newer diff - the ImportProcessor interface moved to Preprocessor Bridge and is now exposed as friend API only (7.91 KB, patch)
2010-01-18 07:51 UTC, Tomasz Slota
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Slota 2010-01-14 08:45:40 UTC
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);
}
Comment 1 Tomasz Slota 2010-01-14 08:56:42 UTC
Created attachment 93291 [details]
interface + corresponding implementation in SourceUtils
Comment 2 Tomas Zezula 2010-01-14 09:01:03 UTC
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.
Comment 3 Tomas Zezula 2010-01-14 09:04:11 UTC
I doubt this interface belongs to API, seems rather a SPI to me.
Why the interface is not a friend SPI (preprocessorbridge)?
Comment 4 Jesse Glick 2010-01-14 09:05:36 UTC
(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
Comment 5 Jesse Glick 2010-01-14 09:08:24 UTC
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.
Comment 6 Tomasz Slota 2010-01-14 09:29:07 UTC
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
Comment 7 Jesse Glick 2010-01-14 10:07:19 UTC
(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).
Comment 8 Tomas Zezula 2010-01-14 15:40:36 UTC
Here is a better link describing the API review process http://openide.netbeans.org/tutorial/review-steps.html
Comment 9 Tomasz Slota 2010-01-18 07:24:17 UTC
Created attachment 93376 [details]
New diff
Comment 10 Tomasz Slota 2010-01-18 07:51:37 UTC
Created attachment 93378 [details]
newer diff - the ImportProcessor interface moved to Preprocessor Bridge and is now exposed as friend API only
Comment 11 Tomasz Slota 2010-01-18 08:56:39 UTC
if there are no objections the changes will be integrated tomorrow
Comment 12 Tomasz Slota 2010-01-19 02:51:49 UTC
change integrated to web-main

http://hg.netbeans.org/web-main/rev/ff47cd5fa54e
Comment 13 Quality Engineering 2010-01-24 08:36:15 UTC
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


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo