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: | remove dependency for editor.guards | ||
---|---|---|---|
Product: | editor | Reporter: | gwaldon <gwaldon> |
Component: | -- Other -- | Assignee: | Svata Dedic <sdedic> |
Status: | NEW --- | ||
Severity: | normal | CC: | sdedic |
Priority: | P3 | ||
Version: | 8.1 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
gwaldon
2016-01-31 00:38:30 UTC
Implementing the editor within the platform I mean. The editor.guards module just provides an API + abstract layer for guarded block management. The implementation of the actual storage and document bindings is left to the Document implementor, that is editor.lib module in this case. What's are the issues caused by the dependency when (re)implementing the editor ? It forces either to add the editor.guard module or manually edit the editor module to have it not included in a custom editor implementation. The idea is to keep continuing having the editor very modular. I am still not entirely sure how removing a public API, and having clients to e.g. again depend on GuardedDocument implementation class would make editor.lib more modular. If the API stays there and is implemented by classes in editor.lib (by GuardedDocument), it's natural that editor modules depend on (implemented) API. Without at least some API in editor.guards, clients had been forced to depend on editor.lib with all its swing and UI dependencies although the client has no UI at all. Please elaborate why including classes for (already implemented) API is an issue. For example GuardedException is another candidate for move to editor.guards module and that one is used/detected by editor actions (again, exception resulting from modification attempt of a protected region is a non-UI concept, should not reside in editor.lib). I need a more solid understanding of other editor impl needs to make the separation smooth and usable, sorry. ok, let's keep things simple and maybe I missed something. From NB8.0 to NB8.1 we found that when implementing our editor we now need a dependency on the editor.guard module. The dependency is due to an implementation class DocumentGuardsImpl in the editor.lib module which is not in a public package. The question then is why not have this class in org.netbeans.modules.editor.guards which appears to be the implementation package of org.netbeans.api.editor.guards in the editor.guards module. If this does not make sense or is not feasible because of possible cyclic dependencies between modules or anything else, let's close this. Otherwise let's move the class and not add unnecessary dependencies in NetBeans editor. |