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.
Summary: | Technology preference to allow co-existence of ko4j & for example angular4j | ||
---|---|---|---|
Product: | platform | Reporter: | tulach |
Component: | Html4j | Assignee: | Jaroslav Tulach <jtulach> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | apireviews |
Priority: | P1 | Keywords: | API_REVIEW_FAST |
Version: | 8.1 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 248418 | ||
Attachments: |
Introducing @TechnologyId
Final diff to apply tommorow with more documentation and @Contexts.Id |
Description
tulach
2014-11-26 10:21:24 UTC
Created attachment 150735 [details] Introducing @TechnologyId One way to address such need, is to identify technologies by string name using some annotation: + @Contexts.TechnologyId("one") + static final class R1 implements Runnable { + @Contexts.TechnologyId("two") + static final class R2 implements Runnable { and then the creator of a browser context could specify list of strings to prefer: + Contexts.newBuilder("one", "two") I am attaching patch that does the necessary changes in html4j APIs. Similar change would have to be done in NetBeans integration APIs: diff -r 01b6eff1beb9 api.html4j/src/org/netbeans/api/html4j/OpenHTMLRegistration.java --- a/api.html4j/src/org/netbeans/api/html4j/OpenHTMLRegistration.java Wed Nov 19 18:30:18 2014 +0100 +++ b/api.html4j/src/org/netbeans/api/html4j/OpenHTMLRegistration.java Wed Nov 26 19:53:06 2014 +0100 @@ -117,4 +117,6 @@ * @return the path to the base 16x16 icon */ String iconBase() default ""; + + String[] context() default {}; } diff -r 01b6eff1beb9 api.html4j/test/unit/src/org/netbeans/api/html4j/OpenHTMLRegistrationTest.java --- a/api.html4j/test/unit/src/org/netbeans/api/html4j/OpenHTMLRegistrationTest.java Wed Nov 19 18:30:18 2014 +0100 +++ b/api.html4j/test/unit/src/org/netbeans/api/html4j/OpenHTMLRegistrationTest.java Wed Nov 26 19:53:06 2014 +0100 @@ -60,7 +60,12 @@ } @ActionID(category = "Test", id="html.test") - @OpenHTMLRegistration(displayName = "Open me!", iconBase = "x.png", url = "empty.html") + @OpenHTMLRegistration( + displayName = "Open me!", + iconBase = "x.png", + url = "empty.html", + context = "ko4j" + ) public static void main() { } Unless there are objections I proceed with integration of the change into html+java API tomorrow and then continue the review with the changes on the NetBeans Platform side. Created attachment 150855 [details]
Final diff to apply tommorow with more documentation and @Contexts.Id
Is it possible to use "context" attribute also in @TemplateRegistration? It works :). Great! I'll integrate the patch tomorrow then. Enhancements to @TemplateRegistration are subject of issue 248418 - I'll make sure they get addressed before the issue is integrated. |