"Open Project" button in Eclipse is disabled - eclipse

I have just downloaded Eclipse, started it and found that "Open Project" button is disabled. So how do I open my project =) ?

"Open Project" button will only be enabled when there is a project selected in the active view. If you just downloaded Eclipse and started on a brand new workspace without any project created or imported, you would need to use File > New > Project... or File > Import... to add a project in your workspace.

Go to File->Import and select "General" and from the list select "Existing Projects into Workspace" then click "Next". After that in the next dialog, for the root directory, if your project exists in the "D:\Projects\Android\Test" folder (for example), type "D:\Projects\Android" and click on "Refresh" button. You will see your project(s) in the result list. Click on "Finish" and done.

The Reason is that if anyone is using the IDE for the first time the option of "open Project" is unavailable ,thus one may have to migrate to file->import->general->Existing Projects into Work space.That's it and browse up to that location as well select the type of project that means if you have unzipped type of files then select "select Root directory" option and if you have a zip version of it then select "select archive file" option.

Related

Importing project from a local git repository into the Eclipse Project Explorer not working

I cloned the following project from GitHub to the git view in eclipse:
https://github.com/nfrankel/twaattin
I want to have the project in my Project Explorer so I can work on it and run it (for testing purposes).
To this end, I went to the Project Explorer and did the following:
I clicked on "File"
I clicked on "Import"
I clicked on "Git" -> "Projects from Git"
I clicked on "Existing lock repository" -> "twaattin"
I chose "Import using the New Project wizard"
I clicked on "Finish"
Then the following window popped up:
I chose "Vaadin 8 Project" and clicked "Next"
The following was displayed:
I chose the first option and clicked "Next"
On the next page I changed the Artifact id to "Twaattin" and clicked "Finish"
The structure of the project I wanted to import is the following:
But this was not imported to the Project Explorer. What I got instead was the following:
So I tried an alternative way ...
I repeated steps 1 to 4 from above but then in step 5 I chose "Import as general project".
After I clicked "Finish", the project became visible in the Project Explorer with its correct structure and I thought everything was fine.
However, now I got the following problem:
when I go to the Servers tab and right-click on my tomcat server and then choose "add and remove" from the menu, the imported project is not addable to the server so can't run it !!
The only projects that I could add to the tomcat server are two old projects I did not import from git but created within the project explorer.
Here's a screenshot:
As you can see the imported project (whose name is "Twaattin") is not amor the addable projects.
So my question is this:
How can I import a project from a local git repository into the Eclipse Project Explorer in a way that it can also be added to the tomcat server ?

How to open an existing project in Eclipse?

I have just created several project using Eclipse. Now restart Eclipse and want to see one of the projects. How can I do it?
I have tried File -> Import -> General -> Existing Project into Workspace.
Then I select the directory of the project that I want to work on and, as a result, I get an error message: "Some projects cannot be imported because they already exist in the workspace".
So, it looks like that I do not need to import a project, because they are already in the workspace... But how I can "see" the projects that are in the workspace? If I create a new project, I see it as well as all other existing projects but I do not want to create a new project just to see the existing projects.
Maybe you have closed the project and configured the project explorer view to filter closed projects.
In that case, have a look at Filters in the Project Explorer view. Make sure that closed projects are disabled in the "Filters" view.
In case you closed multiple projects and trying to re-open all of them then in Windows->Show view-> Navigator
from Eclipse main gui:
select "Window->Show View->Other->General->Project Explorer" Double-clicking on "Project Explorer" brings up the "Project Explorer" window which shows every project in your workspace. That worked for me.
Good luck.
Just do like below, it helped me after doing like this.
To load existing Eclipse projects in the IDE, you need to import them into the Eclipse workspace.
Click File > Import > General
Click Existing Projects into Workspace.
You can edit the project directly in its original location or choose to create a copy of the project in the workspace.
Select the directory that contains the projects you want to import.
Click Finish.
This imports the projects into the current workspace and loads them in the IDE.
Look at this below link for reference.
https://www.microfocus.com/documentation/enterprise-developer/ed30/Eclipse/GUID-773A19C7-98B2-442D-9D36-240E20E3F2CE.html
If you are trying to import non maven project into eclipse follow the below steps, it worked for me.
first clone project into your machine and follow the below steps to import in eclipse.
Project Explorer -> import -> Git -> Projects from git -> Existing
Local repository -> Add -> select project root directory -> (check
box) import as general project -> next -> finish
Thanks.
In Eclipse, try Project > Open Project and select the projects to be opened.
In case you closed multiple projects and trying to re-open all of them then in Project Explorer, select all projects. Go to Project -> Open Project.
I also have just faced with this problem that how to open existing file. And none of answers was helpful. That's why I tried by myself.
Direction: File -> Open file -> Workspace (with you had chosen first
in creating your project) -> Package (which you already created your
project in) -> src (source file) -> Created package ->
And now your searching project's nodepad format.
I hope it would be helpful. If any mistake here, sorry beforehand.
This is How I do it.
File -> Open Project from File System -> Existing Project in WorkSpace
Use shortcut Alt+Shift+W or navigate to Windows->Show View->Project Explorer
If it's a maven project, go to file>import>maven project >existing maven project, then browse for the folder that contains the project, select folder then click finish. That worked for me
If you closed the project, you can open it again easily by going to the top bar (alt) > ͟Project > Open Project
Top menu > Project > Open Project
You will get a menu where you can open closed projects that can be preventing you from opening these projects through the File menu.
The window that lets you open any closed projects after you go through the menu listed previously
For me it worked after I deleted .classpath and .project files from the directory
Try This Method it will work:
In Top Right Corner Click on Open Prospective icon.
Click on Java (Default) in Popup.
Click on Open button.
Courtesy: www.softans.com
I'm using 'Eclipse IDE 2022‑09'
Click the View Menu on the Package Explorer
Filters...
Uncheck the "Closed projects"
Or you can show the Project Explorer Window:
Window -> Show View -> Project Explorer
In this solution 'Project Explorer' will appear alongside the 'Package Explorer'

How to open project from workspace in Eclipse?

I imported an Eclipse project into workspace and after some time I deleted it in Eclipse (from project explorer but not from workspace). Now, I want to reopen it, or import it again, but I cannot import it because such a project already exists in the workspace and when I try to open it, in tab Project -> Open Project, it is disabled. Of course, I can delete the project from workspace and import it again, but this is not what I want. So the question is: how can I open the project, which is in Eclipse's workspace, but has been deleted from the Eclipse's project explorer?
This is exactly what I just ran into. The 'Finish' button is greyed out, as is the check box and project name in the project window. If you try to check that check box the project will not be greyed now, but it won't check. Refresh does nothing.
The trick (or is it a bug) is to uncheck 'copy projects into workspace' hit the refresh button and it will now be checked and you can hit the finish button. Project will now once again be available in the Package Explorer.
(I'm using Eclipse 3.8 and ADT 21.0.1)
These Steps You Have to Follow
Click File menu
In file menu click Import
A window is open Now click General Folder
Now click Existing project into workspace
Then click the select from root directory
Now import project which you want......
You have to choose the project in the workspace, not the zip file with your project. Your project is still in your workspace, and because Eclipse wants to copy the project from the zip file you chose (look at the checked check box "Copy projects into workspace"), you get that warning.
Just select "Select root directory" and choose your workspace as your root directory and choose the project you want to reimport (and make sure, that the checkbox "Copy projects into workspace" is not checked).
Go to “%ECLIPSE_HOME%\configuration.settings” and delete the workspace listed at the key RECENT_WORKSPACES
Restart Eclipse, go to File>Switch Workspace>Other… and select your workspace dir again
Now I could create new projects as always
One simple trick is to delete the project from your work-space directory manually and than try to import project again. That's it...
I've experienced this same problem. It was a deleted workspace which I re-imported. When I tried to work with junit tests in the directory, it said that parts of if were not in the "project" In order to fix this, I had to check the "SEARCH FOR NESTED PROJECTS" and that corrected the issue.
I know that this is a really old question, possibly the solution was not available back then, but on my system (Eclipse Photon 4.8.0) it works like this:
File menu
Open Projects from File System...
Here you can give Eclipse a path to a directory (in this case your own, currently used workspace directory) where it will search for possible projects, list them and let you choose which one to import into the workspace. It will show already imported (aka. existing inside Eclipse) projects grayed out and unselectable, but has an option to hide these as well.
After selecting the project you'd like to import just click the Finish button and voila.
Make sure that your project is included in current workspace, then you have to see the project under "Project Explorer".
Note: you can view this from: Window->Show View->Project Explorer.
If you are facing this:
Some projects cannot be imported because they already exist in the workspace --> "Finish" button is grayed --> hence, no way to open the project(s)
Solution:
Go to File -> Open File...
Choose any one file of your project, and the entire project folder will open in your present workspace.

Is there an equivalent of "Add existing file" (to project) in Eclipse?

I am trying to map my Visual Studio experience onto Eclipse. Right now, I wish to add a file existing somewhere on the file system into a project in Eclipse. I expect it to be copied to the project source folder.
Currently, I see only one way - switch to the windows explorer (total commander, in my case) and copy the file myself, after which to refresh the project.
Can I do the same without leaving the Eclipse IDE?
Thanks.
I had the same problem, but found yet another solution.
Let me state my problem so that we're sure we're talking about the same thing.
I had a file in a directory where a bunch of code files were and some of the files in that directory were shown as "in my project" and some of the files were missing. I wanted the missing files to appear in my project.
I simply selected the folder in my project and pressed 'F5' or right-clicked and selected 'refresh' and the files appeared in my project. It looks like that is the intended way of doing this.
File->Import->General->File System should do it.
There you can select the file(s) from some file system folder to your project (into folder).
Even easier. Just drag and drop the file from explorer into the correct package in Eclipse. It will ask you if you want to copy or link the file(s).
I am a newbie to Eclipse Luna (the 64 bit latest version on Windows 7) but this worked for me:
Copy the preexisting source files you which add to your project.
In Project Explorer, right click your project and select New > File
In the "New File" dialog box, your project's name / folder should be displayed as the parent folder for your new (existing) source file.
Click on the "Advanced" button at the bottom of the "New File" dialog box.
Check the "Link to file in the file system" checkbox.
Click the "Browse" and browse to your preexisting source.
Click the "Finish" button at the bottom of the dialog box.
In my case, I had to:
right-click the project's name
choose "Close Project"
right-click the (now closed) project's name again
choose "Open Project"
Refreshing didn't work for me. :(
Hopefully this helps someone else...
Just found the quickest way to add files:
Copy-paste your file into your project disk directory using your file browser.
In Eclipse project browser select your project.
Click [right mouse button]->Refresh (or press F5 on Windows machine).
Voila
(worked on Neon-4.6.2)
I just got this to work. YMMV
I don't suppose it has to be there, but I put my file, xyz.cpp, into my project's source directory. My project has a source subdir named src, as in ProjName/src.
Right Click on project name (my project was open and the only one open).
NEW->FILE. Put in the filename, xyz.cpp. Click OK or press enter.
The file will open in the editor and complain that it is empty. Close it WITHOUT SAVING.
Reopen the file. It now has its contents.
It turns out that just simply dragging the files into the src folder would work!
Right-click on the file after you have copied it into the project directory. Select Properties... in the left hand pane select C/C++ Build. There will be a checkbox "Exclude resource from build" uncheck that check box.

How to open Non-Netbeans project in Netbeans?

When we create a (PHP) project in Netbeans 7, it somehow saves the directory in its own format, and later we can open the project in Netbeans. However, I have a project which I created without Netbeans, now I want to open it with Netbeans, but seems that I can not. When I "Open Project" in Netbeans, and browse to the directory, it does not not recognize the directory. So how can I open a Non-Netbeans project in it?
Thanks.
In NetBeans IDE 8.0.1
File->New Project
Select PHP-> PHP Existing Sources, Click Next
Browse Source Folder and Select it
Give project a name
If you want you can keep a backup in a separate directory, Click Next
And select your Server
Click Finish
Select "File" > "New Project"
Under "Categories" select "Java"
Under "Projects" select "Java Project with Existing Sources"
You'll then need to tell it which directory contains your sources and which directory contains your JUnit tests.
Go to the window menu and select favorites. Then a tab include beside projects, files...then drag a folder from file explorer and put it into favorites.
You can either use the "Import Project" from the File menu, which can transform an Eclipse project to a Netbeans one for example (there might be other transformations available as plugins, don't know), or just create a new Netbeans project with your existing code.
Go to File Then New Project
Under "Categories" Select PHP.
Under "Projects" Select PHP Application with Existing Sources, Click Next.
Browse Source Folder and Select it.
Give project a name.
If you want you can choose PHP Version, Click Next
And select your Server
Enter project url or link. (i.e http://localhost/onlinevoting).
Choose index file This file is mostly index.php file or the default file for your website.
Click Finish.
reference : https://mauricemutetingundi.blogspot.com/2019/01/how-to-open-existing-php-project-in.html
Just copy this template nbproject folder from the archive nbproject.7z to your target folder. After it, you can open folder as NB project. It is just minified NetBeans 8 project definition.
Base64 7z data uri copy