modules turned into projects

I don't know what I did, but my two modules in a single project are
now behaving like two separate projects. What is the easiest way to
get them back the way they were? The directory structure still looks
ok.

--
Roedy Green Canadian Mind Products http://mindprod.com
Errors using inadequate data are much less than those using no data at all.
~ Charles Babbage (born: 1791-12-26 died: 1871-10-18 at age: 79)

0
5 comments

Sorry for delay. We need some details and screenshots. So far I'm far from understanding the issue.

0
Avatar
Permanently deleted user

On Thu, 28 Aug 2014 19:29:34 MSK, Alexander Doroshko
<no_reply@jetbrains.com> wrote, quoted or indirectly quoted someone
who said :

>Sorry for delay. We need some details and screenshots. So far I'm far from understanding the issue.

Here is the first clue, a tree diagram of the directory structure.

Originally I had a project called MP. Inside it were two modules j7
and j8 for stuff that compiles with 1.7 target and 1.8 targets
respectively.  j8 depended on j7. Now the j7 and j8 behave as if there
were separate projects.  For example the j7 edit configuration cannot
see the j8 programs.

E:\intellij
+--.idea
¦  +--copyright
¦  +--dictionaries
¦  +--inspectionProfiles
¦  +--scopes
+--mp
   +--.idea
   ¦  +--copyright
   ¦  +--dictionaries
   ¦  +--inspectionProfiles
   ¦  +--scopes
   +--j7
   ¦  +--src
   ¦     +--com
   ¦        +--mindprod
   ¦           +--accumulate
...  
   ¦           +--zzz
   +--j8
   ¦  +--.idea
   ¦  ¦  +--copyright
   ¦  ¦  +--scopes
   ¦  +--src
   ¦     +--com
   ¦        +--mindprod
   ¦           +--example
   ¦           +--sortaliases
   ¦           +--sortcode

I notice that there is a .idea directory in j8, but j7 does not have
one. Perhaps all that is required is to remove it.

++++++++++++++++++++++++++++++++++++

Here are the locations of key files
E:\intellij\.idea
E:\intellij\mp
E:\intellij\.idea\copyright
E:\intellij\.idea\dictionaries
E:\intellij\.idea\inspectionProfiles
E:\intellij\.idea\scopes
E:\intellij\.idea\.name
E:\intellij\.idea\codeStyleSettings.xml
E:\intellij\.idea\compiler.xml
E:\intellij\.idea\encodings.xml
E:\intellij\.idea\misc.xml
E:\intellij\.idea\modules.xml
E:\intellij\.idea\uiDesigner.xml
E:\intellij\.idea\untouch.digest
E:\intellij\.idea\vcs.xml
E:\intellij\.idea\workspace.xml
E:\intellij\.idea\copyright\profiles_settings.xml
E:\intellij\.idea\copyright\untouch.digest
E:\intellij\.idea\dictionaries\Roedy.xml
E:\intellij\.idea\dictionaries\untouch.digest
E:\intellij\.idea\inspectionProfiles\profiles_settings.xml
E:\intellij\.idea\inspectionProfiles\Project_Default.xml
E:\intellij\.idea\inspectionProfiles\untouch.digest
E:\intellij\.idea\scopes\scope_settings.xml
E:\intellij\.idea\scopes\untouch.digest
E:\intellij\mp\.idea
E:\intellij\mp\j7
E:\intellij\mp\j8
E:\intellij\mp\out
E:\intellij\mp\.idea\copyright
E:\intellij\mp\.idea\dictionaries
E:\intellij\mp\.idea\inspectionProfiles
E:\intellij\mp\.idea\scopes
E:\intellij\mp\.idea\.name
E:\intellij\mp\.idea\ant.xml
E:\intellij\mp\.idea\codeStyleSettings.xml
E:\intellij\mp\.idea\compiler.xml
E:\intellij\mp\.idea\encodings.xml
E:\intellij\mp\.idea\misc.xml
E:\intellij\mp\.idea\modules.xml
E:\intellij\mp\.idea\uiDesigner.xml
E:\intellij\mp\.idea\untouch.digest
E:\intellij\mp\.idea\vcs.xml
E:\intellij\mp\.idea\workspace.xml
E:\intellij\mp\.idea\copyright\profiles_settings.xml
E:\intellij\mp\.idea\copyright\untouch.digest
E:\intellij\mp\.idea\dictionaries\Roedy.xml
E:\intellij\mp\.idea\dictionaries\untouch.digest
E:\intellij\mp\.idea\inspectionProfiles\profiles_settings.xml
E:\intellij\mp\.idea\inspectionProfiles\Project_Default.xml
E:\intellij\mp\.idea\inspectionProfiles\untouch.digest
E:\intellij\mp\.idea\scopes\scope_settings.xml
E:\intellij\mp\.idea\scopes\untouch.digest
E:\intellij\mp\j7\src
E:\intellij\mp\j7\J7.iml
E:\intellij\mp\j7\untouch.digest
E:\intellij\mp\j7\src\com
E:\intellij\mp\j7\src\com\mindprod
E:\intellij\mp\j7\src\com\mindprod\accumulate
...
E:\intellij\mp\j7\src\com\mindprod\zzz
E:\intellij\mp\j8\.idea
E:\intellij\mp\j8\src
E:\intellij\mp\j8\j8.iml
E:\intellij\mp\j8\.idea\copyright
E:\intellij\mp\j8\.idea\scopes
E:\intellij\mp\j8\.idea\.name
E:\intellij\mp\j8\.idea\compiler.xml
E:\intellij\mp\j8\.idea\encodings.xml
E:\intellij\mp\j8\.idea\j8.iml
E:\intellij\mp\j8\.idea\misc.xml
E:\intellij\mp\j8\.idea\modules.xml
E:\intellij\mp\j8\.idea\untouch.digest
E:\intellij\mp\j8\.idea\vcs.xml
E:\intellij\mp\j8\.idea\workspace.xml
E:\intellij\mp\j8\.idea\copyright\profiles_settings.xml
E:\intellij\mp\j8\.idea\copyright\untouch.digest
E:\intellij\mp\j8\.idea\scopes\scope_settings.xml
E:\intellij\mp\j8\.idea\scopes\untouch.digest
E:\intellij\mp\j8\src\com
E:\intellij\mp\j8\src\com\mindprod
E:\intellij\mp\j8\src\com\mindprod\example
...
E:\intellij\mp\j8\src\com\mindprod\sortcode

If I opet project intelliJ see only module j7
If I open project mp I see only only model j7
If I open "project" j8, I see only module j8.

It is though somehow module j8 got turned into an independent project.
--
Roedy Green Canadian Mind Products http://mindprod.com
Errors using inadequate data are much less than those using no data at all.
~ Charles Babbage (born: 1791-12-26 died: 1871-10-18 at age: 79)

0
Avatar
Permanently deleted user

On Sat, 30 Aug 2014 05:15:03 -0700, Roedy Green
<see_website@mindprod.com.invalid> wrote, quoted or indirectly quoted
someone who said :

>It is though somehow module j8 got turned into an independent project.

I decided to delete the J8 project/module and build it from scratch.

All was going fine, then it did the same thing and turned J8 into
project and invented a j8.xml directory

I manually patched all the xml and iml files.

I imported my module into the base project.  So far so good, except
the dependency section seems to have disappeared. If Intellij does
this again, I will start completely from scratch.

Perhaps we need a utility "sanity check" to check the consistency of
the config files, check for missing dirs, missing files, misplaced
files etc.
--
Roedy Green Canadian Mind Products http://mindprod.com
Errors using inadequate data are much less than those using no data at all.
~ Charles Babbage (born: 1791-12-26 died: 1871-10-18 at age: 79)

0
Avatar
Permanently deleted user

On Sat, 30 Aug 2014 05:59:48 -0700, Roedy Green
<see_website@mindprod.com.invalid> wrote, quoted or indirectly quoted
someone who said :

>All was going fine, then it did the same thing and turned J8 into
>project and invented a j8.xml directory

it is still not right. It won't let me run programs form both models.

I am erasing and starting from scratch.
--
Roedy Green Canadian Mind Products http://mindprod.com
Errors using inadequate data are much less than those using no data at all.
~ Charles Babbage (born: 1791-12-26 died: 1871-10-18 at age: 79)

0

Each .idea folder contains settings of a separate project. I see that you have 3 projects with project dir in E:\intellij, E:\intellij\mp and E:\intellij\mp\j8. I guess that you need only one: E:\intellij\mp.
IntelliJ IDEA doesn't create projects without explicit user actions.

*.iml files contain module settings. In theory different projects can contain the same module, but we do not recommend to configure projects this way as it may cause unexpected results.

If starting from scratch I recommend to delete all unnecessary .idea folders (you may keep only E:\intellij\mp, or you may delete it and it will appear again when you create a new project). You do not have to delete *.iml files. To add module based on existing *.iml file to the project use File | Import Module (or corresponding button in Project Structure dialog) and select *.iml file.

0

Please sign in to leave a comment.