Dangers of converting file-based project to directory-based project? - intellij-idea

I have a large Android project which was initially made in Eclipse thus being file-based project. I would like to convert it to IDEA's directory-based project, but I do not know which files will be changed in this process.
What are the dangers I should be aware of when converting file-based project to directory-based project?
Do any files get deleted in such conversion?
After the conversion, will Eclipse users be able to open the project or I would have to convert it back to file-based each time I need to share the project with such users?
Thanks for your help and time.

Both file based and directory based are IDEA specific project formats that Eclipse doesn't understand, therefore nothing will change in this regard after you convert.
When you convert a file based project to a directory based project, .ipr file is replaced with .idea directory and .iws file is moved to .idea/workspace.xml. Multiple different .xml files under .idea directory are easier to share/merge than a single large .ipr file.
Original .ipr and .iws files are not removed after converting, but it's a good idea to remove them manually to avoid confusion (like someone opening the old .ipr project instead of the new .idea directory based project).

Related

how to show original file structure in intellij?

I imported seldon-core to intellij, which tried to separate the files to different projects automatically.
How to disable this? I need to view all the files in original/same structure with the git repo, like:
Thanks
UPDATE
It STILL DOES NOT work now even I did the following:
When importing project, we need choose Project format as .ipr (file based).
Then, we need select Project Files
Have you tried switching between the options under projects? There is an option with project files
Project Files shows the exact file structure as your git repo.

Rename/move .idea folder for IntelliJ project?

Is it possible to rename the .idea folder that's automatically created by IntelliJ or move it to a different location?
Renaming the .idea directory is not possible; IntelliJ IDEA always reads project files from the directory with that exact name, and it can't be changed.
Moving is sort of possible. The locations and content roots of modules in IntelliJ IDEA are completely independent from the location of the project itself. Because of that, you can create a project in a directory that doesn't contain any code, and set up modules with content roots pointing to the directories where the code is located.

How to force IntelliJ to use a different home folder

I have a computer with two hard drives. In the first one, an SSD disk, I have Windows partition (C) and on the second one (D), a raid volume, I install all the programs. I also moved my user folders (desktop, documents, downloads, pictures and videos) to D:/Users/David.
After installing IntelliJ Idea on D:/Program Filles(x86) a .IntelliJIdea13 directory appeared on D:/Users/David. No problem with this as all was working nice. Then I installed Scala plugin, created a new SBT project and build it. After this, the .sbt directory used by SBT was in C:/Users/David/.sbt but the references to the libraries in my project are pointing to D:/Users/David/.sbt. The question is, how can I force IntelliJ Idea or Scala plugin to download the libraries to D:/Users/David.sbt?
Not 100% sure if this can be a solution, you can change the HOME folder of Intellij IDEA. Look for the folder where the idea executable is. In Linux I have on
~/applications/idea13/bin
On Windows you can check the properties of the menu item. There should be file idea.properties that contains the home folder location of the idea files.
You can find more information here that describe more details:
Locations can be changed by editing the following file:
IDE_HOME\bin\idea.properties
Follow the comments in idea.properties file to change the defaults,
make sure to un-comment the lines defining these properties:
idea.config.path
idea.system.path
idea.plugins.path
idea.log.path
On the other hand you can change the location of your project to D:/Users/David. you should also have a look inside the project folder, there should be a .idea folder with has a library directory. They contains the location of the libs used in the project with their paths.
As dawez allready answered, you should edit idea.properties to set config, system, plugins and log paths.
But if you want to change the user.home path, then you must edit idea.exe.vmoptions file. Just add the following at the end of the file:
-Duser.home=your_new_user_home_path
If you use idea64.exe then you should edit idea64.exe.vmoptions file.
JetBrains had added complete set of features to support such a case and this is described here:
Changing IDE default directories used for config, plugins, and caches storage

Which file IDEA uses to display the name of Android project?

Which file in Android project does IDEA use to display project name in Recent Projects list?
If I want to change display name of my 8th project to "My changed project", which file should I edit? Is this done manually editing a certain file or can be done in a faster way via Ctrl+F6?
I am asking this as renaming module will not change display name.
Depending on the project format, IDEA uses either the .ipr file (its name, specifically) or some file buried under the .idea directory apparently.
Anyway, to change the project (display) name:
Projects using the newer directory-based format
(If you're not sure which format your project is using, try this first.)
Don't edit any file; instead, open the Project Structure dialog (Ctrl-Alt-Shift-S or ⌘;), and under General Settings for Project, change Project name.
Projects using the older file-based format
Find the main project settings file with .ipr extension, in your case LibraryTest.ipr, and simply rename that. Also rename the accompanying .iws file.
(NB: Close the project before doing this. Also, if there's an .iml module file with the same name, leave that alone. If you want to change names of modules, do that through Project Structure settings.)
The project will first disappear from the Recent Projects list; you'll have to use "Open Project" and find the newly renamed .ipr file to open it.

Which files are used by a program?

I have written a program on Visual Basic. In the debug folder, there are many files:
Database1.mdf
Database1_log.ldf
MyData.Designer.vb
MyData.xsc
MyData.xsd
MyData.xss
WindowsApplication1.exe
WindowsApplication1.config
WindowsApplication1.pdb
WindowsApplication1.vshost
WindowsApplication1.vshost.exe
WindowsApplication1.vshost.exe.manifest
WindowsApplication1.xml
I want to publish my program. Are all of those files necessary for the program? Which of them are used for my database?
Because I want to put a button in my program that backs up the database. Which files must be backed up?
First of all, you should publish the Release version of your software, not the debug version so the files will be a bit different. As for which files to publish, if you use the Setup project you will be able to select the files based upon what your application needs. For example, it looks like you are including database files with your application (Database1.mdf and Database1_log.ldf). You could add these files to the setup project.
The setup project will know to include your exe and your config file (unless you tell it not to) so you will be covered there. Here is a video and a written walkthrough of how to create a Setup project:
http://msdn.microsoft.com/en-us/library/ms241903.aspx
http://www.youtube.com/watch?v=Lcue0jo41AM
As for your PDB files, these are the Program Database Files that are used for debugging (and should never be give to the customer/end user).
http://msdn.microsoft.com/en-us/library/ms241903.aspx
As for backing up your database, back up the MDF and LDF files.
No, all of the files above are from your debug compile output. You can change what is output by changing your build configuration. Go to Build, Configuration Manager and switch to Release. It's also on the toolbar.
In general your ProjectName.exe (but not the .vshost.exe), .config (but not the .vshost.exe.config) and MDF/LDF files are needed for publishing. You also have an XSD File which will also be needed.
The MDF/LDF files are your database.