how to get eclipse show a folder from file system - eclipse

i need to see a folder (svn) from file system in eclipse (is there a file explore functionality). how to achieve that?
i don't want the folder to be nested in a project. In best case eclipse links that folder to svn repository like all other projects.

There is a Remote Systems View that offers access to your file system.
Window -> Show View -> Other... -> Remote Systems -> Remote Systems

Eclipse: File -> New -> Project -> General -> Project ->
Untick 'default location'
Set location to the folder where your files reside you want to browse.
After pressing 'Finish' an Eclipse project is created showing all files residing in your folder
(because: creating a Eclipse project into an existing folder does not purge the files therein)

Eclipse is project-centric, it will not show files or folders that are not part of a Project. You can create a link to any arbitrary location on your file system, but the link must live in a Project.
The closest thing I know of would be to install the Remote System Explorer (RSE, see http://www.eclipse.org/tm/), which offers a Local node in its Remote Systems view. But I doubt it has any integration with svn.

open the Navigator view.... that is a view on the filesystem.

You can also create a folder that is a link:
File -> New -> Folder -> Advanced (button) -> "Link to alternate location".
Generally I use it to link to my localhost server (container).

You can also alternatively right click on the file, which you want to open, you will see there Show in Remote Systems view. I do not know, if it is in other eclipse versions possible but I am making it with Eclipse Mars 4.4.

If you are using git, you can open Window > Perspective > Git. That will give you a Git Repositories explorer, which shows the Working Tree. The Working Tree will show all files in the filesystem, even temporary ones you created that are not added to git yet.

Related

Eclipse projects are not visible in workspace folder

The weird part is I can see my projects through package explorer.
I can also export them.
But when I want to access them elsewhere e.g windows explorer, they are not there.
All I see is .metadata folder.
An unexpected shutdown of the system occurred not too long ago.
Edit: When I switched the workspace, created and opened a project, they're still not visible/accessible outside of the eclipse project explorer.
Any ideas?
You most likely haven't ticked "Copy projects into workspace" checkbox option.
File -> Import -> Existing projects into workspace:
It is possible that the projects were not put into the default, workspace folder.
To check this, right click on such a project, select Properties (it is usually available at the bottom of the list), go to the Resources tab, where you have the location of the project files displayed.
Obviously, there is a problem with Windows explorer and OneDrive in particular.
When I navigate to C:/Users/username/OneDrive/Documents/workspace or through command line I do see my eclipse projects.
But when I try to use 'Open file..' option from any application or navigate through Windows explorer, projects are not recognized nor displayed.

Eclipse and SVN import a existing folder that has been SVN checked out

I have a folder (it also has subfolders, containing many java files) on my local hard disk.
This folder was checked out from my svn repository. I can do all the svn commands in that folder.
Now i am using Eclipse, is there a way for me to "import" that folder, and so that for all the changes I made in the Eclipse editor on those files will be reflected as well?
My question is same as How to import an already checked out svn repository into Eclipse?
BUT, the answer, I am not able to get, such as "import..." then "share...", can someone please elaborate these two steps?
If i do "import..." -> "General" -> "existing project"
BUT i don't get it, the folder i want to import is NOT an ECLIPSE PROJECT, so should i still go with this route?
or should I do "Import..." -> "General"-> "file system"? but it requires me to create a project first in eclipse, so i don't think i should go that path
here is what i awant to archive at the end
1. For the folder i want to import, i want to be able to do all the svn stuff, such as commit, update,etc
2. the file i edit in the eclipse, should be the same file in the folder i checked out from svn
please help....
"import..." -> "General" -> "existing project" (Browse for the project which u have checked out into ur local hard disk)
then in that window down there is a checkbox to select "copy projects into workspace" => uncheck this option.
this will have project in Eclipse and local existing folder that has been SVN checked out where u can
1. For the folder u want to import, u want to be able to do all the svn stuff, such as commit, update,etc
2. the file u edit in the eclipse, should be the same file in the folder u checked out from svn.
cheers.. this will work!!
For anyone that has tried all of the suggestions dealing with importing projects and find that it still doesn't work, you may have a mis-configured connector.
Go to Window -> Preferences -> Team -> SVN -> SVN Connector. Make sure the version of the SVN Connector matches the version of SVN you have checked out the code with.
For example, if your connector is configured for svn 1.7.x, and the source is checked out with 1.8.x, then Eclipse will not recognize your SVN repository. If you don't have the right SVN Connector version installed and can't convince Eclipse to install it automatically, you might want to go to the SVNKit web site for further instructions.
Once you have the proper SVN Connector specified, go back and try to Share Project (or Share Projects), or remove and re-import the existing projects.
I was able to "import" a folder without .project-file:
File -> new -> Project... -> General -> Project
Then you have to chose the Location (untick "Use default location" and press the "Browse..." Button):
Press "Finish" and you get the Project in eclipse with SVN History. Also eclipse adds the ".project" file.

How do workspaces work in Aptana 3?

I'm new to programming and IDEs. I never understood the concept of a workspace in Eclipse, and I don't understand it in Aptana.
With Eclipse I just put it into my web root. Not sure if that's the way to go?
Can someone explain what a workspace is and where it should go? And if not in the web root, then how do I launch a PHP page from within the EDI?
Thanks!
An Eclipse workspace is a directory where (generally) all of the files you are working on live and that stores all of the state (like preferences and such) for a single user of Eclipse. So when you create projects, they are located in the workspace. The workspace has some metadata files that control how Eclipses behaves for you.
Eclipse keeps a representation of the workspace internally, which means the workspace can get out of sync with the underlying files. To sync them up, do a right-click Refresh in the Package/Project Explorer.
Usually the workspace goes into some directory relative to your home directory, since it's private to each developer.
Workspaces are like folders where the project's files are.
When you have a local web server you could set the workspace to a new folder in the servers directory (or web root when the project should be in the main directory!) . If you want to add a new PHP-file in Aptana studio 3 just right click the workspace and select add new file (or sth. like that). After that you will be able to enter a file-name and it's gonna be saved in the workspace (folder). But of course you can also work without workspaces, just create the the PHP-File and edit it with Aptana.

Where are projects stored in Eclipse?

The Project Explorer is able to list all projects in Eclipse. I am wondering where the project information gets stored?
The projects can be found under the .metadata directory of your workspace:
[eclipse-workspace]/.metadata/.plugins/org.eclipse.core.resources/.projects
Each project contains a .location file (in binary format) which presumably tells eclipse where the project is located on the filesystem, if it has been imported.
By default projects in Eclipse are stored under your workspace. You get asked where your workspace is created or which one to open whenever you open Eclipse, but you can configure it to not ask you again.
If you configured Eclipse not to ask again, then you can go to General -> Startup and Shutdown -> Workspaces in your preferences and check "Prompt for workspace on startup".
That page also lists your recently used workspaces (with probably just 1 entry, if you never explicitly specified a different one).
Note that you can also create projects that are located outside of your workspace, by explicitly specifying a separate location per-project.
Browse over to your workspace folder. You will see a folder for each project.
(Don't know where your workspace folder is? Try File -> Switch workspace... and it will give you the path.)
In Windows, usually C:\Users\%USERNAME%\workspace
Where %USERNAME% is the username given to your computer. eg. john
You can paste the above path in Run(Windows + R) window and it will pick the username automatically for you though.
For Eclipse Kepler SR2 on Windows 7
The easiest way to retrieve general info about a project (e.g., its location), see the following:
go to your "Package Explorer" view;
right-click on your project top-hierarchy folder;
choose "Show In" -> "Properties";
and you'll get the list of properties for that project in the "Properties view". Location of project will be in there.
On a Windows PC, you should be able to find your projects under C:\Users\yourname\workspace\. If you're on Linux, it should be under /home/yourname/workspace/.
I used the "Try File -> Switch workspace" suggestion which works but also re-installed Eclipse 0_0

Moving project to another folder in Eclipse

I generally have my working projects sitting on folders on my Desktop. When they are completed I just move them to a c:\dev\. The thing is I'm doing it in a rather archaic way.
1. move project files
2. delete project on Eclipse
3. create new project on Eclipse on the new location
How to you guys move projects around?
If I could alter the: File -> Properties -> Resource -> Location path it would be dead simple!
Example move:
c:\user\desktop\project_123
c:\dev\project_123
Right click on the Eclipse project in the Package Explorer, select Refactor, then select Move... In the dialog that comes up, enter or navigate to the new location and click OK. This will also preserve your CVS or other SCM metadata, but will also bring all your modifications as well, and you won't lose any memberships in Working Sets, launch configurations, or other things that Eclipse associates with your project.
Use Eclipse's Move menu item
Open Navigator view, right click on your project and click Move. Then select the destination directory.
Navigator View > Right Click > Move
Note it doesn't seem to work in Package Explorer (at least not in Neon). The move dialog from Package Explorer is different, so use the Navigator window.
I don't know whether eclipse has made modifs since the date of this post...
In my case I had moved a project folder manually and I wanted Eclipse to open the project on this new location. This is what I did (and it seems to work).
(I'm using eclipse "helios" v 3.6.2)
File menu | Import ...
General | Existing projects into Workspace
Select root directory = top directory of your project on the new location
Finish
I rarely have any projects in Eclipse that aren't under source control, so all I would need to do is check the project out in the new location.
If you don't have source control, Eclipse works with CVS rather well out of the box, and it's pretty simple to setup CVS to run locally without a server: http://www.tortoisecvs.org/faq.html#cvsinit
WHEN EVERYTHING ELSE FAILS:
Copying an Eclipse project from one directory (let's call it old_dir) to another directory (let's call it new_dir):
Open Eclipse and specify the copied working directory in your new_dir.
Once it opens the project in the this new_dir, the projects listed under Project Explorer Tab might still be the ones contained in the old_dir (you can check it by right clicking each and following through: "Resource -> Linked Resource" to see the Path Variables values). Thus, they have to be removed from this work space. Delete the Nios 2 Application Project and the BSP Project from the Project Explorer Tab by right clicking on it and selecting Delete option which will pop a new window. In the pop-up window, make sure that the Delete project contents on disk check box is UNCHECKED before clicking OK to delete the Projects. Otherwise, it will delete it from the old_dir where you copied the project from.
Right click in the Project Explorer Tab Area → Import → General → Existing Projects into Workspace and add the copied Nios2 Application Project and the BSP Project from the new_dir.
Right click in the Project Explorer Tab Area → Index → Rebuild, otherwise the Nios2 Application Project will not be able to use the includes provided by the BSP Project.
Click on Project → Clean → OK to clean and rebuild the whole project.
When using console to talk to the NIOS, make sure elf's path is updated to the new project directory as well!
Right click on your project->copy.
right click in project explorer free space and right click->pase.
chose new folder and project name.
I copied the whole project to a new directory. After setting Eclipse to the new workspace it recognises the project instantly. Thus it was nothing further to do. I use Eclipse IDE for C/C++ Developers, Version Luna Service Release 2 (4.4.2).
For Eclipse Oxygen, to move a Java project, djb's accepted answer works well (in my experience just now), except having read comment by Basic May 14 '12 at 9:27, I tried to add my project XMLDiff to C:...\SVN\trunk\Internal Projects, and I got a failure with the rather cryptic message:
Problems encountered while moving resources.
Resource already exists on disk.
I had to move the project to C:...\SVN\trunk\Internal Projects\XMLDiff by creating a new folder, XMLDiff, in the browse dialog, and the result was C:...\SVN\trunk\Internal Projects\XMLDiff, not C:...\SVN\trunk\Internal Projects\XMLDiff\XMLDiff.
So this must have changed between Basic's experience in 2012 and Eclipse.3.
For Eclipse Oxygen
Project Properties -> Resource -> Linked Resources -> Linked Resources (Tab)