Upgrading STS with all plugins and settings - eclipse

I was always disappointed when I have to update Springsource Toolsuite (would also apply to Eclipse, but I never had so much update issues with it), because it takes a rather long amount of time and update function inside of STS doesn't work that well. For example it was not possible for me to upgrade from 2.9.1 to 2.9.2, so I was forced to a reinstallation. In this question I want to show how I do this and I am hoping to get some feedback to improve this process:
I always ensure that I have this plugin installed from the market: P2 Installation Replication. It allows me to select and dump all my plugin info into a single XML file. So I start the old version of STS and dump my plugin list to a file with date in the file name to have different versions.
Then I close STS and rename the root directory to something like "springsource_old"
I download the new version as ZIP file and extract it in a single directory.
I use Lombok, so I download it and doubleclick on the JAR to install it for the chosen STS install location. Normally Lombok finds the installation if you stick to C:\springsource\.. or similar default locations.
Next I update the STS.INI file to force STS to use a specific version of the Java SDK with the -vm flag. If you have a lot of eclipse workspaces to manage it is also helpful to have them shown in the title bar of the window. So I include -showlocation in the INI file. It doesn’t have to appear first, just before -vmargs so that it doesn’t appear to be a JVM argument.
Then I start STS, choose the first workspace and close it again. This generates some preference files. What I want to have is the list of all workspaces. STS (Eclipse) is storing the workspace information in a preferences file called "org.eclipse.ui.ide.prefs".
This file is located under "%ECLIPSE_HOME%\configuration.settings" and contains a key named "RECENT_WORKSPACES". So open the file in the backup location, copy the entries, open the new generated file, and copy the settings into it. The next time I start STS, I can choose between all previous used workspaces again.
Even when no plugin is installed, STS (Eclipse) can natively open the files with the dumped plugins from step 1 (Import - Install - Install Software Items from File). It also allows to fetch the latest version instead of the version which was saved in the XML file. So I select and fetch all my missing plugins.
What is still missing from your experience? How could I improve this process? It still takes some time.
Update
Can't be that I am the only one who has problems with updating STS. Today the update from 3.1.0 to 3.2.0 came and now my STS looks like:
So I still have the issue that after every major update STS is not working anymore.

What exactly was the problem that you had? In general, you should be able to upgrade from a point release to the next point release with no problems (eg- from 2.9.1 to 2.9.2).
There was a problem at one point, which prevented you from upgrading, but that is fixed now. See here: http://forum.springsource.org/showthread.php?126775-Cannot-update-Grails-Support-from-2-9-1-to-2-9-2&p=413794#post413794
If you are having troubles upgrading, please post to the STS forum and paste the error that p2 is giving you with your message.
Sometimes, when upgrading you can look at the error message and see what component is not being found. You may need to add a new update site or de-select an incompatible feature.

Related

Eclipse installation doesn't exist in Programs

I downloaded and ran eclipse.exe.exe for installation, but it doesn't get added to the Programs as an Installed software. I always get to locate the .exe and launch the IDE from there. Any thoughts why it doesn't get installed as a Program?
Eclipse doesn't work as a regular installation, but as an archive of related files, majorly because to create as much as a loose connection to the environment/OS as possible. Applications that are installed need to update data in OS registry and is therefore on some points restricted. In your Eclipse IDE you can specify own registries with data relevant for the project.
Another benefit is that it's easily updated and can also be easily shared between work stations without installation. That gives flexibility, if your workspace is corrupted, you don't need to uninstall, reinstall, restart and all that stuff. All you need is to take a back up of your plugins folder inside you Eclipse, and then discard the current directory, unzip the original download and replace your plugins with the backup. You are up and running on a new instance, no holds barred !!

Eclipse Crash "java was started but returned exit code = -805306369"

I'm aware there is an identical post here but none of the proposed solutions have changed anything and they are quite old (problems to do with Java6) and seem to be referring to a bug to do with Eclipse.
My problem is when I am developing in Eclipse for RCP and RAP Developers; either making changes to java files or changing dependencies etc, Eclipse randomly hangs and then freezes. I have to force close eclipse and I get this message
Things I have tried so far:
Restarted eclipse and PC
Added the -clean command to the very beginning of the eclipse.ini file
Created a brand new work space and attempted to develop in that
I'm running on the latest version of Java (1.7.0_13) and haven't got a clue what to do next.
The problem has happened 4 or 5 times in a number of different occasions:
When I have tried to add a new package to the src folder
When I have tried to add a class to a package in the src folder
When I have tried to edit a class in a package in the src folder
When using Ctrl+Space in a class in the src folder
Any advice/tips would be greatly appreciated! Need to get this problem sorted so I can get developing for my 3rd Year University Project :)
java was started but returned exit code = -805306369
is caused by Eclipse´s corrupted workspace, I solved my problem with these 3 steps:
1) Go to your workspace and rename it.
2) Start your eclipse and by default it will create a workspace.
3) Go to File -> Switch Workspace, choose your original workspace.
After a lot of researching and filing bug reports to no avail I tried one last clear out of Java and fresh installs of Eclipse to try and fix the error and it seems to have worked.
Here is what I did:
Un-installed Eclipse for RCP and RAP developers
Un-installed Java from my PC and deleted any old Java folders that were left behind (I didn't do this in previous clear outs so maybe there was an old version of Java messing something up)
Did a fresh install of Eclipse for RCP and RAP developers and a fresh install of the latest Java
I also deleted my old PATH variable for Java in Environment Variables and put the new one at the front of all the other entries
This seems to have fixed the error for now so hopefully it won't be a short term fix
I opened another instance of eclipse and it prompted me to choose a new workspace. I did so and there it was resolved. Then I closed the new workspace and resorted back to old workspace as usual.
If using Maven projects, check pom.xml, this may corrupted. Mine resolved by fixing pom file.
java was started but returned exit code = -805306369 caused by Eclipse´s currupted workspace, I solved my problem with this 4 steps:
Close Eclipse.
Kill the adb from task manager.
Start Eclipse and by default it will create a workspace or start with new workspace.
Go to File -> Switch Workspace, choose your original workspace.

Can't get GNATbench working with Eclipse

I'm trying to get the GNATbench plugin to work with Eclipse. I put the plugin and feature files in the correct places. I restart Eclipse and I am now given the option to create a new Ada project but when I try to do it I get this error:
The selected wizard could not be started. Plug-in com.adacore.gnatbench.cdt was unable to load class
com.adacore.gnatbench.ui.internal.wizards.NewAdaProject. An error
occurred while automatically activating bundle
com.adacore.gnatbench.ui (235).
Any idea what is causing this?
This is the issue you'll see if you attempt to use GNATbench with the 64-bit version of Eclipse. As the system requirements note in the readme, it's only compatible with the 32-bit version. I just did a quick test, which confirmed the issue.
I checked the README file of this plugin, it says this is required:
"C/C++ Development Tools (CDT) plug-in for Eclipse 3.5.x or 3.6.x"
Have you installed that?
The other important thing is that the downloaded archive file is actually a P2 repository installable file. In this case I would unzip a new eclipse (or remove manually the related plugins you copied over, this is the hard way), start it, click on help/install new software, click add, select archive, point to your downloaded GNATbench zip file, select the 2 features appearing on the avail "software" list and continue the wizard normally (next, finish...). If there is a version problem the wizard should "validate" it.
There was a plugin for Ada called Hibachi, IIRC... I'm not sure where it stands on development or completeness though.

How to manually install software/plugin to Eclipse IDE?

I have downloaded a RAR file from the following location, to be (manually) installed to Eclipse (Helios). How can I perform the manual installation?
http://sourceforge.net/projects/eclipsesql/files/SQL%20Explorer%20RCP%20%28exc%20JRE%29/3.6.1/sqlexplorer_rcp-3.6.1.macosx.cocoa.x86.tgz/download
Instead of putting it directly into the plugins directory, it's better to use the dropins directory as this was created just for this purpose. Have a look here: http://wiki.eclipse.org/Equinox_p2_Getting_Started#Dropins
For sqlexplorer: do not download the full RCP version (as your link does), this one is standalone. Get this one instead: http://sourceforge.net/projects/eclipsesql/files/SQL%20Explorer%20Plugin/3.6.1/sqlexplorer_plugin-3.6.1_SR2.zip/download
Extract this to $eclipse_home$\dropins\sqlexplorer and restart Eclipse.
BUT: Using the SqlExplorer Update Site (http://eclipsesql.sourceforge.net/) would be an even better option (Help>Install new Software)
I have tried the installation with the explanation about the dropins folder and had to tweak it like that:
Unzip the distribution into your eclipse installation directory under the folder dropins. Your structure should be:
eclipse/
dropins/
eclipse/
features/
plugins/
Remove all other files and directories. There is some missing piece (file contents.xml), so that the distribution is no real p2 repository which leads to an error. The directories plugins and features are sufficient.
Restart your eclipse (I have done it with option -clean, not sure if that is necessary).
SQLExplorer is then installed and visible in the help, in different menus and with a new perspective.
I even was able to use it to have a look at my SQLite3 database of a rails3 application. Wow!! So I will give it a try.
From their website (http://www.sqlexplorer.org/):
Eclipse Plugin
Download
Download the Eclipse SQL Explorer plugin and extract the zip file in your eclipse directory (requires Eclipse 3.3 or better).
After restarting eclipse with the -clean option, a new SQL Explorer perspective should be available.
Eclipse Update Site
You can install and update Eclipse SQL Explorer via the eclipse update mechanism. The update site for Eclipse SQL Explorer is http://eclipsesql.sourceforge.net/
I always go for the update site option if they present it, it's easier and lets you do updates easily. To use the update mechanism just select Help > Insall New Software... then enter the update site, press Add and go through the wizard.

What are some RCP Deployment Options?

We have an RCP application and we are looking for a better way to do installation/updates. Currently to install, they just unzip a zip file. The zip file also contains scripts in it that are not java code. We were running into some bugs when updating if they don't first delete the old folder that was previous unzipped. The issue with deleting the folder is that the user loses the plugin preferences that were set. The installation would also need to register a COM server. The update would have to update the plugins and also replace the current script folder. What are some of the best options that could be used for installing and updating rcp apps? Thanks!
An option is to use the eclipse update mechanism. In this case the user would simply update like in the eclipse ide using help->software update. I have not used it myself yet ,but I have visited a tutorial from kai tödter, just google "eclipse rcp adanced kai tödter" und you will find some stuff, e.g. slides where he explains the updated mechanism as well as an example project "MP3 Manager" where you can find an example