Eclipse and Intellij project with GitHub - eclipse

I am trying to set a project that can be used by developers using Intellij or Eclipse on Github. I am not sure I am doing it right.
I know I need the .classpath and project from Eclipse and *.iml for Intellij but I have concerns about the project structure (I am using Maven). In Intellij, everything is fine and I can commit the project as I usually do and the top level contains src folders, pom.xml and so on. With Eclipse the top level is the project folder itself and then inside that folder, I see the pom.xml and src folder.
I am looking for details and found this other SO (eclipse intellij can use Github for same project) but this is really about the file and not the structure.
Can you please help with the project structure ?

All you have to push are only src folder and pom.xml file. All another files and folders should be added to .gitignore. Then you can clone repository and open it in Eclipse or Intellij as existing project (in Intellij: New -> Project from existing sources) or just open it from version control: New -> Project from version control -> git. Also you can add this instructions to README.md file.

Related

FindBugs plugin does not work on projects imported from GitHub

I have always used FindBugs, and it is really useful in many cases. But I couldn't get to find why it does not work on projects imported from GitHub. Projects imported into Eclipse using Git as the source does not have an option to run FindBugs.
Does anyone know why, and a solution to this? I do love to use git extensions on Eclipse, as well as FindBugs.
Is the project that you imported from Git recognised as a Java project (i.e. it has a J under the project folder icon)? If not then FindBugs won't be enabled for the project. If that's the case the remote repository almost certainly hasn't added the .project and .classpath files which are what Eclipse uses to determine if it's a Java project or not.
You should be able to convert it to a Java project by right-clicking and doing 'Configure -> Convert to Java Project'. If that doesn't work, delete the project (but without deleting the files) and then create a File -> New Java project in the same location.

Subclipse checking out as folder not Java project

I'm trying to import a Java project from my teams subversion repository. So I go through the import GUI for subversion, select my repository and the project, then choose to check it out as a project into the workspace.
However, the project now appears in my workspace simply as a folder:
Trying to add a new class tells me "source folder is not a java project". Is there something I am missing? Thanks.
Check out as a project only does what you want if you have checked-in the Eclipse .project, .classpath files etc. In that scenario those files get checked out and configure the Eclipse project. Otherwise you are just getting an Eclipse "Simple Project" which does not have the Java tools configured.
I assume you do not have those Eclipse files in your repository, so you want to use the other option that lets you run the Eclipse Create Project wizard as part of the checkout. This lets you choose the project type and setup some of the configuration. You can skip most of the configuration since you can also do that after the checkout finishes if you prefer.
See: Subclipse Checkout Documentation

Play2 - adding scala nature couses errors

i installed Play2 plugin for eclipse, and whem I am trying to add scala nature to project i receive error message -> "The import views.html.index cannot be resolved". I was trying to recompile, clean, refresh, rebuild it, but nothing works. If I remove scala nature from project everything works fine. Maybe you have some ideas how i can fix this issue?
Not a fix but a workaround for this Scala + Eclipse problem is creating a 2nd project for only editing the template files.
run 'activator clean eclipse'
remove Scala nature from main project
create new Scala project in Eclipse (File -> New -> Project -> Scala Wizards -> Scala Project
--> use default settings
--> don't switch to Scala view
in a Linux shell remove all files and folders from the new project except for .project and .settings
create a folder 'app' (or the root Java source folder in the main project
create a symling from your main project views folder into the new projects app folder named 'views'
create a symlink from the main project bin folder to the new project, named 'bin'
create a symlink from .classpath to the new project
in Eclipse refresh the project
edit new projects properties
--> Java Build Path -> Source, check if the app folder is the source folder

Not finding libgdx projects to import them

I bought a new computer and installed Eclipse on it. After the ADT plugin finished downloading I tried to import my projects (composed of 4 sub-projects), but Eclipse doesn't see them!
I just click "import/general/import existing projects into workspace", select the folder containing the sub projects, hit the open button but Eclipse says "No projects found to import".
I'm using Eclipse Kepler and the projects files are directly taken from Eclipse Juno.
Eclipse need .project file to import the projects into workspace. what you can do is create a new project and copy the source and libraries into that project
Alternative method can be that create a new project and copy the .project file from that project to your project but make sure you edit the .project file and change the name of that project according to your project. read this for more information on .project file
http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fproject_description_file.html
I will suggest you to use the First method .
Make sure that you've tried to:
Refresh everything
Searched for Nested Items
Go to (In the libg-gdx setup) Advanced >> Check Eclipse
And if that doesn't work, add a .project file into the folder manually

How to convert IntelliJ project to Eclipse?

I have one IntelliJ project and I want to open it in Eclipse, so what should I do?
There is an export to eclipse option in Intellij Under file menu.
This option will generate you the necessary .project and .classpath files that will be used by eclipse. Personally, I would remove any IDE dependencies using some dependency management systems like Maven or Apache IVY. ( Is system the right term?)
I had the same issue and (I don't have Intellij) but doc_180's comment pointed me in the right direction. Here is a simple solution. In Eclipse create a new blank Android project. Copy the .project and .classpath files and the .settings folder to the Intellij folder. Edit the .project file and change the name of the project.
You should now be able to Import the project in Eclipse by right clicking and selecting "Import->Existing Project into Workspace".
I see this is an old question, but thought I should add this answer for others Googling it like me ;)
Without access to IntelliJ to export and convert the project, try the following.
In STS or Eclipse create an empty project first, then, select File -> Import and choose General -> File System. In the resulting dialog box, select the root folder of the IntelliJ project as source and the empty project as the destination.
For unit tests, add the test folder as a source folder to the build path (right-click on the folder, select Build Path -> Use as Source Folder).
The projects I import this way run without any further modifications, including the tests.
Eclipse and Intellij create different project structure each other (Output path, Source Code etc...). You can export the current project to Eclipse environment.
File -> Export -> Project to Eclipse