9 Commits

Author SHA1 Message Date
Nikolay Chashnikov
adae737853 [configuration store] properly update data when location of iml file is changed (IDEA-278129)
If after updating the workspace model path to iml file of some module changes (e.g. because the original module was renamed, and other module got its name), we need to update the stored paths in ModuleBridgeImpl, ModuleStateStorageManager and ModulePathMacroManager.

GitOrigin-RevId: 0ca4aa592c1bed6eb0a68ad83fd2164dbc6a73dd
2021-09-15 12:41:48 +00:00
Mikhail Mazurkevich
68df252efd [workspace model] CPP-24452 Fix module serialization at external system folder
There were a couple of problems which were fixed within the ticket:
1. `CustomImlData` was not saved for modules stored at external system folder
2. `DummyParentEntitySource` was applied not only for module entity but for an other e.g `ModuleGroupPathEntity`,
`ModuleCustomImlDataEntity`... This entities without PersistentId which leads to incorrect behaviour at
replaceBySource and leaking DummyParentEntitySource` to the main store
3. There was a problem  that the system don't load `ExternalSystemOptions` if customRootsSerializer is exist
4. For Clion we should created `ExternalSystemModuleOptionsEntity` if we know the externalSystemId but project import
not started yet(for some reasons it may not start e.g due to the problems at Makefile)  and we should properly handle
serialization of such cases

GitOrigin-RevId: f045ceda298d61cf779091e2350827c7e0fb1ab2
2021-03-25 22:21:02 +00:00
Nikolay Chashnikov
1c41d54c94 [workspace model] fix saving facets in modules with custom storage (CPP-22464)
If a module configuration isn't stored in iml and its ModuleEntity uses custom entitySource, and a facet configuration is stored in iml and its FacetEntity uses the standard JpsFileEntitySource, we need to collect all relevant entities with different sources during save, otherwise FacetEntity may be missed and its configuration won't be saved.

GitOrigin-RevId: 44de0eaafb2ab87d9e10fc11e7174d8261529d32
2021-02-12 23:55:53 +00:00
Nikolay Chashnikov
87d4895614 [workspace model] properly report IO and xml exceptions happened during project configuration reloading (EA-246041)
GitOrigin-RevId: 0a3a9c76811865b0899cdc3f15bd649c0d1be039
2020-12-02 15:39:42 +00:00
Nikolay Chashnikov
1a4e89dc2b [java] commit changes under write action when artifacts configuration is reloaded (EA-241293)
GitOrigin-RevId: 232a59b351976daee22e904e3bba8748f3637b0e
2020-10-30 13:16:48 +00:00
Nikolay Chashnikov
4c971bf289 [workspace model] fix loading newly added modules located deep under added directories (IDEA-253040)
If a directory was added, 'addedFileUrls' will contain only its direct children, so we need to explicitly add serializers for new modules mentioned in modules.xml files to 'affectedFileLoaders' list.

GitOrigin-RevId: 61d2683b031374e0831a9e0a2c147a3ce7fc7b82
2020-10-22 13:41:19 +00:00
Alex Plate
8cc164f0e6 [Workspace Model] Update reload tests
Code review: IDEA-CR-65216

GitOrigin-RevId: 4c2079b1caddcb5a697f7154584a2e2a98cad9b7
2020-07-23 13:57:34 +00:00
Nikolay Chashnikov
a01d0adda5 [workspace model] optimize project loading by caching content of iml files
JpsProjectSerializersImpl tries to read at least 3 components (NewModuleRootManager, FacetManager, DeprecatedModuleOptionManager) from each iml file so caching its parsed content speed ups loading. It's needed to clear cache after all modules are loaded to save memory and ensure that content of files will be read again if they change.

GitOrigin-RevId: eedb19aea44dd34347fae64c6f45728caa4fa6c2
2020-07-21 17:23:43 +00:00
Alex Plate
27e0a3e224 [Workspace Model] WM-T-67 Fix exception after removing module with a module library
GitOrigin-RevId: ff11c1e9414d00252c0d07a8b22426189d3b8cb0
2020-07-17 17:59:41 +00:00