Although editor.indent has been around for a while, the editor and editor.lib modules still contain classes and code that support and use the old formatting API. This situation is confusing for module owners who tend to ignore editor.indent API and keep using the old formatting API.
We should separate the old formatting API to a deprecated autoload module the same way as we did with the old settings and code completion APIs. This issue is here to track progress on this task.
Comment 1Vitezslav Stejskal
2010-08-18 13:47:57 UTC
I have done the separation together with my work on Typing Hooks SPI (issue #152655), which has now pretty much gone through the API review and can be applied to trunk.
I'll try to prepare a patch the way that Jesse suggested in #152655 and attach it here, but it's going to be quite large. It might be better to just give a brief overview of the changes:
- the old API was separated to editor.deprecated.pre65formatting autoload module
- all trunk and contrib modules that could be easily migrated to editor.indent were changed; the only remaining (active) modules that still need to depend on e.d.pre65formatting are:
db.sql.editor - SQL Editor
editor.structure - XML Editor
java.editor - Java Editor
java.editor.lib - Java Editor
web.core.syntax - JSP Editor
xml.text - XML Editor
These modules are SPI clients (eg. implement the old Formatter) and could not be easily migrated. They work as before (AFAICT), but should be rewritten to use the new editor.indent API.
- The changes has been made as much backwards compatible as it was practical. Unfortunately there were methods in BaseKit and BaseDocument that required some of the old formatting API classes (eg. used Formatter as a return type, etc) and these had to be removed. I'll attach signature test diff files for editor and editor.lib modules as a reference.
Comment 2Vitezslav Stejskal
2010-08-18 13:49:58 UTC
Comment 7Vitezslav Stejskal
2010-08-24 11:17:34 UTC
The two cumulative patches (trunk and contrib) contain all the changes done in order to separate the old editor formatting API and also to implement Typing Hooks SPI (issue #152655).
Comment 8Vitezslav Stejskal
2010-08-24 13:03:32 UTC
This is more just a heads up than a review request. I've done separating the old formatting API from editor.lib and editor modules. Please read my previous posts in this issue for details (patches, signature changes, migration guide, etc). Besides of the few modules listed above no other modules need the old API. All the modules in -Dcluster.config=experimental are buildable and run fine in the IDE as far as I can tell. I'll also check that the tests are compilable before the final push.
Since the changes in editor.lib are not backwards compatible I incremented the release and spec versions of this module and updated all other modules dependencies. The same was done for editor module's spec version.
If there are any questions or concerns please post them here. Otherwise, I'd like to integrate this by the end of this week. Thanks
Comment 9Vitezslav Stejskal
2010-08-27 11:19:43 UTC
This has been just pushed to jet-main clone.
One thing to note: I had to add org.netbeans.modules.editor.deprecated.pre65formatting to the list of modules that are ignored in ValidateModulesTest, otherwise commit-validation was failing. Once the remaining modules that still require e.d.pre65formatting are updated (see the list in comment #1) the change can be reverted.
Comment 10Quality Engineering
2010-08-31 03:23:45 UTC
Integrated into 'main-golden', will be available in build *201008310001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Vita Stejskal <firstname.lastname@example.org>
Log: fixing javadoc tests after #189638 integration; LegacyFormattersProvider allowing to inject old Formatter implementations to the new editor.indent infrastructure relies on KitsTracker, which needs true module layer registrations and does not work well with MockMimeLookp
Comment 11Quality Engineering
2010-09-07 03:14:36 UTC