Putting eclipse under version control - eclipse

I'd like to put the entire eclipse IDE (indigo) under version control (for us that would be SVN) to allow developers to checkout the entire IDE ready to go with minimum environment configuration. Did anybody try this? Would this cause problems with actually USING SVN in eclipse?
I could check it in and have users export it, but that would make it trickier to keep it updated.

I went with #BenjaminLinus approach, get an eclipse, add all the plugins, set up our app's environment specific stuff, zip it up and check it in.

You can... but why? It is just easier to have it in a shared drive for install. You don't need to track version of eclipse.

Related

Any netbeans plugin that would log file changes?

I would like to maintain a log of changes made to all files of a project while working in a Netbeans session. This would be useful to undo/review changes made while debugging the project.
Is there any plugin that would maintain a log of such file changes ?
I use Netbeans 7.2. for Java Projects.
I would suggest you use a real version control system. There are plugins for NetBeans. I've yet to see some automated system appropriately handle the task of source code change tracking.
If you want it for quick/temporary use:
Download and install Netbeans plugin 'Local History' through Tools->Plugin. After you reload your IDE and save a file multiple times, you'll be able to see a History view for your file. You can see differences between the revisions, restore etc.
If you want maintain revisions and permanent use, I would recommend using "git".

Unable to install updates or plugins in Eclipse

At work we use Adobe Coldfusion Builder and got no problem installing plugins like MercurialEclipse. But at home I would like to use Eclipse itself, but am running into many many problems. When I try to contact http://cbes.javaforge.com/update it just says "Unable to read repository at http://cbes.javaforge.com/update/content.jar. Installing updates result in an endless ...pending...
What is going wrong here? I thought it would be the firewall. Turned it off, no succes. Tried reading all the articles about this problem, could not find my solution there as well.
Hopefully someone can pinpoint me to the right direction.
Thanx!!
Maarten
Are you using a different version of Eclipse? Try opening the transfers tab before you update and seeing if it's blocking on something like downloading content.jar. If so, the problem is that the repository only supports classic update sites, while Eclipse is only using p2.
As to solving it... I noticed this wasn't working on very recent builds of Eclipse. According to docs, classic is still supposed to be supported. I don't know if this is a change in behavior or a bug. Workarounds would probably be using an older Eclipse, switching to classic updates in Preferences, General/Capabilities, or possibly placing the plugin's zip in the eclipse dropins folder (eclipse/dropins).
I haven't tried these, but the Preferences seems most likely.
I'm using Eclipse 3.7 build I20110526-1708.
Edited
Yeah, you can tell that it's a p2 problem: http://cbes.javaforge.com/update/content.jar is a 404, while http://cbes.javaforge.com/update/site.xml works fine. site.xml is the classic update mechanism.
According to the wiki:
However, users will rarely have a need for enabling Update Manager, because p2 is able to install from any update site that was designed for Update Manager.
I just tried this out myself, and can verify the Capabilites workaround works: After enabling it, go to Help>Software Updates>Find and Install. Click Search for new Features to install, and add your site as a remote site.
It should successfully find the provided features.
As listed on the wiki, this is a workaround, and shouldn't normally be used. I'm not sure why it's necessary; I couldn't find information about it myself.
As for the dropins dir, I made a mistake: it should be a jar file, not a zip. The plugin's jar, which can be found by looking through the site.xml file. This is probably a worse workaround than the first, though.
It may be proxy related issue. Go to network connections preference page and in active provider select manual. Then select HTTP, click on edit and then provide the necessary details. Do the same for HTTPS also in the preference page. Then close the preference page and try again. It should work.

Putting a project in Eclipse under source control

I'd like to know a step-by-step procedure for a noob on how to create a hello world project in Eclipse that is Subversion/Mercurial/Git integrated. I know this is easy, but I am unsure how to do it.
I've:
downloaded helios and put it on a local folder.
created a new java project on directory "C:\workspace\tests".
added a new Main.java file with a hello world message as it contents. The full filename is "C:\workspace\tests.java".
now I'll want to change the "hello world" message to "bye world", but I'll want to be able to revert back to the previous message if needed. I need some kind of version control!
What are from this point on the baby-steps I must following to have this already created project and its files under subversion / git / mercurial version control? This shouldn't be about more complex matters, only how to add a simple existing project to source control on our own machine through eclipse!
Put the links to all the software that'll have to be installed, if you please. This is supposed to be a tutorial for total noobs at version control.
edit: i don't know how to make this CW. Could anyone do that?
First you need the appropriate provider installed for your versioning system.
Then the first step from there is right-clicking on the project you want to put under version control, and choosing Team -> Share. What happens then is provider-dependent.
Subclipse is a great plugin for Subversion.
Subclipse.tigris.org
You will need an existing Subversion client to use it.
I will assume you are using Windows based on your drive letter. Tortoise SVN is another good tool that you can use in Windows Explorer rather than inside of Eclipse. This is a more universal approach to Subversion.
tortoisesvn.net
I would personally recommend Git for version control, but I don't know of any good Eclipse plugins for it off the top of my head.

svn command line from eclipse

Hello is there a way to use svn command line from eclipse?
Within eclipse in my project browser i can righclick and then click team and than i have something like svn. Not sure which plugin it is. But it doesn't have button's to for example ignore files for uploading. That's why I want to to it command line. And my question is how to do it.
Ok so how can I use it from command line in windows xp?
The plugin you are probably using is Subclipse. It should have an "Add to svn:ignore" option. If not, try updating to the latest versions of Eclipse and Subclipse. In general subclipse should be enough and there is no need for the command line.
For Windows XP I recommend Tortoise SVN. It integrates with the Windows Explorer and offers you a graphical environment for all your needs. I would say that is much more stable than subclipse and very easy to use.
If you do want to use the command line tools, download and install svn-win32 from here. The command line tools could be helpful in merge and copy operations.
I should also point out that none of these methods interfere with each other. You can work with Tortoise SVN or the command line and subclipse won't be affected. All svn clients work by writing and reading from hidden directories called .svn. There is one such directory in every folder under source control. As long as the svn client software is of the same version, an svn client can write to these hidden folders and another one will be able to read from it. A problem could arise if one of the clients is updated to a version that uses a different protocol for writing to the .svn folders. In that case, older clients won't be able to read the information stored there. Upgrading them to the latest version will solve the problem.
Not sure what you're trying to do; sometimes it's better to describe the goal rather than the means you plan to do it.
Have you tried Subeclipse? It lets you use SVN inside Eclipse; it's great.
I'm not sure if you can use it from Eclipse, but nothing stops you from just using it. From cmd / xterm / whatever. It's not going to interfere with Eclipse in anyway, nor will it interfere with Subclipse (which I'm assuming is what you're using).
I'm using subclipse, and in generaly it works pretty well.
However, and I guess this is your problem, the Team Synchronization by default wants to add all files in my projects, not just the ones I add to version control. This is lame and frustrating, and apparently there's no way to turn it off. Screenshots for older versions, however, hints at the possibility of turning the "feature" off. Frustrating!
I'm not personally a fan of Subclipse - it slows the IDE a bit too much for my taste. Here is an alternative approach using External Tools and TortoiseSVN
Create a new External Tool
Call it SVN Commit
Set the Location to \bin\TortoiseProc.exe (mine is C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe)
Set the arguments to /command:commit /path:"${selected_resource_loc}"
Open the file / directory you want committed and run the external tool.
Interchange the commit in step four for additional commands. You can also add the specific tools to favorites and have them in a dropdown on the toolbar.
Additional Arguments Here
Not intended to be too presumptuous here, but I think you should look at whether Subversive or Subclipse actually solves problem in a different way than you intended. For instance, it is very much possible to ignore files and directories from being checked in, via Subclipse.
On the other hand, if you really want to hack away via the command prompt from Eclipse, you must install the Target Management project (supported for Eclipse Europa and Ganymede). Once you have that installed, you can launch a remote shell to your local machine and then type away on the command line :).
PS: I haven't used this approach ever; Subversive satisfied all my requirements of a SVN plugin in Eclipse.

How do I configure Eclipse to work on Qt-based applications in a subversion tree?

Most of the work being done at my company is Qt-based C++, and it's all checked into a Subversion repository. Until now, all work on the codebase has been done purely with nano, or perhaps Kate. Being new here, I would like to take advantage of setting up Eclipse -properly- to edit my local copy of the tree. I have the CDT "version" of Eclipse, and the Qt integration, and the Subclipse module. At this point, though, I don't know what to do. Do I "import" the projects into an Eclipse-controlled workspace? Do I edit them in place? Nothing I've tried to do gets Eclipse to recognize that the "project" is a Qt application, so that I can get the integration working.
I would create a new QT project in eclipse, then switch perspectives to subclipse and simply do a SVN checkout into the new eclipse project. You should be good to go.
OK, I've been playing around with this idea, and it has some merit. I can switch to the "SVN Project Exploring" perspective (which I hadn't noticed before), and do a checkout from the head of the sub-project I want. I get a nice SVN-linked copy of the tree in my Eclipse workspace for editing. Eclipse even "understands" the classes, and can do completion on methods and such. However, I still can't get Eclipse to understand that the project is a "QT Gui" project, such that I could view the properties, and control the linking of the various Qt libraries and the like. By extension, it also doesn't understand how to build my project, like it would be able to do if I had created an empty Qt Gui project from scratch. How do I get this part working?
I have exactly the same situation at work (with CVS instead of subversion and the rest of the team using KDevelop but that's no big deal). Just start a new Qt Gui project using the Qt - Eclipse integration features and then remove all the auto generated files. Now using the "Team" features of eclipse and choose to share your project, enter the path to the repository and you 're good to go.
Checkout the project. It will ask you some options like if you want to start with a blank project, or want to use the tree to make a new project. Choose the latter and you should be ok :). It seems to work for me with Ganymed and subversive(not sure about subclipse and i don't remember.) :)
The only way I could get this to work was to check out the project with eclipse and then copy over the .project and .cdtproject files from another Qt-project. Then do a refresh on the project. This is a horrible hack but it gets you started.
You might need to define another builder for 'make'.
Second nikolavp - Checkout, and mark the option to use the new project wizard, then select Qt project. I've done this (with ganymede) and it successfully finds everything and builds correctly.
My solution:
go to the svn-view and add the repository location for your project
check out the project some temporary location with svn or any client you like
choose 'File->Import...' and say 'Qt->Qt project'
browse to the location of the *.pro file, select and hit the OK-Button
you are in the game with an appropriate Qt-project and Subversion Access for that project
I would say the same as the last one,
but instead of the two first steps I would set up the Qt-Eclipse integration:
Qt-Eclipse integration before looking for the *.pro file.