Can Eclipse and IntelliJ IDEA use the same workspace without conflict? - eclipse

I'm using both IDEs for some projects and I was thinking of using the same "workspace" folder with both IDEs. Is there any known problems for doing this? Conflicts between IDEs or something?
Thanks!

Each IntelliJ project saves its setting within the project folder. With Eclipse, there is one common folder in "workspace" folder contains infomation about list of projects in this workspace.
It's safe to save using same "workspace" folder.
But the terminologies in 2 IDE are different, in Eclipse there are workspaces, under each workspace, there are multiple projects. But in IntelliJ there are projects and each project has multiple modules.
If your projects stand alone, IntelliJ project = Eclipse project. But if you have some projects relate to each other, IntelliJ project = Eclipse workspace, IntelliJ module = Eclipse project

Related

IntelliJ IDEA - Sync between Eclipse .classpath and IntelliJ .iml

Say I open an Eclipse project in IntelliJ IDEA, and then I add a library dependency in Eclipse.
How can I sync the .iml file with the modified .classpath one? If there is a way...
If you want to keep dependency consistency across IDE's and achieve even more if you want it... You must use Maven.
Maven is awesome about it. You only will have your project's real code and a file called pom.xml.
You are able to add dependencies in the Maven way to that pom.xml and no matter what you are able to run your project in IntelliJ, Netbeans, and Eclipse without a problem, even across multiple developer on different IDEs.
You can learn a good deal about Maven from this tutorial:
https://www.tutorialspoint.com/maven/
It shows you it's usage in Eclipse, IntelliJ and Netbeans in the last chapters of the tutorial.

How to import a maven project in eclipse?

I have a (command-line) maven based project which just works great (mvn clean, mvn verify, install all perfect)! I want now import this into eclipse not as maven project but regular eclipse project.
I did it but I have a dependency issue which I solved by just copying all the jars created into the .m2 folder to another folder into my eclipse workspace. Then I've added all these jars to my project.
everything ok!
Question is: I have the feeling that this is not the best way to manage the dependency in eclipse ... what do you suggest? best practices
If you have a simple java project which is made up of only one module, using Eclipse is very simple. To generate the Eclipse project files from your POM you execute the following command:
mvn eclipse:eclipse
If you have created or checked out the project with Eclipse, you only have to refresh the project in your workspace. Otherwise you have to import the project into your Eclipse workspace (From the menu bar, select File > Import > Existing Projects into Workspace). In the latter case the project (directory) should not be located in your workspace, because Eclipse might come into trouble, especially if you want to use Eclipse as the scm client.

How to maintain JAVA projects irrespective of IDE (Netbeans and Eclipse)

In my team, some of them are using Netbeans and some of them using Eclipse, so in our Subversion repository for each JAVA project we have Netbeans & Eclipse project files.
I do want to keep Netbeans & Eclipse project setting files inside the JAVA project, they are specific to IDEs.
Please help me to maintain only the JAVA source files inside the subversion.
Use a common build infrastructure, like maven. This encapsulates (as good as) all settings inside the maven pom.xml files (source encoding, java version etc.).
Also versioned library dependencies, subprojects are managed in maven.
NetBeans knows maven out-of-the-box, and eclipse has a good maven plugin.
In my experience manual configuration, especially in eclipse, and grown ant scripts, are cumbersome.

Importing C Eclipse Project into Perforce

I have the Perforce plug-In in my Eclipse IDE. Now I want to import Eclipse C projects that is already in the Perforce server. However, I cannot build them. They do not get imported as a C project.
I observed the same situation for Java project. Looks like any project from perforce is imported as just the Project. So that to resolve the problem I used the following approach.
Create project from perforce
Create separate language-specific project and set it up so that it is created from existing sources.
Share project (in perforce plugin terminology) so this is under perforce control now
In my Eclipse, I can right click on the project and choose New --> "Convert to a C/C++ project (Adds C/C++ Nature)". See also this question: Adding a C/C++ nature to an Eclipse project

How to clone Hibernate sources using Egit (Eclipse)?

I need help using Egit (Eclipse git integration capabilities). My goal is to have Hibernate sources in my local Eclipse. Eventually I aim for running their tests, doing some changes in the sources, issuing a git pull request (patch), etc.
Can someone explain how to clone Hibernate sources and have them as Java Project(s) in Eclipse?
All I can achieve myself is to have the sources cloned (as needed) to some specified path (the suggested path is outside of the workspace directory). Then I am puzzled trying to convert the structure into Java projects in Eclipse. I try different ways to import the project(s) using File | Import (e.g. Existing projects into workspace) or linking sources into a new created Java project. The problem seems to be the Hibernate sources are not a single maven project (not quite sure about this one either, I am new to maven) and probably not an Eclipse project at all, so Eclipse doesn't recognize the source structure at all.
It looks like it has both maven and ant builds, so you can generate Eclipse projects with both of these.
For maven you have 2 options:
Run mvn eclipse:eclipse to generate
eclipse project artifacts and then
import existing projects.
Install m2Eclipse and import Existing Maven
Project. This is the preferred
approach when working with Maven and
Eclipse.
For ant, New project->Java Project from Existing Ant Buildfile