- Description has changed:

Diff:

~~~~

--- old
+++ new
@@ -17,6 +17,8 @@
 
 In the _modules.xml_ file all Modules of the project are listed, and the 
transmitted Modul does not appear there. After copying the _module.xml_ file 
from the Host to the client the corresponding module is shown correctly.
 
+Another Problem (not solved with the Approach to Solution) is that nested 
Modules (Modules in Modules) are not transmitted correctly, because its hard to 
compute the path to the inner .iml file.
+
 **Approach to solution**
 
 Intellij provide a _ModuleManager.class_ in the openapi Library, which hast a 
method "loadModules" which load a Module from an .iml file and adds it to the 
project. This solves the problem.

~~~~




---

** [bugs:#868] IntelliJ Modules are not shared correctly**

**Status:** open
**Group:** OTHER
**Labels:** Intellij 
**Created:** Mon Sep 05, 2016 02:02 PM UTC by Bernd Sahre
**Last Updated:** Mon Sep 26, 2016 10:46 AM UTC
**Owner:** Bernd Sahre


**Description**:
Host Alice has a Module which contains a test folder, sources folder, and a 
<modulename>.iml file. There are two classes in the src folder.
If the Host shares this Module in Intellij with Bob, Bob gets all the files 
(.java and .iml) but not the whole Module.
Problem 1: The folders containing the files are only shown as directories, 
independent of their host-side status (e.g. Module, src folder, test folder, 
etc.).  As a result, Bob cannot create classes (as it's only possible in Java 
Module src folders, not in plain directories). 
Problem 2: Empty folders are not transmitted.

**Problem-Analysis**:
Comparing the two projects of Alice and Bob, the result is following:

In the _.idea_ folder (which contains the project meta data), there are 
differences in

* _misc.xml_
* _workspace.xml_
* _modules.xml_

All other files are equivalent (except for own system configurations).

In the _modules.xml_ file all Modules of the project are listed, and the 
transmitted Modul does not appear there. After copying the _module.xml_ file 
from the Host to the client the corresponding module is shown correctly.

Another Problem (not solved with the Approach to Solution) is that nested 
Modules (Modules in Modules) are not transmitted correctly, because its hard to 
compute the path to the inner .iml file.

**Approach to solution**

Intellij provide a _ModuleManager.class_ in the openapi Library, which hast a 
method "loadModules" which load a Module from an .iml file and adds it to the 
project. This solves the problem.
To call this method, it is recommend to register a new class in the 
SarosLifeCycleListener and the Picocontainer so the method is called every time 
when Ressources are shared.
It is also appropiate to imbed this method with
   ApplicationManager.getApplication().invokeLater(new Runnable() {
                @Override
                public void run() {
                    ApplicationManager.getApplication().runWriteAction(new 
Runnable() {
                    loadModule(filepath);
                    ....
to secure threadsafety.


---

Sent from sourceforge.net because dpp-robot@lists.sourceforge.net is subscribed 
to https://sourceforge.net/p/dpp/bugs/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/dpp/admin/bugs/options.  Or, if this is a mailing 
list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
_______________________________________________
DPP-Robot mailing list
DPP-Robot@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dpp-robot

Reply via email to