Why is my Eclipse workspace unstable and how can I fix it?

The Eclipse workspace may become unstable over time and must be cleaned or replaced.

Symptom

The DITA CMS Eclipse Client repeatedly becomes unresponsive or the plugins stop working reliably.

Problem

Over time an Eclipse workspace may become unstable as plugins are added, upgraded, or removed. This instability can cause plugins to malfunction such as causing searches or autocomplete to fail.

Solution

You can try the following procedures one at a time and test in between each one to check if the problem is resolved:

  1. Clean the Eclipse caches
  2. Create a new workspace
  3. Reinstall Eclipse

Clean the Eclipse caches

Using the -clean argument forces Eclipse to reinitialize the caches, which removes all cached data used by the OSGi framework and Eclipse runtime. This should restore workspace stability.

To use the -clean argument, perform one of the following procedures:

Method Procedure
Edit the eclipse.ini file
  1. Open the eclipse.ini file located in the Eclipse installation directory. For example, in C:\eclipses\eclipse-SDK-4.3.2-win32-x86_64.
  2. Add -clean to the end of the first line in the file.
  3. Save the file.
  4. Restart Eclipse.
  5. Delete -clean from the file.
  6. Save the file.

For example:

-clean
-startup 
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20140116-2212
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Xms256m
-Xmx1024m
-Dixia.level=DEBUG
-Dsun.java2d.d3d=false
-Dosgi.requiredJavaVersion=1.6
-Dosgi.bundlefile.limit=1000
-Djava.security.krb5.conf=krb5.ini
-Djava.security.auth.login.config=login.conf
-Ddita.cms.mode=STD
Edit the Eclipse shortcut
  1. Right-click the DITA CMS Eclipse shortcut.
  2. Click Properties.
  3. In the Target box, add -clean to the end of the target statement. For example,
    C:\eclipses\eclipse-SDK-4.3.2-win32-x86_64-test-4.2\eclipse.exe -clean
  4. Click OK.
  5. Restart Eclipse.
  6. Delete -clean from the target statement.
Create a batch or shell script Create a batch or shell script that calls the Eclipse executable with the -clean argument.

Create a new workspace

If the -clean argument did not resolve the issue, then you need to create a new workspace and import your preferences and projects into it.

To create a new workspace:

  1. Export your preferences from the existing workspace:
    1. Open the DITA CMS Eclipse Client associated to the workspace that is unstable.
    2. In the main menu, click File > Export
    3. In the Export window, click General > Preferences.
    4. Click Next.
    5. Select Export all.
    6. In the To preference file box, type the path and file name where you want to save your preferences file or click Browse to choose a location.
    7. Click Finish.
  2. Create a new workspace:
    1. In the main menu, click File > Switch workspace > Other.
    2. In the Workspace box, type the path to your new workspace or click Browse to choose a location. The Eclipse Client will restart with the new workspace associated to it.
  3. Import your preferences:
    1. In the main menu, click File > Import.
    2. In the Import window, click General > Preferences.
    3. Click Next.
    4. In the From preference file box, type the path and file name where you saved your preferences file or click Browse to choose the location.
    5. Select Export all.
    6. Click Finish.

Clean reinstall of Eclipse

If creating a new workspace did not resolve the issue, then you need to reinstall Eclipse. A broken Eclipse installation is usually caused by using incompatible versions of plugins with the wrong base version of Eclipse. Do not delete the old installation until your new installation is sufficiently tested and you are confident in it. If you do not know how to reinstall Eclipse, please contact your DITA CMSDITA CMS Administrator.