Eclipse SVN Check Out Multiple Folders to 1 Project - eclipse

Is it possible to checkout several directories into one project in Eclipse?
I have the following directory:
JS
app
css
icons
I want to check out js/app and js/css into one project.
I've been looking everywhere but can't seem to find an answer.

I don't think, it is possible. But you could checkout the whole directory, and ignore the icons directory. Depending on the language you are using and the perspective, there is sometimes the notion of a "source folder". You can then mark app and css as source folders (so they stand out in Eclipse and are clearly separated from the rest). Could you add the distro you are using (Standard Java, Java EE, ... )? And could you please add information to the subversion client you are using: Subversive, Subclipse, or svn cmd client or TortoiseSVN?

Related

How do I start using source control with an existing project?

So I'm working on my first website in Eclipse. It is very simple only shows some text and an input box currently that does nothing, all this eclipse stuff is in my project folder. I've set it up to use Apache Tomcat 9 which is also in my project folder.
Now I think that I shouldn't just push my top level project folder as if I do this, everytime I open up the project in Eclipse, Sourcetree will show 50 or so files modified (.metadata files and such), so I'm guessing that I shouldn't have pushed these to start with.
I've since reset all my commits and am now wondering which files are necessary to upload to github?
You should add all source files to git: the actual code that runs your site (PHP, JavaScript, HTML, whatever it is), along with things like CSS. Don't include config files or files auto generated by the IDE (Eclipse in your case). You can use a .gitignore file to tell git not to pay attention to certain files, types of files, or directories. A guide to .gitignore files can be found here.

How do you make linked resources in Eclipse metadata system-independent

I use eclipse to develop my project, with git. I use 2 different system : Windows and Linux. Sometimes I work on Win, sometimes on Linux.
In my project I have a linked resources to a Google Drive folder.
On windows, the folder is D:\GoogleDrive and on Linux /mysuer/GDrive.
I configured the linked resources under windows. So in my .project I have a direct reference to D:\GoogleDrive\myfolder.
So, if I commit the .project, when I checkout under linux, I will have the path relative to windows.
I think may be I can ignore the .project but I don't know it is really better. What I risk to lose ?
What do you do yourself ?
Thanks
If you don't generate the project files and do settings that you want the same on all development machines like code style settings and so on, it is perfectly valid to check in the IDE metadata.
You should just leverage the Feature "Path Variables" that is provided by IntelliJ IDEA and now also Eclipse: http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Fconcepts%2Fcpathvars.htm
You then just set this path variable in your local Eclipse workspaces and define your linked resource relative to this path variable as the linked doku describes.

Use eclipse as svn client

Running OSX.
I have used eclipse for years as a Java developer. I am now messing with all kinds of new technologies but still find myself using svn (don't ask its not my descision). Anyways I don't really like SVN command line as I find it almost impossible to sort through merge conflicts.
With that I was thinking about using eclipse (w/ subclipse plugin) as my SVN client whenever I need to do SVN type things. The one problem that I have found is that eclipse loves to create a .project file. I would never want to check this in as no one else is using eclipse. I know that I can add it to svn:ignore, but that has to actually commit that ignore to SVN as well, which I do not want to do either.
Anyway to create eclipse projects without the .project file. I know sounds dumb because I am sure that eclipse needs the .project file for all its projects. Would be nice just to create an SVN project (not Java project) and have eclipse leave off any other crap.
ideas?
There is no way to create an Eclipse project without the .project file (at least none that I know of), but you can tell Eclipse which files to ignore, as well.
Just go to Preferences -> Team -> Ignored Resources and add the pattern .project.
This setting is purely Eclipse-internal and does neither affect your global svn-ignores (defined in ~/.subversion/config) nor will it add any files to the repository.
Also, when checking out folders from SVN using Eclipse, make sure to create a General Project, not a Java Project, so the .project file is the only file Eclipse creates.
.project is actually not the only file that will be generated - depending on the "project natures" you add to a project.
To really separate the project from the source folders, you'll have to create the project in a separate folder - say the workspace - remove the original source folder and add the source folders as external links - see: Project Settings/Java Build Path/Source.

Eclipse and the SVN command line client

For a number of good reasons (I think), I find myself wanting to use the SVN command line client rather than the plugin for particular Eclipse-based Android project, and I'd like to verify some assumptions and observations I've made so far:
Don't check-in derivative folders such as: bin, gen, obj, and libs
Do check in source folders such as: assets, jni, res, and src
Do check in .project and .cproject configuration files
This leaves the question of what to do with .classpaths and .settings? Although I've seen some recommend that I don't, I currently do check in .classpaths but not .settings (just discovered it - I'm an Eclipse noob). Any advice from people who've found themselves needing to use SVN outside of Eclipse?
If you are using similar environments (like similar Windows 7 clients where everything is installed and organized in a similar fashion) you can add project specific settings (.classpath, .settings) to version control too. However if your project is checked out in different OS'es, then most probably you would want to keep them out of versioın control.
Eclipse can guide you to what to do. Import the project into SVN by using Eclipse plugin. Then you can switch to the command line tool on prepared repository.

Sharing eclipse project over SVN

We want to share an eclipse Qt project via an SVN repository.
Of course we need to share the .pro file of Qt to be able to build the project.
The problem is, that without the project files you can not handle the project in eclipse but we cannot use the same as they contain local references.
Also it would be nice to use the Eclipse SVN plugin to manage this.
I already tried to check out the project and create a Qt project on Checkout but this overwrites the checked-out project file.
Any suggestion would be appreciated.
These are some lines from the .cproject file that are autogenerated, so I can not change the absolute paths:
<storageModule moduleId="org.eclipse.cdt.core.pathentry">
<pathentry base-path="/usr/include/qt4" include="" kind="inc" path="" system="true"/>
<pathentry base-path="/usr/include/qt4" include="QtWebKit" kind="inc" path="" system="true"/>
...
There are 2 rules for Subversion (independent of Eclipse, should be the same all the time):
If the tool will regenerate a file, and you don't have to change it:
==> don't check it in your version management (may it Subversion, Git, CVS, ...).
If the file contains parts that are manually changed by a user
==> it should be checked into version management.
If you have the second case (not clear from your question), you should try to change the paths to be relative, so that others could use your project at the same location.
If you cannot change that, stick to the location in the file system. Every developer has to use an identical setup.
If you have to support different operating systems, and the files generated by the tooling are not compliant (shame on the tool makers), you should hold templates for all operating systems in your version management, and should initially (manually) make a copy, depending on the operating system you are working in.
If you have to change that file for some purpose, you have to change the templates as well and should remember that all developers have to make a new copy after that.
Sorry, I don't know Qt and have never developed in a C-environment on different platforms, so my tips are pretty vague.
Finally I found following solution:
No .cproject .project file in SVN!
Import the code files from SVN (also the .pro file for Qt)
Eclipse will ask you to create a project, so create a Qt Project with the same name (or some else, but you will then have to delete the files)
When the project was created, revert it (right MB on the Project in Project Explorer -> Team -> Revert) to the state of the repo checkout
Done, now you can work with the project