how to import nodejs projects into nodejs eclipse in mac - eclipse

I have cloned a project and try to load into nodejseclipse(mac) as file system or existing project. but it does load only root folder js files. it does not load all folder structures into eclipse. can you please help me on this.

You need install nodeclipse, first.
npm install -g nodeclipse to install it
Go to your folder, nodeclipse -g to generate nodeclipse project setting.
Open it from Eclipse "import from other projects".

It is not quite intuitive, but the following worked for me.
Move the project into the workspace directory. Then:
File > New > Project ...
Under Nodeclipse select Node.js Project and next >.
Under Project name: type the same name as the project you are importing and press Finish.
Now you should have the project visible in the Package Explorer.
To make .* files visible press the small arrow in the Package Explorer (top right) > Filters ....
Deselect .* resources > OK.

File -> New Project -> Node.js Project -> Project Name (Give some relevant name)
Next click on "Use default location" checkbox to check it off.
Next browse to the location where project has been cloned/exists
Finish.

Created a project folder in eclipse. Dragged the source and drop into project folder in eclipse. and then linked the source folder

Related

How to add a folder into eclipse for development work?

I have cloned a git repository (which contains lot of python, shell, json files) using git clone command from git bash and it is in my workspace location. I would like to add the whole repository folder into eclipse and want to do modifications / edits to the shell, python files there. How can I do it?
Note: I am Pretty new using Eclipse and I would appreciate your help.
There is no need to create a Java project and let unnecessary Java dependencies and libraries to cling into the project. The question is regarding importing an existing directory into eclipse
Suppose the directory is present in C:/harley/mydir
What we have to do is ,
Create a new project [Right click on Project explorer, select New -> Project, From the Wizard list, select General -> Project .. click next ]
Give the project name same as your target directory , Here 'mydir'.
Uncheck the 'Use default location' and give the exact location , ie: C:/harley/mydir and click on Finish.

Eclipse+Maven src/main/java not visible in src folder in Package Explorer

I'm wondering why I can't see following folders in src node in Package Explorer
src/main/java
src/main/resources
src/test/java
src/test/resources
I can access those folders as direct children of the project and they exist in the file system.
I'm using Spring Tool Suite (STS of Eclipse).
Maybe I can configure Eclipse somehow ?
I have solved this issue by below steps:
Right click the Maven Project -> Build Path -> Configure Build Path
In Order and Export tab, you can see the message like '2 build path entries are missing'
Now select 'JRE System Library' and 'Maven Dependencies' checkbox
Click OK
Now you can see below in all type of Explorers (Package or Project or Navigator)
src/main/java
src/main/resources
src/test/java
Eclipse filters out folders that are marked as source from the "raw" folder path. That is, they are visible only as source folders:
If you can't see them in either place, then they
are either filtered out in the settings: check your settings for Package Explorer (the Package Explorer bar, downwards menu arrow -> Filters...)
or they were created externally and Eclipse haven't noticed them: Refresh your project in this case.
or they don't exist: right-click on the project, select New->Folder and input the path, e.g. src/test/java (not "Source Folder"). After you use Maven->Update Project... on the project, they will be automatically added as source folders, provided you have the default configuration.
Now, as I said, those folder will only be used as source if you preserved the default configuration in your POM. If you defined other resources and/or testResources, those will be used instead. In general, Eclipse m2e synchronizes Eclipse's project source folder configuration with what's in your POM.
EDIT: maybe this is unclear - see those folders at the top? The ones labeled with the /-separated paths? These are your folders. These are the same folders that you would expect to find in main and test, just represented differently.
I used to get the same problem, but solved it by pointing to the right jre used for the project.
Right click on the project
properties
java builpath
see the jre selected
edit it
select alternate jre
installed jre
select the right one
ok
After changing right click on project>maven>update project
Hope it helps.
Attaching screen shot.
If you are looking for Simple/quicker way, you can follow this solution.
Right click on your project.
Goto > Build Path > Configure Build Path > Java Build Path
Goto 'Source' tab, there, you can see like <<your_project_name>>/src/main/java(missing).
Click on it and remove.
Click on Apply and Close.
Now, right click on project and >New > Source folder > add source folder "src/main/java".
happy learning and do not forget to upvote :)
I had the same problem, I changed my Eclipse project view from Package explorer to Project Explorer.
After 2 hours of trying everything...
Just go on window -> show view -> project explorer
and in project explorer you can view of all files solution
I had a similar issue when I checked out a web project from a github repo on my eclipse. src/main/java was directly inside the project root in Package Explorer. My expectation was that src/main/java be visible inside a source folder "Java Resources". There were few things which I did to achieve this.
Right click on Project > Build Path > Configure Build Path..
Select filter "Java Build Path" and click on Tab "Libraries"
Verify your "JRE System Library". If it is not pointing to your latest JDK, then you can click on Edit Button and follow the subsequent dialog boxes to select most appropriate JDK home path in your system.
Once done click Apply, Apply and Close, Finish to close all the associated open boxes for the current filter.
Select filter "Java Compiler" and ensure your JDK Compliance points to correct JDK. Click Aapply
Select filter "Project Facets". Ensure both Java and Dynamic Web Module is selected with correct version.
Click Apply and Close.
Source folder "Java Resources" gets created with src/main/java in it when viewed in Project Explorer.
Navigate > Show In > Package Explore
Right click the Maven Project
-> Build Path -> Configure Build Path
Go to Order and Export tab,
you can see the message like '2 build path entries are missing'
Now select 'JRE System Library' and 'Maven Dependencies' checkbox
Click OK
I have solved this issue by below steps:
Right click the Maven Project -> Build Path -> Configure Build Path
In Order and Export tab, you can see the message like '2 build path entries are missing'
Now select 'JRE System Library' and 'Maven Dependencies' checkbox
Click OK
Now you can see below in all type of Explorers (Package or Project or Navigator)
I used this tutorial to create my maven web project http://crunchify.com/how-to-create-dynamic-web-project-using-maven-in-eclipse/ and eclipse did not create src/main/java folder for me. When i tired to create the source folder src/main/java eclipse did not let me. So i created the folder outside eclipse in the project directly and then src/main/java appeared in eclipse.
I was not able to see the build path option in the properties as well. Also the
src/main/java
was not visible in Project Explorer. below solution worked for me
Go to Project root
Select "Project facets" from Properties
Check "Java"
This fixes the issue
If none of the answers worked for you. You might be in the wrong "Window". I was in "Package explorer" and switching to "Project Explorer" showed me the folders.
Right click on the project > Build Path > Configure Build Path > Source > Add Folder > Select src/main/java > apply and close > refresh the project.
This error happens when there are no files inside /src/main/java
Just make some empty files inside and the problem will go away.
A side note: lots of version control systems (mercurial for example) do not commit folders if there are no files inside.
After creating the project go to properties --> build path --> configure build path --> order and export tab and check jre and maven dependencies. You will then have the folder.
Right click on eclipse project go to build path and then configure build path you will see jre and maven will be unchecked check both of them and your error will be solved
My problem was kind of the same at first and then a little different in the sense that when /java folder showed up, it was deep down in a nested folder somewhere in src/main/resources/java.
Initallially the problem was being in the Package Explorer and not in the Project Explorer as many people have talked about. So,
a. right-click on your project root
b. show in, and select Project Explorer
However, the main problem was I missed to notice a checkbox at the second step of Maven Project Creation from the wizard. That got me created a complicated structure and not a clean direct one.
Once I marked it checked I got a clean project structure as what asked.
I was also facing the issue but I open POM xml file and keep it open. Wait for some time till maven read pom then Automatically it will come.
I tried all the solutions mentioned in this post but none of them worked for me.
The solution for me was to go to build-path and then into Source tab. I found src/main/java folders present there and there was no error. I double clicked on this folder and a window opened like this:
Do not make any change and click on Finish. The folders will appear suddenly.

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

Import maven project in eclipse - folder structure not as expected

I am new to maven projects. Steps followed :
I tried importing a maven project in eclipse through File -> Import.
Gave the location of root dir of the svn checkout project. It recognized the pom.xml file.
Clicked Finish. Project imported and all files were placed in the Project Explorer of the eclipse.
Problem:
The directory structure was not as that of a java package, it was just a normal folder structure. I am not able to browse the code quickly i.e. get the declaration, different calls to a method and all the code browsing shortcuts. It gives a error says.. Project not in Build Path. On right clicking the project, there are no options present in the 'Build Path'.
Please let me know, what I am doing wrong here. How to import a maven project correctly into eclipse and set it up ?
Run :
mvn eclipse:clean
Then
mvn eclipse:eclipse
And it should be it's old self again, if not refresh the project in eclipse and that should do it
I have faced similar issue . I have resolved this issue :
Right click on project -> properties -> Project Facets -> convert it into Facet form
And you can get the folder structure as you want
I faced the same issue and could resolve by following steps
First ensure that you are able to maven clean or install. Just to ensure the proj setup works.
Right click on Project.
Navigate to Maven > Update project configuration.
This should resolve the issue. Hope this helps.
I resolved this issue with:
go to Window > Preferences > build path
under output and source folder choose the project
delete/backup original project and create/import the same.
your issue will be resolved.

Eclipse - Import an existing project?

I have a project that I am trying to add to my workspace. But eclipse cannot detect a new project in the directory I am pointing to.
How can I let eclipse know that a specific directory contains a project?
My directory contains:
assets
libs
res
src
bin
gen
AndoridManijest.xml
proguard.cfg
project.properties
You just have to do a Import->Existing Project into Workspace, and then browse to the location where the .classpath and .project files exists for your project.
For the new versions of Eclipse, it is File > Import > General > Existing projects into workspace
Like this
Importing existing projects
You can use the Import Wizard to command link import an existing project into workspace.
From the main menu bar, select command link File > Import.... The Import wizard opens.
Select General > Existing Project into Workspace and click Next.
Choose either Select root directory or Select archive file and click the associated Browse to locate the directory or file containing the projects.
Under Projects select the project or projects which you would like to import.
Click Finish to start the import.
This solution is for eclipse
I had a similar problem when I was cloning repositories from bit bucket from the command line, it would clones into the local repository. So the above solution did not work because it would say that the files were already in the local repository.
The solution:
1. Window > Show View > other > Git repositories
2. Right Click on the git repository tab > import projects
3. navigate to the repository you want to put into eclipse
4. select the third option 'import as general project', if selecting this does not work then view other options and select the option that applies to you
5. finish
if you cannot import project like some above solution, you should create new project has name procject like which procject you want to import. Remember to put your import project into workstation.