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 210262 - API Addition TransformationSupport class
Summary: API Addition TransformationSupport class
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Jan Becicka
URL:
Keywords: API, API_REVIEW_FAST
Depends on:
Blocks:
 
Reported: 2012-03-28 11:46 UTC by Jan Becicka
Modified: 2012-04-02 15:59 UTC (History)
4 users (show)

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
API class (11.41 KB, application/octet-stream)
2012-03-28 11:48 UTC, Jan Becicka
Details
A sketch of a builder-like possibility to implement the RefactoringSupport. (1.41 KB, text/x-java)
2012-03-28 12:18 UTC, Jan Lahoda
Details
TransformationSupport (14.11 KB, text/plain)
2012-03-29 07:44 UTC, Jan Becicka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Becicka 2012-03-28 11:46:06 UTC
Please review attached new API class
Comment 1 Jan Becicka 2012-03-28 11:48:27 UTC
Created attachment 117393 [details]
API class
Comment 2 Jan Becicka 2012-03-28 11:49:51 UTC
    <changes>
        <change id="RefactoringSupport">
            <api name="JavaHintsSPI"/>
            <summary>Added support for using jackpot patterns from other modules (e.g. refactoring).</summary>
            <version major="1" minor="1"/>
            <date day="28" month="3" year="2012"/>
            <author login="jbecicka"/>
            <compatibility addition="yes"/>
            <description>
                <p>
                    Added support for using jackpot patterns from other modules (e.g. refactoring).
                </p>    
            </description>
            <class package="org.netbeans.spi.java.hints.support" name="RefactoringSupport"/>
            <issue number="210262"/>
        </change>
    </changes>
Comment 3 Jan Lahoda 2012-03-28 12:17:53 UTC
Thanks for the proposal. A few comments:
JL01: the "support" package may not be very appropriate for this class. Generally when a class from the support package is copied into a different module, it should still compile, which is not the case of this class
JL02: after thinking about a little bit more, it might be meaningful to use a builder-like pattern, used e.g. in the org.netbeans.api.java.source.matching.Matcher. I will attach a sketch. This might be more future-proof.
Comment 4 Jan Lahoda 2012-03-28 12:18:48 UTC
Created attachment 117397 [details]
A sketch of a builder-like possibility to implement the RefactoringSupport.
Comment 5 Jan Becicka 2012-03-29 07:44:07 UTC
Created attachment 117446 [details]
TransformationSupport

Version 2.0
Comment 6 Ralph Ruijs 2012-03-29 08:00:08 UTC
(In reply to comment #5)
> Created attachment 117446 [details]
> TransformationSupport
> 
> Version 2.0

API looks good to me.
Comment 7 Jan Becicka 2012-03-29 13:27:53 UTC
http://hg.netbeans.org/jet-main/rev/39274bf203c9
Comment 8 Jesse Glick 2012-03-30 13:47:30 UTC
I think there is something wrong with mail delivery since I never saw any notifications about this issue.


(In reply to comment #3)
> when a class from the support package is copied into a different
> module, it should still compile

More precisely, it should be possible to copy the class including its transitive static dependencies (and resources) into another module with the same dependency list, and the result should not only compile - i.e. not be using any restricted packages - but any code _using_ the original class and updated to use the new class should also compile, and (in the case of non-type-safe APIs like Map<String,?>) behave the same (i.e. no other code is casting to the original type).

I think the distinction is irrelevant in this case since no other code in the API refers to TS, but still as JL01 said it has privileged access to private packages so it is not a support class and should preferably not be named that way.


[JG01] I do not think {@link https://bitbucket.org/...} is valid Javadoc syntax, but even if it were, such external links would be flagged as test failures by nbms-and-javadoc. (nbbuild/javadoctools/disallowed-links.xml)
Comment 9 Jan Becicka 2012-03-30 14:04:05 UTC
as for support. The change is already committed. So should I do incompatible change and rename/move it somewhere?

JG01: fixed
Comment 10 Jesse Glick 2012-03-30 22:15:22 UTC
I guess it is not important enough to change now. jlahoda any opinion on that?
Comment 11 Quality Engineering 2012-04-02 15:59:32 UTC
Integrated into 'main-golden', will be available in build *201204021038* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/39274bf203c9
User: Jan Becicka <jbecicka@netbeans.org>
Log: Issue #210262 - API Addition TransformationSupport class