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: | PHP spellchecker doesn't work | ||
---|---|---|---|
Product: | php | Reporter: | junichi11 |
Component: | Editor | Assignee: | junichi11 |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | amobilia, jlahoda, jtulach, tmysik |
Priority: | P3 | ||
Version: | 8.2 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
proposed patch
proposed patch v2 |
Description
junichi11
2016-11-30 02:39:06 UTC
Created attachment 163092 [details]
proposed patch
Tomas, I want to add the spellchecker for PHPDoc comments(spellchecker.bindings.php) to spellchecker.bindings.htmlxml as a friend to use the HtmlTokenList class with the MultiTokenList.create(), and update both spec versions. Could I do that?
Thanks!
Unfortunately, the patch _creates_ API of the spellchecker.bindings.htmlxml module (currently, it has no API). Not sure who is the owner of that module, but there should definitely be more work behind this change - probably creating new "api" package only with classes that are supposed to be available to other modules. But in this particular case, I guess implementation dependency should be fine - both modules are present in the build so there should not be a problem with it. However, adding Jarda to CC - Jardo, could you please advice? Thanks. (In reply to Tomas Mysik from comment #2) > Unfortunately, the patch _creates_ API of the spellchecker.bindings.htmlxml > module (currently, it has no API). Not sure who is the owner of that module, > but there should definitely be more work behind this change - probably > creating new "api" package only with classes that are supposed to be > available to other modules. > > But in this particular case, I guess implementation dependency should be > fine - both modules are present in the build so there should not be a > problem with it. Thanks a lot for your answer! Make sense. My request is bad. I just changed the module dependency of spellcheker.bindings.htmlxml to implementation version. But I got the error message (Cannot depend on module org.netbeans.modules.spellchecker.bindings.htmlxml using build number as an implementation version). Thanks. Implementation dependency is bad, friend dependency may not be necessary. Why not try the same approach as in spellchecker/src/org/netbeans/modules/spellchecker/ComponentPeer.java - e.g.: for (TokenListProvider p : MimeLookup.getLookup(MimePath.get("text/html")).lookupAll(TokenListProvider.class)) { TokenList l = p.findTokenList(doc); if (l != null) { List<TokenList> tokens = new ArrayList<>(2); tokens.add(new PHPTokenList(doc)); tokens.add(l); // NOI18N return MultiTokenList.create(tokens); } } that could do the same without any API changes. CCing Jan (author of spellchecker) to verify if my idea is sane. Created attachment 163100 [details] proposed patch v2 (In reply to Jaroslav Tulach from comment #4) > Why not try the same approach as in > spellchecker/src/org/netbeans/modules/spellchecker/ComponentPeer.java It works fine. Thanks a lot! If it works, feel free to apply it :) I will then transplant the fix to the NB 8.2 Patch. Thanks, guys! Applied :) http://hg.netbeans.org/web-main/rev/5ab2ed9efdb6 Thanks! Thank a lot, Junichi! You are welcome :) Integrated into 'main-silver', will be available in build *201612020001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/5ab2ed9efdb6 User: Junichi Yamamoto <junichi11@netbeans.org> Log: #269179 - PHP spellchecker doesn't work Verified, thanks! Product Version: NetBeans IDE Dev (Build 20161202-f5e0ed8a8ff8) Java: 1.8.0_111; Java HotSpot(TM) 64-Bit Server VM 25.111-b14 Runtime: Java(TM) SE Runtime Environment 1.8.0_111-b14 System: Linux version 4.8.0-28-generic running on amd64; UTF-8; cs_CZ (nb) Transplanted to the releases repo branch release82: http://hg.netbeans.org/releases/rev/845ca0fcf2c5 Thanks. 82patch1-verified |