No dirs in imported SBT project in IntelliJ IDEA - scala

After importing sbt project there are no dirs in project tree but I see them if I click on root dir in path

Go to the Source location of your code and delete .idea folder and also the target folder then try to open the project again.
Make sure you closed the project in Intellij IDEA before doing the above.

Related

Eclipse and Intellij project with GitHub

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.

Getting "Project folder ins managed by a project..." when opening Actviti source code in netbeans

I can't open Activiti source code in netbeans It just says "Project folder is managed by a project Activiti. Instead of creating a new project just open it. If by a chance you just deleted the project Activiti then restart the IDE to reuse the folder."
I have restarted Netbeans and re-cloned the project but it still won't open.
And eclipse just says that the javac was not found in the build.xml.
Any help would be greatly appreciated.
The project folder does not contain a nbproject folder.
Try the following:
rename the pom.xml file to something else, e.g. pom.xmlzzzz,
create the project in NetBeans,
rename pom.xmlzzzz back to pom.xml once the project has loaded in NetBeans.
I've just hit the same problem with a different project and this is what fixed it for me.
Netbeans creates a folder in your project named "nbproject". Once you delete that, restart the IDE and you're good to go.
Go to the folder containing your project
Delete the folder named nbproject
Restart Netbeans
Try creating your project again from the original folder

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

Eclipse showing package name including directory structure

I have my source in the hierarchy:
folder: src/main/java
package: com.test.serviceImpl
Now eclipse is showing this as src.main.java.com.test.serviceImpl
How can I make it display only com.test.serviceImpl under the directory structure : src/main/java
Note: This is a maven project module imported to eclise. All other modules display properly
If you use m2eclipse and your pom is configured properly, just right-click the project and select Maven > Update Project Configuration.
If that doesn't work, study the Eclipse Maven Console (in the Console view) for errors.
Set src/main/java as a source root directory.
Here's the standard Maven directory structure - like it or not:
http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
I had a problem which may be related.
Eclipse started showing folder names as a concatenation of the folder name with other elements. A folder named "x" was being replaced with "xorg.eclipse.jdt.core.javabuilderorg.eclipse.m2e.core.maven2builder"
After exploring various possible explanations and/or solutions, I realized this behavior appeared after my having deleted a project folder without checking the box "Delete project contents on disk (cannot be redone)". When I subsequently re-checked out the code from an SVN repository, a folder named "x" was still on my disk, and so I suspect Eclipse created a longer version of a folder to contain "x" using other elements from the buildSpec.
I fixed the problem by closing Eclipse, deleting both folders ("x" and "xorg.eclipse..."), reopening Eclipse and checking out the project again.
I had the same problem on my Maven project and I solved it just updating my project Maven>Update Project

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